From 7b4c426c71ec6ed5b74bd199a3215f323d1620b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vacant=E4=B8=B6?= <49608830+Versirity@users.noreply.github.com> Date: Fri, 23 Aug 2024 06:24:41 +0800 Subject: [PATCH] baidu-qianfan[patch]: Fix the issue of missing request parameters (#6575) Co-authored-by: wangweiming1 Co-authored-by: Brace Sproul --- libs/langchain-baidu-qianfan/src/chat_models.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/libs/langchain-baidu-qianfan/src/chat_models.ts b/libs/langchain-baidu-qianfan/src/chat_models.ts index e1f0a3469f3c..6fc98ff48ce5 100644 --- a/libs/langchain-baidu-qianfan/src/chat_models.ts +++ b/libs/langchain-baidu-qianfan/src/chat_models.ts @@ -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; @@ -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