diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 000000000..95ed9e268
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,97 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Runtime data
+pids
+*.pid
+*.seed
+*.pid.lock
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+*.lcov
+
+# nyc test coverage
+.nyc_output
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Node.js dependencies
+/node_modules
+/jspm_packages
+
+# TypeScript v1 declaration files
+typings
+
+# Optional npm cache directory
+.npm
+
+# Optional eslint cache
+.eslintcache
+
+# Optional REPL history
+.node_repl_history
+
+# Output of 'npm pack'
+*.tgz
+
+# Yarn Integrity file
+.yarn-integrity
+
+# dotenv environment variable files
+.env
+.env.test
+
+# local env files
+.env*.local
+
+# Next.js build output
+.next
+out
+
+# Nuxt.js build output
+.nuxt
+dist
+
+# Gatsby files
+.cache/
+
+
+# Vuepress build output
+.vuepress/dist
+
+# Serverless directories
+.serverless/
+
+# FuseBox cache
+.fusebox/
+
+# DynamoDB Local files
+.dynamodb/
+
+# Temporary folders
+tmp
+temp
+
+# IDE and editor directories
+.idea
+.vscode
+*.swp
+*.swo
+*~
+
+# OS generated files
+.DS_Store
+Thumbs.db
+
+# secret key
+*.key
+*.key.pub
diff --git a/.env.template b/.env.template
index 3e3290369..b2a0438d9 100644
--- a/.env.template
+++ b/.env.template
@@ -2,12 +2,22 @@
# Your openai api key. (required)
OPENAI_API_KEY=sk-xxxx
-# Access passsword, separated by comma. (optional)
+# Access password, separated by comma. (optional)
CODE=your-password
# You can start service behind a proxy
PROXY_URL=http://localhost:7890
+# (optional)
+# Default: Empty
+# Googel Gemini Pro API key, set if you want to use Google Gemini Pro API.
+GOOGLE_API_KEY=
+
+# (optional)
+# Default: https://generativelanguage.googleapis.com/
+# Googel Gemini Pro API url without pathname, set if you want to customize Google Gemini Pro API url.
+GOOGLE_URL=
+
# Override openai api request base url. (optional)
# Default: https://api.openai.com
# Examples: http://your-openai-proxy.com
@@ -36,3 +46,18 @@ ENABLE_BALANCE_QUERY=
# Default: Empty
# If you want to disable parse settings from url, set this value to 1.
DISABLE_FAST_LINK=
+
+
+# anthropic claude Api Key.(optional)
+ANTHROPIC_API_KEY=
+
+### anthropic claude Api version. (optional)
+ANTHROPIC_API_VERSION=
+
+
+
+### anthropic claude Api url (optional)
+ANTHROPIC_URL=
+
+### (optional)
+WHITE_WEBDEV_ENDPOINTS=
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
deleted file mode 100644
index 01fa35e82..000000000
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ /dev/null
@@ -1,43 +0,0 @@
----
-name: Bug report
-about: Create a report to help us improve
-title: "[Bug] "
-labels: ''
-assignees: ''
-
----
-
-**Describe the bug**
-A clear and concise description of what the bug is.
-
-**To Reproduce**
-Steps to reproduce the behavior:
-1. Go to '...'
-2. Click on '....'
-3. Scroll down to '....'
-4. See error
-
-**Expected behavior**
-A clear and concise description of what you expected to happen.
-
-**Screenshots**
-If applicable, add screenshots to help explain your problem.
-
-**Deployment**
-- [ ] Docker
-- [ ] Vercel
-- [ ] Server
-
-**Desktop (please complete the following information):**
- - OS: [e.g. iOS]
- - Browser [e.g. chrome, safari]
- - Version [e.g. 22]
-
-**Smartphone (please complete the following information):**
- - Device: [e.g. iPhone6]
- - OS: [e.g. iOS8.1]
- - Browser [e.g. stock browser, safari]
- - Version [e.g. 22]
-
-**Additional Logs**
-Add any logs about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 000000000..bdba257d2
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,146 @@
+name: Bug report
+description: Create a report to help us improve
+title: "[Bug] "
+labels: ["bug"]
+
+body:
+ - type: markdown
+ attributes:
+ value: "## Describe the bug"
+ - type: textarea
+ id: bug-description
+ attributes:
+ label: "Bug Description"
+ description: "A clear and concise description of what the bug is."
+ placeholder: "Explain the bug..."
+ validations:
+ required: true
+
+ - type: markdown
+ attributes:
+ value: "## To Reproduce"
+ - type: textarea
+ id: steps-to-reproduce
+ attributes:
+ label: "Steps to Reproduce"
+ description: "Steps to reproduce the behavior:"
+ placeholder: |
+ 1. Go to '...'
+ 2. Click on '....'
+ 3. Scroll down to '....'
+ 4. See error
+ validations:
+ required: true
+
+ - type: markdown
+ attributes:
+ value: "## Expected behavior"
+ - type: textarea
+ id: expected-behavior
+ attributes:
+ label: "Expected Behavior"
+ description: "A clear and concise description of what you expected to happen."
+ placeholder: "Describe what you expected to happen..."
+ validations:
+ required: true
+
+ - type: markdown
+ attributes:
+ value: "## Screenshots"
+ - type: textarea
+ id: screenshots
+ attributes:
+ label: "Screenshots"
+ description: "If applicable, add screenshots to help explain your problem."
+ placeholder: "Paste your screenshots here or write 'N/A' if not applicable..."
+ validations:
+ required: false
+
+ - type: markdown
+ attributes:
+ value: "## Deployment"
+ - type: checkboxes
+ id: deployment
+ attributes:
+ label: "Deployment Method"
+ description: "Please select the deployment method you are using."
+ options:
+ - label: "Docker"
+ - label: "Vercel"
+ - label: "Server"
+
+ - type: markdown
+ attributes:
+ value: "## Desktop (please complete the following information):"
+ - type: input
+ id: desktop-os
+ attributes:
+ label: "Desktop OS"
+ description: "Your desktop operating system."
+ placeholder: "e.g., Windows 10"
+ validations:
+ required: false
+ - type: input
+ id: desktop-browser
+ attributes:
+ label: "Desktop Browser"
+ description: "Your desktop browser."
+ placeholder: "e.g., Chrome, Safari"
+ validations:
+ required: false
+ - type: input
+ id: desktop-version
+ attributes:
+ label: "Desktop Browser Version"
+ description: "Version of your desktop browser."
+ placeholder: "e.g., 89.0"
+ validations:
+ required: false
+
+ - type: markdown
+ attributes:
+ value: "## Smartphone (please complete the following information):"
+ - type: input
+ id: smartphone-device
+ attributes:
+ label: "Smartphone Device"
+ description: "Your smartphone device."
+ placeholder: "e.g., iPhone X"
+ validations:
+ required: false
+ - type: input
+ id: smartphone-os
+ attributes:
+ label: "Smartphone OS"
+ description: "Your smartphone operating system."
+ placeholder: "e.g., iOS 14.4"
+ validations:
+ required: false
+ - type: input
+ id: smartphone-browser
+ attributes:
+ label: "Smartphone Browser"
+ description: "Your smartphone browser."
+ placeholder: "e.g., Safari"
+ validations:
+ required: false
+ - type: input
+ id: smartphone-version
+ attributes:
+ label: "Smartphone Browser Version"
+ description: "Version of your smartphone browser."
+ placeholder: "e.g., 14"
+ validations:
+ required: false
+
+ - type: markdown
+ attributes:
+ value: "## Additional Logs"
+ - type: textarea
+ id: additional-logs
+ attributes:
+ label: "Additional Logs"
+ description: "Add any logs about the problem here."
+ placeholder: "Paste any relevant logs here..."
+ validations:
+ required: false
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
deleted file mode 100644
index 25c36ab67..000000000
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: Feature request
-about: Suggest an idea for this project
-title: "[Feature] "
-labels: ''
-assignees: ''
-
----
-
-**Is your feature request related to a problem? Please describe.**
-A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
-
-**Describe the solution you'd like**
-A clear and concise description of what you want to happen.
-
-**Describe alternatives you've considered**
-A clear and concise description of any alternative solutions or features you've considered.
-
-**Additional context**
-Add any other context or screenshots about the feature request here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
new file mode 100644
index 000000000..499781330
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -0,0 +1,53 @@
+name: Feature request
+description: Suggest an idea for this project
+title: "[Feature Request]: "
+labels: ["enhancement"]
+
+body:
+ - type: markdown
+ attributes:
+ value: "## Is your feature request related to a problem? Please describe."
+ - type: textarea
+ id: problem-description
+ attributes:
+ label: Problem Description
+ description: "A clear and concise description of what the problem is. Example: I'm always frustrated when [...]"
+ placeholder: "Explain the problem you are facing..."
+ validations:
+ required: true
+
+ - type: markdown
+ attributes:
+ value: "## Describe the solution you'd like"
+ - type: textarea
+ id: desired-solution
+ attributes:
+ label: Solution Description
+ description: A clear and concise description of what you want to happen.
+ placeholder: "Describe the solution you'd like..."
+ validations:
+ required: true
+
+ - type: markdown
+ attributes:
+ value: "## Describe alternatives you've considered"
+ - type: textarea
+ id: alternatives-considered
+ attributes:
+ label: Alternatives Considered
+ description: A clear and concise description of any alternative solutions or features you've considered.
+ placeholder: "Describe any alternative solutions or features you've considered..."
+ validations:
+ required: false
+
+ - type: markdown
+ attributes:
+ value: "## Additional context"
+ - type: textarea
+ id: additional-context
+ attributes:
+ label: Additional Context
+ description: Add any other context or screenshots about the feature request here.
+ placeholder: "Add any other context or screenshots about the feature request here..."
+ validations:
+ required: false
diff --git a/.github/ISSUE_TEMPLATE/功能建议.md b/.github/ISSUE_TEMPLATE/功能建议.md
deleted file mode 100644
index 3fc3d0769..000000000
--- a/.github/ISSUE_TEMPLATE/功能建议.md
+++ /dev/null
@@ -1,24 +0,0 @@
----
-name: 功能建议
-about: 请告诉我们你的灵光一闪
-title: "[Feature] "
-labels: ''
-assignees: ''
-
----
-
-> 为了提高交流效率,我们设立了官方 QQ 群和 QQ 频道,如果你在使用或者搭建过程中遇到了任何问题,请先第一时间加群或者频道咨询解决,除非是可以稳定复现的 Bug 或者较为有创意的功能建议,否则请不要随意往 Issue 区发送低质无意义帖子。
-
-> [点击加入官方群聊](https://github.com/Yidadaa/ChatGPT-Next-Web/discussions/1724)
-
-**这个功能与现有的问题有关吗?**
-如果有关,请在此列出链接或者描述问题。
-
-**你想要什么功能或者有什么建议?**
-尽管告诉我们。
-
-**有没有可以参考的同类竞品?**
-可以给出参考产品的链接或者截图。
-
-**其他信息**
-可以说说你的其他考虑。
diff --git a/.github/ISSUE_TEMPLATE/反馈问题.md b/.github/ISSUE_TEMPLATE/反馈问题.md
deleted file mode 100644
index 270263f06..000000000
--- a/.github/ISSUE_TEMPLATE/反馈问题.md
+++ /dev/null
@@ -1,36 +0,0 @@
----
-name: 反馈问题
-about: 请告诉我们你遇到的问题
-title: "[Bug] "
-labels: ''
-assignees: ''
-
----
-
-> 为了提高交流效率,我们设立了官方 QQ 群和 QQ 频道,如果你在使用或者搭建过程中遇到了任何问题,请先第一时间加群或者频道咨询解决,除非是可以稳定复现的 Bug 或者较为有创意的功能建议,否则请不要随意往 Issue 区发送低质无意义帖子。
-
-> [点击加入官方群聊](https://github.com/Yidadaa/ChatGPT-Next-Web/discussions/1724)
-
-**反馈须知**
-
-⚠️ 注意:不遵循此模板的任何帖子都会被立即关闭,如果没有提供下方的信息,我们无法定位你的问题。
-
-请在下方中括号内输入 x 来表示你已经知晓相关内容。
-- [ ] 我确认已经在 [常见问题](https://github.com/Yidadaa/ChatGPT-Next-Web/blob/main/docs/faq-cn.md) 中搜索了此次反馈的问题,没有找到解答;
-- [ ] 我确认已经在 [Issues](https://github.com/Yidadaa/ChatGPT-Next-Web/issues) 列表(包括已经 Close 的)中搜索了此次反馈的问题,没有找到解答。
-- [ ] 我确认已经在 [Vercel 使用教程](https://github.com/Yidadaa/ChatGPT-Next-Web/blob/main/docs/vercel-cn.md) 中搜索了此次反馈的问题,没有找到解答。
-
-**描述问题**
-请在此描述你遇到了什么问题。
-
-**如何复现**
-请告诉我们你是通过什么操作触发的该问题。
-
-**截图**
-请在此提供控制台截图、屏幕截图或者服务端的 log 截图。
-
-**一些必要的信息**
- - 系统:[比如 windows 10/ macos 12/ linux / android 11 / ios 16]
- - 浏览器: [比如 chrome, safari]
- - 版本: [填写设置页面的版本号]
- - 部署方式:[比如 vercel、docker 或者服务器部署]
diff --git a/.github/workflows/app.yml b/.github/workflows/app.yml
index aebba28f7..7e74cf045 100644
--- a/.github/workflows/app.yml
+++ b/.github/workflows/app.yml
@@ -43,12 +43,9 @@ jobs:
- os: ubuntu-latest
arch: x86_64
rust_target: x86_64-unknown-linux-gnu
- - os: macos-latest
- arch: x86_64
- rust_target: x86_64-apple-darwin
- os: macos-latest
arch: aarch64
- rust_target: aarch64-apple-darwin
+ rust_target: x86_64-apple-darwin,aarch64-apple-darwin
- os: windows-latest
arch: x86_64
rust_target: x86_64-pc-windows-msvc
@@ -60,13 +57,14 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
+ cache: 'yarn'
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.config.rust_target }}
- uses: Swatinem/rust-cache@v2
with:
- key: ${{ matrix.config.rust_target }}
+ key: ${{ matrix.config.os }}
- name: install dependencies (ubuntu only)
if: matrix.config.os == 'ubuntu-latest'
run: |
@@ -79,8 +77,15 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
+ APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
+ APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
+ APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
+ APPLE_ID: ${{ secrets.APPLE_ID }}
+ APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
+ APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
with:
releaseId: ${{ needs.create-release.outputs.release_id }}
+ args: ${{ matrix.config.os == 'macos-latest' && '--target universal-apple-darwin' || '' }}
publish-release:
permissions:
diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml
new file mode 100644
index 000000000..bdbb78c27
--- /dev/null
+++ b/.github/workflows/deploy_preview.yml
@@ -0,0 +1,84 @@
+name: VercelPreviewDeployment
+
+on:
+ pull_request_target:
+ types:
+ - opened
+ - synchronize
+ - reopened
+
+env:
+ VERCEL_TEAM: ${{ secrets.VERCEL_TEAM }}
+ VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
+ VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
+ VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
+ VERCEL_PR_DOMAIN_SUFFIX: ${{ secrets.VERCEL_PR_DOMAIN_SUFFIX }}
+
+permissions:
+ contents: read
+ statuses: write
+ pull-requests: write
+
+jobs:
+ deploy-preview:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ ref: ${{ github.event.pull_request.head.sha }}
+
+ - name: Extract branch name
+ shell: bash
+ run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> "$GITHUB_OUTPUT"
+ id: extract_branch
+
+ - name: Hash branch name
+ uses: pplanel/hash-calculator-action@v1.3.1
+ id: hash_branch
+ with:
+ input: ${{ steps.extract_branch.outputs.branch }}
+ method: MD5
+
+ - name: Set Environment Variables
+ id: set_env
+ if: github.event_name == 'pull_request_target'
+ run: |
+ echo "VERCEL_ALIAS_DOMAIN=${{ github.event.pull_request.number }}-${{ github.workflow }}.${VERCEL_PR_DOMAIN_SUFFIX}" >> $GITHUB_OUTPUT
+
+ - name: Install Vercel CLI
+ run: npm install --global vercel@latest
+
+ - name: Cache dependencies
+ uses: actions/cache@v2
+ id: cache-npm
+ with:
+ path: ~/.npm
+ key: npm-${{ hashFiles('package-lock.json') }}
+ restore-keys: npm-
+
+ - name: Pull Vercel Environment Information
+ run: vercel pull --yes --environment=preview --token=${VERCEL_TOKEN}
+
+ - name: Deploy Project Artifacts to Vercel
+ id: vercel
+ env:
+ META_TAG: ${{ steps.hash_branch.outputs.digest }}-${{ github.run_number }}-${{ github.run_attempt}}
+ run: |
+ set -e
+ vercel pull --yes --environment=preview --token=${VERCEL_TOKEN}
+ vercel build --token=${VERCEL_TOKEN}
+ vercel deploy --prebuilt --archive=tgz --token=${VERCEL_TOKEN} --meta base_hash=${{ env.META_TAG }}
+
+ DEFAULT_URL=$(vercel ls --token=${VERCEL_TOKEN} --meta base_hash=${{ env.META_TAG }})
+ ALIAS_URL=$(vercel alias set ${DEFAULT_URL} ${{ steps.set_env.outputs.VERCEL_ALIAS_DOMAIN }} --token=${VERCEL_TOKEN} --scope ${VERCEL_TEAM}| awk '{print $3}')
+
+ echo "New preview URL: ${DEFAULT_URL}"
+ echo "New alias URL: ${ALIAS_URL}"
+ echo "VERCEL_URL=${ALIAS_URL}" >> "$GITHUB_OUTPUT"
+
+ - uses: mshick/add-pr-comment@v2
+ with:
+ message: |
+ Your build has completed!
+
+ [Preview deployment](${{ steps.vercel.outputs.VERCEL_URL }})
diff --git a/.github/workflows/remove_deploy_preview.yml b/.github/workflows/remove_deploy_preview.yml
new file mode 100644
index 000000000..4846cda2d
--- /dev/null
+++ b/.github/workflows/remove_deploy_preview.yml
@@ -0,0 +1,40 @@
+name: Removedeploypreview
+
+permissions:
+ contents: read
+ statuses: write
+ pull-requests: write
+
+env:
+ VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
+ VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
+ VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
+
+on:
+ pull_request_target:
+ types:
+ - closed
+
+jobs:
+ delete-deployments:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Extract branch name
+ shell: bash
+ run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
+ id: extract_branch
+
+ - name: Hash branch name
+ uses: pplanel/hash-calculator-action@v1.3.1
+ id: hash_branch
+ with:
+ input: ${{ steps.extract_branch.outputs.branch }}
+ method: MD5
+
+ - name: Call the delete-deployment-preview.sh script
+ env:
+ META_TAG: ${{ steps.hash_branch.outputs.digest }}
+ run: |
+ bash ./scripts/delete-deployment-preview.sh
diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml
index ebf5587d0..e04e30adb 100644
--- a/.github/workflows/sync.yml
+++ b/.github/workflows/sync.yml
@@ -24,7 +24,7 @@ jobs:
id: sync
uses: aormsby/Fork-Sync-With-Upstream-action@v3.4
with:
- upstream_sync_repo: Yidadaa/ChatGPT-Next-Web
+ upstream_sync_repo: ChatGPTNextWeb/ChatGPT-Next-Web
upstream_sync_branch: main
target_sync_branch: main
target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set
diff --git a/Dockerfile b/Dockerfile
index 720a0cfe9..51a810fc5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -16,6 +16,7 @@ FROM base AS builder
RUN apk update && apk add --no-cache git
ENV OPENAI_API_KEY=""
+ENV GOOGLE_API_KEY=""
ENV CODE=""
WORKDIR /app
@@ -31,6 +32,7 @@ RUN apk add proxychains-ng
ENV PROXY_URL=""
ENV OPENAI_API_KEY=""
+ENV GOOGLE_API_KEY=""
ENV CODE=""
COPY --from=builder /app/public ./public
@@ -41,22 +43,22 @@ COPY --from=builder /app/.next/server ./.next/server
EXPOSE 3000
CMD if [ -n "$PROXY_URL" ]; then \
- export HOSTNAME="127.0.0.1"; \
- protocol=$(echo $PROXY_URL | cut -d: -f1); \
- host=$(echo $PROXY_URL | cut -d/ -f3 | cut -d: -f1); \
- port=$(echo $PROXY_URL | cut -d: -f3); \
- conf=/etc/proxychains.conf; \
- echo "strict_chain" > $conf; \
- echo "proxy_dns" >> $conf; \
- echo "remote_dns_subnet 224" >> $conf; \
- echo "tcp_read_time_out 15000" >> $conf; \
- echo "tcp_connect_time_out 8000" >> $conf; \
- echo "localnet 127.0.0.0/255.0.0.0" >> $conf; \
- echo "localnet ::1/128" >> $conf; \
- echo "[ProxyList]" >> $conf; \
- echo "$protocol $host $port" >> $conf; \
- cat /etc/proxychains.conf; \
- proxychains -f $conf node server.js; \
+ export HOSTNAME="127.0.0.1"; \
+ protocol=$(echo $PROXY_URL | cut -d: -f1); \
+ host=$(echo $PROXY_URL | cut -d/ -f3 | cut -d: -f1); \
+ port=$(echo $PROXY_URL | cut -d: -f3); \
+ conf=/etc/proxychains.conf; \
+ echo "strict_chain" > $conf; \
+ echo "proxy_dns" >> $conf; \
+ echo "remote_dns_subnet 224" >> $conf; \
+ echo "tcp_read_time_out 15000" >> $conf; \
+ echo "tcp_connect_time_out 8000" >> $conf; \
+ echo "localnet 127.0.0.0/255.0.0.0" >> $conf; \
+ echo "localnet ::1/128" >> $conf; \
+ echo "[ProxyList]" >> $conf; \
+ echo "$protocol $host $port" >> $conf; \
+ cat /etc/proxychains.conf; \
+ proxychains -f $conf node server.js --host 0.0.0.0; \
else \
- node server.js; \
+ node server.js; \
fi
diff --git a/README.md b/README.md
index 7c7a6f243..d496d68ed 100644
--- a/README.md
+++ b/README.md
@@ -1,22 +1,22 @@
-
+
-
ChatGPT Next Web
+
NextChat (ChatGPT Next Web)
English / [简体中文](./README_CN.md)
-One-Click to get well-designed cross-platform ChatGPT web UI.
+One-Click to get a well-designed cross-platform ChatGPT web UI, with GPT3, GPT4 & Gemini Pro support.
-一键免费部署你的跨平台私人 ChatGPT 应用。
+一键免费部署你的跨平台私人 ChatGPT 应用, 支持 GPT3, GPT4 & Gemini Pro 模型。
[![Web][Web-image]][web-url]
[![Windows][Windows-image]][download-url]
[![MacOS][MacOS-image]][download-url]
[![Linux][Linux-image]][download-url]
-[Web App](https://chatgpt.nextweb.fun/) / [Desktop App](https://github.com/Yidadaa/ChatGPT-Next-Web/releases) / [Discord](https://discord.gg/YCkeafCafC) / [Twitter](https://twitter.com/mortiest_ricky) / [Buy Me a Coffee](https://www.buymeacoffee.com/yidadaa)
+[Web App](https://app.nextchat.dev/) / [Desktop App](https://github.com/Yidadaa/ChatGPT-Next-Web/releases) / [Discord](https://discord.gg/YCkeafCafC) / [Twitter](https://twitter.com/NextChatDev)
-[网页版](https://chatgpt.nextweb.fun/) / [客户端](https://github.com/Yidadaa/ChatGPT-Next-Web/releases) / [反馈](https://github.com/Yidadaa/ChatGPT-Next-Web/issues) / [QQ 群](https://github.com/Yidadaa/ChatGPT-Next-Web/discussions/1724) / [打赏开发者](https://user-images.githubusercontent.com/16968934/227772541-5bcd52d8-61b7-488c-a203-0330d8006e2b.jpg)
+[网页版](https://app.nextchat.dev/) / [客户端](https://github.com/Yidadaa/ChatGPT-Next-Web/releases) / [反馈](https://github.com/Yidadaa/ChatGPT-Next-Web/issues)
[web-url]: https://chatgpt.nextweb.fun
[download-url]: https://github.com/Yidadaa/ChatGPT-Next-Web/releases
@@ -25,7 +25,9 @@ One-Click to get well-designed cross-platform ChatGPT web UI.
[MacOS-image]: https://img.shields.io/badge/-MacOS-black?logo=apple
[Linux-image]: https://img.shields.io/badge/-Linux-333?logo=ubuntu
-[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FYidadaa%2FChatGPT-Next-Web&env=OPENAI_API_KEY&env=CODE&project-name=chatgpt-next-web&repository-name=ChatGPT-Next-Web)
+[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FChatGPTNextWeb%2FChatGPT-Next-Web&env=OPENAI_API_KEY&env=CODE&project-name=nextchat&repository-name=NextChat)
+
+[](https://zeabur.com/templates/ZBUEFA)
[](https://gitpod.io/#https://github.com/Yidadaa/ChatGPT-Next-Web)
@@ -37,8 +39,8 @@ One-Click to get well-designed cross-platform ChatGPT web UI.
- **Deploy for free with one-click** on Vercel in under 1 minute
- Compact client (~5MB) on Linux/Windows/MacOS, [download it now](https://github.com/Yidadaa/ChatGPT-Next-Web/releases)
-- Fully compatible with self-deployed llms, recommended for use with [RWKV-Runner](https://github.com/josStorer/RWKV-Runner) or [LocalAI](https://github.com/go-skynet/LocalAI)
-- Privacy first, all data stored locally in the browser
+- Fully compatible with self-deployed LLMs, recommended for use with [RWKV-Runner](https://github.com/josStorer/RWKV-Runner) or [LocalAI](https://github.com/go-skynet/LocalAI)
+- Privacy first, all data is stored locally in the browser
- Markdown support: LaTex, mermaid, code highlight, etc.
- Responsive design, dark mode and PWA
- Fast first screen loading speed (~100kb), support streaming response
@@ -59,10 +61,11 @@ One-Click to get well-designed cross-platform ChatGPT web UI.
## What's New
-- 🚀 v2.0 is released, now you can create prompt templates, turn your ideas into reality! Read this: [ChatGPT Prompt Engineering Tips: Zero, One and Few Shot Prompting](https://www.allabtai.com/prompt-engineering-tips-zero-one-and-few-shot-prompting/).
-- 🚀 v2.7 let's share conversations as image, or share to ShareGPT!
-- 🚀 v2.8 now we have a client that runs across all platforms!
+- 🚀 v2.10.1 support Google Gemini Pro model.
- 🚀 v2.9.11 you can use azure endpoint now.
+- 🚀 v2.8 now we have a client that runs across all platforms!
+- 🚀 v2.7 let's share conversations as image, or share to ShareGPT!
+- 🚀 v2.0 is released, now you can create prompt templates, turn your ideas into reality! Read this: [ChatGPT Prompt Engineering Tips: Zero, One and Few Shot Prompting](https://www.allabtai.com/prompt-engineering-tips-zero-one-and-few-shot-prompting/).
## 主要功能
@@ -189,6 +192,26 @@ Azure Api Key.
Azure Api Version, find it at [Azure Documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#chat-completions).
+### `GOOGLE_API_KEY` (optional)
+
+Google Gemini Pro Api Key.
+
+### `GOOGLE_URL` (optional)
+
+Google Gemini Pro Api Url.
+
+### `ANTHROPIC_API_KEY` (optional)
+
+anthropic claude Api Key.
+
+### `ANTHROPIC_API_VERSION` (optional)
+
+anthropic claude Api version.
+
+### `ANTHROPIC_URL` (optional)
+
+anthropic claude Api Url.
+
### `HIDE_USER_API_KEY` (optional)
> Default: Empty
@@ -205,7 +228,7 @@ If you do not want users to use GPT-4, set this value to 1.
> Default: Empty
-If you do want users to query balance, set this value to 1, or you should set it to 0.
+If you do want users to query balance, set this value to 1.
### `DISABLE_FAST_LINK` (optional)
@@ -222,6 +245,17 @@ To control custom models, use `+` to add a custom model, use `-` to hide a model
User `-all` to disable all default models, `+all` to enable all default models.
+### `WHITE_WEBDEV_ENDPOINTS` (optional)
+
+You can use this option if you want to increase the number of webdav service addresses you are allowed to access, as required by the format:
+- Each address must be a complete endpoint
+> `https://xxxx/yyy`
+- Multiple addresses are connected by ', '
+
+### `DEFAULT_INPUT_TEMPLATE` (optional)
+
+Customize the default template used to initialize the User Input Preprocessing configuration item in Settings.
+
## Requirements
NodeJS >= 18, Docker >= 20
@@ -350,9 +384,11 @@ If you want to add a new translation, read this [document](./docs/translation.md
[@Licoy](https://github.com/Licoy)
[@shangmin2009](https://github.com/shangmin2009)
-### Contributor
+### Contributors
-[Contributors](https://github.com/Yidadaa/ChatGPT-Next-Web/graphs/contributors)
+
+
+
## LICENSE
diff --git a/README_CN.md b/README_CN.md
index 08b385573..6811102b6 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -1,14 +1,16 @@