Initialize with the LLM and a docstore.
(self, llm: BaseLanguageModel, docstore: Docstore, **kwargs: Any)
| 144 | """[Deprecated] Chain that implements the ReAct paper.""" |
| 145 | |
| 146 | def __init__(self, llm: BaseLanguageModel, docstore: Docstore, **kwargs: Any): |
| 147 | """Initialize with the LLM and a docstore.""" |
| 148 | docstore_explorer = DocstoreExplorer(docstore) |
| 149 | tools = [ |
| 150 | Tool( |
| 151 | name="Search", |
| 152 | func=docstore_explorer.search, |
| 153 | description="Search for a term in the docstore.", |
| 154 | ), |
| 155 | Tool( |
| 156 | name="Lookup", |
| 157 | func=docstore_explorer.lookup, |
| 158 | description="Lookup a term in the docstore.", |
| 159 | ), |
| 160 | ] |
| 161 | agent = ReActDocstoreAgent.from_llm_and_tools(llm, tools) |
| 162 | super().__init__(agent=agent, tools=tools, **kwargs) |
nothing calls this directly
no test coverage detected