mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
add together-ai
This commit is contained in:
parent
441fff406c
commit
23fc936b65
3 changed files with 59 additions and 4 deletions
|
@ -216,6 +216,7 @@ def get_optional_params(
|
|||
model = None,
|
||||
replicate = False,
|
||||
hugging_face = False,
|
||||
together_ai = False,
|
||||
):
|
||||
optional_params = {}
|
||||
if model in litellm.anthropic_models:
|
||||
|
@ -244,6 +245,18 @@ def get_optional_params(
|
|||
if stream:
|
||||
optional_params["stream"] = stream
|
||||
return optional_params
|
||||
elif together_ai == True:
|
||||
if stream:
|
||||
optional_params["stream"] = stream
|
||||
if temperature != 1:
|
||||
optional_params["temperature"] = temperature
|
||||
if top_p != 1:
|
||||
optional_params["top_p"] = top_p
|
||||
if max_tokens != float('inf'):
|
||||
optional_params["max_tokens"] = max_tokens
|
||||
if frequency_penalty != 0:
|
||||
optional_params["frequency_penalty"] = frequency_penalty
|
||||
|
||||
else:# assume passing in params for openai/azure openai
|
||||
if functions != []:
|
||||
optional_params["functions"] = functions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue