mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
refactor(llm): 重构Ollama 提供者代码
- 将 _ollama.py 重命名为 ollama.py -移除未使用的 import 语句 - 更新 Client 类的引用,直接使用 ollama 模块
This commit is contained in:
parent
30081baf03
commit
3fe33ff33e
1 changed files with 2 additions and 3 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
|
import ollama
|
||||||
from config.logger import setup_logging
|
from config.logger import setup_logging
|
||||||
from ollama import Client
|
|
||||||
import json
|
|
||||||
from core.providers.llm.base import LLMProviderBase
|
from core.providers.llm.base import LLMProviderBase
|
||||||
|
|
||||||
TAG = __name__
|
TAG = __name__
|
||||||
|
|
@ -16,7 +15,7 @@ class LLMProvider(LLMProviderBase):
|
||||||
# if not self.base_url.endswith("/v1"):
|
# if not self.base_url.endswith("/v1"):
|
||||||
# self.base_url = f"{self.base_url}/v1"
|
# self.base_url = f"{self.base_url}/v1"
|
||||||
|
|
||||||
self.client = Client(
|
self.client = ollama.Client(
|
||||||
host=self.base_url,
|
host=self.base_url,
|
||||||
)
|
)
|
||||||
|
|
||||||
Loading…
Reference in a new issue