MCPcopy Create free account

hub / github.com/datawhalechina/easy-data-x-ai / functions

Functions230 in github.com/datawhalechina/easy-data-x-ai

↓ 1 callersFunctionfetchContributors
(repoSlug)
scripts/update-contributors.mjs:35
↓ 1 callersFunctionflatten
(d, prefix="")
code/X1/part3_consolidation/x1_13_profile_vs_facts.py:36
↓ 1 callersMethodfrom_dict
Create Example instance from dictionary. Args: data: Dictionary containing example data Ret
code/X2/models/example.py:74
↓ 1 callersMethodfrom_dict
Create Rule instance from dictionary. Args: data: Dictionary containing rule data Returns:
code/X2/models/rule.py:70
↓ 1 callersMethodfrom_dict
Create Skill instance from dictionary. Args: data: Dictionary containing skill data Returns
code/X2/models/skill.py:87
↓ 1 callersFunctionfull_context_approach
全量上下文策略(模拟): 把所有候选记忆都返回,估计 Token 消耗
code/X1/part1_decay_conflict/x1_6_retrieval_aggregate.py:98
↓ 1 callersFunctionfull_injection_context
()
code/X2/x2_1_compare_context.py:25
↓ 1 callersMethodget_all_for_user
获取某用户的所有记忆(仅用于调试对比)
code/X1/part2_namespace/x1_7_namespace_isolation.py:102
↓ 1 callersMethodget_audit_log
(self, memory_id: str | None = None)
code/X1/part2_namespace/x1_8_promote_and_share.py:135
↓ 1 callersMethodget_dashscope_config
获取 DashScope 配置
code/config.py:56
↓ 1 callersFunctionget_examples
(skill_name: str, db_path: str)
code/X2/tools/query_tool.py:113
↓ 1 callersFunctionget_exchange_rate
模拟汇率查询
code/D4/d4_1_react_loop.py:44
↓ 1 callersMethodget_metadata_json
Get metadata as JSON string. Returns: JSON string representation of metadata
code/X2/models/skill.py:151
↓ 1 callersMethodget_migration_summary
(self)
code/X2/storage/base.py:83
↓ 1 callersMethodget_migration_summary
(self)
code/X2/services/migration_service.py:97
↓ 1 callersFunctionget_rules
(skill_name: str, db_path: str)
code/X2/tools/query_tool.py:94
↓ 1 callersFunctionget_skill
(skill_name: str, db_path: str, output_format: str = "text")
code/X2/tools/query_tool.py:34
↓ 1 callersMethodget_skill_complete
(self, skill_name: str)
code/X2/services/query_service.py:27
↓ 1 callersFunctionget_weather
模拟天气查询
code/D4/d4_1_react_loop.py:33
↓ 1 callersFunctiongroup_by_topic
按话题关键词分组
code/X1/part3_consolidation/x1_12_consolidation_reflection.py:37
↓ 1 callersMethodinit
(self, force: bool = False)
code/X2/storage/seekdb_storage.py:63
↓ 1 callersMethodinsert_examples
(self, examples: list[Example])
code/X2/storage/base.py:65
↓ 1 callersMethodinsert_rules
(self, rules: list[Rule])
code/X2/storage/base.py:51
↓ 1 callersMethodis_initialized
(self)
code/X2/storage/seekdb_storage.py:70
↓ 1 callersFunctionlist_skills
(category: str = None, db_path: str = None)
code/X2/tools/query_tool.py:56
↓ 1 callersMethodlist_skills
( self, category: str | None = None, status: str | None = None, )
code/X2/storage/base.py:33
↓ 1 callersFunctionload_all_data
加载所有 fixtures
code/X1/part3_consolidation/x1_15_benchmark_runner.py:41
↓ 1 callersFunctionload_data
(filepath: str)
code/X1/part1_decay_conflict/x1_6_retrieval_aggregate.py:23
↓ 1 callersFunctionload_memories
(filepath: str)
code/X1/part1_decay_conflict/x1_2_decay_param_ablation.py:69
↓ 1 callersFunctionload_memories
(filepath: str)
code/X1/part1_decay_conflict/x1_3_retrieval_with_decay.py:45
↓ 1 callersFunctionload_profile
(filepath: str)
code/X1/part3_consolidation/x1_13_profile_vs_facts.py:27
↓ 1 callersFunctionmain
()
code/X1/part3_consolidation/x1_11_consolidation_passive.py:57
↓ 1 callersFunctionmain
()
code/X1/part3_consolidation/x1_15_benchmark_runner.py:202
↓ 1 callersFunctionmain
()
code/X1/part3_consolidation/x1_12_consolidation_reflection.py:124
↓ 1 callersFunctionmain
()
code/X1/part3_consolidation/x1_13_profile_vs_facts.py:155
↓ 1 callersFunctionmain
()
code/X1/part3_consolidation/x1_14_experience_distill.py:120
↓ 1 callersFunctionmain
()
code/X1/part1_decay_conflict/x1_2_decay_param_ablation.py:113
↓ 1 callersFunctionmain
()
code/X1/part1_decay_conflict/x1_4_conflict_detect.py:153
↓ 1 callersFunctionmain
()
code/X1/part1_decay_conflict/x1_5_conflict_resolve.py:134
↓ 1 callersFunctionmain
()
code/X1/part1_decay_conflict/x1_3_retrieval_with_decay.py:140
↓ 1 callersFunctionmain
()
code/X1/part1_decay_conflict/x1_1_decay_score_demo.py:100
↓ 1 callersFunctionmain
()
code/X1/part1_decay_conflict/x1_6_retrieval_aggregate.py:145
↓ 1 callersFunctionmain
()
code/X1/part2_namespace/x1_7_namespace_isolation.py:107
↓ 1 callersFunctionmain
()
code/X1/part2_namespace/x1_8_promote_and_share.py:141
↓ 1 callersFunctionmain
()
code/X1/part2_namespace/x1_9_cross_agent_query.py:87
↓ 1 callersFunctionmain
()
code/X1/part2_namespace/x1_10_concurrent_write.py:160
↓ 1 callersFunctionmain
()
code/X2/x2_1_compare_context.py:54
↓ 1 callersFunctionmain
()
code/X2/tools/query_tool.py:133
↓ 1 callersFunctionmain
()
code/X2/tools/migrate.py:110
↓ 1 callersFunctionmain
()
code/X2/database/init_seekdb.py:20
↓ 1 callersFunctionmain
()
code/X2/database/check_seekdb.py:24
↓ 1 callersFunctionmigrate_directory
(skills_dir: str, db_path: str, force: bool = False)
code/X2/tools/migrate.py:63
↓ 1 callersMethodmigrate_directory
(self, skills_dir: str, force: bool = False)
code/X2/services/migration_service.py:80
↓ 1 callersFunctionmigrate_file
(skill_file: str, db_path: str, force: bool = False)
code/X2/tools/migrate.py:35
↓ 1 callersFunctionon_demand_context
(user_query: str)
code/X2/x2_1_compare_context.py:35
↓ 1 callersMethodparse
Parse the Markdown file and extract frontmatter and content. Returns: Dictionary containing: - name:
code/X2/parsers/markdown_parser.py:31
↓ 1 callersMethodpromote
Promote 记忆到更高作用域。 PowerMem 的规则:只能向更严格的方向(数值更大)移动。
code/X1/part2_namespace/x1_8_promote_and_share.py:54
↓ 1 callersFunctionquery_combined
组合检索:先画像,后事实库
code/X1/part3_consolidation/x1_13_profile_vs_facts.py:145
↓ 1 callersFunctionrecall_memory
检索相关记忆,带时效性权重
code/D4/d4_4_memory_agent.py:123
↓ 1 callersFunctionreflection_analyze
模拟 LLM reflection:分析同一话题的多条记忆,蒸馏为稳定事实。 实际系统中这一步骤由 LLM 完成: "以下是用户最近关于 {topic} 的记忆:[memories] 请判断这些记忆是否隐含一个稳定的用户事实或偏好。 如果是,用一句话总
code/X1/part3_consolidation/x1_12_consolidation_reflection.py:58
↓ 1 callersFunctionresolveRepoSlug
()
scripts/update-contributors.mjs:12
↓ 1 callersFunctionrule_doc_id
(skill_name: str, rule_key: str)
code/X2/database/collections.py:14
↓ 1 callersFunctionrun_ablation
运行消融实验
code/X1/part1_decay_conflict/x1_2_decay_param_ablation.py:75
↓ 1 callersFunctionrun_agent
运行 Agent(流式输出)。 create_agent 内部自动实现了 F2 中描述的循环: 感知(用户提问)→ 推理(要不要查?)→ 行动(查知识库)→ 观察(拿到结果)→ 继续推理... 不再需要手动写 for 循环、手动拼消息了!
code/D1/d1_6_agent.py:106
↓ 1 callersFunctionrun_benchmark
运行一次完整的评测
code/X1/part3_consolidation/x1_15_benchmark_runner.py:164
↓ 1 callersFunctionsave_memory
将事实存入记忆库
code/D4/d4_4_memory_agent.py:111
↓ 1 callersFunctionsearch_memories
模拟检索 + 衰减排序 返回 (results, estimated_tokens, latency_ms)
code/X1/part3_consolidation/x1_15_benchmark_runner.py:93
↓ 1 callersFunctionsearch_memory
从记忆库中检索与当前问题相关的记忆。 使用时效性权重:越新的记忆权重越高(模拟遗忘曲线)。
code/D4/d4_3_with_memory.py:122
↓ 1 callersFunctionsearch_skills
(keyword: str, db_path: str)
code/X2/tools/query_tool.py:76
↓ 1 callersFunctionsimulate_concurrent_write
模拟两个线程(Agent)并发写入同一 key。 策略: - no_lock: 无保护,后写入覆盖先写入(可能丢数据) - optimistic_lock: 乐观锁(version 检查),冲突时重试 - lww_timestamp: 最后写入胜出(基于时
code/X1/part2_namespace/x1_10_concurrent_write.py:31
↓ 1 callersFunctionsimulate_semantic_score
模拟语义相似度(中文友好):基于主题关键词字典
code/X1/part3_consolidation/x1_15_benchmark_runner.py:65
↓ 1 callersFunctionsimulate_semantic_score
模拟语义相似度分数(中文友好)。 实际系统中这是 embedding 余弦相似度,这里用主题关键词字典模拟。 思路:每个语义主题(编程语言、食物偏好、云平台等)维护一组关键词; - 先识别 query 涉及哪些主题; - 然后看 memory 的内容在该主
code/X1/part1_decay_conflict/x1_3_retrieval_with_decay.py:51
↓ 1 callersFunctionsimulate_semantic_score
模拟语义相似度分数(中文友好)。 实际系统中这是 embedding 余弦相似度,这里用主题关键词字典模拟。
code/X1/part1_decay_conflict/x1_6_retrieval_aggregate.py:115
↓ 1 callersFunctionsimulate_similarity
模拟 embedding 余弦相似度(中文友好)。 实际系统中使用 embedding 模型计算,这里用「主题关键词重叠 + 字符级 Jaccard」模拟。
code/X1/part1_decay_conflict/x1_4_conflict_detect.py:32
↓ 1 callersFunctionto_skill_description
将经验模式转化为 Skill 描述。 这是记忆系统输出 → Skill 系统输入的关键衔接点。
code/X1/part3_consolidation/x1_14_experience_distill.py:105
↓ 1 callersFunctionupdateReadme
(wallMarkup)
scripts/update-contributors.mjs:91
↓ 1 callersMethodupdate_skill
(self, skill: Skill)
code/X2/services/skill_service.py:45
↓ 1 callersFunctionvector_with_metadata
向量检索 + 元数据过滤:语义搜索 + 结构化字段精确匹配
code/D3/d3_3_compare.py:62
Method__init__
(self)
code/X1/part2_namespace/x1_7_namespace_isolation.py:38
Method__init__
(self, agents_config: dict)
code/X1/part2_namespace/x1_8_promote_and_share.py:34
Method__init__
Initialize extractor with Markdown content. Args: content: Markdown content string
code/X2/parsers/example_extractor.py:19
Method__init__
Initialize extractor with Markdown content. Args: content: Markdown content string
code/X2/parsers/rule_extractor.py:49
Method__init__
Initialize parser with file path. Args: file_path: Path to SKILL.md file
code/X2/parsers/markdown_parser.py:20
Method__init__
(self, path: str = DEFAULT_SEEKDB_PATH)
code/X2/storage/seekdb_storage.py:45
Method__init__
(self, storage_or_path: SkillStorage | str)
code/X2/services/query_service.py:17
Method__init__
(self, storage_or_path: SkillStorage | str)
code/X2/services/skill_service.py:15
Method__init__
(self, storage_or_path: SkillStorage | str)
code/X2/services/migration_service.py:17
Method__init__
Initialize an Example instance. Args: skill_name: Name of the associated skill code: Example code
code/X2/models/example.py:18
Method__init__
Initialize a Rule instance. Args: skill_name: Name of the associated skill rule_type: Type of rule (
code/X2/models/rule.py:18
Method__init__
Initialize a Skill instance. Args: name: Skill name (unique identifier) description: Skill descripti
code/X2/models/skill.py:19
Method__repr__
(self)
code/X2/models/example.py:119
Method__repr__
(self)
code/X2/models/rule.py:114
Method__repr__
(self)
code/X2/models/skill.py:160
Functionagent_a_write
Agent A:用户已从 Java 转向 Go
code/X1/part2_namespace/x1_10_concurrent_write.py:51
Functionagent_b_write
Agent B:用户现在用 Rust 做主力
code/X1/part2_namespace/x1_10_concurrent_write.py:103
Methodcheck_api_key
检查 API Key 是否已配置
code/config.py:38
Methodclient
(self)
code/X2/storage/seekdb_storage.py:53
Methodcreate_skill
(self, skill: Skill)
code/X2/storage/seekdb_storage.py:125
Methodcreate_skill
Persist a new skill. Returns document id.
code/X2/storage/base.py:25
Methoddelete_skill
(self, name: str)
code/X2/services/skill_service.py:48
← previousnext →101–200 of 230, ranked by callers