MCPcopy Create free account
hub / github.com/OpenBMB/ToolBench / __init__

Method __init__

toolbench/inference/Algorithms/DFS.py:14–26  ·  view source on GitHub ↗
(self, llm, io_func, process_id=0, callbacks=None)

Source from the content-addressed store, hash-verified

12class DFS_tree_search(base_search_method):
13
14 def __init__(self, llm, io_func, process_id=0, callbacks=None):
15 super(DFS_tree_search, self).__init__(
16 llm, io_func, process_id, callbacks)
17 """Depth-first search.
18 with_filter=True: Every time a child node is generated, choose the best multiple iterations to go.
19 with_filter=False: Do as Preorder traversal.
20 """
21 self.io_func = io_func
22 self.llm = llm
23 self.process_id = process_id
24 self.restart()
25
26 self.callbacks = callbacks if callbacks is not None else []
27
28 def restart(self):
29 self.status = 0

Callers

nothing calls this directly

Calls 1

restartMethod · 0.95

Tested by

no test coverage detected