File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import asyncio
22
33from temporalio .client import Client
4- from temporalio .contrib .pydantic import pydantic_data_converter
4+ from temporalio .contrib .openai_agents import OpenAIAgentsPlugin
55
66from openai_agents .workflows .agents_as_tools_workflow import AgentsAsToolsWorkflow
77
@@ -10,7 +10,9 @@ async def main():
1010 # Create client connected to server at the given address
1111 client = await Client .connect (
1212 "localhost:7233" ,
13- data_converter = pydantic_data_converter ,
13+ plugins = [
14+ OpenAIAgentsPlugin (),
15+ ],
1416 )
1517
1618 # Execute a workflow
Original file line number Diff line number Diff line change 77 WorkflowUpdateFailedError ,
88)
99from temporalio .common import QueryRejectCondition
10- from temporalio .contrib .pydantic import pydantic_data_converter
10+ from temporalio .contrib .openai_agents import OpenAIAgentsPlugin
1111from temporalio .service import RPCError , RPCStatusCode
1212
1313from openai_agents .workflows .customer_service_workflow import (
@@ -24,7 +24,9 @@ async def main():
2424 # Create client connected to server at the given address
2525 client = await Client .connect (
2626 "localhost:7233" ,
27- data_converter = pydantic_data_converter ,
27+ plugins = [
28+ OpenAIAgentsPlugin (),
29+ ],
2830 )
2931
3032 handle = client .get_workflow_handle (args .conversation_id )
Original file line number Diff line number Diff line change 11import asyncio
22
33from temporalio .client import Client
4- from temporalio .contrib .pydantic import pydantic_data_converter
4+ from temporalio .contrib .openai_agents import OpenAIAgentsPlugin
55
66from openai_agents .workflows .hello_world_workflow import HelloWorldAgent
77
@@ -10,7 +10,9 @@ async def main():
1010 # Create client connected to server at the given address
1111 client = await Client .connect (
1212 "localhost:7233" ,
13- data_converter = pydantic_data_converter ,
13+ plugins = [
14+ OpenAIAgentsPlugin (),
15+ ],
1416 )
1517
1618 # Execute a workflow
Original file line number Diff line number Diff line change 11import asyncio
22
33from temporalio .client import Client
4- from temporalio .contrib .pydantic import pydantic_data_converter
4+ from temporalio .contrib .openai_agents import OpenAIAgentsPlugin
55
66from openai_agents .workflows .research_bot_workflow import ResearchWorkflow
77
@@ -10,7 +10,9 @@ async def main():
1010 # Create client connected to server at the given address
1111 client = await Client .connect (
1212 "localhost:7233" ,
13- data_converter = pydantic_data_converter ,
13+ plugins = [
14+ OpenAIAgentsPlugin (),
15+ ],
1416 )
1517
1618 # Execute a workflow
Original file line number Diff line number Diff line change 11import asyncio
22
33from temporalio .client import Client
4- from temporalio .contrib .pydantic import pydantic_data_converter
4+ from temporalio .contrib .openai_agents import OpenAIAgentsPlugin
55
66from openai_agents .workflows .tools_workflow import ToolsWorkflow
77
@@ -10,7 +10,9 @@ async def main():
1010 # Create client connected to server at the given address
1111 client = await Client .connect (
1212 "localhost:7233" ,
13- data_converter = pydantic_data_converter ,
13+ plugins = [
14+ OpenAIAgentsPlugin (),
15+ ],
1416 )
1517
1618 # Execute a workflow
You can’t perform that action at this time.
0 commit comments