MCPcopy Create free account
hub / github.com/Tencent/digitalhuman / run

Method run

HATE/basic_hate/agentverse/tasksolving.py:72–87  ·  view source on GitHub ↗

Run the environment from scratch until it is done.

(self)

Source from the content-addressed store, hash-verified

70 return cls(environment=environment, task=task)
71
72 def run(self):
73 """Run the environment from scratch until it is done."""
74 self.environment.reset()
75 self.logs = []
76 total_decision_making_process = []
77 advice = "No advice yet."
78 previous_plan = "No solution yet."
79 while not self.environment.is_done():
80 result, advice, previous_plan, logs, success, decision_making_process = asyncio.run(
81 self.environment.step(advice, previous_plan)
82 )
83 self.logs += logs
84 total_decision_making_process += decision_making_process
85 self.environment.report_metrics()
86 self.save_result(previous_plan, result, self.environment.get_spend())
87 return previous_plan, result, self.logs, total_decision_making_process
88
89 def singleagent_thinking(self, preliminary_solution, advice) -> str:
90 preliminary_solution = self.environment.solve(

Callers

nothing calls this directly

Calls 6

save_resultMethod · 0.95
resetMethod · 0.45
is_doneMethod · 0.45
stepMethod · 0.45
report_metricsMethod · 0.45
get_spendMethod · 0.45

Tested by

no test coverage detected