mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
feat(sagemaker.py): initial commit of working sagemaker with aioboto3
This commit is contained in:
parent
ad7e856a02
commit
460b48914e
3 changed files with 117 additions and 42 deletions
|
@ -201,6 +201,22 @@ async def test_hf_completion_tgi():
|
|||
# test_get_cloudflare_response_streaming()
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_completion_sagemaker():
|
||||
# litellm.set_verbose=True
|
||||
try:
|
||||
response = await acompletion(
|
||||
model="sagemaker/berri-benchmarking-Llama-2-70b-chat-hf-4",
|
||||
messages=[{"content": "Hello, how are you?", "role": "user"}],
|
||||
)
|
||||
# Add any assertions here to check the response
|
||||
print(response)
|
||||
except litellm.Timeout as e:
|
||||
pass
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
|
||||
|
||||
def test_get_response_streaming():
|
||||
import asyncio
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue