mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
add test
Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>
This commit is contained in:
parent
12e730885b
commit
338722beba
1 changed files with 19 additions and 0 deletions
19
tests/litellm/llms/chat/test_converse_handler.py
Normal file
19
tests/litellm/llms/chat/test_converse_handler.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
from litellm.llms.bedrock.chat import BedrockConverseLLM
|
||||
|
||||
sys.path.insert(
|
||||
0, os.path.abspath("../../../../..")
|
||||
) # Adds the parent directory to the system path
|
||||
import litellm
|
||||
|
||||
def test_encode_model_id_with_inference_profile():
|
||||
"""
|
||||
Tests to make sure model name is being escaped correctly when used with an inference profile
|
||||
:return:
|
||||
"""
|
||||
test = "bedrock/converse/arn:aws:bedrock:us-east-1:12345678910:application-inference-profile/ujdtmcirjhevpi"
|
||||
expected = "bedrock/converse/arn%3Aaws%3Abedrock%3Aus-east-1%3A12345678910%3Aapplication-inference-profile%2Fujdtmcirjhevpi"
|
||||
got = BedrockConverseLLM.encode_model_id(test)
|
||||
assert expected == got
|
||||
Loading…
Add table
Reference in a new issue