mirror of
https://github.com/hwchase17/langchain.git
synced 2026-02-03 15:55:44 +00:00
llm fix
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user