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

Use all tool_calls in response, not just first one #906

Merged
merged 2 commits into from
Apr 29, 2024

Conversation

chriswilty
Copy link
Member

Description

More recent ChatGPT models can return more than one tool_call in a chat completion. Our code assumed only one tool_call, which was the case originally, but no longer! This PR addresses that, while also adding tests and cleaning up some code redundancy.

Resolves #764

Checklist

Have you done the following?

  • Linked the relevant Issue
  • Added tests
  • Ensured the workflow steps are passing

backend/src/openai.ts Outdated Show resolved Hide resolved
@chriswilty chriswilty merged commit 9b0912c into dev Apr 29, 2024
2 checks passed
@chriswilty chriswilty deleted the 764-include-all-toolcalls branch April 29, 2024 13:20
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

Successfully merging this pull request may close these issues.

Use all tool calls when generating the final chatbot reply
1 participant