Skip to content

Commit ae0fa2d

Browse files
authored
Merge branch 'main' into pdb-hang-repro
2 parents 8b93ffb + dbc6023 commit ae0fa2d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

temporalio/contrib/openai_agents/_invoke_model_activity.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,9 @@ async def invoke_model_activity_streaming(
393393
conversation_id=input.get("conversation_id"),
394394
prompt=input.get("prompt"),
395395
):
396+
# OpenAI models set defer_build=True, so an event's pydantic
397+
# schema may still be an unbuilt placeholder.
398+
type(event).model_rebuild()
396399
events.append(event)
397400
events_topic.publish(event)
398401
except APIStatusError as e:

0 commit comments

Comments
 (0)