mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-23 15:19:33 +00:00
Allow for async use of SelfAskWithSearchChain (#5394)
# Allow for async use of SelfAskWithSearchChain Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
This commit is contained in:
parent
8121e04200
commit
0a44bfdca3
@ -77,7 +77,10 @@ class SelfAskWithSearchChain(AgentExecutor):
|
||||
):
|
||||
"""Initialize with just an LLM and a search chain."""
|
||||
search_tool = Tool(
|
||||
name="Intermediate Answer", func=search_chain.run, description="Search"
|
||||
name="Intermediate Answer",
|
||||
func=search_chain.run,
|
||||
coroutine=search_chain.arun,
|
||||
description="Search",
|
||||
)
|
||||
agent = SelfAskWithSearchAgent.from_llm_and_tools(llm, [search_tool])
|
||||
super().__init__(agent=agent, tools=[search_tool], **kwargs)
|
||||
|
Loading…
Reference in New Issue
Block a user