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

baidu-qianfan[patch]: Fix the issue of missing request parameters #6575

Merged
merged 3 commits into from
Aug 22, 2024

Conversation

Versirity
Copy link
Contributor

@Versirity Versirity commented Aug 20, 2024

This PR is to fix the issue where only the messages parameter was sent: The generated request:
{ stream: false, user_id: undefined, temperature: undefined, top_p: undefined, penalty_score: undefined, system: 'Translate the following from English into Chinese!', messages: [ { role: 'user', content: 'hello?' } ] }
is correct, but when sending the request, only the messages parameter was included, and the other parameters were not sent.

{
  stream: false,
  user_id: undefined,
  temperature: undefined,
  top_p: undefined,
  penalty_score: undefined,
  system: 'Translate the following into italian:',
  messages: [ { role: 'user', content: 'hi!' } ]
}
####error return(system parameters were not sent)
{
  words: 'Hello there! I am doing well and feeling quite alright. I am a virtual artificial intelligence language model and I am always here to assist you. What about you? How are you today?'   
}
####correct return
{ words: 'Ciao!' }

Copy link

vercel bot commented Aug 20, 2024

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

Name Status Preview Comments Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview Aug 22, 2024 10:02pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Aug 22, 2024 10:02pm

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. auto:bug Related to a bug, vulnerability, unexpected error with an existing feature labels Aug 20, 2024
Copy link
Member

@bracesproul bracesproul left a comment

Choose a reason for hiding this comment

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

lgtm, thank you!

@dosubot dosubot bot added the lgtm PRs that are ready to be merged as-is label Aug 22, 2024
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Aug 22, 2024
@bracesproul bracesproul merged commit 7b4c426 into langchain-ai:main Aug 22, 2024
27 checks passed
CarterMorris pushed a commit to CarterMorris/langchainjs that referenced this pull request Nov 10, 2024
…ngchain-ai#6575)

Co-authored-by: wangweiming1 <wangweiming1@xiaomi.com>
Co-authored-by: Brace Sproul <braceasproul@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature lgtm PRs that are ready to be merged as-is size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants