Skip to content

Commit

Permalink
Fix #1023 baichuan api error (#1024)
Browse files Browse the repository at this point in the history
  • Loading branch information
10cl committed Jan 19, 2024
1 parent b97b701 commit 6ac8c7c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/bots/baichuan/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ export class BaichuanWebBot extends AbstractBot {
'Content-Type': 'application/json',
},
body: JSON.stringify({
assistant: {},
assistant_info: {},
retry: 3,
type: "input",
stream: true,
request_id: uuid(),
app_info: { id: 10001, name: 'baichuan_web' },
Expand All @@ -59,6 +63,7 @@ export class BaichuanWebBot extends AbstractBot {
from: message.from,
parent_id: lastMessageId || 0,
created_at: message.createdAt,
attachments: []
},
session_info: { id: conversationId, name: '新的对话', created_at: Date.now() },
parameters: {
Expand All @@ -69,6 +74,7 @@ export class BaichuanWebBot extends AbstractBot {
max_new_tokens: -1,
do_sample: -1,
regenerate: 0,
wse:true
},
history: historyMessages,
}),
Expand Down

0 comments on commit 6ac8c7c

Please sign in to comment.