modify: cli命令更新
This commit is contained in:
@@ -102,7 +102,7 @@ message = { type = "str", default = "" }
|
||||
### 第四步:生成 Pydantic 模型
|
||||
|
||||
```bash
|
||||
uv run python -m chongming.scripts.gen_models
|
||||
uv run gen_models
|
||||
```
|
||||
|
||||
自动在 `src/plugins/<name>/models/` 下生成 `pydantic.py` 和 `__init__.py`。
|
||||
@@ -209,7 +209,7 @@ from .routes import router # 网关通过 getattr 自动发现
|
||||
## 为现有插件添加新端点
|
||||
|
||||
1. 创建 `config/workers/<name>/<new_op>.toml`
|
||||
2. 运行 `uv run python -m chongming.scripts.gen_models`
|
||||
2. 运行 `uv run gen_models`
|
||||
3. 创建 `router/<new_op>.py`,引用生成的模型
|
||||
4. 更新 `router/__init__.py`
|
||||
5. 重启服务
|
||||
|
||||
Reference in New Issue
Block a user