Skip to content

Commit

Permalink
Replace single quotes with double
Browse files Browse the repository at this point in the history
  • Loading branch information
vblagoje committed Mar 6, 2024
1 parent feff4b4 commit 8cb1d4b
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions integrations/amazon_bedrock/tests/test_chat_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ def test_prepare_body_with_default_params(self) -> None:
layer = AnthropicClaudeChatAdapter(generation_kwargs={})
prompt = "Hello, how are you?"
expected_body = {
'anthropic_version': 'bedrock-2023-05-31',
'max_tokens': 512,
'messages': [{'content': [{'text': 'Hello, how are you?', 'type': 'text'}],
'role': 'user'}]}
"anthropic_version": "bedrock-2023-05-31",
"max_tokens": 512,
"messages": [{"content": [{"text": "Hello, how are you?", "type": "text"}],
"role": "user"}]}

body = layer.prepare_body([ChatMessage.from_user(prompt)])

Expand All @@ -158,15 +158,15 @@ def test_prepare_body_with_default_params(self) -> None:
def test_prepare_body_with_custom_inference_params(self) -> None:
layer = AnthropicClaudeChatAdapter(generation_kwargs={"temperature": 0.7, "top_p": 0.8, "top_k": 4})
prompt = "Hello, how are you?"
expected_body = {'anthropic_version': 'bedrock-2023-05-31',
'max_tokens': 512,
'max_tokens_to_sample': 69,
'messages': [{'content': [{'text': 'Hello, how are you?', 'type': 'text'}],
'role': 'user'}],
'stop_sequences': ['CUSTOM_STOP'],
'temperature': 0.7,
'top_k': 5,
'top_p': 0.8}
expected_body = {"anthropic_version": "bedrock-2023-05-31",
"max_tokens": 512,
"max_tokens_to_sample": 69,
"messages": [{"content": [{"text": "Hello, how are you?", "type": "text"}],
"role": "user"}],
"stop_sequences": ["CUSTOM_STOP"],
"temperature": 0.7,
"top_k": 5,
"top_p": 0.8}

body = layer.prepare_body(
[ChatMessage.from_user(prompt)], top_p=0.8, top_k=5, max_tokens_to_sample=69, stop_sequences=["CUSTOM_STOP"]
Expand Down

0 comments on commit 8cb1d4b

Please sign in to comment.