Skip to content

Commit

Permalink
doc: config file comments
Browse files Browse the repository at this point in the history
  • Loading branch information
RockChinQ committed Oct 5, 2023
1 parent a979392 commit f1f8d82
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ python main.py

你可以在 `http://localhost:3000/` 打开管理页面。

## Usage
## 用法

1. 创建一个 channel,按照说明填写配置,然后创建一个新的 key。

Expand Down Expand Up @@ -135,6 +135,33 @@ response = openai.ChatCompletion.create(
print(response)
```

### 配置文件

配置文件位于`data/config.yaml`

```yaml
database:
# SQLite 数据库文件路径
path: ./data/free_one_api.db
type: sqlite
router:
# 后端监听端口
port: 3000
# 管理页登录密码
token: '12345678'
watchdog:
heartbeat:
# 自动停用渠道前的心跳失败次数
fail_limit: 3
# 心跳检测间隔(秒)
interval: 1800
# 单个渠道心跳检测超时时间(秒)
timeout: 300
web:
# 前端页面路径
frontend_path: ./web/dist/
```
## 快速体验
### Demo
Expand Down
27 changes: 27 additions & 0 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,33 @@ response = openai.ChatCompletion.create(
print(response)
```

### Configurations

Configuration file is saved at `data/config.yaml`

```yaml
database:
# SQLite DB file path
path: ./data/free_one_api.db
type: sqlite
router:
# Backend listen port
port: 3000
# Admin page login password
token: '12345678'
watchdog:
heartbeat:
# Max fail times
fail_limit: 3
# Heartbeat check interval (seconds)
interval: 1800
# Single channel heartbeat check timeout (seconds)
timeout: 300
web:
# Frontend page path
frontend_path: ./web/dist/
```
## Quick Test
### Demo
Expand Down

0 comments on commit f1f8d82

Please sign in to comment.