Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update domain chat.openai.com -> chatgpt.com #914

Merged
merged 1 commit into from
Sep 28, 2024

Conversation

PeterDaveHello
Copy link
Collaborator

@PeterDaveHello PeterDaveHello commented Sep 28, 2024

Update the domain from chat.openai.com to chatgpt.com due to the implementation of an HTTP 308 redirect:

$ curl -sSLI https://chat.openai.com | head -n 5
HTTP/2 308 
date: Sat, 28 Sep 2024 16:48:28 GMT
content-type: text/html
content-length: 169
location: https://chatgpt.com/

Summary by CodeRabbit

  • New Features

    • Updated API endpoints to transition from OpenAI to ChatGPT domain for improved service integration.
  • Bug Fixes

    • Corrected URLs for session management and chat functionalities to ensure proper application performance.

Copy link
Contributor

coderabbitai bot commented Sep 28, 2024

Walkthrough

The changes involve updating various API endpoint URLs in the ChatGPT4Bot.js and ChatGPTBot.js files. The modifications transition the service calls from the OpenAI domain to the ChatGPT domain, affecting how the application interacts with backend services for account checks, session management, and conversation handling.

Changes

Files Change Summary
src/bots/openai/ChatGPT4Bot.js Updated account check API URL from chat.openai.com to chatgpt.com.
src/bots/openai/ChatGPTBot.js Multiple URL updates transitioning from chat.openai.com to chatgpt.com for session and conversation APIs.

Possibly related PRs

  • Add OpenAI API gpt-4o-mini Bot #893: The changes in the ChatGPTBot.js file involve updating URLs related to the ChatGPT service, which may be relevant to the integration of the new OpenAIAPI4oMiniBot that also interacts with the ChatGPT API.

🐰 In the meadow, hopping free,
URLs change, as bright as can be!
From OpenAI to ChatGPT,
A new path for all to see.
With every hop, we celebrate,
A fresh start, oh, isn’t it great? 🌼


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between c49b5e0 and 2ff8618.

📒 Files selected for processing (2)
  • src/bots/openai/ChatGPT4Bot.js (1 hunks)
  • src/bots/openai/ChatGPTBot.js (5 hunks)
🔇 Additional comments (8)
src/bots/openai/ChatGPT4Bot.js (1)

23-23: Approve the domain update with suggestions.

The change from chat.openai.com to chatgpt.com aligns with the PR objective. However, consider the following recommendations:

  1. Add a comment explaining why this specific URL is used, for future maintainability.
  2. Verify the functionality of the new endpoint in a staging environment before merging.

To ensure consistency across the codebase, run the following script to check for any remaining occurrences of the old domain:

Consider adding a comment above the URL for better maintainability:

 const response = await axios.get(
+  // OpenAI's account check endpoint (updated from chat.openai.com to chatgpt.com)
   "https://chatgpt.com/backend-api/accounts/check",
   { headers },
 );
✅ Verification successful

Domain update verified successfully.

All occurrences of chat.openai.com have been updated to chatgpt.com with no remaining instances found in the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for remaining occurrences of 'chat.openai.com' in the codebase

# Test: Search for 'chat.openai.com' in all files. Expect: No results
rg --type-not binary 'chat\.openai\.com'

Length of output: 73


Script:

#!/bin/bash
# Description: Search for remaining occurrences of 'chat.openai.com' in the codebase

# Test: Search for 'chat.openai.com' in all files. Expect: No results
rg 'chat\.openai\.com'

Length of output: 24

src/bots/openai/ChatGPTBot.js (7)

11-11: LGTM: URL updated correctly.

The REFRESH_SESSION_URL has been successfully updated to use the new chatgpt.com domain, which aligns with the PR objective.


17-17: LGTM: Login URL updated correctly.

The _loginUrl has been successfully updated to use the new chatgpt.com domain, which is in line with the PR objective.


45-45: LGTM: Session API endpoint updated correctly.

The API endpoint for fetching the session has been successfully updated to use the new chatgpt.com domain, which aligns with the PR objective.


110-110: LGTM: Arkose script URL updated correctly.

The script source URL for Arkose has been successfully updated to use the new chatgpt.com domain while preserving the tcr9i subdomain. This change is in line with the PR objective.


172-172: LGTM: Chat requirements endpoint updated correctly.

The endpoint for chat requirements has been successfully updated to use the new chatgpt.com domain, which aligns with the PR objective.


218-218: LGTM: Conversation API endpoint updated correctly.

The conversation API endpoint has been successfully updated to use the new chatgpt.com domain, which is in line with the PR objective.


Line range hint 1-338: Summary: All domain updates look good. Consider verifying other files.

All changes in this file correctly update the domain from chat.openai.com to chatgpt.com, which aligns with the PR objective. The modifications appear to be straightforward and don't introduce any functional changes.

To ensure completeness, it might be beneficial to check if there are any other files in the project that may need similar updates. You can use the following script to search for any remaining instances of the old domain:

If this script returns any results, those files may need to be updated as well.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@PeterDaveHello PeterDaveHello merged commit 3675a94 into ai-shifu:main Sep 28, 2024
1 check passed
@PeterDaveHello PeterDaveHello deleted the UpdateDomainForChatGPT branch September 28, 2024 16:49
PeterDaveHello added a commit to PeterDaveHello/ChatALL that referenced this pull request Sep 29, 2024
Use `npm run lint`/`vue-cli-service lint` to format the code.

Related to ai-shifu#914 / 3675a94
PeterDaveHello added a commit that referenced this pull request Sep 29, 2024
Use `npm run lint`/`vue-cli-service lint` to format the code.

Related to #914 / 3675a94
eddieai pushed a commit to eddieai/ChatALL that referenced this pull request Nov 15, 2024
eddieai pushed a commit to eddieai/ChatALL that referenced this pull request Nov 15, 2024
Use `npm run lint`/`vue-cli-service lint` to format the code.

Related to ai-shifu#914 / 3675a94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant