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

Method load_cache

SWF/src/base.py:323–329  ·  view source on GitHub ↗

Read the task output of a single agent {"task_id": str, "task": str, "output": "long output", "answer": "short answer", "usage": List[int], }

(self)

Source from the content-addressed store, hash-verified

321 return 0.5 * ((usages[0]*1 + usages[1]*1) / 1000)
322
323 def load_cache(self) -> Dict[str, Dict[str, Any]]:
324 """
325 Read the task output of a single agent
326 {"task_id": str, "task": str, "output": "long output", "answer": "short answer", "usage": List[int], }
327 """
328
329 return json.load(open(self.cache_file, 'r'))
330
331 def look_up_cache(self, task_id, agent_name) -> Response:
332 """

Callers 1

__post_init__Method · 0.95

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected