fix: deepseek rate limit keep-alive
Some checks failed
Deploy static content to Pages / deploy (push) Has been cancelled
Some checks failed
Deploy static content to Pages / deploy (push) Has been cancelled
This commit is contained in:
@@ -338,6 +338,9 @@ class Chat {
|
||||
console.log("line", line);
|
||||
try {
|
||||
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;
|
||||
yield json;
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user