算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
langextract【设计与创意】Use LangExtract to extract structured data from unstructured text, configure model providers, save/visualize grounded outputs, and author provider plugins.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when the user wants to use the langextract Python package for source-grounded structured extraction from natural language, provider/back-end configuration, JSONL/HTML result review, or custom provider plugin authoring.
LangExtract's central workflow is: define a prompt and examples, call lx.extract(), inspect grounded AnnotatedDocument results, optionally save JSONL, and generate interactive HTML visualization. It supports Gemini by default, OpenAI/GPT through the openai extra, Ollama/local models, Vertex AI batch processing, and third-party provider plugins.
For ordinary package use:
python -m pip install langextract
python - <<'PY'
import langextract as lx
print(lx.__name__)
PY
For OpenAI provider support:
python -m pip install "langextract[openai]"
Cloud model calls require provider credentials such as GEMINI_API_KEY, LANGEXTRACT_API_KEY, or OPENAI_API_KEY. Ollama calls require a running Ollama service and a pulled local model.
| User task | Read next |
|---|---|
Write or debug lx.extract() calls, examples, relationship attributes, output schemas, prompt validation, resolver params, long-document chunking, Unicode tokenization, or grounded span filtering. | sub-skills/extraction/SKILL.md |
| Choose/configure Gemini, Vertex AI, OpenAI/GPT, OpenAI-compatible endpoints, Ollama/local models, provider kwargs, route resolution, retries, or batch APIs. | sub-skills/providers/SKILL.md |
Save AnnotatedDocument outputs to JSONL, reload JSONL, inspect serialized data, or generate/write interactive HTML visualizations. | sub-skills/visualization/SKILL.md |
| Create or troubleshoot a custom provider plugin package, entry point, router pattern, or schema adapter. | sub-skills/provider-plugins/SKILL.md |
| Need the public API map or version-sensitive refresh baseline. | references/api-map.md and references/repo-provenance.md |
| Cross-cutting install/import/provider/schema troubleshooting. | references/troubleshooting.md |
show_progress=False while debugging. Scale to long documents, batch mode, multiple workers, or multiple passes only after examples and grounding look correct.char_interval=None as ungrounded output until diagnosed; visualization only highlights valid intervals.sub-skills/extraction/scripts/sub-skills/providers/scripts/sub-skills/visualization/scripts/save_and_visualize.pysub-skills/provider-plugins/scripts/create_provider_plugin.pyfetch_urls=True for untrusted URLs; fetch and sanitize content yourself, then pass literal text.output_schema with fence_output=True, YAML output, or provider-native schema kwargs.This skill was generated for LangExtract package version 1.6.0. Before relying on version-sensitive details, read references/repo-provenance.md. If package metadata, provider entry points, public signatures, or major evidence paths differ from that snapshot, refresh the skill.