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

openai[patch]: Fix tool content list #5756

Merged
merged 4 commits into from
Jun 13, 2024
Merged

Conversation

bracesproul
Copy link
Member

No description provided.

Copy link

vercel bot commented Jun 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2024 6:42pm
langchainjs-docs 🛑 Canceled (Inspect) 💬 Add feedback Jun 13, 2024 6:42pm

@bracesproul bracesproul marked this pull request as ready for review June 13, 2024 18:29
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 13, 2024
@@ -228,11 +228,13 @@ function convertMessagesToOpenAIParams(messages: BaseMessage[]) {
}
if (message.additional_kwargs.function_call != null) {
completionParam.function_call = message.additional_kwargs.function_call;
completionParam.content = null;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just do delete completionParam.content?

Prefer avoiding null when possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants