Skip to content

Commit ce8ad33

Browse files
committed
docs: add quick-start in README
1 parent 9a20f81 commit ce8ad33

2 files changed

Lines changed: 192 additions & 0 deletions

File tree

README.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,102 @@ ChatTutor effectively solves this problem by bringing all the teaching tools use
6868
</tr>
6969
</table>
7070

71+
## Quick Start
72+
73+
<details><summary>Environment Variables</summary>
74+
75+
### Database Configuration
76+
- `DATABASE_URL`: PostgreSQL connection string
77+
78+
### Server & Client
79+
- `VITE_API_BASE_URL`: Base URL for the API server (e.g., `http://localhost:8002`)
80+
- `CLINET_BASE_URL`: Base URL for the client application (e.g., `http://localhost:8001`)
81+
82+
### AI Configuration
83+
- `MODEL_API_KEY`: Your API key for the AI service (e.g., `your_api_key_here`)
84+
- `MODEL_BASE_URL`: Base URL for the AI service (optional, defaults to OpenAI)
85+
- `AGENT_MODEL`: Model for the main agent that chats with users (e.g., `gpt-4`)
86+
- `AGENT_MODEL_PROVIDER`: Model provider (options: refer to [Provider Enum](#provider-enum))
87+
- `TITLE_MODEL`: Model for generating chat titles (optional, defaults to `AGENT_MODEL`)
88+
- `TITLE_MODEL_PROVIDER`: Model provider for title generation (optional, defaults to `AGENT_MODEL_PROVIDER`, refer to [Provider Enum](#provider-enum))
89+
90+
#### Provider Enum
91+
- OpenAI: `openai`
92+
- Anthropic: `anthropic`
93+
- DeepSeek: `deepseek`
94+
95+
### OSS Configuration
96+
- `OSS_ENDPOINT`: OSS endpoint URL (if not set, image upload will be unavailable)
97+
- `OSS_ACCESS_KEY`: OSS access key
98+
- `OSS_SECRET_KEY`: OSS secret key
99+
- `OSS_BUCKET`: OSS bucket name
100+
- `OSS_REGION`: OSS region
101+
102+
</details>
103+
104+
<details><summary>Run with Docker</summary>
105+
106+
### Environment
107+
108+
> - Docker >= 24.0.0
109+
> - Docker Compose >= 2.22.0
110+
111+
### Setup
112+
113+
```bash
114+
git clone https://github.com/HugeCatLab/ChatTutor.git
115+
cd ChatTutor
116+
cp .env.example .env
117+
```
118+
119+
### Run
120+
121+
```bash
122+
cd docker
123+
docker compose up -d
124+
```
125+
</details>
126+
127+
<details><summary>Run with Node & Bun</summary>
128+
129+
### Environment
130+
131+
> - Node.js >= 20
132+
> - Bun >= 1.2
133+
> - pnpm >= 9.1.0
134+
135+
### Setup
136+
137+
```bash
138+
git clone https://github.com/HugeCatLab/ChatTutor.git
139+
cd ChatTutor
140+
pnpm i
141+
```
142+
143+
### Development
144+
145+
```bash
146+
pnpm dev
147+
```
148+
149+
Or:
150+
151+
```bash
152+
pnpm client:dev
153+
pnpm web:dev
154+
```
155+
156+
### Build
157+
158+
```bash
159+
pnpm build
160+
pnpm client:start
161+
pnpm web:start
162+
```
163+
164+
</details>
165+
166+
71167
## Tech Stacks
72168

73169
- [Geogebra](https://www.geogebra.org/)

README_CN.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,102 @@ ChatTutor 有效地解决了这一问题。它将现实教育场景中的各种
6868
</tr>
6969
</table>
7070

71+
## 快速开始
72+
73+
<details><summary>环境变量</summary>
74+
75+
### 数据库配置
76+
- `DATABASE_URL`: PostgreSQL 连接字符串
77+
78+
### 服务器与客户端
79+
- `VITE_API_BASE_URL`: API 服务器的基础 URL(例如:`http://localhost:8002`
80+
- `CLINET_BASE_URL`: 客户端应用程序的基础 URL(例如:`http://localhost:8001`
81+
82+
### AI 配置
83+
- `MODEL_API_KEY`: AI 服务的 API 密钥(例如:`your_api_key_here`
84+
- `MODEL_BASE_URL`: AI 服务的基础 URL(可选,默认为 OpenAI)
85+
- `AGENT_MODEL`: 与用户聊天的主代理模型(例如:`gpt-4`
86+
- `AGENT_MODEL_PROVIDER`: 模型提供商(选项:参考 [提供商枚举](#provider-enum)
87+
- `TITLE_MODEL`: 用于生成聊天标题的模型(可选,默认为 `AGENT_MODEL`
88+
- `TITLE_MODEL_PROVIDER`: 标题生成的模型提供商(可选,默认为 `AGENT_MODEL_PROVIDER`,参考 [提供商枚举](#provider-enum)
89+
90+
#### 提供商枚举
91+
- OpenAI: `openai`
92+
- Anthropic: `anthropic`
93+
- DeepSeek: `deepseek`
94+
95+
### OSS 配置
96+
- `OSS_ENDPOINT`: OSS 端点 URL(如果未设置,图片上传将不可用)
97+
- `OSS_ACCESS_KEY`: OSS 访问密钥
98+
- `OSS_SECRET_KEY`: OSS 密钥
99+
- `OSS_BUCKET`: OSS 存储桶名称
100+
- `OSS_REGION`: OSS 区域
101+
102+
</details>
103+
104+
<details><summary>使用 Docker 运行</summary>
105+
106+
### 环境要求
107+
108+
> - Docker >= 24.0.0
109+
> - Docker Compose >= 2.22.0
110+
111+
### 安装步骤
112+
113+
```bash
114+
git clone https://github.com/HugeCatLab/ChatTutor.git
115+
cd ChatTutor
116+
cp .env.example .env
117+
```
118+
119+
### 运行
120+
121+
```bash
122+
cd docker
123+
docker compose up -d
124+
```
125+
</details>
126+
127+
<details><summary>使用 Node & Bun 运行</summary>
128+
129+
### 环境要求
130+
131+
> - Node.js >= 20
132+
> - Bun >= 1.2
133+
> - pnpm >= 9.1.0
134+
135+
### 安装步骤
136+
137+
```bash
138+
git clone https://github.com/HugeCatLab/ChatTutor.git
139+
cd ChatTutor
140+
pnpm i
141+
```
142+
143+
### 开发模式
144+
145+
```bash
146+
pnpm dev
147+
```
148+
149+
或者:
150+
151+
```bash
152+
pnpm client:dev
153+
pnpm web:dev
154+
```
155+
156+
### 构建
157+
158+
```bash
159+
pnpm build
160+
pnpm client:start
161+
pnpm web:start
162+
```
163+
164+
</details>
165+
166+
71167
## Tech Stacks
72168

73169
- [Geogebra](https://www.geogebra.org/)

0 commit comments

Comments
 (0)