|
|
@ -3,17 +3,28 @@
|
|
|
|
This is a ChatGPT web application demo with express and vue3
|
|
|
|
This is a ChatGPT web application demo with express and vue3
|
|
|
|
|
|
|
|
|
|
|
|
![cover](./docs/cover.png)
|
|
|
|
![cover](./docs/cover.png)
|
|
|
|
## Intro
|
|
|
|
## Usage
|
|
|
|
1. `node >= 18`
|
|
|
|
> Make sure `node >= 18`
|
|
|
|
1. `pnpm install` node deps
|
|
|
|
|
|
|
|
2. set `OPENAI_API_KEY` in `.env`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Run
|
|
|
|
install node deps
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
|
|
|
pnpm install
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sign up for an [OpenAI API key](https://platform.openai.com/overview) and store it in your environment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
# .env
|
|
|
|
|
|
|
|
OPENAI_API_KEY="Your Key"
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Run service
|
|
|
|
```shell
|
|
|
|
```shell
|
|
|
|
# 1. run service
|
|
|
|
|
|
|
|
pnpm run service
|
|
|
|
pnpm run service
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
# 2. run web
|
|
|
|
Run web
|
|
|
|
|
|
|
|
```shell
|
|
|
|
pnpm run dev
|
|
|
|
pnpm run dev
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|