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

Method run_pipeline

toolbench/inference/toolbench_server.py:41–62  ·  view source on GitHub ↗
(self, user_input, method, top_k)

Source from the content-addressed store, hash-verified

39 print("Server ready")
40
41 def run_pipeline(self, user_input, method, top_k):
42 # empty the queue
43 while not self.queue.empty():
44 self.queue.get()
45 self.query_id += 1
46 temp_args = copy.deepcopy(self.args)
47 temp_args.retrieved_api_nums = top_k
48 temp_args.method = method
49 data_dict = {
50 "query": user_input,
51 }
52 self.pipeline.run_single_task(
53 method=method,
54 backbone_model=self.llm,
55 query_id=self.query_id,
56 data_dict=data_dict,
57 output_dir_path=self.args.output_answer_file,
58 retriever=self.retriever,
59 args=temp_args,
60 tool_des=None,
61 callbacks=[self.callback]
62 )
63
64 def get_queue(self):
65 while not self.queue.empty():

Callers

nothing calls this directly

Calls 1

run_single_taskMethod · 0.80

Tested by

no test coverage detected