Change "chat.openai.com" to "chatgpt.com"

This commit is contained in:
Anan
2024-05-08 17:24:52 +08:00
committed by josc146
parent e2fcabba74
commit b494193eb5
20 changed files with 87 additions and 87 deletions
+4 -4
View File
@@ -63,10 +63,10 @@ export async function getRequirements(accessToken) {
export async function getArkoseToken(config) {
if (!config.chatgptArkoseReqUrl)
throw new Error(
t('Please login at https://chat.openai.com first') +
t('Please login at https://chatgpt.com first') +
'\n\n' +
t(
"Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.",
"Please keep https://chatgpt.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.",
),
)
const arkoseToken = await fetch(
@@ -87,7 +87,7 @@ export async function getArkoseToken(config) {
t('Failed to get arkose token.') +
'\n\n' +
t(
"Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.",
"Please keep https://chatgpt.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.",
),
)
return arkoseToken
@@ -229,7 +229,7 @@ export async function generateAnswersWithChatgptWebApi(port, question, session,
let cookie
let oaiDeviceId
if (Browser.cookies && Browser.cookies.getAll) {
cookie = (await Browser.cookies.getAll({ url: 'https://chat.openai.com/' }))
cookie = (await Browser.cookies.getAll({ url: 'https://chatgpt.com/' }))
.map((cookie) => {
return `${cookie.name}=${cookie.value}`
})
+2 -2
View File
@@ -15,12 +15,12 @@ export async function getChatGptAccessToken() {
if (userConfig.accessToken) {
return userConfig.accessToken
} else {
const cookie = (await Browser.cookies.getAll({ url: 'https://chat.openai.com/' }))
const cookie = (await Browser.cookies.getAll({ url: 'https://chatgpt.com/' }))
.map((cookie) => {
return `${cookie.name}=${cookie.value}`
})
.join('; ')
const resp = await fetch('https://chat.openai.com/api/auth/session', {
const resp = await fetch('https://chatgpt.com/api/auth/session', {
headers: {
Cookie: cookie,
},