mirror of
https://github.com/Dodelidoo-Labs/sonobarr.git
synced 2025-12-23 22:17:45 -05:00
Pass API Key fallback value
Seems OpenAI insists on an API key, so lets pass a default value when none is used.
This commit is contained in:
@@ -37,6 +37,9 @@ class OpenAIRecommender:
|
||||
}
|
||||
if api_key is not None:
|
||||
client_kwargs["api_key"] = api_key or None
|
||||
elif base_url:
|
||||
# OpenAI Python SDK insists on an api_key; use a benign placeholder for keyless endpoints.
|
||||
client_kwargs["api_key"] = "not-provided"
|
||||
if base_url:
|
||||
client_kwargs["base_url"] = base_url
|
||||
if default_headers:
|
||||
|
||||
Reference in New Issue
Block a user