From 13150efc0e0d2e7a46e0398dc5e5914afeb31e62 Mon Sep 17 00:00:00 2001 From: Antonio Date: Mon, 1 May 2023 16:42:09 +0800 Subject: [PATCH] update user agent --- internal/chatgpt/request.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/chatgpt/request.go b/internal/chatgpt/request.go index e806f44e..e177eefa 100644 --- a/internal/chatgpt/request.go +++ b/internal/chatgpt/request.go @@ -83,7 +83,7 @@ func SendRequest(message typings.ChatGPTRequest, access_token string) (*http.Res return &http.Response{}, err } request.Header.Set("Content-Type", "application/json") - request.Header.Set("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36") + request.Header.Set("User-Agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36") request.Header.Set("Accept", "*/*") if access_token != "" { request.Header.Set("Authorization", "Bearer "+access_token)