mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 15:55:56 +08:00
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
@ -153,7 +153,7 @@ class OllamaChat(Base):
|
|||||||
options=options
|
options=options
|
||||||
)
|
)
|
||||||
ans = response["message"]["content"].strip()
|
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:
|
except Exception as e:
|
||||||
return "**ERROR**: " + str(e), 0
|
return "**ERROR**: " + str(e), 0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user