mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
fix test_bedrock_httpx_streaming
This commit is contained in:
parent
de0dacc42d
commit
7efe9beac5
2 changed files with 5 additions and 2 deletions
|
|
@ -1066,7 +1066,7 @@ class BedrockLLM(BaseLLM):
|
|||
|
||||
if response.status_code != 200:
|
||||
raise BedrockError(
|
||||
status_code=response.status_code, message=response.text
|
||||
status_code=response.status_code, message=response.read()
|
||||
)
|
||||
|
||||
decoder = AWSEventStreamDecoder(model=model)
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ sys.path.insert(
|
|||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
import random
|
||||
|
||||
import litellm
|
||||
from litellm import (
|
||||
AuthenticationError,
|
||||
|
|
@ -1373,7 +1375,8 @@ async def test_bedrock_httpx_streaming(sync_mode, model):
|
|||
if complete_response.strip() == "":
|
||||
raise Exception("Empty response received")
|
||||
print(f"completion_response: {complete_response}\n\nFinalChunk: {final_chunk}")
|
||||
except RateLimitError:
|
||||
except RateLimitError as e:
|
||||
print("got rate limit error=", e)
|
||||
pass
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue