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

API Error When Assistants Do Not Utilize Attached Tools #27

Closed
VRSEN opened this issue May 4, 2024 · 3 comments
Closed

API Error When Assistants Do Not Utilize Attached Tools #27

VRSEN opened this issue May 4, 2024 · 3 comments
Assignees
Labels
bug Something isn't working fixed-waiting-user-feedback

Comments

@VRSEN
Copy link

VRSEN commented May 4, 2024

Description

When adding tools to an assistant, the API throws an error if the assistant does not utilize them. In OpenAI, assistants can choose whether to use tools or not. This issue originates from the threads.py create_run method.

Steps to Reproduce

  1. Create an assistant with any custom tool. (function)
  2. Ask the assistant to say "hi."
  3. Observe the error: "Could not extract function arguments from LLM response, may have not been properly formatted. Consider retrying or use a different model."

Expected Behavior

In OpenAI, tools can be attached to an assistant, allowing it to decide whether or not to use them. This autonomy in tool utilization is crucial for any agentic system.

Actual Behavior

The operation fails with the error:
ValueError("Could not extract function arguments from LLM response, may have not been properly formatted. Consider retrying or use a different model.")

Additional Information

  • OpenAI version: 1.20.0
  • Python version: 3.10.13
  • Streaming assistants version: 0.16.0
  • Operating System: macOS 14.1.1
@phact
Copy link
Collaborator

phact commented May 10, 2024

Working on this now

@phact
Copy link
Collaborator

phact commented May 10, 2024

Fix here - 921f687

Shipped in v0.1.20, live on the service.

@VRSEN feel free to try it on your end.

@phact phact self-assigned this May 10, 2024
@phact phact added bug Something isn't working fixed-waiting-user-feedback labels May 10, 2024
@phact
Copy link
Collaborator

phact commented May 28, 2024

@VRSEN should we close this one since it's been fixed for a while?

@phact phact closed this as completed May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed-waiting-user-feedback
Projects
None yet
Development

No branches or pull requests

2 participants