From 8ac7801283df3005089f0a79d75ceefbbe1c0a69 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Tue, 28 Nov 2023 16:05:01 -0800 Subject: [PATCH] (feat) completion:openai pass OpenAI client --- litellm/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/litellm/main.py b/litellm/main.py index 2ccd19683b..e0e4757c2f 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -498,7 +498,7 @@ def completion( logging_obj=logging, acompletion=acompletion, timeout=timeout, - client=optional_params.pop("client", None) + client=optional_params.pop("client", None) # pass AsyncAzureOpenAI, AzureOpenAI client ) ## LOGGING @@ -568,7 +568,8 @@ def completion( litellm_params=litellm_params, logger_fn=logger_fn, timeout=timeout, - custom_prompt_dict=custom_prompt_dict + custom_prompt_dict=custom_prompt_dict, + client=optional_params.pop("client", None) # pass AsyncOpenAI, OpenAI client ) except Exception as e: ## LOGGING - log the original exception returned