-
Notifications
You must be signed in to change notification settings - Fork 59.7k
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
docs: update readme #5875
base: main
Are you sure you want to change the base?
docs: update readme #5875
Conversation
@ischanx is attempting to deploy a commit to the NextChat Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe changes in this pull request involve updates to the Changes
Possibly related PRs
Suggested reviewers
Poem
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (12)
README_CN.md (5)
250-265
: Enhance Cloudflare variables documentationConsider adding the following improvements to the Cloudflare variables documentation:
- Add a brief introduction explaining why/when users might need these Cloudflare configurations
- Specify the time unit for
CLOUDFLARE_KV_TTL
(e.g., seconds, minutes)
266-273
: Add context for analytics configurationConsider adding a brief explanation of the benefits of configuring Google Analytics and Tag Manager, such as tracking user engagement and usage patterns.
274-285
: Clarify Tencent Cloud service integrationPlease specify which Tencent Cloud services these credentials are used for (e.g., TencentCloud ChatBot, Natural Language Processing, etc.).
286-293
: Add context for Moonshot integrationPlease add a brief description of what Moonshot is and why users might want to configure it.
294-300
: Add context for XAI integrationPlease add a brief description of what XAI is and why users might want to configure it.
README_JA.md (3)
244-247
: Clarify the default GA_ID value.The description mentions a default value for GA_ID when not specified, but doesn't indicate what that default value is. Consider adding this information for completeness.
260-267
: Consider adding context about Moonshot API.While the environment variables are clearly described, it would be helpful to add a brief explanation about what Moonshot API is and its purpose in the application.
268-275
: Consider adding context about XAI API.While the environment variables are clearly described, it would be helpful to add a brief explanation about what XAI API is and its purpose in the application.
README.md (4)
377-392
: Fix indentation and formatting inconsistencies in Cloudflare section.The Cloudflare environment variables section has inconsistent line spacing and indentation.
Apply this diff to fix the formatting:
### `CLOUDFLARE_ACCOUNT_ID` (optional) Cloudflare Account ID. ### `CLOUDFLARE_KV_NAMESPACE_ID` (optional) Cloudflare KV Namespace ID. ### `CLOUDFLARE_KV_API_KEY` (optional) Cloudflare KV API Key. ### `CLOUDFLARE_KV_TTL` (optional) Cloudflare KV cache expiration time.
389-392
: Add TTL format details forCLOUDFLARE_KV_TTL
.The documentation should specify the expected format and unit for the TTL value (e.g., seconds, minutes).
Add details about the TTL format:
### `CLOUDFLARE_KV_TTL` (optional) -Cloudflare KV cache expiration time. +Cloudflare KV cache expiration time in seconds. Default: 3600 (1 hour).
393-400
: Add example values for Google service IDs.The Google Tag Manager and Analytics ID sections would benefit from example values to help users identify the correct format.
Add example values:
### `GTM_ID` (optional) -Google Tag Manager ID. +Google Tag Manager ID (e.g., 'GTM-XXXXXXX'). ### `GA_ID` (optional) -Google Analytics ID. Will use default value if not set. +Google Analytics ID (e.g., 'G-XXXXXXXXXX'). Will use default value if not set.
401-412
: Add region information for Tencent Cloud configuration.The Tencent Cloud API configuration would benefit from additional details about regional endpoints.
Add region information:
### `TENCENT_URL` (optional) -Tencent Cloud API URL. +Tencent Cloud API URL. The endpoint varies by region (e.g., 'https://xxxx.tencentcloudapi.com').
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
README.md
(1 hunks)README_CN.md
(1 hunks)README_JA.md
(1 hunks)
🔇 Additional comments (4)
README_JA.md (3)
224-239
: LGTM! Cloudflare configuration section is well-documented.
The Cloudflare environment variables are clearly described with proper Japanese translations.
248-259
: LGTM! Tencent Cloud configuration section is well-documented.
The Tencent Cloud environment variables are clearly described with proper Japanese translations.
224-275
: Overall documentation updates look good!
The new environment variables are well-documented with proper Japanese translations and consistent formatting. While some sections could benefit from additional context, the core objective of documenting the missing configuration items has been achieved.
README.md (1)
413-428
: Add API version information for Moonshot and XAI integration.
The Moonshot and XAI API configurations should include supported API versions or compatibility information.
Let's verify the API version requirements:
Consider adding API version information if supported versions are found in the codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (4)
README_CN.md (1)
Let me analyze the results from the shell script execution:
- Environment variables used in server.ts:
- All core API configuration variables are present
- Authentication variables (CODE, HIDE_USER_API_KEY)
- Feature flags (DISABLE_GPT4, DISABLE_FAST_LINK, etc.)
- Integration configurations (Cloudflare, GTM, GA, etc.)
- Proxy and deployment settings
- Variables documented in README_CN.md:
- All API configuration variables are documented
- All authentication variables are documented
- All feature flags are documented
- All integration configurations are documented
- All proxy settings are documented
The only variable from server.ts that is not documented in README_CN.md is:
DISABLE_GPT4
Let me generate the final response:
Documentation missing environment variable
DISABLE_GPT4
The
DISABLE_GPT4
environment variable is used in the codebase but not documented in README_CN.md. Please add documentation for this variable:### `DISABLE_GPT4` (可选) > 默认值:空 如果你不想让用户使用 GPT-4,将此环境变量设置为 1 即可。这将从模型列表中隐藏所有 GPT-4 相关的模型。🔗 Analysis chain
Line range hint
1-315
: Verify documentation completenessLet's verify if all configuration items from server.ts are now documented in README_CN.md.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if all environment variables from server.ts are documented in README_CN.md # Get all environment variables from server.ts echo "Checking for environment variables in server.ts..." rg "process\.env\." app/config/server.ts # Check documented variables in README_CN.md echo "Checking documented variables in README_CN.md..." rg "^###\s+\`[A-Z_]+\`" README_CN.mdLength of output: 4620
README_JA.md (2)
242-249
: Add example values for Google service IDsWhile the Google Tag Manager and Analytics IDs are documented, it would be helpful to include example formats:
### `GTM_ID` (オプション) -Google Tag Manager ID。 +Google Tag Manager ID。例:`GTM-XXXXXXX` ### `GA_ID` (オプション) -Google Analytics ID。設定されていない場合はデフォルト値を使用します。 +Google Analytics ID。例:`G-XXXXXXXXXX`。設定されていない場合はデフォルト値を使用します。
186-188
: Fix formatting inconsistency in default value sectionThere's a formatting inconsistency in the default value section.
-### `DISABLE_GPT4` (オプション) -> デフォルト:空 - +### `DISABLE_GPT4` (オプション) +> デフォルト:空README.md (1)
377-441
: Enhance documentation for security-sensitive environment variables.While the documentation for new environment variables is comprehensive, some security-sensitive variables like API keys and secrets should include additional security notes:
For Cloudflare credentials:
- Add a note about required permissions/scopes
- Recommend using restricted API keys
For analytics IDs (GTM, GA):
- Add a privacy implications note
- Mention data collection considerations
For proxy authentication:
- Add a warning about encoding special characters in credentials
- Recommend using environment files instead of direct command line
Consider adding these security notes using this format:
### `CLOUDFLARE_KV_API_KEY` (optional) Cloudflare KV API Key. + +> Security Note: Use restricted API keys with minimum required permissions. Never share or commit this key. ### `PROXY_URL` (optional) If your proxy server requires authentication, you can use the following format: ```bash http://username:[email protected]:7890
+> Security Note: Special characters in username/password must be URL-encoded. Consider using environment files instead of command line arguments to prevent credential leakage in shell history.
</blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used: CodeRabbit UI** **Review profile: CHILL** <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 1525087dcacd6ecc3531947c88d1e9d72ac4cb0f and 468ecf7474d3220eaee8f97950695b317d3076d1. </details> <details> <summary>📒 Files selected for processing (3)</summary> * `README.md` (2 hunks) * `README_CN.md` (2 hunks) * `README_JA.md` (2 hunks) </details> <details> <summary>🔇 Additional comments (11)</summary> <details> <summary>README_CN.md (7)</summary> `202-204`: **LGTM! Clear documentation for DISABLE_GPT4** The added default value and clarification about hiding GPT-4 models improves the documentation. --- `252-267`: **LGTM! Well-documented Cloudflare integration variables** The Cloudflare-related environment variables are clearly documented with their purposes: - Account ID - KV namespace ID - KV API key - KV TTL --- `268-275`: **LGTM! Clear analytics integration documentation** The Google analytics integration variables (GTM_ID and GA_ID) are well documented. --- `276-287`: **LGTM! Comprehensive Tencent Cloud integration variables** The Tencent Cloud integration variables are properly documented with clear descriptions. --- `288-295`: **LGTM! Clear Moonshot API integration variables** The Moonshot API integration variables are well documented. --- `296-303`: **LGTM! Clear XAI integration variables** The XAI API integration variables are well documented. --- `304-315`: **LGTM! Comprehensive proxy configuration documentation** The proxy configuration is well documented with: - Clear example - Authentication format - Important note about Docker deployment </details> <details> <summary>README_JA.md (2)</summary> `226-241`: **Documentation for Cloudflare environment variables looks good!** The Cloudflare configuration variables are well-documented with clear descriptions in Japanese. Each variable's purpose is clearly explained. --- `278-290`: **Proxy configuration documentation is thorough and well-structured** The proxy URL documentation is particularly well done with: - Clear example formats - Authentication syntax explanation - Important Docker-specific limitation note </details> <details> <summary>README.md (2)</summary> `324-324`: **LGTM: Clear documentation for GPT4 configuration.** The documentation for `DISABLE_GPT4` environment variable is clear and follows the existing format pattern. --- `377-441`: **Verify the formatting consistency.** The documentation maintains consistent formatting with: - Clear section headers - Consistent indentation - Proper code block usage </details> </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (7)
docs/vercel-en.md (3)
20-20
: Improve grammar in the environment variable warning-5. Make sure you've added OPENAI_API_KEY, otherwise it won't work; +5. Make sure you've added OPENAI_API_KEY, as the application won't work without it;🧰 Tools
🪛 LanguageTool
[typographical] ~20-~20: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...s; 5. Make sure you've added OPENAI_API_KEY, otherwise it won't work; 6. Click Deploy, complet...(THUS_SENTENCE)
23-24
: Complete the custom domain configuration sectionThe custom domain section is currently incomplete. This is an important feature for production deployments that should be documented.
Would you like me to help draft the custom domain configuration instructions? I can create detailed steps including:
- Accessing domain settings in Vercel
- Adding and verifying domain ownership
- Configuring DNS records
- Handling SSL/TLS certificates
33-33
: Make the redeployment warning more prominentThis is a crucial warning that users might miss.
Consider making it more prominent:
-⚠️️ Note: Every time you modify environment variables, you need to [redeploy the project](#how-to-redeploy) to make the changes take effect! +> ⚠️ **IMPORTANT** +> Every time you modify environment variables, you need to [redeploy the project](#how-to-redeploy) to make the changes take effect!README_CN.md (1)
178-178
: Improve markdown formattingSeveral markdown formatting issues need to be addressed:
- Wrap bare URLs in angle brackets or markdown links
- Add language specifiers to code blocks
Example fixes:
-https://aip.baidubce.com +<https://aip.baidubce.com> -``` +```bashAlso applies to: 188-188, 198-198, 212-212, 222-222, 232-232, 242-242, 256-256, 379-379, 421-421, 427-427, 518-518
🧰 Tools
🪛 Markdownlint (0.35.0)
178-178: null
Bare URL used(MD034, no-bare-urls)
README_JA.md (1)
162-162
: Consider enclosing URLs in angle brackets.To improve markdown formatting, consider enclosing the following URLs in angle brackets:
- Line 162:
<https://generativelanguage.googleapis.com/>
- Line 176:
<https://api.anthropic.com>
And similar patterns for other URLs in the document.Also applies to: 176-176, 190-190, 200-200, 210-210, 224-224, 234-234, 244-244, 254-254, 268-268, 392-392, 434-434, 440-440
🧰 Tools
🪛 Markdownlint (0.35.0)
162-162: null
Bare URL used(MD034, no-bare-urls)
README.md (2)
279-279
: Format URLs using proper markdown syntaxSeveral URLs in the documentation are presented as bare URLs. Consider formatting them using proper markdown syntax for better readability and consistency.
Example fix:
-https://generativelanguage.googleapis.com/ +[https://generativelanguage.googleapis.com/](https://generativelanguage.googleapis.com/)Also applies to: 293-293, 307-307, 317-317, 327-327, 341-341, 351-351, 361-361, 371-371, 385-385, 509-509, 551-551, 557-557
🧰 Tools
🪛 Markdownlint (0.35.0)
279-279: null
Bare URL used(MD034, no-bare-urls)
273-387
: Add security notes for API keysConsider adding security notes about safely handling API keys for various services. This would help users understand best practices for managing sensitive credentials.
Suggested addition:
+> **Security Note**: All API keys should be kept secure and never exposed in client-side code or public repositories. When deploying, ensure these environment variables are properly protected.
🧰 Tools
🪛 Markdownlint (0.35.0)
279-279: null
Bare URL used(MD034, no-bare-urls)
293-293: null
Bare URL used(MD034, no-bare-urls)
307-307: null
Bare URL used(MD034, no-bare-urls)
317-317: null
Bare URL used(MD034, no-bare-urls)
327-327: null
Bare URL used(MD034, no-bare-urls)
341-341: null
Bare URL used(MD034, no-bare-urls)
351-351: null
Bare URL used(MD034, no-bare-urls)
361-361: null
Bare URL used(MD034, no-bare-urls)
371-371: null
Bare URL used(MD034, no-bare-urls)
385-385: null
Bare URL used(MD034, no-bare-urls)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (4)
README.md
(2 hunks)README_CN.md
(4 hunks)README_JA.md
(2 hunks)docs/vercel-en.md
(1 hunks)
🧰 Additional context used
🪛 Markdownlint (0.35.0)
README.md
244-244: null
Blank line inside blockquote
(MD028, no-blanks-blockquote)
279-279: null
Bare URL used
(MD034, no-bare-urls)
293-293: null
Bare URL used
(MD034, no-bare-urls)
307-307: null
Bare URL used
(MD034, no-bare-urls)
317-317: null
Bare URL used
(MD034, no-bare-urls)
327-327: null
Bare URL used
(MD034, no-bare-urls)
341-341: null
Bare URL used
(MD034, no-bare-urls)
351-351: null
Bare URL used
(MD034, no-bare-urls)
361-361: null
Bare URL used
(MD034, no-bare-urls)
371-371: null
Bare URL used
(MD034, no-bare-urls)
385-385: null
Bare URL used
(MD034, no-bare-urls)
509-509: null
Bare URL used
(MD034, no-bare-urls)
551-551: null
Bare URL used
(MD034, no-bare-urls)
557-557: null
Bare URL used
(MD034, no-bare-urls)
README_CN.md
123-123: null
Blank line inside blockquote
(MD028, no-blanks-blockquote)
178-178: null
Bare URL used
(MD034, no-bare-urls)
188-188: null
Bare URL used
(MD034, no-bare-urls)
198-198: null
Bare URL used
(MD034, no-bare-urls)
212-212: null
Bare URL used
(MD034, no-bare-urls)
222-222: null
Bare URL used
(MD034, no-bare-urls)
232-232: null
Bare URL used
(MD034, no-bare-urls)
242-242: null
Bare URL used
(MD034, no-bare-urls)
256-256: null
Bare URL used
(MD034, no-bare-urls)
379-379: null
Bare URL used
(MD034, no-bare-urls)
421-421: null
Bare URL used
(MD034, no-bare-urls)
427-427: null
Bare URL used
(MD034, no-bare-urls)
518-518: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
README_JA.md
127-127: null
Blank line inside blockquote
(MD028, no-blanks-blockquote)
162-162: null
Bare URL used
(MD034, no-bare-urls)
176-176: null
Bare URL used
(MD034, no-bare-urls)
190-190: null
Bare URL used
(MD034, no-bare-urls)
200-200: null
Bare URL used
(MD034, no-bare-urls)
210-210: null
Bare URL used
(MD034, no-bare-urls)
224-224: null
Bare URL used
(MD034, no-bare-urls)
234-234: null
Bare URL used
(MD034, no-bare-urls)
244-244: null
Bare URL used
(MD034, no-bare-urls)
254-254: null
Bare URL used
(MD034, no-bare-urls)
268-268: null
Bare URL used
(MD034, no-bare-urls)
392-392: null
Bare URL used
(MD034, no-bare-urls)
434-434: null
Bare URL used
(MD034, no-bare-urls)
440-440: null
Bare URL used
(MD034, no-bare-urls)
🪛 LanguageTool
docs/vercel-en.md
[typographical] ~20-~20: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...s; 5. Make sure you've added OPENAI_API_KEY, otherwise it won't work; 6. Click Deploy, complet...
(THUS_SENTENCE)
🔇 Additional comments (12)
docs/vercel-en.md (1)
35-39
: LGTM!
The redeployment instructions are clear, concise, and well-illustrated with screenshots.
README_CN.md (3)
91-92
: LGTM! Well-organized documentation structure
The documentation is well-organized with clear sections for different types of configuration:
- Basic Configuration
- Model Configuration
- Feature Configuration
- TTS Configuration
- Other Services
Also applies to: 118-119, 280-281, 324-325, 362-363
105-116
: LGTM! Previously missing environment variables are now documented
The documentation now includes the previously missing environment variables:
PROXY_URL
with proper configuration examplesDISABLE_GPT4
with clear explanation of its functionality
Also applies to: 288-293
122-124
: LGTM! URLs follow security best practices
All service URLs:
- Use HTTPS protocol
- Point to well-known services
- Have clear default values
Also applies to: 178-180, 188-190, 198-200, 212-214, 222-224, 232-234, 242-244, 256-259, 379-381, 421-424, 427-429
🧰 Tools
🪛 Markdownlint (0.35.0)
123-123: null
Blank line inside blockquote
(MD028, no-blanks-blockquote)
README_JA.md (6)
6-7
: LGTM! Language navigation links added.
The addition of language navigation links improves accessibility for users of different languages.
95-120
: LGTM! Basic configuration section is well documented.
The basic configuration section clearly documents essential environment variables like OPENAI_API_KEY
and CODE
with proper descriptions and default values.
214-226
: LGTM! Previously missing environment variables are now documented.
The documentation now includes all the previously missing environment variables from the past review:
IFLYTEK_API_KEY
IFLYTEK_API_SECRET
IFLYTEK_URL
CHATGLM_API_KEY
CHATGLM_URL
Also applies to: 228-237, 238-247, 248-257, 258-271
🧰 Tools
🪛 Markdownlint (0.35.0)
224-224: null
Bare URL used
(MD034, no-bare-urls)
272-282
: LGTM! Clear documentation of model customization.
The CUSTOM_MODELS
section provides comprehensive examples and explanations for:
- Adding/removing models
- Customizing model display names
- Azure and ByteDance specific configurations
337-374
: LGTM! Well-documented TTS configuration.
The Text-to-Speech (TTS) related configuration section is thorough and includes:
- Default engine settings
- Available models and voices
- Clear default values
375-442
: LGTM! Comprehensive documentation of additional services.
The documentation now includes all additional service configurations:
- WebDAV endpoints
- Stability AI integration
- Cloudflare KV settings
- Analytics configurations
- SaaS related URLs
🧰 Tools
🪛 Markdownlint (0.35.0)
392-392: null
Bare URL used
(MD034, no-bare-urls)
434-434: null
Bare URL used
(MD034, no-bare-urls)
440-440: null
Bare URL used
(MD034, no-bare-urls)
README.md (2)
9-9
: LGTM: Language option addition
The addition of Japanese language option aligns well with the project's internationalization efforts.
210-217
: LGTM: Clear documentation structure
The environment variables section is well-organized and provides clear documentation for configuration options.
1. On the project configuration page, click Environment Variables to start configuring environment variables; | ||
2. Add environment variables named OPENAI_API_KEY and CODE ([access password](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/blob/main/docs/faq-en.md#what-is-the-environment-variable-code-is-it-necessary-to-set-it)); | ||
3. Fill in the corresponding values for the environment variables; | ||
4. Click Add to confirm adding the environment variables; | ||
5. Make sure you've added OPENAI_API_KEY, otherwise it won't work; | ||
6. Click Deploy, complete the creation, and wait patiently for about 5 minutes for deployment to complete. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add documentation for all supported environment variables
The environment variables section only mentions OPENAI_API_KEY
and CODE
, but according to the README changes, there are additional optional variables for Cloudflare, Google services, Tencent Cloud, and Moonshot APIs that should be documented here.
Consider adding a comprehensive list of all available environment variables with their descriptions, or add a reference to the README section that contains this information.
🧰 Tools
🪛 LanguageTool
[typographical] ~20-~20: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...s; 5. Make sure you've added OPENAI_API_KEY, otherwise it won't work; 6. Click Deploy, complet...
(THUS_SENTENCE)
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
根据
app/config/server.ts
文件补充了部分缺失的配置项到 Readme📝 补充信息 | Additional Information
Summary by CodeRabbit
New Features
CLOUDFLARE_ACCOUNT_ID
,GTM_ID
,GA_ID
,TENCENT_SECRET_ID
, and more, providing users with greater flexibility in deployment configurations.Documentation