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

Code Execution Error and Missing Dependencies #1

Open
alice2001zipy opened this issue Apr 26, 2024 · 1 comment
Open

Code Execution Error and Missing Dependencies #1

alice2001zipy opened this issue Apr 26, 2024 · 1 comment

Comments

@alice2001zipy
Copy link

Description:
I encountered errors while running the script run_assistant.py. Below are the details:

Steps:

Clone the repository.
Set the API keys
Run python run_assistant.py.
Install the necessary dependencies manually: taufactor, bs4, and nbformat.

Run again python run_assistant.py.

I encountered the following error message:

Creating an Assistant with custom functions...
Traceback (most recent call last):
File "/Users/alice/Microgpt/./run_assistant.py", line 330, in
assistant = create_assistant(assistant_name_microgpt, model_name_microgpt, tools_microgpt, instructions_microgpt,assistant_id_file="assistant_id_microgpt.txt")
File "/Users/alice/Microgpt/assistant_client_functions.py", line 26, in create_assistant
assistant = client.beta.assistants.create(
...
openai.BadRequestError: Error code: 400 - {'error': {'message': "Missing required parameter: 'tools[0].type'. You provided 'tpye', did you mean to provide 'type'?", 'type': 'invalid_request_error', 'param': 'tools[0].type', 'code': 'missing_required_parameter'}}

Do I need to add files to run the script run_assistant.py
Many thanks in advance for taking the time to read it.

Additional Information:
I manually added the following dependencies: taufactor, bs4, and nbformat.
Triton was commented out due to installation issues.
The error indicates a missing required parameter ('tools[0].type') in the OpenAI API call.

Environment:
Operating System: Mac OS 14.4.1 Intel
Python Version: as in the README

@leigedove
Copy link
Contributor

Thank you for your inquiry. The issue you encountered may have resulted from OpenAI's updated requirements for function call structures within the assistant API. I have revised the function structure in the relevant files. It should work now.

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

2 participants