diff --git a/conversion/requests/chatgpt/convert.go b/conversion/requests/chatgpt/convert.go index daf12d4..3b9cb18 100644 --- a/conversion/requests/chatgpt/convert.go +++ b/conversion/requests/chatgpt/convert.go @@ -25,7 +25,7 @@ func ConvertAPIRequest(api_request official_types.APIRequest, account string, se chatgpt_request.ConversationMode.Kind = "gizmo_interaction" chatgpt_request.ConversationMode.GizmoId = "g-" + matches[1] } - ifMultimodel := secret.Token != "" + ifMultimodel := strings.HasPrefix(api_request.Model, "gpt-4") for _, api_message := range api_request.Messages { if api_message.Role == "system" { api_message.Role = "critic" diff --git a/typings/chatgpt/request.go b/typings/chatgpt/request.go index 7213bda..f57f5ec 100644 --- a/typings/chatgpt/request.go +++ b/typings/chatgpt/request.go @@ -91,7 +91,7 @@ type FileResult struct { Filesize int Isimage bool Bounds [2]int - // Current file max-age 1 year + // Current file max-age 30 days Upload int64 } @@ -289,7 +289,7 @@ func processUrl(urlstr string, account string, secret *tokens.Secret, deviceId s hasher := sha1.New() hasher.Write(binary) hash := account + secret.TeamUserID + hex.EncodeToString(hasher.Sum(nil)) - if fileHashPool[hash] != nil && time.Now().Unix() < fileHashPool[hash].Upload+31536000 { + if fileHashPool[hash] != nil && time.Now().Unix() < fileHashPool[hash].Upload+2592000 { return fileHashPool[hash] } isImg := strings.HasPrefix(mimeType, "image") @@ -319,7 +319,7 @@ func processDataUrl(data string, account string, secret *tokens.Secret, deviceId hasher := sha1.New() hasher.Write(binary) hash := account + secret.TeamUserID + hex.EncodeToString(hasher.Sum(nil)) - if fileHashPool[hash] != nil && time.Now().Unix() < fileHashPool[hash].Upload+31536000 { + if fileHashPool[hash] != nil && time.Now().Unix() < fileHashPool[hash].Upload+2592000 { return fileHashPool[hash] } startIdx := strings.Index(data, ":")