Skip to content

Conversation

@dot-agi
Copy link
Member

@dot-agi dot-agi 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.

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

codecov bot commented Dec 30, 2024

Codecov Report

Attention: Patch coverage is 4.61538% with 62 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
agentops/llms/providers/openai.py 4.61% 62 Missing ⚠️
Flag Coverage Δ
unittests 36.85% <4.61%> (-0.65%) ⬇️

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.57% <4.61%> (-3.32%) ⬇️

@dot-agi dot-agi requested a review from areibman December 31, 2024 13:23
@dot-agi dot-agi enabled auto-merge (squash) January 1, 2025 14:38
@areibman
Copy link
Contributor

areibman commented Jan 4, 2025

image Nailed it! Let's merge

@dot-agi dot-agi merged commit 9d6aac3 into main Jan 4, 2025
8 of 9 checks passed
@dot-agi dot-agi deleted the feat/openai-assistants-beta branch January 4, 2025 04:57
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

3 participants