mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
feat(chat): Enhance bypass handling and introduce CC filter naming feature
Fix : Ollam Provider response
This commit is contained in:
@@ -162,7 +162,9 @@ export function createSSEStream(options = {}) {
|
||||
const parsed = parseSSELine(trimmed, targetFormat);
|
||||
if (!parsed) continue;
|
||||
|
||||
if (parsed && parsed.done) {
|
||||
// For Ollama: done=true is the final chunk with finish_reason/usage, must translate
|
||||
// For other formats: done=true is the [DONE] sentinel, skip
|
||||
if (parsed && parsed.done && targetFormat !== FORMATS.OLLAMA) {
|
||||
const output = "data: [DONE]\n\n";
|
||||
reqLogger?.appendConvertedChunk?.(output);
|
||||
controller.enqueue(sharedEncoder.encode(output));
|
||||
|
||||
Reference in New Issue
Block a user