界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

api-engine-and-cli

api-engine-and-cli

【效率与协作】Operate Sparrow LLM API and CLI surfaces, request routing, validation, table templates, and protected-access configuration.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: api-engine-and-cli description: "Operate Sparrow LLM API and CLI surfaces, request routing, validation, table templates, and protected-access configuration." metadata: disco-role: operating disable-model-invocation: true license: GPL 3.0

API Engine and CLI

Use this sub-skill when the task is to run, debug, or translate requests for Sparrow's LLM-facing command line and HTTP API surfaces: sparrow.sh, the Typer engine command, the FastAPI /api/v1/sparrow-llm/inference endpoint, or /api/v1/sparrow-llm/instruction-inference.

Route the task

Boundaries and handoffs

Safe bundled helpers

These scripts are offline by default and are safe to run for fixture checks or request construction:

  • python scripts/sparrow_cli_request.py --help builds CLI or curl requests, including curl-to-CLI translation.
  • python scripts/json_validation_smoke.py --help validates Sparrow-style JSON example schemas against candidate JSON.
  • python scripts/table_template_smoke.py --help exercises the generic table-template mapping against an embedded HTML table fixture.

Operating checklist

  1. Identify the surface: CLI, document API, or instruction API.
  2. Normalize options: repeated --options for CLI; comma-separated options= for API.
  3. Choose the pipeline: sparrow-parse for document/schema work, sparrow-instructor for instruction/payload text work.
  4. Check query mode before blaming the model: *, --instruction, --validation, --markdown, --page-type, and --table change both prompts and validation behavior.
  5. If the API is protected, confirm the sparrow_key route: config-key validation when database use is disabled, database validation when enabled.
  6. For table requests, confirm whether the request is using the generic table template and whether it supplied the second backend/model pair required by the table OCR pass.
我的收藏