Compare commits
1 Commits
24973eabfe
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
7793d94514
|
@@ -338,6 +338,9 @@ class Chat {
|
|||||||
console.log("line", line);
|
console.log("line", line);
|
||||||
try {
|
try {
|
||||||
const jsonStr = line.slice("data:".length).trim();
|
const jsonStr = line.slice("data:".length).trim();
|
||||||
|
if (jsonStr === "keep-alive") { // for deepseek https://api-docs.deepseek.com/quick_start/rate_limit
|
||||||
|
continue;
|
||||||
|
}
|
||||||
const json = JSON.parse(jsonStr) as StreamingResponseChunk;
|
const json = JSON.parse(jsonStr) as StreamingResponseChunk;
|
||||||
yield json;
|
yield json;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user