From 4a8498232baf9a1dc8a8d6178b96c3e485e1a00a Mon Sep 17 00:00:00 2001 From: sijinhui Date: Wed, 19 Jun 2024 11:34:58 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 0522d53c1..3395e3ca2 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -1,9 +1,14 @@ // This is your Prisma schema file, // learn more about it in the docs: https://pris.ly/d/prisma-schema +// datasource db { +// provider = "postgresql" +// url = env("POSTGRES_PRISMA_URL") // uses connection pooling +// // directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection +// } datasource db { - provider = "postgresql" - url = env("POSTGRES_PRISMA_URL") // uses connection pooling + provider = "mysql" + url = env("DATABASE_URL") // uses connection pooling // directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection } @@ -14,7 +19,7 @@ generator client { model User { id String @id @default(cuid()) - name String? @unique + name String? // if you are using Github OAuth, you can get rid of the username attribute (that is for Twitter OAuth) username String? @unique gh_username String? @unique @@ -28,8 +33,6 @@ model User { isAdmin Boolean? @default(false) accounts Account[] sessions Session[] - // sites Site[] - // posts Post[] logs LogEntry[] } From 26861781a9fd909aa9e8e8f982b968771d932df6 Mon Sep 17 00:00:00 2001 From: sijinhui Date: Wed, 19 Jun 2024 11:41:58 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=87=E7=94=A8docker?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index f161d4922..96f560e5a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: # image: yidadaa/chatgpt-next-web restart: always image: registry.cn-hangzhou.aliyuncs.com/si-private/chatgpt-next-web -# image: registry.cn-hangzhou.aliyuncs.com/sijinhui/chatgpt-next-web +# image: registry.gitlab.si.icu/common/chatgpt-next-web build: context: . dockerfile: Dockerfile From dc1d6b854a61eb452f0ef57e3d7a135cfc92041d Mon Sep 17 00:00:00 2001 From: sijinhui Date: Wed, 19 Jun 2024 11:52:48 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9mysql=E5=90=8E=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E4=BD=BF=E7=94=A8=E4=B8=8D=E5=8C=BA=E5=88=86=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E5=86=99=E7=9A=84=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/admin/users/[[...path]]/route.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/api/admin/users/[[...path]]/route.ts b/app/api/admin/users/[[...path]]/route.ts index df11becd9..46e97ed40 100644 --- a/app/api/admin/users/[[...path]]/route.ts +++ b/app/api/admin/users/[[...path]]/route.ts @@ -31,19 +31,16 @@ async function handle( { name: { contains: searchText, - mode: "insensitive", // 不区分大小写 }, }, { username: { contains: searchText, - mode: "insensitive", // 不区分大小写 }, }, { email: { contains: searchText, - mode: "insensitive", // 不区分大小写 }, }, ], From 8fe96dbf0a0e3cda997a41d1329679cf229c6d52 Mon Sep 17 00:00:00 2001 From: sijinhui Date: Mon, 24 Jun 2024 18:08:49 +0800 Subject: [PATCH 4/6] temp --- app/constant.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/constant.ts b/app/constant.ts index 2afbf1c2d..40ad74a45 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -256,9 +256,9 @@ export const DEFAULT_MODELS = [ }, }, // { - // name: "gpt-4-vision-preview", + // name: "gpt-4o-2024-05-13", // available: true, - // describe: "GPT-4多模态,图像识别", + // describe: "GPT-4多模态,原生代理", // provider: { // id: "openai", // providerName: "OpenAI", From 007c004a444ec58372d7d0e26e1ae9acd04a4110 Mon Sep 17 00:00:00 2001 From: sijinhui Date: Mon, 24 Jun 2024 18:09:58 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/chat.tsx | 4 ++-- app/store/chat.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 8d3e89ce3..6c08f147f 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -1340,7 +1340,7 @@ function _Chat() { title={ {localStorage.getItem("current_day_token") ?? 0}{" "} - / 100000 + / 200000 } color={"var(--second)"} @@ -1350,7 +1350,7 @@ function _Chat() { = 100000) { + if (current_day_token >= 200000) { botMessage.content += "\n\n" + prettyObject({ From 6c6e88ba35f0b7a274ebe33103a132a7ff39dc25 Mon Sep 17 00:00:00 2001 From: sijinhui Date: Mon, 24 Jun 2024 18:22:52 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dockerToHub.yml | 4 ++-- Dockerfile | 2 +- Dockerfile.linux-build | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dockerToHub.yml b/.github/workflows/dockerToHub.yml index 5decaf0fa..7a5527da7 100644 --- a/.github/workflows/dockerToHub.yml +++ b/.github/workflows/dockerToHub.yml @@ -24,7 +24,7 @@ jobs: uses: actions/checkout@v4 with: clean: true - github-server-url: 'https://gh.siji.ci' + github-server-url: 'https://gh.sivpn.cn' - name: build and deploy to Docker Hub run: | echo ${{ secrets.ALY_DOCKER_PASSWORD }} | docker login registry.cn-hangzhou.aliyuncs.com -u ${{ secrets.ALY_DOCKER_USERNAME }} --password-stdin @@ -42,7 +42,7 @@ jobs: uses: actions/checkout@v4 with: clean: true - github-server-url: 'https://gh.siji.ci' + github-server-url: 'https://gh.sivpn.cn' # deploy-nm: # name: 部署到内蒙服务器 # needs: download-repo diff --git a/Dockerfile b/Dockerfile index 9cb8d6903..6ca213922 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ #FROM registry.cn-hangzhou.aliyuncs.com/sijinhui/node:18-alpine AS base -FROM hub.siji.ci/library/node:22.1-alpine AS base +FROM hub.sivpn.cn/library/node:22.1-alpine AS base RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories RUN apk update && apk add --no-cache git tzdata RUN apk add --no-cache \ diff --git a/Dockerfile.linux-build b/Dockerfile.linux-build index c35822a35..6f5539aeb 100644 --- a/Dockerfile.linux-build +++ b/Dockerfile.linux-build @@ -1,5 +1,5 @@ #FROM registry.cn-hangzhou.aliyuncs.com/sijinhui/node:18-alpine AS base -FROM hub.siji.ci/library/node:20-alpine AS base +FROM hub.sivpn.cn/library/node:20-alpine AS base RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories RUN apk update && apk add --no-cache git tzdata # 设置时区环境变量