Agent
Function call
模型的function call能力来源于模型本身,并不是所有的模型都具备这种能力,需要经过特定数据集训练
几种方式

image-20251213204918213
MCP
几种方式
stdio
sse
streamable
Agent五种模式
Tool工具模式
ReAct模式
Reflection反思模式
Planning规划模式
Multi-Agent多智能体模式
Agent实战
Agent本质是一个LCEL链,把LLM、Prompt、Tool、Parser串起来
比如使用langchain的话:
- 初始化LLM,比如openAI 设置apikey
- 自定义prompt,对于反思模式,prompt模板里要有previousresponse,也就是之前的回答,以及userfeedback用户反馈
- 然后通过管道符将LLM | prompt | parser串起来形成链