Skip to content

Commit

Permalink
communicate with biochatter server (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: fengsh <[email protected]>
  • Loading branch information
fengsh27 and fengsh authored Oct 19, 2023
1 parent da0bcab commit 0c8c815
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 1,060 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ WORKDIR /app

COPY package.json yarn.lock ./

RUN yarn config set registry 'https://registry.npmmirror.com/'
RUN yarn install

FROM base AS builder
Expand Down
7 changes: 4 additions & 3 deletions app/api/openai/[...path]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ async function handle(

const authResult = auth(req);
if (authResult.error) {
return NextResponse.json(authResult, {
status: 401,
});
// return NextResponse.json(authResult, {
// status: 401,
// });
console.log("Invalide OpenAI Key!");
}

try {
Expand Down
4 changes: 2 additions & 2 deletions app/components/exporter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,9 @@ export function ImagePreviewer(props: {
</div>

<div>
<div className={styles["main-title"]}>ChatGPT Next Web</div>
<div className={styles["main-title"]}>ChatGSE Next Web</div>
<div className={styles["sub-title"]}>
github.com/Yidadaa/ChatGPT-Next-Web
github.com/fengsh27/ChatGPT-Next-Web
</div>
<div className={styles["icons"]}>
<ExportAvatar avatar={config.avatar} />
Expand Down
2 changes: 1 addition & 1 deletion app/components/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export function SideBar(props: { className?: string }) {
>
<div className={styles["sidebar-header"]} data-tauri-drag-region>
<div className={styles["sidebar-title"]} data-tauri-drag-region>
ChatGPT Next
ChatGSE Next
</div>
<div className={styles["sidebar-sub-title"]}>
Build your own AI assistant.
Expand Down
2 changes: 1 addition & 1 deletion app/constant.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const OWNER = "Yidadaa";
export const OWNER = "fengsh27";
export const REPO = "ChatGPT-Next-Web";
export const REPO_URL = `https://github.com/${OWNER}/${REPO}`;
export const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;
Expand Down
4 changes: 2 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getClientConfig } from "./config/client";
import { type Metadata } from "next";

export const metadata: Metadata = {
title: "ChatGPT Next Web",
title: "ChatGSE Next",
description: "Your personal ChatGPT Chat Bot.",
viewport: {
width: "device-width",
Expand All @@ -18,7 +18,7 @@ export const metadata: Metadata = {
{ media: "(prefers-color-scheme: dark)", color: "#151515" },
],
appleWebApp: {
title: "ChatGPT Next Web",
title: "ChatGSE Next",
statusBarStyle: "default",
},
};
Expand Down
3 changes: 3 additions & 0 deletions app/store/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,9 @@ export const useChatStore = createPersistStore(
const longTermMemoryPrompts = shouldSendLongTermMemory
? [get().getMemoryPrompt()]
: [];
console.log(
`[fengsh] shouldSendLongTermMemory: ${shouldSendLongTermMemory}`,
);
const longTermMemoryStartIndex = session.lastSummarizeIndex;

// short term memory
Expand Down
33 changes: 9 additions & 24 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,15 @@
version: '3.9'
services:
chatgpt-next-web:
profiles: ["no-proxy"]
container_name: chatgpt-next-web
image: yidadaa/chatgpt-next-web
chatgse:
build:
context: ./
dockerfile: Dockerfile
ports:
- 3000:3000
environment:
- OPENAI_API_KEY=$OPENAI_API_KEY
- CODE=$CODE
- BASE_URL=$BASE_URL
- OPENAI_ORG_ID=$OPENAI_ORG_ID
- HIDE_USER_API_KEY=$HIDE_USER_API_KEY
- DISABLE_GPT4=$DISABLE_GPT4
depends_on:
- flask-app

chatgpt-next-web-proxy:
profiles: ["proxy"]
container_name: chatgpt-next-web-proxy
image: yidadaa/chatgpt-next-web
flask-app:
image: frankfeng78/bioserver:v1
ports:
- 3000:3000
environment:
- OPENAI_API_KEY=$OPENAI_API_KEY
- CODE=$CODE
- PROXY_URL=$PROXY_URL
- BASE_URL=$BASE_URL
- OPENAI_ORG_ID=$OPENAI_ORG_ID
- HIDE_USER_API_KEY=$HIDE_USER_API_KEY
- DISABLE_GPT4=$DISABLE_GPT4
- 8000:8000
1,030 changes: 5 additions & 1,025 deletions public/prompts.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if ! command -v node >/dev/null || ! command -v git >/dev/null || ! command -v y
fi

# Clone the repository and install dependencies
git clone https://github.com/Yidadaa/ChatGPT-Next-Web
git clone https://github.com/fengsh27/ChatGPT-Next-Web
cd ChatGPT-Next-Web
yarn install

Expand Down

0 comments on commit 0c8c815

Please sign in to comment.