mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 19:54:13 +00:00
(feat) completion:openai pass OpenAI client
This commit is contained in:
parent
544beba4e1
commit
efd5dbccd5
1 changed files with 3 additions and 2 deletions
|
@ -498,7 +498,7 @@ def completion(
|
||||||
logging_obj=logging,
|
logging_obj=logging,
|
||||||
acompletion=acompletion,
|
acompletion=acompletion,
|
||||||
timeout=timeout,
|
timeout=timeout,
|
||||||
client=optional_params.pop("client", None)
|
client=optional_params.pop("client", None) # pass AsyncAzureOpenAI, AzureOpenAI client
|
||||||
)
|
)
|
||||||
|
|
||||||
## LOGGING
|
## LOGGING
|
||||||
|
@ -568,7 +568,8 @@ def completion(
|
||||||
litellm_params=litellm_params,
|
litellm_params=litellm_params,
|
||||||
logger_fn=logger_fn,
|
logger_fn=logger_fn,
|
||||||
timeout=timeout,
|
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:
|
except Exception as e:
|
||||||
## LOGGING - log the original exception returned
|
## LOGGING - log the original exception returned
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue