mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-16 18:16:34 +00:00
(test) bedrock.cohere testing
This commit is contained in:
@@ -408,7 +408,7 @@ def test_completion_openai_prompt_array():
|
||||
response_str = response["choices"][0]["text"]
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
test_completion_openai_prompt_array()
|
||||
# test_completion_openai_prompt_array()
|
||||
|
||||
def test_completion_hf_prompt_array():
|
||||
try:
|
||||
@@ -423,7 +423,7 @@ def test_completion_hf_prompt_array():
|
||||
response_str = response["choices"][0]["text"]
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
test_completion_hf_prompt_array()
|
||||
# test_completion_hf_prompt_array()
|
||||
|
||||
def test_completion_text_openai():
|
||||
try:
|
||||
@@ -879,6 +879,26 @@ def test_completion_bedrock_claude():
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
# test_completion_bedrock_claude()
|
||||
|
||||
def test_completion_bedrock_cohere():
|
||||
print("calling bedrock cohere")
|
||||
try:
|
||||
response = completion(
|
||||
model="bedrock/cohere.command-text-v14",
|
||||
messages=[{"role": "user", "content": "hi"}],
|
||||
temperature=0.1,
|
||||
max_tokens=10,
|
||||
stream=True
|
||||
)
|
||||
# Add any assertions here to check the response
|
||||
print(response)
|
||||
for chunk in response:
|
||||
print(chunk)
|
||||
except RateLimitError:
|
||||
pass
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
# test_completion_bedrock_cohere()
|
||||
|
||||
|
||||
def test_completion_bedrock_claude_completion_auth():
|
||||
print("calling bedrock claude completion params auth")
|
||||
|
||||
Reference in New Issue
Block a user