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

Enhancement: OpenAI Assistants API V2 support #2490

Open
danny-avila opened this issue Apr 22, 2024 Discussed in #2489 · 13 comments
Open

Enhancement: OpenAI Assistants API V2 support #2490

danny-avila opened this issue Apr 22, 2024 Discussed in #2489 · 13 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@danny-avila
Copy link
Owner

danny-avila commented Apr 22, 2024

Initial support added in #2781

5/19/24

Read the PR notes for more details on what changed, and what is still to be done.


Discussed in #2489

Originally posted by sathyarajv April 22, 2024
OpenAI updated the Assistants API to V2 with changes to the tools and files. Refer the Migration steps here

image

Known issues: The attached files of an existing Assistants are not loading in the UI but its available on the OpenAI platform. Migrating to V2 will resolve this issue.

Any plan on this migration?

@danny-avila danny-avila self-assigned this Apr 22, 2024
@danny-avila danny-avila added the enhancement New feature or request label Apr 22, 2024
@danny-avila danny-avila added this to the v0.7.3 milestone Apr 22, 2024
@danny-avila danny-avila changed the title feat: OpenAI Assistantd API V2 support Enhancement: OpenAI Assistantd API V2 support Apr 22, 2024
@scottbetza
Copy link

Will this enhancement planned for v0.7.3 milestone completion allow for > 20 files?

@danny-avila
Copy link
Owner Author

Will this enhancement planned for v0.7.3 milestone completion allow for > 20 files?

yes I think it's possible through vector stores

@danny-avila danny-avila changed the title Enhancement: OpenAI Assistantd API V2 support Enhancement: OpenAI Assistants API V2 support May 13, 2024
@danny-avila
Copy link
Owner Author

Due to several undocumented, breaking and non-breaking changes, as well as gpt-4o support being exclusive to v2, this is a priority item for this week.

@danny-avila
Copy link
Owner Author

danny-avila commented May 16, 2024

Just a quick preview of what will be possible with Assistants V2 (also using gpt-4o):

Recording.2024-05-16.170411.mp4

@danny-avila
Copy link
Owner Author

I've made a lot of progress, and the initial support is almost done but not quite ready.

Azure integration breaks with the latest openai SDK versions, so I need to write old v1 methods for Azure file handling. Because of the differences with Azure, even later on, I've decided to make Azure Assistants its own endpoint, and there are also a few things to touch on to complete that process.

The way file attachments now work for tool resources is not fully complete for Code Interpreter, but is nearly done (just need to handle deleting from its tool_resources)

This is saying nothing of the new File Search vector store handling. This needs a completely new UI and file management system, which I've already started earlier this week.

My goal is to release the initial support tomorrow, with the ability to use all v2 features including file search, but no way manage/attach vector stores for file search yet, other than attaching files at the thread level.

I've addressed a lot of fixes for Assistants in the process, so I'm excited to get this out soon!

@danny-avila
Copy link
Owner Author

Merging soon, read the full notes if you're interested!

#2781

@illgitthat
Copy link
Contributor

@danny-avila thanks so much for your work on this. I saw that Azure OpenAI announced support for assistants v2 today.

Passing this on in case it would (hopefully) be a comparatively easy task to add Azure support.

@danny-avila
Copy link
Owner Author

@danny-avila thanks so much for your work on this. I saw that Azure OpenAI announced support for assistants v2 today.

Passing this on in case it would (hopefully) be a comparatively easy task to add Azure support.

Cool! i'll see if it's as easy as flipping a switch at this point

@danny-avila
Copy link
Owner Author

danny-avila commented May 21, 2024

Right now, I'm able to get v2 working which enables streaming for Azure Assistants, but it is really unreliable with files, even in playground. For anyone that wants to try: #2820

@BennyMorton28
Copy link

Has anyone gotten gpt-4o working with Assistants in Librechat yet?

@danny-avila
Copy link
Owner Author

Has anyone gotten gpt-4o working with Assistants in Librechat yet?

Yup. On the latest build, it's fully functional:
image

@BennyMorton28
Copy link

Sorry to keep troubling on this issue, I can't get it to work. I updated my assistant on OpenAI to be gpt-4o, and in my librechat.yaml file, and then when I rebuild I get the error below. I am using Docker, but I think there might be an update issue to the latest Librechat, but I'm not sure how to update/get the latest build? Thanks for any help

Screenshot 2024-05-29 at 4 02 42 PM

@danny-avila
Copy link
Owner Author

Sorry to keep troubling on this issue, I can't get it to work. I updated my assistant on OpenAI to be gpt-4o, and in my librechat.yaml file, and then when I rebuild I get the error below. I am using Docker, but I think there might be an update issue to the latest Librechat, but I'm not sure how to update/get the latest build? Thanks for any help

I think you have a merge conflict while trying to update. Send an email to danny@librechat.ai and we can setup a time to troubleshoot live.

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
Status: 🚧 On Going
Development

No branches or pull requests

4 participants