mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
fix(bedrock.py): fix supported openai params for bedrock claude 3
This commit is contained in:
parent
5bcf92f4f5
commit
2fabff06c0
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
Reference in a new issue