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

[Feat] OpenAI Assistants (Beta) Integration #609

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

Conversation

the-praxs
Copy link
Member

@the-praxs the-praxs commented Dec 28, 2024

📥 OpenAI Assistants (Beta) Integration

Closes #482. Adds support for the OpenAI Assistants API.

Supports the following APIs -

  • Assistants
  • Threads
  • Messages
  • Runs
  • Run Steps

🗒️ Changelog

  • Adds a new method _override_openai_assistants_beta to override beta methods. This is purely for maintenance purposes since the API is in beta.
  • Adds an example notebook adapted from this OpenAI cookbook. Note that the code is outdated so the notebook version is from this PR.
  • Adds examples docs page using the example notebook

⚠️ Caveats

  • No LLM event(s) recorded since the API is using a different format than ChatML for prompting.
  • Async support will need a custom event handler which is to be inherited from AssistantEventHandler and modified accordingly. An example is here.

@the-praxs the-praxs self-assigned this Dec 28, 2024
@areibman areibman marked this pull request as draft December 29, 2024 06:58
@the-praxs the-praxs marked this pull request as ready for review December 29, 2024 22:52
@the-praxs the-praxs requested a review from areibman December 29, 2024 22:52
Copy link

codecov bot commented Dec 30, 2024

Codecov Report

Attention: Patch coverage is 3.33333% with 58 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
agentops/llms/providers/openai.py 3.33% 58 Missing ⚠️
Flag Coverage Δ
unittests 36.87% <3.33%> (-0.63%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
agentops/llms/tracker.py 23.36% <ø> (ø)
agentops/llms/providers/openai.py 10.34% <3.33%> (-3.55%) ⬇️

docs/v1/integrations/openai.mdx Outdated Show resolved Hide resolved
@the-praxs the-praxs requested a review from areibman December 31, 2024 13:23
@the-praxs the-praxs enabled auto-merge (squash) January 1, 2025 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Assistants API
2 participants