mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
test: mock sagemaker tests
This commit is contained in:
parent
58f46d847c
commit
48e6a7036b
3 changed files with 56 additions and 21 deletions
|
@ -5,6 +5,7 @@ from typing import Callable, Optional, Union
|
|||
import httpx
|
||||
|
||||
from litellm.llms.bedrock.base_aws_llm import BaseAWSLLM
|
||||
from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler, HTTPHandler
|
||||
from litellm.utils import ModelResponse, get_secret
|
||||
|
||||
from ..common_utils import AWSEventStreamDecoder
|
||||
|
@ -125,6 +126,7 @@ class SagemakerChatHandler(BaseAWSLLM):
|
|||
logger_fn=None,
|
||||
acompletion: bool = False,
|
||||
headers: dict = {},
|
||||
client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,
|
||||
):
|
||||
|
||||
# pop streaming if it's in the optional params as 'stream' raises an error with sagemaker
|
||||
|
@ -173,4 +175,5 @@ class SagemakerChatHandler(BaseAWSLLM):
|
|||
custom_endpoint=True,
|
||||
custom_llm_provider="sagemaker_chat",
|
||||
streaming_decoder=custom_stream_decoder, # type: ignore
|
||||
client=client,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue