1.基础知识


2.Chains链是啥

python
from langchain.chains import LLMChain, SequentialChain
from langchain.prompts import PromptTemplate
# LLMChain:最基础的链
prompt = PromptTemplate.from_template("翻译:{text}")
chain = LLMChain(llm=llm, prompt=prompt)
# SequentialChain:串联多个链
translate_chain = LLMChain(...) # 翻译
summarize_chain = LLMChain(...) # 总结
sequential_chain = SequentialChain(
chains=[translate_chain, summarize_chain]
)

3.Agent是啥




3.Memory是啥


4.自定义Tools工具
在Langchain中定义工具主要有两种方式:



5.Prompt是啥



6.Agent执行流程




7.流式输出



8.Callback回调机制是啥?
Callback的重应用是实现可观测性、记录完整执行过程、方便调试和监控。


