mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-14 22:13:41 +08:00
修改: app/api/bedrock.ts
修改: app/client/platforms/bedrock.ts
This commit is contained in:
@@ -38,9 +38,11 @@ export class BedrockApi implements LLMApi {
|
||||
}
|
||||
|
||||
extractMessage(res: any) {
|
||||
console.log("[Response] claude response: ", res);
|
||||
|
||||
return res?.content?.[0]?.text;
|
||||
console.log("[Response] Bedrock not stream response: ", res);
|
||||
if (res.error) {
|
||||
return "```\n" + JSON.stringify(res, null, 4) + "\n```";
|
||||
}
|
||||
return res?.content ?? res;
|
||||
}
|
||||
|
||||
async chat(options: ChatOptions): Promise<void> {
|
||||
@@ -144,6 +146,7 @@ export class BedrockApi implements LLMApi {
|
||||
topP: modelConfig.top_p,
|
||||
stopSequences: [],
|
||||
},
|
||||
stream: shouldStream,
|
||||
};
|
||||
|
||||
const conversePath = `${ApiPath.Bedrock}/converse`;
|
||||
|
Reference in New Issue
Block a user