Dhudean commited on
Commit
2c13ccd
·
1 Parent(s): 013ebd5
Files changed (4) hide show
  1. common/constants.go +1 -1
  2. controller/chat.go +8 -0
  3. go.mod +1 -1
  4. go.sum +2 -0
common/constants.go CHANGED
@@ -3,7 +3,7 @@ package common
3
  import "time"
4
 
5
  var StartTime = time.Now().Unix() // unit: second
6
- var Version = "v1.8.11" // this hard coding will be replaced automatically when building, no need to manually change
7
 
8
  var DefaultOpenaiModelList = []string{
9
  "gpt-4o",
 
3
  import "time"
4
 
5
  var StartTime = time.Now().Unix() // unit: second
6
+ var Version = "v1.8.12" // this hard coding will be replaced automatically when building, no need to manually change
7
 
8
  var DefaultOpenaiModelList = []string{
9
  "gpt-4o",
controller/chat.go CHANGED
@@ -61,6 +61,14 @@ func ChatForOpenAI(c *gin.Context) {
61
  return
62
  }
63
 
 
 
 
 
 
 
 
 
64
  // 初始化cookie
65
  cookieManager := config.NewCookieManager()
66
  cookie, err := cookieManager.GetRandomCookie()
 
61
  return
62
  }
63
 
64
+ // 模型映射
65
+ if openAIReq.Model == "deepseek-r1" {
66
+ openAIReq.Model = "deep-seek-r1"
67
+ }
68
+ if openAIReq.Model == "deepseek-v3" {
69
+ openAIReq.Model = "deep-seek-v3"
70
+ }
71
+
72
  // 初始化cookie
73
  cookieManager := config.NewCookieManager()
74
  cookie, err := cookieManager.GetRandomCookie()
go.mod CHANGED
@@ -3,7 +3,7 @@ module genspark2api
3
  go 1.23
4
 
5
  require (
6
- github.com/deanxv/CycleTLS/cycletls v0.0.0-20250206060125-b8e4d910abbf
7
  github.com/gin-contrib/cors v1.7.3
8
  github.com/gin-gonic/gin v1.10.0
9
  github.com/google/uuid v1.6.0
 
3
  go 1.23
4
 
5
  require (
6
+ github.com/deanxv/CycleTLS/cycletls v0.0.0-20250206063908-bfd1b7750d37
7
  github.com/gin-contrib/cors v1.7.3
8
  github.com/gin-gonic/gin v1.10.0
9
  github.com/google/uuid v1.6.0
go.sum CHANGED
@@ -39,6 +39,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
39
  github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
40
  github.com/deanxv/CycleTLS/cycletls v0.0.0-20250206060125-b8e4d910abbf h1:nsskm99CacPwCDkwCoIFDAqIHahLJyjht1bICqu1uvc=
41
  github.com/deanxv/CycleTLS/cycletls v0.0.0-20250206060125-b8e4d910abbf/go.mod h1:eAyIp7Lbyq6WnJDGicqf7nYr0bTj5FQ0HXQbIesuuJ8=
 
 
42
  github.com/dlclark/regexp2 v1.11.4 h1:rPYF9/LECdNymJufQKmri9gV604RvvABwgOA8un7yAo=
43
  github.com/dlclark/regexp2 v1.11.4/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
44
  github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
 
39
  github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
40
  github.com/deanxv/CycleTLS/cycletls v0.0.0-20250206060125-b8e4d910abbf h1:nsskm99CacPwCDkwCoIFDAqIHahLJyjht1bICqu1uvc=
41
  github.com/deanxv/CycleTLS/cycletls v0.0.0-20250206060125-b8e4d910abbf/go.mod h1:eAyIp7Lbyq6WnJDGicqf7nYr0bTj5FQ0HXQbIesuuJ8=
42
+ github.com/deanxv/CycleTLS/cycletls v0.0.0-20250206063908-bfd1b7750d37 h1:39pwCIyBhsAylwHet8IbjgNinLnqyqSkdgqTcNHbi3E=
43
+ github.com/deanxv/CycleTLS/cycletls v0.0.0-20250206063908-bfd1b7750d37/go.mod h1:eAyIp7Lbyq6WnJDGicqf7nYr0bTj5FQ0HXQbIesuuJ8=
44
  github.com/dlclark/regexp2 v1.11.4 h1:rPYF9/LECdNymJufQKmri9gV604RvvABwgOA8un7yAo=
45
  github.com/dlclark/regexp2 v1.11.4/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
46
  github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=