mirror of
https://github.com/magnus919/agent-skills.git
synced 2026-09-12 12:06:29 +03:00
Greenfield SkillOpt: 3 epochs optimizing discoverability, decision guidance, and troubleshooting for a brand-new LangChain skill. Epoch 1 — Prominence: - Added critical AgentExecutor deprecation callout at top - Framework Routing Guide for cross-portfolio decisions Epoch 2 — Decision Guidance: - Where to Start table with AgentExecutor migration row - Pipeline Mode table (Quick/RAG/Agent/Production) Epoch 3 — Pattern Expansion: - Troubleshooting table with reference file links - FAQ section covering installation, migration, performance 13 files: SKILL.md, 7 references, 4 templates, 1 script. v1.0.0 -> v1.0.3 across 3 SkillOpt epochs. Signed-off-by: Magnus Hedemark <magnus919@pm.me>
29 lines
924 B
Python
29 lines
924 B
Python
#!/usr/bin/env python3
|
|
"""Verify LangChain installation and basic functionality."""
|
|
import sys
|
|
|
|
REQUIRED = ["langchain_core", "langchain_openai", "langchain"]
|
|
OPTIONAL = ["langchain_anthropic", "langchain_community", "langserve"]
|
|
|
|
for pkg in REQUIRED:
|
|
try:
|
|
__import__(pkg.replace("-", "_").replace(".", "_"))
|
|
print(f" [OK] {pkg}")
|
|
except ImportError:
|
|
print(f" [FAIL] {pkg} — install with pip install {pkg}")
|
|
sys.exit(1)
|
|
|
|
for pkg in OPTIONAL:
|
|
try:
|
|
__import__(pkg.replace("-", "_").replace(".", "_"))
|
|
print(f" [OK] {pkg} (optional)")
|
|
except ImportError:
|
|
print(f" [—] {pkg} (optional, not installed)")
|
|
|
|
# Test Runnable interface
|
|
from langchain_core.runnables import RunnableLambda
|
|
r = RunnableLambda(lambda x: x.upper())
|
|
assert r.invoke("hello") == "HELLO"
|
|
print(" [OK] Runnable interface works")
|
|
print("\nSetup check: ALL REQUIRED PACKAGES OK")
|