fix(utils.py): route together ai calls to openai client

together ai is now openai-compatible

n
This commit is contained in:
Krrish Dholakia 2024-02-03 19:22:48 -08:00
parent c2f674ebe0
commit c49c88c8e5
6 changed files with 23 additions and 4 deletions

View file

@ -791,6 +791,7 @@ def completion(
or custom_llm_provider == "anyscale"
or custom_llm_provider == "mistral"
or custom_llm_provider == "openai"
or custom_llm_provider == "together_ai"
or "ft:gpt-3.5-turbo" in model # finetune gpt-3.5-turbo
): # allow user to make an openai call with a custom base
# note: if a user sets a custom base - we should ensure this works
@ -1330,6 +1331,9 @@ def completion(
or ("togethercomputer" in model)
or (model in litellm.together_ai_models)
):
"""
Deprecated. We now do together ai calls via the openai client - https://docs.together.ai/docs/openai-api-compatibility
"""
custom_llm_provider = "together_ai"
together_ai_key = (
api_key