Skip to content

Commit

Permalink
✨ update copilot header
Browse files Browse the repository at this point in the history
  • Loading branch information
v_frgfeng committed Apr 8, 2024
1 parent 60d0985 commit 92e5c26
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions api/copilot/copilot.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,19 +439,19 @@ func GetCompletionsHeader(token string) map[string]string {
uid := uuid.New().String()
headersMap := map[string]string{
"Host": "api.githubcopilot.com",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Encoding": "gzip,deflate,br",
"Accept": "*/*",
"Authorization": "Bearer " + token,
"X-RequestType-Id": uid,
"X-Request-Id": uid,
"X-Github-CopilotApi-Version": "2023-07-07",
"Vscode-Sessionid": uid + strconv.FormatInt(time.Now().UnixNano()/int64(time.Millisecond), 10),
"vscode-machineid": utils.GenHexStr(64),
"Editor-Version": "vscode/1.85.0",
"Editor-Plugin-Version": "copilot-chat/0.11.1",
"Editor-Version": "vscode/1.86.2",
"Editor-Plugin-Version": "copilot-chat/0.12.2",
"Openai-Organization": "github-copilot",
"Copilot-Integration-Id": "vscode-chat",
"Openai-Intent": "conversation-panel",
"User-Agent": "GitHubCopilotChat/0.11.1",
"User-Agent": "GitHubCopilotChat/0.12.2",
}
return headersMap
}
Expand Down

0 comments on commit 92e5c26

Please sign in to comment.