(self, input, log=False)
| 228 | f"contain irrelevant info. Input should be a search query." |
| 229 | |
| 230 | def run(self, input, log=False): |
| 231 | assert isinstance(input, self.input_type) |
| 232 | loader = TextLoader(self.doc_path) |
| 233 | vectorstore = VectorstoreIndexCreator().from_loaders([loader]).vectorstore |
| 234 | evidence = vectorstore.similarity_search(input, k=1)[0].page_content |
| 235 | assert isinstance(evidence, self.output_type) |
| 236 | if log: |
| 237 | print(f"Running {self.name} with input {input}\nOutput: {evidence}\n") |
| 238 | return evidence |
| 239 | |
| 240 | |
| 241 | class SearchSOTUWorker(SearchDocWorker): |
nothing calls this directly
no outgoing calls
no test coverage detected