Skip to content
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

Update OpenAI Assistante Agent on_reset #4423

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lspinheiro
Copy link
Collaborator

Why are these changes needed?

This PR introduces the following changes for the OpenAI Assistants API agent

  1. Update the on_reset method to present the initial thread state and only delete new messages
  2. Move optional dependency imports to conditional blocks to avoid module import errors
  3. Add aiofiles to the openai extra
  4. Remove deprecated extras (missed in the clean up)

Checks

from openai.types.beta.threads import Message, MessageDeleted, Run
from openai.types.beta.vector_store import VectorStore
from openai.types.shared_params.function_definition import FunctionDefinition

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can use the full module to import OpenAIAssistantAgent as discussed in #4408? So we can avoid this import test.

Copy link
Collaborator

@ekzhu ekzhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The module import related comment can be addressed in a separate PR e.g., #4408 #4410

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