From 928efe2d870d998d39bb0fd6c249873c86dd87ed Mon Sep 17 00:00:00 2001 From: uid10804 Date: Fri, 31 May 2024 16:57:28 +0200 Subject: [PATCH] refactor(bedrock_httpx): change botocore reference --- litellm/llms/bedrock_httpx.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/litellm/llms/bedrock_httpx.py b/litellm/llms/bedrock_httpx.py index 55bd6d7390f..156aa510c33 100644 --- a/litellm/llms/bedrock_httpx.py +++ b/litellm/llms/bedrock_httpx.py @@ -45,7 +45,6 @@ import httpx # type: ignore from .bedrock import BedrockError, convert_messages_to_prompt, ModelResponseIterator from litellm.types.llms.bedrock import * import urllib.parse -import botocore class AmazonCohereChatConfig: @@ -264,7 +263,9 @@ class BedrockLLM(BaseLLM): # Extract the credentials from the response and convert to Session Credentials sts_credentials = sts_response["Credentials"] - credentials = botocore.credentials.Credentials( + from botocore.credentials import Credentials + + credentials = Credentials( access_key=sts_credentials["AccessKeyId"], secret_key=sts_credentials["SecretAccessKey"], token=sts_credentials["SessionToken"],