mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 19:54:13 +00:00
fix(bedrock.py): fix supported openai params for bedrock claude 3
This commit is contained in:
parent
6c3ef60c93
commit
47b2b0df17
2 changed files with 10 additions and 1 deletions
|
@ -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():
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue