MCPcopy Create free account
hub / github.com/bigdata-ustc/Agent4Edu / __init__

Method __init__

Code/memory.py:19–33  ·  view source on GitHub ↗
(self, student_id: int, data_path: str | Path)

Source from the content-addressed store, hash-verified

17 """
18
19 def __init__(self, student_id: int, data_path: str | Path):
20 self.student_id = int(student_id)
21 self.factual: list[list[Any]] = []
22 self.short: list[list[Any]] = []
23 self.long: dict[str, list[Any]] = {
24 "significant_facts": [],
25 "learning_status": [],
26 "knowledge_proficiency": [],
27 "practiced_knowledge": [],
28 }
29 self.threshold = int(SIM_PARAMS["long_term_thresh"])
30 self.short_size = int(SIM_PARAMS["short_term_size"])
31 self.forget_lambda = float(SIM_PARAMS["forget_lambda"])
32 self.relation_graph = RelationGraph(data_path)
33 self.knowledge_proficiency = KnowledgeProficiency(data_path)
34
35 def retrieve_short(self) -> list[list[Any]]:
36 self.short = self.factual[-self.short_size:]

Callers

nothing calls this directly

Calls 2

RelationGraphClass · 0.90

Tested by

no test coverage detected