docs: add README.md and skill/SKILL.md
This commit is contained in:
parent
6dad8a1db5
commit
3367da879f
21
README.md
21
README.md
@ -1,2 +1,23 @@
|
|||||||
# pipeline_ops
|
# pipeline_ops
|
||||||
|
|
||||||
|
产线运营模块 —— 产线定价、容量管理、使用日志。
|
||||||
|
|
||||||
|
## 功能
|
||||||
|
|
||||||
|
- **产线定价**:按产线/模型设置调用价格
|
||||||
|
- **容量管理**:产线并发/配额限制
|
||||||
|
- **使用日志**:调用记录与费用统计
|
||||||
|
|
||||||
|
## 数据表
|
||||||
|
|
||||||
|
| 表 | 说明 |
|
||||||
|
|---|------|
|
||||||
|
| pipeline_pricing | 产线调用定价 |
|
||||||
|
| pipeline_capacity | 产线容量/配额 |
|
||||||
|
| pipeline_usage_log | 调用使用日志 |
|
||||||
|
|
||||||
|
## 安装
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd pkgs/pipeline_ops && pip install .
|
||||||
|
```
|
||||||
|
|||||||
29
skill/SKILL.md
Normal file
29
skill/SKILL.md
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
name: pipeline-ops
|
||||||
|
description: "Pipeline operations module — pricing, capacity management, and usage logging."
|
||||||
|
---
|
||||||
|
|
||||||
|
# pipeline_ops
|
||||||
|
|
||||||
|
Operations layer: pricing configuration, capacity quotas, and usage logging for pipeline billing.
|
||||||
|
|
||||||
|
## Data Model
|
||||||
|
|
||||||
|
| Table | Key Fields |
|
||||||
|
|-------|-----------|
|
||||||
|
| `pipeline_pricing` | id, pipeline_id, model_name, unit_price, price_unit |
|
||||||
|
| `pipeline_capacity` | id, pipeline_id, max_concurrent, max_daily |
|
||||||
|
| `pipeline_usage_log` | id, pipeline_id, distributor_id, tokens, cost |
|
||||||
|
|
||||||
|
## DSPY Endpoints
|
||||||
|
|
||||||
|
- `pipeline_pricing_create/update/delete.dspy` — pricing CRUD
|
||||||
|
- `pipeline_capacity_create/update/delete.dspy` — capacity CRUD
|
||||||
|
- `pipeline_usage_log_create/update/delete.dspy` — usage log CRUD
|
||||||
|
- `ops_dashboard_data.dspy` — aggregated stats dashboard
|
||||||
|
- `get_search_pipeline_id.dspy` — pipeline dropdown search
|
||||||
|
|
||||||
|
## Pitfalls
|
||||||
|
|
||||||
|
- Usage log writes must be atomic — use `sor.C` inline, not batch.
|
||||||
|
- `ops_dashboard_data.dspy` aggregation queries — test with realistic volume.
|
||||||
Loading…
x
Reference in New Issue
Block a user