Skip to content

Commit

Permalink
Update domain chat.openai.com -> chatgpt.com (#914)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterDaveHello committed Sep 28, 2024
1 parent c49b5e0 commit 3675a94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/bots/openai/ChatGPT4Bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default class ChatGPT4Bot extends ChatGPTBot {
Authorization: `Bearer ${this.accessToken}`,
};
const response = await axios.get(
"https://chat.openai.com/backend-api/accounts/check",
"https://chatgpt.com/backend-api/accounts/check",
{ headers },
);
const isPaidSubscriptionActive =
Expand Down
12 changes: 6 additions & 6 deletions src/bots/openai/ChatGPTBot.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import store from "@/store";

// Inspired by https://v2ex.com/t/926890
const REFRESH_SESSION_URL =
"https://chat.openai.com/_next/static/k9OKjvwgjWES7JT3k-6g9/_ssgManifest.js";
"https://chatgpt.com/_next/static/k9OKjvwgjWES7JT3k-6g9/_ssgManifest.js";

export default class ChatGPTBot extends Bot {
static _brandId = "chatGpt";
static _className = "ChatGPTBot"; // Class name of the bot
static _logoFilename = "chatgpt-logo.svg"; // Place it in public/bots/
static _loginUrl = "https://chat.openai.com/";
static _loginUrl = "https://chatgpt.com/";
// Remove Electron from the user agent to avoid blank login screen of Google
static _userAgent =
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) chatall/1.29.40 Chrome/114.0.5735.134 Safari/537.36";
Expand Down Expand Up @@ -42,7 +42,7 @@ export default class ChatGPTBot extends Bot {

try {
const response = await axios.get(

Check failure on line 44 in src/bots/openai/ChatGPTBot.js

View workflow job for this annotation

GitHub Actions / build-and-deploy

Replace `⏎········"https://chatgpt.com/api/auth/session",⏎······` with `"https://chatgpt.com/api/auth/session"`
"https://chat.openai.com/api/auth/session",
"https://chatgpt.com/api/auth/session",
);
if (!response.data?.error && response.data?.accessToken) {
this.accessToken = response.data.accessToken;
Expand Down Expand Up @@ -107,7 +107,7 @@ export default class ChatGPTBot extends Bot {
const script = document.createElement("script");
script.type = "text/javascript";
script.src =
"https://tcr9i.chat.openai.com/v2/35536E1E-65B4-4D96-9D97-6ADB7EFF8147/api.js";
"https://tcr9i.chatgpt.com/v2/35536E1E-65B4-4D96-9D97-6ADB7EFF8147/api.js";
script.setAttribute("data-callback", "setupEnforcement");
script.async = true;
script.defer = true;
Expand Down Expand Up @@ -169,7 +169,7 @@ export default class ChatGPTBot extends Bot {
let requirement;
try {
const result = await axios.post(
"https://chat.openai.com/backend-api/sentinel/chat-requirements",
"https://chatgpt.com/backend-api/sentinel/chat-requirements",
undefined,
{ headers },
);
Expand Down Expand Up @@ -215,7 +215,7 @@ export default class ChatGPTBot extends Bot {
return new Promise((resolve, reject) => {
try {
const source = new SSE(

Check failure on line 217 in src/bots/openai/ChatGPTBot.js

View workflow job for this annotation

GitHub Actions / build-and-deploy

Replace `⏎··········"https://chatgpt.com/backend-api/conversation",⏎·········` with `"https://chatgpt.com/backend-api/conversation",`
"https://chat.openai.com/backend-api/conversation",
"https://chatgpt.com/backend-api/conversation",
{
headers: {

Check failure on line 220 in src/bots/openai/ChatGPTBot.js

View workflow job for this annotation

GitHub Actions / build-and-deploy

Replace `············` with `··········`
...headers,

Check failure on line 221 in src/bots/openai/ChatGPTBot.js

View workflow job for this annotation

GitHub Actions / build-and-deploy

Delete `··`
Expand Down

0 comments on commit 3675a94

Please sign in to comment.