This commit is contained in:
Sakurasan
2023-04-27 17:27:43 +08:00
parent a202dfadca
commit 8a2ebb6778

View File

@@ -31,6 +31,7 @@ var (
baseUrl = "https://api.openai.com" baseUrl = "https://api.openai.com"
GPT3Dot5Turbo = "gpt-3.5-turbo" GPT3Dot5Turbo = "gpt-3.5-turbo"
GPT4 = "gpt-4" GPT4 = "gpt-4"
client = getHttpClient()
) )
type User struct { type User struct {
@@ -362,7 +363,7 @@ func HandleProy(c *gin.Context) {
} }
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", store.FromKeyCacheRandomItem())) req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", store.FromKeyCacheRandomItem()))
} }
client := getHttpClient()
resp, err := client.Do(req) resp, err := client.Do(req)
if err != nil { if err != nil {
log.Println(err) log.Println(err)