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

Method to_json

toolbench/inference/Algorithms/base_search.py:15–28  ·  view source on GitHub ↗

return a json object, If "answer" = True. must have the following field to make answer annotation If "process" = True. You need provide the full information of the tree searching process "answer_generation": { "valid_data": bool, "final_answ

(self,answer=False,process=True)

Source from the content-addressed store, hash-verified

13 pass
14
15 def to_json(self,answer=False,process=True):
16 '''
17 return a json object,
18 If "answer" = True. must have the following field to make answer annotation
19 If "process" = True. You need provide the full information of the tree searching process
20
21 "answer_generation": {
22 "valid_data": bool,
23 "final_answer": string,
24 "finish_type": enum["give_up","give_answer"]
25 "train_messages": [ [openAI-message] ],
26 }
27 '''
28 raise NotImplementedError
29
30 def start(self, **args):
31 """This is the entry point of the searching process"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected