fix ollama issuet push (#486)
### What problem does this PR solve? #477 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
11949f9f2e
commit
3610e1e5b4
1 changed files with 1 additions and 1 deletions
|
|
@ -153,7 +153,7 @@ class OllamaChat(Base):
|
|||
options=options
|
||||
)
|
||||
ans = response["message"]["content"].strip()
|
||||
return ans, response["eval_count"] + response["prompt_eval_count"]
|
||||
return ans, response["eval_count"] + response.get("prompt_eval_count", 0)
|
||||
except Exception as e:
|
||||
return "**ERROR**: " + str(e), 0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue