From 1085a672e99369172e88283ec7b9b5c5a9f163e8 Mon Sep 17 00:00:00 2001 From: wengchaoxi Date: Fri, 21 Jun 2024 11:24:22 +0800 Subject: [PATCH] Add `claude-3-5-sonnet-20240620` model --- README.md | 6 +++--- README.zh-CN.md | 6 +++--- anthropic.go | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c0d5567..d6edf4d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **English** | [简体中文](./README.zh-CN.md) -Anthropic SDK implemented in Go, supporting models such as Claude 2.1, Claude 3 (supports sending images), etc. +Anthropic SDK implemented in Go, supporting models such as Claude 2.1, Claude 3, and Claude 3.5 (supports sending images), etc. ## Installation @@ -31,7 +31,7 @@ func main() { // }) resp, err := cli.CreateMessages(anthropic.MessagesRequest{ - // `MODEL_CLAUDE_3_SONNET`、`MODEL_CLAUDE_3_OPUS`、`MODEL_CLAUDE_2_1` + // `MODEL_CLAUDE_35_SONNET`、`MODEL_CLAUDE_3_SONNET`、`MODEL_CLAUDE_3_OPUS`、`MODEL_CLAUDE_2_1` Model: anthropic.MODEL_CLAUDE_3_HAIKU Messages: []anthropic.Message{{ Role: "user", @@ -71,7 +71,7 @@ func main() { // }) stream, _ := cli.CreateMessagesStream(anthropic.MessagesRequest{ - // `MODEL_CLAUDE_3_SONNET`、`MODEL_CLAUDE_3_OPUS`、`MODEL_CLAUDE_2_1` + // `MODEL_CLAUDE_35_SONNET`、`MODEL_CLAUDE_3_SONNET`、`MODEL_CLAUDE_3_OPUS`、`MODEL_CLAUDE_2_1` Model: anthropic.MODEL_CLAUDE_3_HAIKU Messages: []anthropic.Message{{ Role: "user", diff --git a/README.zh-CN.md b/README.zh-CN.md index 0591a42..ce2c4ec 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -2,7 +2,7 @@ **简体中文** | [English](./README.md) -用 Go 实现的 Anthropic SDK,支持:Claude 2.1、Claude 3(支持发送图片)等模型。 +用 Go 实现的 Anthropic SDK,支持:Claude 2.1、Claude 3、Claude 3.5(支持发送图片)等模型。 ## 安装 @@ -31,7 +31,7 @@ func main() { // }) resp, err := cli.CreateMessages(anthropic.MessagesRequest{ - // `MODEL_CLAUDE_3_SONNET`、`MODEL_CLAUDE_3_OPUS`、`MODEL_CLAUDE_2_1` + // `MODEL_CLAUDE_35_SONNET`、`MODEL_CLAUDE_3_SONNET`、`MODEL_CLAUDE_3_OPUS`、`MODEL_CLAUDE_2_1` Model: anthropic.MODEL_CLAUDE_3_HAIKU Messages: []anthropic.Message{{ Role: "user", @@ -71,7 +71,7 @@ func main() { // }) stream, _ := cli.CreateMessagesStream(anthropic.MessagesRequest{ - // `MODEL_CLAUDE_3_SONNET`、`MODEL_CLAUDE_3_OPUS`、`MODEL_CLAUDE_2_1` + // `MODEL_CLAUDE_35_SONNET`、`MODEL_CLAUDE_3_SONNET`、`MODEL_CLAUDE_3_OPUS`、`MODEL_CLAUDE_2_1` Model: anthropic.MODEL_CLAUDE_3_HAIKU Messages: []anthropic.Message{{ Role: "user", diff --git a/anthropic.go b/anthropic.go index f2940be..7a1081e 100644 --- a/anthropic.go +++ b/anthropic.go @@ -8,6 +8,8 @@ const ( MODEL_CLAUDE_3_SONNET = "claude-3-sonnet-20240229" MODEL_CLAUDE_3_OPUS = "claude-3-opus-20240229" MODEL_CLAUDE_3_HAIKU = "claude-3-haiku-20240307" + + MODEL_CLAUDE_35_SONNET = "claude-3-5-sonnet-20240620" ) // MessageContentText | MessageContentFile