feat(sagemaker.py): initial commit of working sagemaker with aioboto3

This commit is contained in:
Krrish Dholakia 2024-02-12 17:25:57 -08:00
parent ad7e856a02
commit 460b48914e
3 changed files with 117 additions and 42 deletions

View file

@ -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