Update ollama.py

This commit is contained in:
欣南科技 2025-03-16 15:44:24 +08:00 committed by GitHub
parent 85956c8928
commit 77e5ea1176
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -54,7 +54,7 @@ class LLMProvider(LLMProviderBase):
stream = self.client.chat.completions.create(
model=self.model_name,
messages=dialogue,
stream=False,
stream=True,
tools=functions,
)
@ -63,4 +63,4 @@ class LLMProvider(LLMProviderBase):
except Exception as 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)}】"}