Compare commits

...

4 Commits

Author SHA1 Message Date
isaac hershenson
d3024f9298 llm fix 2024-07-29 08:16:46 -07:00
isaac hershenson
8395c28dbd Revert "llm fix"
This reverts commit 1f364dcd81.
2024-07-29 08:15:41 -07:00
isaac hershenson
1f364dcd81 llm fix 2024-07-29 08:13:46 -07:00
isaac hershenson
eed9a19c2b first draft 2024-07-26 18:27:07 -07:00
2 changed files with 172 additions and 124 deletions

File diff suppressed because one or more lines are too long

View File

@@ -305,9 +305,7 @@ class OllamaLLM(BaseLLM):
if not isinstance(stream_resp, str):
chunk = GenerationChunk(
text=(
stream_resp["message"]["content"]
if "message" in stream_resp
else ""
stream_resp.get("response","")
),
generation_info=(
dict(stream_resp) if stream_resp.get("done") is True else None
@@ -331,9 +329,7 @@ class OllamaLLM(BaseLLM):
if not isinstance(stream_resp, str):
chunk = GenerationChunk(
text=(
stream_resp["message"]["content"]
if "message" in stream_resp
else ""
stream_resp.get("response","")
),
generation_info=(
dict(stream_resp) if stream_resp.get("done") is True else None