Skip to content

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Example with new plugin PR #206

wants to merge 1 commit into from

Conversation

tconley1428
Copy link
Contributor

What was changed

Why?

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

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
Copy link
Member

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

Copy link
Contributor

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()],
Copy link
Contributor

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
Copy link
Contributor

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.]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants