Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
deanxv committed May 31, 2024
1 parent 57c962e commit 8ddb6a1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ package common
import "time"

var StartTime = time.Now().Unix() // unit: second
var Version = "v0.1.0" // this hard coding will be replaced automatically when building, no need to manually change
var Version = "v0.1.1" // this hard coding will be replaced automatically when building, no need to manually change
4 changes: 2 additions & 2 deletions controller/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func ChatForOpenAI(c *gin.Context) {

c.JSON(http.StatusInternalServerError, model.OpenAIErrorResponse{
OpenAIError: model.OpenAIError{
Message: fmt.Sprintf("上下文中检索到敏感信息:%s", errMsg),
Message: fmt.Sprintf("Sensitive information detected:%s", errMsg),
Type: "request_error",
Code: "AUDIT_RESULT",
},
Expand Down Expand Up @@ -219,7 +219,7 @@ func ImagesForOpenAI(c *gin.Context) {

c.JSON(http.StatusInternalServerError, model.OpenAIErrorResponse{
OpenAIError: model.OpenAIError{
Message: fmt.Sprintf("上下文中检索到敏感信息:%s", errMsg),
Message: fmt.Sprintf("Sensitive information detected:%s", errMsg),
Type: "request_error",
Code: "AUDIT_RESULT",
},
Expand Down
4 changes: 2 additions & 2 deletions utils/qiniu.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ func QiNiuAudit[T model.GetUserContent](t T) (model.AuditResponse, error) {

//qiNiuResp.Result.Scenes["antispam"].

if qiNiuResp.Result.Suggestion != "pass" || qiNiuResp.Result.Scenes["antispam"].Suggestion != "review" {
if qiNiuResp.Result.Scenes["antispam"].Suggestion != "pass" || qiNiuResp.Result.Scenes["antispam"].Suggestion != "review" {
if qiNiuResp.Result.Suggestion != "pass" && qiNiuResp.Result.Suggestion != "review" {
if qiNiuResp.Result.Scenes["antispam"].Suggestion != "pass" && qiNiuResp.Result.Scenes["antispam"].Suggestion != "review" {
for _, detail := range qiNiuResp.Result.Scenes["antispam"].Details {
if !lo.Contains(labels, detail.Label) {
continue
Expand Down

0 comments on commit 8ddb6a1

Please sign in to comment.