-
Notifications
You must be signed in to change notification settings - Fork 79
Example with new plugin PR #206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
from temporalio.contrib.openai_agents.temporal_openai_agents import ( | ||
set_open_ai_agent_temporal_overrides, | ||
) | ||
from temporalio.contrib.openai_agents import Plugin | ||
from temporalio.contrib.pydantic import pydantic_data_converter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import not needed anymore either
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[I like using a ruff IDE extension and setting format-on-save to true.]
|
||
|
||
async def main(): | ||
# Create client connected to server at the given address | ||
client = await Client.connect( | ||
"localhost:7233", | ||
data_converter=open_ai_data_converter, | ||
plugins=[Plugin()], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we probably want to encourage plugin authors to name this object like OpenAIAgentsPlugin
so that even if imported using from ... import ...
it's still clear at the usage site what plugin it is.
Alternatively we could reference it as openai_agents.Plugin
, but I think encouraging the fully-qualified plugin object name makes sense.
from temporalio.contrib.openai_agents.temporal_openai_agents import ( | ||
set_open_ai_agent_temporal_overrides, | ||
) | ||
from temporalio.contrib.openai_agents import Plugin | ||
from temporalio.contrib.pydantic import pydantic_data_converter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[I like using a ruff IDE extension and setting format-on-save to true.]
What was changed
Why?
Checklist
Closes
How was this tested: