Add Llama 3.1 without tool call

This commit is contained in:
Aiden Dai
2024-07-30 12:27:08 +08:00
parent f6b73152bc
commit f8faf32a76

View File

@@ -131,6 +131,24 @@ class BedrockModel(BaseChatModel):
"tool_call": False,
"stream_tool_call": False,
},
"meta.llama3-1-8b-instruct-v1:0": {
"system": True,
"multimodal": False,
"tool_call": False,
"stream_tool_call": False,
},
"meta.llama3-1-70b-instruct-v1:0": {
"system": True,
"multimodal": False,
"tool_call": False,
"stream_tool_call": False,
},
"meta.llama3-1-405b-instruct-v1:0": {
"system": True,
"multimodal": False,
"tool_call": False,
"stream_tool_call": False,
},
"mistral.mistral-7b-instruct-v0:2": {
"system": False,
"multimodal": False,
@@ -388,7 +406,7 @@ class BedrockModel(BaseChatModel):
]
}
if chat_request.tool_choice:
if chat_request.tool_choice and not chat_request.model.startswith("meta.llama3-1-"):
if isinstance(chat_request.tool_choice, str):
# auto (default) is mapped to {"auto" : {}}
# required is mapped to {"any" : {}}