mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-29 05:09:46 +01:00
Update ollama.py
This commit is contained in:
parent
85956c8928
commit
77e5ea1176
1 changed files with 2 additions and 2 deletions
|
|
@ -54,7 +54,7 @@ class LLMProvider(LLMProviderBase):
|
||||||
stream = self.client.chat.completions.create(
|
stream = self.client.chat.completions.create(
|
||||||
model=self.model_name,
|
model=self.model_name,
|
||||||
messages=dialogue,
|
messages=dialogue,
|
||||||
stream=False,
|
stream=True,
|
||||||
tools=functions,
|
tools=functions,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -63,4 +63,4 @@ class LLMProvider(LLMProviderBase):
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.bind(tag=TAG).error(f"Error in Ollama function call: {e}")
|
logger.bind(tag=TAG).error(f"Error in Ollama function call: {e}")
|
||||||
yield {"type": "content", "content": f"【Ollama服务响应异常: {str(e)}】"}
|
yield {"type": "content", "content": f"【Ollama服务响应异常: {str(e)}】"}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue