We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c360a3c commit c5e839fCopy full SHA for c5e839f
1 file changed
src/app/bots/baichuan/index.ts
@@ -80,13 +80,16 @@ export class BaichuanWebBot extends AbstractBot {
80
81
for await (const uint8Array of streamAsyncIterable(resp.body!)) {
82
const str = decoder.decode(uint8Array)
83
- console.debug('baichuan', str)
+ console.debug('baichuan stream', str)
84
const lines = str.split('\n')
85
for (const line of lines) {
86
if (!line) {
87
continue
88
}
89
const data = JSON.parse(line)
90
+ if (!data.answer) {
91
+ continue
92
+ }
93
answerMessageId = data.answer.id
94
const text = data.answer.data
95
if (text) {
0 commit comments