Lee-W commented on code in PR #72049:
URL: https://github.com/apache/airflow/pull/72049#discussion_r4013710772
##########
providers/openai/docs/operators/openai.rst:
##########
@@ -58,6 +58,54 @@ specify the OpenAI connection to use, and
``response_kwargs`` to pass through op
:start-after: [START howto_operator_openai_response]
:end-before: [END howto_operator_openai_response]
+Passing Responses API options
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+See the `Responses API reference
+<https://platform.openai.com/docs/api-reference/responses/create>`__ for the
authoritative list
+of parameters. ``response_kwargs`` passes straight through to the underlying
``create_response``
+call, so most keyword arguments the Responses API accepts can be set there,
with the exceptions
+noted below. Options worth knowing about:
+
+- ``background``: run the response asynchronously on OpenAI's side. See the
note below before
+ using this with ``OpenAIResponseOperator``.
+- ``stream``: return a stream of response events instead of a single completed
response. Do not
+ set this on ``OpenAIResponseOperator``: ``execute`` reads
``response.status`` and
+ ``response.output_text``, neither of which exists on the streamed response
object, so the task
+ raises ``AttributeError``. Stream responses from a ``@task`` using
+ :class:`~airflow.providers.openai.hooks.openai.OpenAIHook` instead.
+- ``store``: whether the response is retained on OpenAI's side, for example so
it can later be
+ used as a ``previous_response_id``.
+- ``reasoning``: reasoning configuration for reasoning models.
+- ``service_tier``: currently one of ``'auto'``, ``'default'``, ``'flex'``,
``'scale'`` or
+ ``'priority'``, selecting the processing tier the request is served from.
+- ``prompt_cache_key``: an identifier used to route requests to the same
prompt cache.
+- ``safety_identifier``: a stable identifier for the end user, used for safety
and abuse
+ detection.
+- ``truncation``: one of ``'auto'`` or ``'disabled'``, controlling whether the
model truncates
+ context that exceeds its window.
+- ``include``: additional output fields to include in the response, such as
encrypted reasoning
Review Comment:
Both bullets now name the mechanism rather than pointing at the hook and
leaving it there.
--
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]