mirror of
https://github.com/magnus919/agent-skills.git
synced 2026-09-13 04:26:28 +03:00
Greenfield SkillOpt: 3 epochs for a Stanford DSPy compiler skill. DSPy is a fundamentally different paradigm from chain/RAG frameworks. Epoch 1 — Prominence: - Hard-gate blockquote: 'DSPy is NOT a chain framework' - Core Paradigm section with runnable code example early Epoch 2 — Decision Guidance: - Framework Routing Guide (DSPy vs LlamaIndex vs LangChain vs LangGraph) - Where to Start table mapping entry points - Troubleshooting table with reference links Epoch 3 — Pattern Expansion: - Optimizer selection cheat sheet from official docs - Caching, compilation cost management, save/load - FAQ covering paradigm confusion, errors, deployment 12 files: SKILL.md, 7 references, 3 templates, 1 script. v1.0.0 -> v1.0.3 across 3 epochs. All API surfaces validated against dspy.ai official docs — optimizer selection guide, caching, core modules, FAQ. Signed-off-by: Jasper <jasper@montcastle.bitches>
28 lines
687 B
Python
28 lines
687 B
Python
#!/usr/bin/env python3
|
|
"""Verify DSPy installation and basic functionality."""
|
|
|
|
import sys
|
|
|
|
REQUIRED_PACKAGES = ["dspy"]
|
|
|
|
for pkg in REQUIRED_PACKAGES:
|
|
try:
|
|
__import__(pkg)
|
|
print(f" [OK] {pkg}")
|
|
except ImportError:
|
|
print(f" [FAIL] {pkg} — install with pip install {pkg}")
|
|
sys.exit(1)
|
|
|
|
# Test basic DSPy functionality
|
|
import dspy
|
|
|
|
lm = dspy.LM("openai/gpt-4o-mini")
|
|
dspy.configure(lm=lm)
|
|
|
|
qa = dspy.Predict("question -> answer")
|
|
result = qa(question="What is DSPy?")
|
|
assert hasattr(result, "answer"), "Answer field missing"
|
|
print(f" [OK] Basic prediction works: {result.answer[:50]}...")
|
|
|
|
print("\nDSPy setup check: ALL REQUIRED PACKAGES OK")
|