Lee-W commented on code in PR #72151:
URL: https://github.com/apache/airflow/pull/72151#discussion_r4034504101
##########
providers/openai/tests/system/openai/example_openai.py:
##########
@@ -101,13 +101,26 @@ def task_to_store_input_text_in_xcom():
# [END howto_operator_openai_embedding]
# [START howto_operator_openai_response]
- OpenAIResponseOperator(
+ openai_response = OpenAIResponseOperator(
task_id="openai_response",
conn_id="openai_default",
input_text="Write a haiku about data pipelines.",
response_kwargs={"instructions": "You are a helpful assistant."},
)
+ # Chains onto the previous response via its response_id XCom, continuing
+ # the same conversation without resending prior turns.
+ openai_response_follow_up = OpenAIResponseOperator(
Review Comment:
Switched to `XComArg(openai_response, key="response_id")` which resolves
through `response_kwargs`' template and builds the task dependency
automatically.
--
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]