admin管理员组

文章数量:1399971

Langchain's encapsulation is quite complex. I would like to ask where the implementation of this agent's plan function is located.

# this code is in create_openai_tools_agent
agent = (
            RunnablePassthrough.assign(
                agent_scratchpad=lambda x: format_to_openai_tool_messages(
                    x["intermediate_steps"]
                )
            )
            | prompt
            | llm_with_tools
            | OpenAIToolsAgentOutputParser()
    )

本文标签: Langchain Agent39s Plan Implementation LocationStack Overflow