29 lines
822 B
Markdown
29 lines
822 B
Markdown
# PicoBot 常用命令
|
||
|
||
```bash
|
||
# 编译
|
||
cargo build
|
||
|
||
# 启动网关 (默认 127.0.0.1:19876)
|
||
cargo run -- gateway
|
||
|
||
# 启动 CLI 客户端 (连接 ws://127.0.0.1:19876/ws)
|
||
cargo run -- chat
|
||
|
||
# 运行单元测试
|
||
cargo test --lib
|
||
|
||
# 运行离线集成/协议测试
|
||
cargo test --test test_scheduler
|
||
cargo test --test test_request_format
|
||
|
||
# 运行代码检查(Rust 修改必跑)
|
||
cargo clippy --all-targets --all-features -- -D warnings
|
||
|
||
# 运行模型 API 集成测试(需配置 tests/test.env)
|
||
cargo test --test test_integration -- --ignored
|
||
cargo test --test test_tool_calling -- --ignored
|
||
```
|
||
|
||
`test_scheduler` 和 `test_request_format` 不需要 API Key,也没有标记 `#[ignore]`。只有会真实调用 Provider 的测试需要从 `tests/test.env.example` 创建 `tests/test.env` 后使用 `-- --ignored`。
|