add replicate support for max_tokens

This commit is contained in:
ishaan-jaff 2023-09-06 10:38:19 -07:00
parent ef43141554
commit d4c4a138ca
4 changed files with 11 additions and 4 deletions

View file

@ -707,6 +707,8 @@ def get_optional_params( # use the openai defaults
if stream:
optional_params["stream"] = stream
return optional_params
if max_tokens != float("inf"):
optional_params["max_new_tokens"] = max_tokens
elif custom_llm_provider == "together_ai" or ("togethercomputer" in model):
if stream:
optional_params["stream_tokens"] = stream