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

Fails to run with error: TypeError: Assistants.create() got an unexpected keyword argument 'file_ids' #9

Open
kfuras opened this issue May 31, 2024 · 0 comments

Comments

@kfuras
Copy link

kfuras commented May 31, 2024

First of all, let me say that this is awesome work!

I encountered an issue with the autoblogger running on the latest OpenAI API.

The code it fails on

print("Creating OpenAI Assistant...")
assistant = client.beta.assistants.create(
    name="Content Creation Assistant",
    model="gpt-4-turbo-preview",
    instructions=f"",
    tools=[{"type": "retrieval"}, {"type": "code_interpreter"}],
    file_ids=[internal_links_file_id, content_plan_file_id, brand_plan_file_id, images_file_id]
)

It gives me the following error:
TypeError: Assistants.create() got an unexpected keyword argument 'file_ids'

It appears that the API was changed in version 1.21.0, and the file_ids parameter is no longer supported in the "Create assistant" method.

This is marked as legacy in the documentation:

API Reference Legacy: Create Assistant V1

API Reference Current: Create Assistant

As a workaround, downgrading to version 1.20.0 resolves the issue.

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

No branches or pull requests

1 participant