Skip to content

Commit

Permalink
baidu-qianfan[patch]: Fix the issue of missing request parameters (#6575
Browse files Browse the repository at this point in the history
)

Co-authored-by: wangweiming1 <[email protected]>
Co-authored-by: Brace Sproul <[email protected]>
  • Loading branch information
3 people authored Aug 22, 2024
1 parent 28cbfd7 commit 7b4c426
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions libs/langchain-baidu-qianfan/src/chat_models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,13 +403,7 @@ export class ChatBaiduQianfan
) {
const makeCompletionRequest = async () => {
console.log(request);
const response = await this.client.chat(
{
messages: request.messages,
stream,
},
this.model
);
const response = await this.client.chat(request, this.model);

if (!stream) {
return response;
Expand Down Expand Up @@ -455,7 +449,7 @@ export class ChatBaiduQianfan
private async createStream(request: ChatCompletionRequest) {
const response = await this.client.chat(
{
messages: request.messages,
...request,
stream: true,
},
this.model
Expand Down

0 comments on commit 7b4c426

Please sign in to comment.