瀏覽代碼

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)
tags/v0.3.1
KevinHuSh 1 年之前
父節點
當前提交
3610e1e5b4
No account linked to committer's email address
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      rag/llm/chat_model.py

+ 1
- 1
rag/llm/chat_model.py 查看文件

@@ -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…
取消
儲存