mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
refactor(llm): 简化 Ollama 客户端初始化逻辑
- 移除了不必要的注释代码,清理了初始化过程 - 保留了 Ollama 客户端的原始逻辑
This commit is contained in:
parent
beade1af7f
commit
5ad061f361
1 changed files with 1 additions and 4 deletions
|
|
@ -10,10 +10,7 @@ class LLMProvider(LLMProviderBase):
|
|||
def __init__(self, config):
|
||||
self.model_name = config.get("model_name")
|
||||
self.base_url = config.get("base_url", "http://localhost:11434")
|
||||
# Initialize OpenAI client with Ollama base URL
|
||||
# 如果没有v1,增加v1
|
||||
# if not self.base_url.endswith("/v1"):
|
||||
# self.base_url = f"{self.base_url}/v1"
|
||||
# Initialize Ollama client with Ollama base URL
|
||||
|
||||
self.client = ollama.Client(
|
||||
host=self.base_url,
|
||||
|
|
|
|||
Loading…
Reference in a new issue