用langgraph创建的智能体怎么绑定提示词
chat_prompt_template = ChatPromptTemplate.from_messages([
(‘system’, ‘’’
- 你是一个数学方面的专家,擅长使用工具解决各种数学计算问题
- 只要是数学计算问题,必须全部使用工具完成计算
- 如果是综合算式需要你先进行按照计算优先级的规则进行拆分一步一步的使用工具完成计算
’’’),
(‘human’, ‘{question}’)
])
#创建智能体
agent = create_react_agent(
model=llm,
tools=tools,
checkpointer=memory,
debug=False
)
chain=chat_prompt_template|agent
如上使用流式方式绑定了提示词但是后面在使用chain.invoke的方法的时候怎么把question传递进去