Skip to content

Commit

Permalink
feat oai
Browse files Browse the repository at this point in the history
  • Loading branch information
xqdoo00o committed Jun 11, 2024
1 parent 49585a8 commit c56dace
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/chatgpt/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func newRequest(method string, url string, body io.Reader, secret *tokens.Secret
request.Header.Set("User-Agent", userAgent)
request.Header.Set("Accept", "*/*")
request.Header.Set("Oai-Device-Id", deviceId)
request.Header.Set("Oai-Language", "zh-CN")
request.Header.Set("Oai-Language", "en-US")
if secret.Token != "" {
request.Header.Set("Authorization", "Bearer "+secret.Token)
}
Expand Down Expand Up @@ -160,7 +160,7 @@ func getConfig() []interface{} {
rand.New(rand.NewSource(time.Now().UnixNano()))
script := cachedScripts[rand.Intn(len(cachedScripts))]
timeNum := (float64(time.Since(startTime).Nanoseconds()) + rand.Float64()) / 1e6
return []interface{}{cachedHardware, getParseTime(), int64(4294705152), 0, userAgent, script, cachedDpl, "zh-CN", "zh-CN", 0, "webkitGetUserMedia−function webkitGetUserMedia() { [native code] }", "location", "ontransitionend", timeNum, cachedSid}
return []interface{}{cachedHardware, getParseTime(), int64(4294705152), 0, userAgent, script, cachedDpl, "en-US", "en-US", 0, "webkitGetUserMedia−function webkitGetUserMedia() { [native code] }", "location", "ontransitionend", timeNum, cachedSid}
}
func CalcProofToken(require *ChatRequire, proxy string) string {
proof := generateAnswer(require.Proof.Seed, require.Proof.Difficulty, proxy)
Expand Down

0 comments on commit c56dace

Please sign in to comment.