Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions temporalio/contrib/openai_agents/_invoke_model_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,9 @@ async def invoke_model_activity_streaming(
conversation_id=input.get("conversation_id"),
prompt=input.get("prompt"),
):
# OpenAI models set defer_build=True, so an event's pydantic
# schema may still be an unbuilt placeholder.
type(event).model_rebuild()
events.append(event)
events_topic.publish(event)
except APIStatusError as e:
Expand Down
Loading