diff --git a/middleware/auth.go b/middleware/auth.go index 5215f7f..540f9a3 100644 --- a/middleware/auth.go +++ b/middleware/auth.go @@ -156,7 +156,7 @@ func TokenAuth() func(c *gin.Context) { if token != nil { id := c.GetInt("id") if id == 0 { - c.Set("id", token.Id) + c.Set("id", token.UserId) } } if err != nil { diff --git a/relay/channel/openai/constant.go b/relay/channel/openai/constant.go index 5d12d36..7a0c8ca 100644 --- a/relay/channel/openai/constant.go +++ b/relay/channel/openai/constant.go @@ -8,7 +8,7 @@ var ModelList = []string{ "gpt-4-32k", "gpt-4-32k-0314", "gpt-4-32k-0613", "gpt-4-turbo-preview", "gpt-4-turbo", "gpt-4-turbo-2024-04-09", "gpt-4-vision-preview", - "gpt-4o", "gpt-4o-2024-05-13", + "gpt-4o", "gpt-4o-2024-05-13", "gpt-4o-2024-08-06", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "text-embedding-ada-002", "text-embedding-3-small", "text-embedding-3-large", "text-curie-001", "text-babbage-001", "text-ada-001", "text-davinci-002", "text-davinci-003",