MCPcopy Create free account
hub / github.com/aiming-lab/MDocAgent / sum

Method sum

agents/multi_agent_system.py:39–49  ·  view source on GitHub ↗
(self, sum_question)

Source from the content-addressed store, hash-verified

37 pass
38
39 def sum(self, sum_question):
40 ans, all_messages = self.sum_agent.predict(sum_question)
41 def extract_final_answer(agent_response):
42 try:
43 response_dict = json.loads(agent_response)
44 answer = response_dict.get("Answer", None)
45 return answer
46 except:
47 return agent_response
48 final_ans = extract_final_answer(ans)
49 return final_ans, all_messages
50
51 def predict_dataset(self, dataset:BaseDataset, resume_path = None):
52 samples = dataset.load_data(use_retreival=True)

Callers 4

predictMethod · 0.80
predictMethod · 0.80
predictMethod · 0.80
predictMethod · 0.80

Calls 1

predictMethod · 0.45

Tested by

no test coverage detected