KevinHuSh
commited on
Commit
·
ef15d2d
1
Parent(s):
7ccbb61
fix ollama issuet push (#486)
Browse files### What problem does this PR solve?
#477
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
- rag/llm/chat_model.py +1 -1
rag/llm/chat_model.py
CHANGED
@@ -153,7 +153,7 @@ class OllamaChat(Base):
|
|
153 |
options=options
|
154 |
)
|
155 |
ans = response["message"]["content"].strip()
|
156 |
-
return ans, response["eval_count"] + response
|
157 |
except Exception as e:
|
158 |
return "**ERROR**: " + str(e), 0
|
159 |
|
|
|
153 |
options=options
|
154 |
)
|
155 |
ans = response["message"]["content"].strip()
|
156 |
+
return ans, response["eval_count"] + response.get("prompt_eval_count", 0)
|
157 |
except Exception as e:
|
158 |
return "**ERROR**: " + str(e), 0
|
159 |
|