Merge remote-tracking branch 'upstream/main'
@ -159,7 +159,7 @@ Your openai api key.
|
||||
|
||||
### `CODE` (optional)
|
||||
|
||||
Access passsword, separated by comma.
|
||||
Access password, separated by comma.
|
||||
|
||||
### `BASE_URL` (optional)
|
||||
|
||||
@ -257,6 +257,10 @@ If your proxy needs password, use:
|
||||
bash <(curl -s https://raw.githubusercontent.com/Yidadaa/ChatGPT-Next-Web/main/scripts/setup.sh)
|
||||
```
|
||||
|
||||
## Synchronizing Chat Records (UpStash)
|
||||
|
||||
| [简体中文](./docs/synchronise-chat-logs-cn.md) | [English](./docs/synchronise-chat-logs-en.md) | [Italiano](./docs/synchronise-chat-logs-es.md) | [日本語](./docs/synchronise-chat-logs-ja.md) | [한국어](./docs/synchronise-chat-logs-ko.md)
|
||||
|
||||
## Documentation
|
||||
|
||||
> Please go to the [docs][./docs] directory for more documentation instructions.
|
||||
@ -309,6 +313,7 @@ If you want to add a new translation, read this [document](./docs/translation.md
|
||||
[@AnsonHyq](https://github.com/AnsonHyq)
|
||||
[@synwith](https://github.com/synwith)
|
||||
[@piksonGit](https://github.com/piksonGit)
|
||||
[@ouyangzhiping](https://github.com/ouyangzhiping)
|
||||
|
||||
### Contributor
|
||||
|
||||
|
@ -169,6 +169,7 @@ bash <(curl -s https://raw.githubusercontent.com/Yidadaa/ChatGPT-Next-Web/main/s
|
||||
|
||||
⚠️ 注意:如果你安装过程中遇到了问题,请使用 docker 部署。
|
||||
|
||||
|
||||
## 鸣谢
|
||||
|
||||
### 捐赠者
|
||||
|
@ -169,6 +169,7 @@ bash <(curl -s https://raw.githubusercontent.com/Yidadaa/ChatGPT-Next-Web/main/s
|
||||
|
||||
⚠️ 주의: 설치 중 문제가 발생한 경우, docker로 배포하세요.
|
||||
|
||||
|
||||
## 감사의 말
|
||||
|
||||
### 기부자
|
||||
|
@ -753,7 +753,7 @@ export function Settings() {
|
||||
title={`${config.fontSize ?? 14}px`}
|
||||
value={config.fontSize}
|
||||
min="12"
|
||||
max="18"
|
||||
max="40"
|
||||
step="1"
|
||||
onChange={(e) =>
|
||||
updateConfig(
|
||||
|
@ -8,7 +8,7 @@ export const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/c
|
||||
export const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;
|
||||
export const RUNTIME_CONFIG_DOM = "danger-runtime-config";
|
||||
|
||||
export const DEFAULT_CORS_HOST = "https://nb.nextweb.fun";
|
||||
export const DEFAULT_CORS_HOST = "https://ab.nextweb.fun";
|
||||
export const DEFAULT_API_HOST = `${DEFAULT_CORS_HOST}/api/proxy`;
|
||||
|
||||
export enum Path {
|
||||
|
BIN
docs/images/upstash-1.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
docs/images/upstash-2.png
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
docs/images/upstash-3.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
docs/images/upstash-4.png
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
docs/images/upstash-5.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
docs/images/upstash-6.png
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
docs/images/upstash-7.png
Normal file
After Width: | Height: | Size: 84 KiB |
31
docs/synchronise-chat-logs-cn.md
Normal file
@ -0,0 +1,31 @@
|
||||
# 同步聊天记录(upStash)
|
||||
## 准备工作
|
||||
- GitHub账号
|
||||
- 拥有自己搭建过的ChatGPT-Next-Web的服务器
|
||||
- [UpStash](https://upstash.com)
|
||||
|
||||
## 开始教程
|
||||
1. 注册UpStash账号
|
||||
2. 创建数据库
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
3. 找到REST API,分别复制UPSTASH_REDIS_REST_URL和UPSTASH_REDIS_REST_TOKEN(⚠切记⚠:不要泄露Token!)
|
||||
|
||||

|
||||
|
||||
4. UPSTASH_REDIS_REST_URL和UPSTASH_REDIS_REST_TOKEN复制到你的同步配置,点击**检查可用性**
|
||||
|
||||

|
||||
|
||||
如果没什么问题,那就成功了
|
||||
|
||||

|
||||
|
||||
5. Success!
|
||||
|
||||

|
31
docs/synchronise-chat-logs-en.md
Normal file
@ -0,0 +1,31 @@
|
||||
# Synchronize Chat Logs with UpStash
|
||||
## Prerequisites
|
||||
- GitHub account
|
||||
- Your own ChatGPT-Next-Web server set up
|
||||
- [UpStash](https://upstash.com)
|
||||
|
||||
## Getting Started
|
||||
1. Register for an UpStash account.
|
||||
2. Create a database.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
3. Find the REST API and copy UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN (⚠Important⚠: Do not share your token!)
|
||||
|
||||

|
||||
|
||||
4. Copy UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN into your synchronization configuration, then click **Check Availability**.
|
||||
|
||||

|
||||
|
||||
If everything is in order, you've successfully completed this step.
|
||||
|
||||

|
||||
|
||||
5. Success!
|
||||
|
||||

|
31
docs/synchronise-chat-logs-es.md
Normal file
@ -0,0 +1,31 @@
|
||||
# Sincronizzare i Log delle Chat con UpStash
|
||||
## Prerequisiti
|
||||
- Account GitHub
|
||||
- Server ChatGPT-Next-Web di propria configurazione
|
||||
- [UpStash](https://upstash.com)
|
||||
|
||||
## Per iniziare
|
||||
1. Registrarsi per un account UpStash.
|
||||
2. Creare un database.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
3. Trovare l'API REST e copiare UPSTASH_REDIS_REST_URL e UPSTASH_REDIS_REST_TOKEN (⚠Importante⚠: Non condividere il token!)
|
||||
|
||||

|
||||
|
||||
4. Copiare UPSTASH_REDIS_REST_URL e UPSTASH_REDIS_REST_TOKEN nella configurazione di sincronizzazione, quindi fare clic su **Verifica la Disponibilità**.
|
||||
|
||||

|
||||
|
||||
Se tutto è in ordine, hai completato con successo questa fase.
|
||||
|
||||

|
||||
|
||||
5. Successo!
|
||||
|
||||

|
31
docs/synchronise-chat-logs-ja.md
Normal file
@ -0,0 +1,31 @@
|
||||
# UpStashを使用してチャットログを同期する
|
||||
## 事前準備
|
||||
- GitHubアカウント
|
||||
- 自分自身でChatGPT-Next-Webのサーバーをセットアップしていること
|
||||
- [UpStash](https://upstash.com)
|
||||
|
||||
## 始める
|
||||
1. UpStashアカウントを登録します。
|
||||
2. データベースを作成します。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
3. REST APIを見つけ、UPSTASH_REDIS_REST_URLとUPSTASH_REDIS_REST_TOKENをコピーします(⚠重要⚠:トークンを共有しないでください!)
|
||||
|
||||

|
||||
|
||||
4. UPSTASH_REDIS_REST_URLとUPSTASH_REDIS_REST_TOKENを同期設定にコピーし、次に「可用性を確認」をクリックします。
|
||||
|
||||

|
||||
|
||||
すべてが正常であれば、このステップは成功です。
|
||||
|
||||

|
||||
|
||||
5. 成功!
|
||||
|
||||

|
31
docs/synchronise-chat-logs-ko.md
Normal file
@ -0,0 +1,31 @@
|
||||
# UpStash를 사용하여 채팅 기록 동기화
|
||||
## 사전 준비물
|
||||
- GitHub 계정
|
||||
- 자체 ChatGPT-Next-Web 서버 설정
|
||||
- [UpStash](https://upstash.com)
|
||||
|
||||
## 시작하기
|
||||
1. UpStash 계정 등록
|
||||
2. 데이터베이스 생성
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
3. REST API를 찾아 UPSTASH_REDIS_REST_URL 및 UPSTASH_REDIS_REST_TOKEN을 복사합니다 (⚠주의⚠: 토큰을 공유하지 마십시오!)
|
||||
|
||||

|
||||
|
||||
4. UPSTASH_REDIS_REST_URL 및 UPSTASH_REDIS_REST_TOKEN을 동기화 구성에 복사한 다음 **가용성 확인**을 클릭합니다.
|
||||
|
||||

|
||||
|
||||
모든 것이 정상인 경우,이 단계를 성공적으로 완료했습니다.
|
||||
|
||||

|
||||
|
||||
5. 성공!
|
||||
|
||||

|
@ -1,15 +1,21 @@
|
||||
const CHATGPT_NEXT_WEB_CACHE = "chatgpt-next-web-cache";
|
||||
|
||||
importScripts('https://storage.googleapis.com/workbox-cdn/releases/7.0.0/workbox-sw.js');
|
||||
|
||||
self.addEventListener("activate", function (event) {
|
||||
console.log("ServiceWorker activated.");
|
||||
});
|
||||
|
||||
self.addEventListener("install", function (event) {
|
||||
event.waitUntil(
|
||||
caches.open(CHATGPT_NEXT_WEB_CACHE).then(function (cache) {
|
||||
return cache.addAll([]);
|
||||
}),
|
||||
);
|
||||
workbox.core.clientsClaim();
|
||||
self.addEventListener("message", (event) => {
|
||||
if (event.data && event.data.type === "SKIP_WAITING") {
|
||||
self.skipWaiting();
|
||||
}
|
||||
});
|
||||
|
||||
self.addEventListener("fetch", (e) => {});
|
||||
workbox.routing.registerRoute(
|
||||
new RegExp('/*'),
|
||||
new workbox.strategies.StaleWhileRevalidate({
|
||||
cacheName: CHATGPT_NEXT_WEB_CACHE
|
||||
})
|
||||
);
|
||||
|