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>
15 lines
496 B
Python
15 lines
496 B
Python
#!/usr/bin/env python3
|
|
"""Minimal LangChain chain using LCEL."""
|
|
from langchain_openai import ChatOpenAI
|
|
from langchain_core.prompts import ChatPromptTemplate
|
|
from langchain_core.output_parsers import StrOutputParser
|
|
|
|
prompt = ChatPromptTemplate.from_template(
|
|
"You are a helpful assistant. Answer concisely.\n\nQuestion: {question}"
|
|
)
|
|
model = ChatOpenAI(model="gpt-4o-mini")
|
|
chain = prompt | model | StrOutputParser()
|
|
|
|
result = chain.invoke({"question": "What is LangChain?"})
|
|
print(result)
|