feat: support aws bedrockruntime claude3

closes #622, closes #749, closes #1300
This commit is contained in:
Laisky.Cai
2024-04-18 02:50:12 +00:00
parent 7bf61f9165
commit 1d507be770
21 changed files with 515 additions and 85 deletions

View File

@@ -4,6 +4,7 @@ import (
"github.com/songquanpeng/one-api/common/env"
"os"
"strconv"
"strings"
"sync"
"time"
@@ -51,9 +52,9 @@ var EmailDomainWhitelist = []string{
"foxmail.com",
}
var DebugEnabled = os.Getenv("DEBUG") == "true"
var DebugSQLEnabled = os.Getenv("DEBUG_SQL") == "true"
var MemoryCacheEnabled = os.Getenv("MEMORY_CACHE_ENABLED") == "true"
var DebugEnabled = strings.ToLower(os.Getenv("DEBUG")) == "true"
var DebugSQLEnabled = strings.ToLower(os.Getenv("DEBUG_SQL")) == "true"
var MemoryCacheEnabled = strings.ToLower(os.Getenv("MEMORY_CACHE_ENABLED")) == "true"
var LogConsumeEnabled = true

View File

@@ -4,3 +4,11 @@ import "time"
var StartTime = time.Now().Unix() // unit: second
var Version = "v0.0.0" // this hard coding will be replaced automatically when building, no need to manually change
var (
// CtxKeyChannel is the key to store the channel in the context
CtxKeyChannel string = "channel_docu"
CtxKeyRequestModel string = "request_model"
CtxKeyRawRequest string = "raw_request"
CtxKeyConvertedRequest string = "converted_request"
)