forked from phoenix/litellm-mirror
(fix) init_bedrock_client
This commit is contained in:
parent
e0dfbdcd68
commit
d1e8d13c4f
1 changed files with 6 additions and 6 deletions
|
@ -424,16 +424,16 @@ def completion(
|
||||||
)
|
)
|
||||||
|
|
||||||
# use passed in BedrockRuntime.Client if provided, otherwise create a new one
|
# use passed in BedrockRuntime.Client if provided, otherwise create a new one
|
||||||
client = optional_params.pop(
|
client = optional_params.pop("aws_bedrock_client", None)
|
||||||
"aws_bedrock_client",
|
|
||||||
# only pass variables that are not None
|
# only init client, if user did not pass one
|
||||||
init_bedrock_client(
|
if client is None:
|
||||||
|
client = init_bedrock_client(
|
||||||
aws_access_key_id=aws_access_key_id,
|
aws_access_key_id=aws_access_key_id,
|
||||||
aws_secret_access_key=aws_secret_access_key,
|
aws_secret_access_key=aws_secret_access_key,
|
||||||
aws_region_name=aws_region_name,
|
aws_region_name=aws_region_name,
|
||||||
aws_bedrock_runtime_endpoint=aws_bedrock_runtime_endpoint,
|
aws_bedrock_runtime_endpoint=aws_bedrock_runtime_endpoint,
|
||||||
),
|
)
|
||||||
)
|
|
||||||
|
|
||||||
model = model
|
model = model
|
||||||
provider = model.split(".")[0]
|
provider = model.split(".")[0]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue