Skip to content

Commit

Permalink
fix new gpt4 header
Browse files Browse the repository at this point in the history
  • Loading branch information
xqdoo00o committed Feb 19, 2024
1 parent 9e79bf9 commit 48475df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/chatgpt/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ func POSTconversation(message chatgpt_types.ChatGPTRequest, access_token string,
request.Header.Set("Content-Type", "application/json")
request.Header.Set("User-Agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36")
request.Header.Set("Accept", "text/event-stream")
if message.Model == "gpt-4" {
request.Header.Set("Openai-Sentinel-Arkose-Token", message.ArkoseToken)
}
if access_token != "" {
request.Header.Set("Authorization", "Bearer "+access_token)
}
Expand Down

0 comments on commit 48475df

Please sign in to comment.