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

don't include tool calls if there was none #16408

Merged
merged 3 commits into from
Oct 7, 2024

Conversation

logan-markewich
Copy link
Collaborator

If there was no tool calls, don't include it in additional_kwargs

Keeping an empty list here can cause issues for various API's that use openai's client

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Oct 7, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 7, 2024
@logan-markewich logan-markewich merged commit 4655797 into main Oct 7, 2024
11 checks passed
@logan-markewich logan-markewich deleted the logan/openai_tool_calls branch October 7, 2024 18:06
@tslmy
Copy link
Contributor

tslmy commented Oct 13, 2024

@logan-markewich you beat me. https://gist.github.com/tslmy/7e15e93ed76da167f6a0bd663946fa40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants