add api key to ollama client to support open webui

This commit is contained in:
Maximilian Knoll 2024-11-13 18:18:40 +01:00
parent 2b160f2949
commit d712b88d21
No known key found for this signature in database
GPG key ID: A0A9A3B79AACD068

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