mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
Feat : Auto restart after crash
This commit is contained in:
@@ -79,7 +79,8 @@ export function translateNonStreamingResponse(responseBody, targetFormat, source
|
||||
for (const block of responseBody.content) {
|
||||
if (block.type === "text") {
|
||||
// Strip markdown code block markers (e.g. kimi wraps JSON in ```json...```)
|
||||
const text = block.text.replace(/^\s*```\s*json\s*\n?/i, "").replace(/\n?\s*```\s*$/i, "");
|
||||
const raw = block.text ?? "";
|
||||
const text = raw.replace(/^\s*```\s*json\s*\n?/i, "").replace(/\n?\s*```\s*$/i, "");
|
||||
textContent += text;
|
||||
} else if (block.type === "thinking") thinkingContent += block.thinking || "";
|
||||
else if (block.type === "tool_use") {
|
||||
|
||||
Reference in New Issue
Block a user