MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / run

Method run

eval_heldout/rewoo/nodes/Worker.py:230–238  ·  view source on GitHub ↗
(self, input, log=False)

Source from the content-addressed store, hash-verified

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
241class SearchSOTUWorker(SearchDocWorker):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected