(fix) bug fix: completion, text_completion, check if optional params are not None and pass to LLM

This commit is contained in:
ishaan-jaff 2023-11-06 13:17:19 -08:00
parent f591d79376
commit b4797bec3b
2 changed files with 11 additions and 10 deletions

View file

@ -1923,6 +1923,7 @@ def text_completion(
text_completion_response = TextCompletionResponse()
optional_params: Dict[str, Any] = {}
# default values for all optional params are none, litellm only passes them to the llm when they are set to non None values
if best_of is not None:
optional_params["best_of"] = best_of
if echo is not None: