Merge pull request #1600 from MorpheusI0/feature/support_for_open_webui

Add api key to ollama client to support open webui
This commit is contained in:
better629 2025-03-10 02:04:56 +08:00 committed by GitHub
commit cf761ab754
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -193,7 +193,7 @@ class OllamaLLM(BaseLLM):
"""
def __init__(self, config: LLMConfig):
self.client = GeneralAPIRequestor(base_url=config.base_url)
self.client = GeneralAPIRequestor(base_url=config.base_url, key=config.api_key)
self.config = config
self.http_method = "post"
self.use_system_prompt = False