fix(utils.py): allow dynamically setting boto3 init and switching between bedrock and openai

This commit is contained in:
Krrish Dholakia 2024-01-17 15:56:30 -08:00
parent 9b38ce8447
commit 7ed4d9b4d1
2 changed files with 14 additions and 0 deletions

View file

@ -3197,6 +3197,10 @@ def get_optional_params(
passed_params = locals()
special_params = passed_params.pop("kwargs")
for k, v in special_params.items():
if k.startswith("aws_") and (
custom_llm_provider != "bedrock" or custom_llm_provider != "sagemaker"
): # allow dynamically setting boto3 init logic
continue
passed_params[k] = v
default_params = {
"functions": None,