From 6b07e6fb970656ec4653cd5a94e89ed9d0070b6a Mon Sep 17 00:00:00 2001 From: Mageia Date: Tue, 25 Jun 2024 10:04:17 +0800 Subject: [PATCH 1/2] chore: Add Anthropic claude-3-5-sonnet-20240620 to model list --- common/model-ratio.go | 11 ++++++----- fly.toml | 19 +++++++++++++++++++ relay/channel/claude/constants.go | 1 + 3 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 fly.toml diff --git a/common/model-ratio.go b/common/model-ratio.go index d283c65..4504c5f 100644 --- a/common/model-ratio.go +++ b/common/model-ratio.go @@ -72,11 +72,12 @@ var defaultModelRatio = map[string]float64{ "text-search-ada-doc-001": 10, "text-moderation-stable": 0.1, "text-moderation-latest": 0.1, - "claude-instant-1": 0.4, // $0.8 / 1M tokens - "claude-2.0": 4, // $8 / 1M tokens - "claude-2.1": 4, // $8 / 1M tokens - "claude-3-haiku-20240307": 0.125, // $0.25 / 1M tokens - "claude-3-sonnet-20240229": 1.5, // $3 / 1M tokens + "claude-instant-1": 0.4, // $0.8 / 1M tokens + "claude-2.0": 4, // $8 / 1M tokens + "claude-2.1": 4, // $8 / 1M tokens + "claude-3-haiku-20240307": 0.125, // $0.25 / 1M tokens + "claude-3-sonnet-20240229": 1.5, // $3 / 1M tokens + "claude-3-5-sonnet-20240620": 1.5, "claude-3-opus-20240229": 7.5, // $15 / 1M tokens "ERNIE-Bot": 0.8572, // ¥0.012 / 1k tokens //renamed to ERNIE-3.5-8K "ERNIE-Bot-turbo": 0.5715, // ¥0.008 / 1k tokens //renamed to ERNIE-Lite-8K diff --git a/fly.toml b/fly.toml new file mode 100644 index 0000000..f835793 --- /dev/null +++ b/fly.toml @@ -0,0 +1,19 @@ +app = "new-api-proxy" +primary_region = "ord" + +[http_service] +internal_port = 3000 +force_https = true +auto_stop_machines = true +auto_start_machines = true +min_machines_running = 1 +processes = ["app"] + +[[vm]] +cpu_kind = "shared" +cpus = 1 +memory_mb = 1024 + + +# postgres://newapi:niXl1YOXVBI4ur4@127.0.0.1:5433/newapi + diff --git a/relay/channel/claude/constants.go b/relay/channel/claude/constants.go index 2ad7507..7d86e66 100644 --- a/relay/channel/claude/constants.go +++ b/relay/channel/claude/constants.go @@ -8,6 +8,7 @@ var ModelList = []string{ "claude-3-sonnet-20240229", "claude-3-opus-20240229", "claude-3-haiku-20240307", + "claude-3-5-sonnet-20240620", } var ChannelName = "claude" From c838beba3daa2192924d8a0c561ca01a8df2a021 Mon Sep 17 00:00:00 2001 From: Calcium-Ion <61247483+Calcium-Ion@users.noreply.github.com> Date: Wed, 26 Jun 2024 22:11:58 +0800 Subject: [PATCH 2/2] Delete fly.toml --- fly.toml | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 fly.toml diff --git a/fly.toml b/fly.toml deleted file mode 100644 index f835793..0000000 --- a/fly.toml +++ /dev/null @@ -1,19 +0,0 @@ -app = "new-api-proxy" -primary_region = "ord" - -[http_service] -internal_port = 3000 -force_https = true -auto_stop_machines = true -auto_start_machines = true -min_machines_running = 1 -processes = ["app"] - -[[vm]] -cpu_kind = "shared" -cpus = 1 -memory_mb = 1024 - - -# postgres://newapi:niXl1YOXVBI4ur4@127.0.0.1:5433/newapi -