修改Ollama接口调用方式
在调用本地Ollama接口时,将api_key默认值设置为“ollama”。
This commit is contained in:
@@ -172,6 +172,9 @@ class OllamaAdapter(BaseLLMAdapter):
|
||||
self.temperature = temperature
|
||||
self.timeout = timeout
|
||||
|
||||
if self.api_key == '':
|
||||
self.api_key= 'ollama'
|
||||
|
||||
self._client = ChatOpenAI(
|
||||
model=self.model_name,
|
||||
api_key=self.api_key,
|
||||
|
||||
Reference in New Issue
Block a user