修改一些

This commit is contained in:
yangyongju
2024-08-14 13:23:45 +08:00
parent 741a078c87
commit 69f931543f
10 changed files with 105 additions and 17 deletions

View File

@@ -206,14 +206,14 @@ export class DeepseekApi implements LLMApi {
}
},
onmessage(msg) {
console.log("msg", msg);
// console.log("msg", msg);
if (msg.data === "[DONE]" || finished) {
return finish();
}
const text = msg.data;
try {
const json = JSON.parse(text);
console.log("json", json);
// console.log("json", json);
const choices = json.choices as Array<{
delta: { content: string };