update
This commit is contained in:
1 parent
7df0b2817c
commit
de31741d06
2 files changed
+111
-42
No files matched your search
@@ -511,6 +511,16 @@ func HandleProy(c *gin.Context) {
|
||||
onekey := store.FromKeyCacheRandomItemKey()
|
||||
// 创建 API 请求
|
||||
switch onekey.ApiType {
|
||||
case "claude":
|
||||
payload, _ := claude.TransReq(&chatreq)
|
||||
buildurl := "https://api.anthropic.com/v1/complete"
|
||||
req, err = http.NewRequest("POST", buildurl, payload)
|
||||
req.Header.Add("accept", "application/json")
|
||||
req.Header.Add("anthropic-version", "2023-06-01")
|
||||
req.Header.Add("x-api-key", onekey.Key)
|
||||
req.Header.Add("content-type", "application/json")
|
||||
case "azure":
|
||||
fallthrough
|
||||
case "azure_openai":
|
||||
var buildurl string
|
||||
var apiVersion = "2023-05-15"
|
||||
|
||||
Reference in new issue
Block a user