Update utils.py

Allow using custom models and on-demand deployments
This commit is contained in:
Daniel Bichuetti 2024-07-17 08:19:36 -03:00 • committed by GitHub
parent efb1ee66d7
commit 8b830358e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4417,7 +4417,7 @@ def get_llm_provider(
dynamic_api_key = get_secret("DEEPSEEK_API_KEY")
elif custom_llm_provider == "fireworks_ai":
# fireworks is openai compatible, we just need to set this to custom_openai and have the api_base be https://api.fireworks.ai/inference/v1
if not model.startswith("accounts/fireworks/models"):
if not model.startswith("accounts/"):
model = f"accounts/fireworks/models/{model}"
api_base = api_base or "https://api.fireworks.ai/inference/v1"
dynamic_api_key = (