Lee-W commented on code in PR #74450:
URL: https://github.com/apache/airflow/pull/74450#discussion_r4227196580
##########
providers/common/ai/src/airflow/providers/common/ai/operators/llm.py:
##########
@@ -197,7 +198,7 @@ def __init__(
model_id: str | None = None,
fallback_conn_ids: list[str] | None = None,
system_prompt: str = "",
- output_type: type = str,
+ output_type: OutputSpec[Any] = str,
Review Comment:
Change it to `type | UnionType`. The `:param output_type:` docs now describe
a single type or `A | B`. `Literal[...]` and `Optional[A]` still rehydrate fine
at runtime, but the annotation doesn't cover them — same as before this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]