Skip to content

Commit

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

infiniflow#477 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
KevinHuSh authored Apr 22, 2024
1 parent 87f9630 commit b052519
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 b052519

Please sign in to comment.