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;
|
||||
}
|
||||
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 = '';
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user