Add support of anthropic.claude-3-opus-20240229-v1:0 model
This commit is contained in:
@@ -6,7 +6,8 @@ OpenAI-compatible RESTful APIs for Amazon Bedrock
|
|||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
Amazon Bedrock offers a wide range of foundation models (such as Claude 3 Sonnet/Haiku, Llama 2, Mistral/Mixtral, etc.) and a broad set of capabilities for you to build generative AI applications. Check the [Amazon Bedrock](https://aws.amazon.com/bedrock) landing page for additional information.
|
Amazon Bedrock offers a wide range of foundation models (such as Claude 3 Opus/Sonnet/Haiku, Llama 2, Mistral/Mixtral,
|
||||||
|
etc.) and a broad set of capabilities for you to build generative AI applications. Check the [Amazon Bedrock](https://aws.amazon.com/bedrock) landing page for additional information.
|
||||||
|
|
||||||
Sometimes, you might have applications developed using OpenAI APIs or SDKs, and you want to experiment with Amazon Bedrock without modifying your codebase. Or you may simply wish to evaluate the capabilities of these foundation models in tools like AutoGen etc. Well, this repository allows you to access Amazon Bedrock models seamlessly through OpenAI APIs and SDKs, enabling you to test these models without code changes.
|
Sometimes, you might have applications developed using OpenAI APIs or SDKs, and you want to experiment with Amazon Bedrock without modifying your codebase. Or you may simply wish to evaluate the capabilities of these foundation models in tools like AutoGen etc. Well, this repository allows you to access Amazon Bedrock models seamlessly through OpenAI APIs and SDKs, enabling you to test these models without code changes.
|
||||||
|
|
||||||
@@ -30,6 +31,7 @@ Supported Amazon Bedrock models (Model IDs):
|
|||||||
- anthropic.claude-instant-v1
|
- anthropic.claude-instant-v1
|
||||||
- anthropic.claude-v2:1
|
- anthropic.claude-v2:1
|
||||||
- anthropic.claude-v2
|
- anthropic.claude-v2
|
||||||
|
- anthropic.claude-3-opus-20240229-v1:0
|
||||||
- anthropic.claude-3-sonnet-20240229-v1:0
|
- anthropic.claude-3-sonnet-20240229-v1:0
|
||||||
- anthropic.claude-3-haiku-20240307-v1:0
|
- anthropic.claude-3-haiku-20240307-v1:0
|
||||||
- meta.llama2-13b-chat-v1
|
- meta.llama2-13b-chat-v1
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
|
|
||||||
## 概述
|
## 概述
|
||||||
|
|
||||||
Amazon Bedrock提供了广泛的基础模型(如Claude 3 Sonnet/Haiku、Llama 2、Mistral/Mixtral等),以及构建生成式AI应用程序的多种功能。更多详细信息,请查看[Amazon Bedrock](https://aws.amazon.com/bedrock)。
|
Amazon Bedrock提供了广泛的基础模型(如Claude 3 Opus/Sonnet/Haiku、Llama 2、Mistral/Mixtral等),以及构建生成式AI应用程序的多种功能。更多详细信息,请查看[Amazon
|
||||||
|
Bedrock](https://aws.amazon.com/bedrock)。
|
||||||
|
|
||||||
有时,您可能已经使用OpenAI的API或SDK构建了应用程序,并希望在不修改代码的情况下试用Amazon
|
有时,您可能已经使用OpenAI的API或SDK构建了应用程序,并希望在不修改代码的情况下试用Amazon
|
||||||
Bedrock的模型。或者,您可能只是希望在AutoGen等工具中评估这些基础模型的功能。 好消息是, 这里提供了一种方便的途径,让您可以使用
|
Bedrock的模型。或者,您可能只是希望在AutoGen等工具中评估这些基础模型的功能。 好消息是, 这里提供了一种方便的途径,让您可以使用
|
||||||
@@ -32,6 +33,7 @@ OpenAI 的 API 或 SDK 无缝集成并试用 Amazon Bedrock 的模型,而无需
|
|||||||
- anthropic.claude-instant-v1
|
- anthropic.claude-instant-v1
|
||||||
- anthropic.claude-v2:1
|
- anthropic.claude-v2:1
|
||||||
- anthropic.claude-v2
|
- anthropic.claude-v2
|
||||||
|
- anthropic.claude-3-opus-20240229-v1:0
|
||||||
- anthropic.claude-3-sonnet-20240229-v1:0
|
- anthropic.claude-3-sonnet-20240229-v1:0
|
||||||
- anthropic.claude-3-haiku-20240307-v1:0
|
- anthropic.claude-3-haiku-20240307-v1:0
|
||||||
- meta.llama2-13b-chat-v1
|
- meta.llama2-13b-chat-v1
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ SUPPORTED_BEDROCK_MODELS = {
|
|||||||
"anthropic.claude-v2:1": "Claude",
|
"anthropic.claude-v2:1": "Claude",
|
||||||
"anthropic.claude-v2": "Claude",
|
"anthropic.claude-v2": "Claude",
|
||||||
"anthropic.claude-3-sonnet-20240229-v1:0": "Claude 3 Sonnet",
|
"anthropic.claude-3-sonnet-20240229-v1:0": "Claude 3 Sonnet",
|
||||||
|
"anthropic.claude-3-opus-20240229-v1:0": "Claude 3 Opus",
|
||||||
"anthropic.claude-3-haiku-20240307-v1:0": "Claude 3 Haiku",
|
"anthropic.claude-3-haiku-20240307-v1:0": "Claude 3 Haiku",
|
||||||
"meta.llama2-13b-chat-v1": "Llama 2 Chat 13B",
|
"meta.llama2-13b-chat-v1": "Llama 2 Chat 13B",
|
||||||
"meta.llama2-70b-chat-v1": "Llama 2 Chat 70B",
|
"meta.llama2-70b-chat-v1": "Llama 2 Chat 70B",
|
||||||
@@ -738,7 +739,7 @@ def get_model(model_id: str) -> BedrockModel:
|
|||||||
model_name = SUPPORTED_BEDROCK_MODELS.get(model_id, "")
|
model_name = SUPPORTED_BEDROCK_MODELS.get(model_id, "")
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
logger.info("model name is " + model_name)
|
logger.info("model name is " + model_name)
|
||||||
if model_name in ["Claude Instant", "Claude", "Claude 3 Sonnet", "Claude 3 Haiku"]:
|
if model_name in ["Claude Instant", "Claude", "Claude 3 Sonnet", "Claude 3 Haiku", "Claude 3 Opus"]:
|
||||||
return ClaudeModel()
|
return ClaudeModel()
|
||||||
elif model_name in ["Llama 2 Chat 13B", "Llama 2 Chat 70B"]:
|
elif model_name in ["Llama 2 Chat 13B", "Llama 2 Chat 70B"]:
|
||||||
return Llama2Model()
|
return Llama2Model()
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ List of Amazon Bedrock models currently supported:
|
|||||||
- anthropic.claude-instant-v1
|
- anthropic.claude-instant-v1
|
||||||
- anthropic.claude-v2:1
|
- anthropic.claude-v2:1
|
||||||
- anthropic.claude-v2
|
- anthropic.claude-v2
|
||||||
|
- anthropic.claude-3-opus-20240229-v1:0
|
||||||
- anthropic.claude-3-sonnet-20240229-v1:0
|
- anthropic.claude-3-sonnet-20240229-v1:0
|
||||||
- anthropic.claude-3-haiku-20240307-v1:0
|
- anthropic.claude-3-haiku-20240307-v1:0
|
||||||
- meta.llama2-13b-chat-v1
|
- meta.llama2-13b-chat-v1
|
||||||
|
|||||||
Reference in New Issue
Block a user