fix(bedrock.py): fix supported openai params for bedrock claude 3

This commit is contained in:
Krrish Dholakia 2024-03-23 16:02:15 -07:00
parent 6c3ef60c93
commit 47b2b0df17
2 changed files with 10 additions and 1 deletions

View file

@ -129,7 +129,15 @@ class AmazonAnthropicClaude3Config:
}
def get_supported_openai_params(self):
return ["max_tokens", "tools", "tool_choice", "stream"]
return [
"max_tokens",
"tools",
"tool_choice",
"stream",
"stop",
"temperature",
"top_p",
]
def map_openai_params(self, non_default_params: dict, optional_params: dict):
for param, value in non_default_params.items():

View file

@ -214,6 +214,7 @@ def test_bedrock_claude_3():
model="bedrock/anthropic.claude-3-sonnet-20240229-v1:0",
messages=messages,
max_tokens=10,
temperature=0.78,
)
# Add any assertions here to check the response
assert len(response.choices) > 0