9898logger = make_logger (__name__ )
9999
100100
101- < << << << HEAD :examples / tutorials / 10_ agentic / 10_ temporal / 070_ open_ai_agents_sdk_tools / project / workflow .py
102- == == == =
103101class StateModel (BaseModel ):
104102 """
105103 State model for preserving conversation history across turns.
@@ -112,7 +110,6 @@ class StateModel(BaseModel):
112110 turn_number : int
113111
114112
115- > >> >> >> main :examples / tutorials / 10_ async / 10_ temporal / 070_ open_ai_agents_sdk_tools / project / workflow .py
116113@workflow .defn (name = environment_variables .WORKFLOW_NAME )
117114class At070OpenAiAgentsSdkToolsWorkflow (BaseWorkflow ):
118115 """
@@ -132,8 +129,6 @@ def __init__(self):
132129 async def on_task_event_send (self , params : SendEventParams ) -> None :
133130 logger .info (f"Received task message instruction: { params } " )
134131
135- < << << << HEAD :examples / tutorials / 10_ agentic / 10_ temporal / 070_ open_ai_agents_sdk_tools / project / workflow .py
136- == == == =
137132 if self ._state is None :
138133 raise ValueError ("State is not initialized" )
139134
@@ -146,7 +141,6 @@ async def on_task_event_send(self, params: SendEventParams) -> None:
146141 # Add the user message to conversation history
147142 self ._state .input_list .append ({"role" : "user" , "content" : params .event .content .content })
148143
149- >> >> >> > main :examples / tutorials / 10_ async / 10_ temporal / 070_ open_ai_agents_sdk_tools / project / workflow .py
150144 # Echo back the client's message to show it in the UI. This is not done by default
151145 # so the agent developer has full control over what is shown to the user.
152146 await adk .messages .create (task_id = params .task .id , content = params .event .content )
@@ -235,8 +229,6 @@ async def on_task_event_send(self, params: SendEventParams) -> None:
235229 self ._parent_span_id = params .task .id
236230
237231 # ============================================================================
238- < << << << HEAD :examples / tutorials / 10_ agentic / 10_ temporal / 070_ open_ai_agents_sdk_tools / project / workflow .py
239- == == == =
240232 # HOOKS: Create Streaming Lifecycle Messages
241233 # ============================================================================
242234 # TemporalStreamingHooks integrates with OpenAI Agents SDK lifecycle events
@@ -281,7 +273,6 @@ async def on_task_event_send(self, params: SendEventParams) -> None:
281273 span .output = self ._state .model_dump ()
282274
283275 # ============================================================================
284- >> >> >> > main :examples / tutorials / 10_ async / 10_ temporal / 070_ open_ai_agents_sdk_tools / project / workflow .py
285276 # PATTERN 2: Multiple Activities Within Tools
286277 # ============================================================================
287278 # Use this pattern when:
@@ -365,7 +356,3 @@ async def on_task_create(self, params: CreateTaskParams) -> str:
365356 async def fulfill_order_signal (self , success : bool ) -> None :
366357 if success == True :
367358 await self ._pending_confirmation .put (True )
368- < << << << HEAD :examples / tutorials / 10_ agentic / 10_ temporal / 070_ open_ai_agents_sdk_tools / project / workflow .py
369-
370- == == == =
371- >> >> >> > main :examples / tutorials / 10_ async / 10_ temporal / 070_ open_ai_agents_sdk_tools / project / workflow .py
0 commit comments