计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
prompt-workflows【效率与协作】Compose, validate, and apply reusable Outlines prompt workflows with Template, Application, Chat, multimodal inputs, caching, and safe iterative prompting.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is to build or troubleshoot reusable prompt composition around Outlines rather than to choose a model backend or design a schema. It covers:
outlines.Template.outlines.Application objects that pair a template or callable with an optional output type.outlines.inputs.Chat conversations and multimodal Image, Audio, and Video inputs.Do not call remote providers, start local model downloads, or execute model-generated code from this skill alone. After prompt/input assembly is validated, route execution to the appropriate sibling skill: ../structured-generation/ for schemas and output types, ../remote-providers/ for hosted model capability/credential routing, or ../local-models/ for local model setup and capability routing.
Template.from_string(content, filters={}) for inline prompts. Use Template.from_file(path, filters={}) only when the template file and all includes/extends are bundled under the same template directory boundary.StrictUndefined; render with a complete variable mapping before any model call.Application(template_or_callable, output_type=None) when the same prompt/output contract will be applied repeatedly. Call it as application(model, {"var": value}, **inference_kwargs).outlines.inputs: Chat, Image, Audio, Video. Keep each chat message shaped as {"role": "system"|"user"|"assistant", "content": ...}.Image requires a PIL image with a real format and base64-encodes it. Audio and Video are wrappers; actual support is model/provider-specific.OUTLINES_CACHE_DIR, outlines.caching.cache, cache_disabled(), outlines.disable_cache(), and outlines.clear_cache() for deterministic workflow components and stale-cache recovery.eval/exec of generated code.references/api-reference.md: exact APIs, imports, Jinja filters, Application, Chat, multimodal inputs, and cache controls.references/workflows.md: reusable workflow recipes distilled from Outlines examples without source-checkout dependencies.references/troubleshooting.md: failure modes for missing variables, include boundaries, paths, chat/content shape, image/base64 conversion, provider capability mismatches, cache behavior, and generated-code safety.Use scripts/render_template.py to render an inline Outlines Template with JSON variables or a small built-in fixture before wiring a prompt into an Application, Chat, or generator call. The script performs only local template rendering; it does not read repository-relative prompt files by default, call providers, or execute generated code.
Example:
python scripts/render_template.py \
--template 'Hello {{ name }}!' \
--vars-json '{"name":"Ada"}'
Expected output:
Hello Ada!