feat: publish sanitized custom.97 source

This commit is contained in:
cneicy committed 2026-10-27 20:43:39 +08:00
1 parent 8e6ed0317b
commit 86c0276156
1022 files changed
+69903 -19207

No files matched your search

+5 -5
View File
@@ -145,7 +145,7 @@ func xunfeiStreamHandler(c *gin.Context, textRequest dto.GeneralOpenAIRequest, a
response := streamResponseXunfei2OpenAI(&xunfeiResponse)
jsonResponse, err := json.Marshal(response)
if err != nil {
common.SysLog("error marshalling stream response: " + err.Error())
common.SysLog(common.LogText("error marshalling stream response: %s", err.Error()))
return true
}
c.Render(-1, common.CustomEvent{Data: "data: " + string(jsonResponse)})
@@ -224,19 +224,19 @@ func xunfeiMakeRequest(textRequest dto.GeneralOpenAIRequest, domain, authUrl, ap
for {
_, msg, err := conn.ReadMessage()
if err != nil {
common.SysLog("error reading stream response: " + err.Error())
common.SysLog(common.LogText("error reading stream response: %s", err.Error()))
break
}
var response XunfeiChatResponse
err = json.Unmarshal(msg, &response)
if err != nil {
common.SysLog("error unmarshalling stream response: " + err.Error())
common.SysLog(common.LogText("error unmarshalling stream response: %s", err.Error()))
break
}
dataChan <- response
if response.Payload.Choices.Status == 2 {
if err != nil {
common.SysLog("error closing websocket connection: " + err.Error())
common.SysLog(common.LogText("error closing websocket connection: %s", err.Error()))
}
break
}
@@ -287,6 +287,6 @@ func getAPIVersion(c *gin.Context, modelName string) string {
return apiVersion
}
apiVersion = "v1.1"
common.SysLog("api_version not found, using default: " + apiVersion)
common.SysLog(common.LogText("api_version not found, using default: %s", apiVersion))
return apiVersion
}