Fixing content mechanisms in API

This commit is contained in:
Cyber MacGeddon 2025-12-04 19:54:51 +00:00
parent 3b6b035e6f
commit c1749f9b85
2 changed files with 4 additions and 2 deletions

View file

@ -206,8 +206,10 @@ class SocketClient:
)
else:
# RAG-style chunk (or generic chunk)
# Text-completion uses "response" field, RAG uses "chunk" field
content = resp.get("response", resp.get("chunk", ""))
return RAGChunk(
content=resp.get("chunk", ""),
content=content,
end_of_stream=resp.get("end_of_stream", False),
error=resp.get("error")
)