瀏覽代碼

Fix: base url issue. (#8281)

### What problem does this PR solve?


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.19.1
Kevin Hu 4 月之前
父節點
當前提交
b1117a8717
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 查看文件

@@ -853,7 +853,7 @@ class OllamaChat(Base):
def __init__(self, key, model_name, base_url=None, **kwargs):
super().__init__(key, model_name, base_url=base_url, **kwargs)

self.client = Client(host=kwargs["base_url"]) if not key or key == "x" else Client(host=kwargs["base_url"], headers={"Authorization": f"Bearer {key}"})
self.client = Client(host=base_url) if not key or key == "x" else Client(host=base_url, headers={"Authorization": f"Bearer {key}"})
self.model_name = model_name

def _clean_conf(self, gen_conf):

Loading…
取消
儲存