-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
fix: update OpenAIAssistantAgent
to use attachments
rather than file_ids
#13341
Conversation
fix: use attachments for openai assistants
After further inspection--I think this PR will work as a temporary fix, but the agent probably needs some refactoring to adopt the significant changes to how tools and files are passed in. The new Assistants API now has a |
Hmm, I tried running this but got I have |
Thanks for checking it out, will take another look. I don't think I set up my dev environment correctly... |
With the latest change, the minimal functionality should be restored. But to get the full functionality of the Assistants API, I believe breaking changes will be required to use the new |
@naingthet I tried running a few of our openai assistant notebooks, and ran into this:
Or
Seems like its still pretty unstable 😅 But lets merge this for now, and in another PR you or me or someone can make a complete revamp here |
Description
This PR addresses a bug with
OpenAIAssistantAgent
resulting from the transition from thefile_ids
kwarg toattachments
kwarg when creating assistants. The present solution formats the existingfile_ids
intoattachments
objects, without specifyingtools
within eachattachment
, as this is optional (see here).Another solution could be to add an
attachments
argument toOpenAIAssistantAgent
methods. However, the present solution would be more seamless with any existing uses (i.e. it would not require any changes to any existing uses of this agent).Fixes #12968
New Package?
Did I fill in the
tool.llamahub
section in thepyproject.toml
and provide a detailed README.md for my new integration or package?Version Bump?
Did I bump the version in the
pyproject.toml
file of the package I am updating? (Except for thellama-index-core
package)Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Suggested Checklist:
make format; make lint
to appease the lint gods