Skip to content

Commit

Permalink
fix ollama issuet push (#486)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

#477 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
KevinHuSh committed Apr 22, 2024
1 parent 11949f9 commit 3610e1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rag/llm/chat_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def chat(self, system, history, gen_conf):
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

Expand Down

0 comments on commit 3610e1e

Please sign in to comment.