From 3367da879fd514182607c53317b9cc5e8cfff191 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 3 Aug 2026 16:46:18 +0800 Subject: [PATCH] docs: add README.md and skill/SKILL.md --- README.md | 21 +++++++++++++++++++++ skill/SKILL.md | 29 +++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 skill/SKILL.md diff --git a/README.md b/README.md index 0a13c7d..f6cf1d5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,23 @@ # pipeline_ops +产线运营模块 —— 产线定价、容量管理、使用日志。 + +## 功能 + +- **产线定价**:按产线/模型设置调用价格 +- **容量管理**:产线并发/配额限制 +- **使用日志**:调用记录与费用统计 + +## 数据表 + +| 表 | 说明 | +|---|------| +| pipeline_pricing | 产线调用定价 | +| pipeline_capacity | 产线容量/配额 | +| pipeline_usage_log | 调用使用日志 | + +## 安装 + +```bash +cd pkgs/pipeline_ops && pip install . +``` diff --git a/skill/SKILL.md b/skill/SKILL.md new file mode 100644 index 0000000..f427bfe --- /dev/null +++ b/skill/SKILL.md @@ -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.