mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix ollama chunk wrapper
This commit is contained in:
@ -31,7 +31,8 @@ async function parseOllamaStream(jsonStream, request, response) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
const text = json.response || '';
|
const text = json.response || '';
|
||||||
response.write(`data: {"choices": [{"text": "${text}"}]}\n\n`);
|
const chunk = { choices: [{ text }] };
|
||||||
|
response.write(`data: ${JSON.stringify(chunk)}\n\n`);
|
||||||
partialData = '';
|
partialData = '';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user