mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-06 13:33:37 +00:00
Tool Retrieval Template (#13104)
Adds a template like https://python.langchain.com/docs/modules/agents/how_to/custom_agent_with_tool_retrieval Uses OpenAI functions, LCEL, and FAISS
This commit is contained in:
@@ -62,11 +62,11 @@ agent = (
|
||||
|
||||
class AgentInput(BaseModel):
|
||||
input: str
|
||||
chat_history: List[Tuple[str, str]] = Field(..., extra={"widget": {"type": "chat"}})
|
||||
chat_history: List[Tuple[str, str]] = Field(
|
||||
..., extra={"widget": {"type": "chat", "input": "input", "output": "output"}}
|
||||
)
|
||||
|
||||
|
||||
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True).with_types(
|
||||
input_type=AgentInput
|
||||
)
|
||||
|
||||
agent_executor = agent_executor | (lambda x: x["output"])
|
||||
|
Reference in New Issue
Block a user