MCPcopy Create free account

hub / github.com/Enfoirer/Text2GraphRAG / functions

Functions365 in github.com/Enfoirer/Text2GraphRAG

↓ 22 callersMethod_safe_truncate
安全截取字符串,处理None值 Args: text: 输入文本 max_length: 最大长度 Returns: 截取后的字符串
rag_modules/milvus_index_construction.py:48
↓ 12 callersFunctionclean_str
Clean an input string by removing HTML escapes, control characters, and other unwanted characters.
nano_graphrag/_utils.py:253
↓ 11 callersMethodencode
(self, text: str)
nano_graphrag/_utils.py:148
↓ 10 callersFunctionlist_of_list_to_csv
(data: list[list])
nano_graphrag/_utils.py:241
↓ 9 callersFunctiontruncate_list_by_token_size
Truncate a list of data by token size using a provided tokenizer wrapper.
nano_graphrag/_utils.py:169
↓ 8 callersMethodupsert
(self, data: dict[str, T])
nano_graphrag/base.py:109
↓ 6 callersFunctionsplit_string_by_multi_markers
Split a string by multiple markers
nano_graphrag/_utils.py:224
↓ 5 callersMethod_lazy_load_tokenizer
(self)
nano_graphrag/_utils.py:130
↓ 5 callersMethodclose
关闭资源连接
rag_modules/graph_rag_retrieval.py:630
↓ 5 callersMethodget_by_id
(self, id: str)
nano_graphrag/base.py:97
↓ 5 callersMethodhas_collection
检查集合是否存在 Returns: 集合是否存在
rag_modules/milvus_index_construction.py:469
↓ 5 callersMethodindex_done_callback
commit the storage operations after indexing
nano_graphrag/base.py:68
↓ 4 callersFunctioncompute_mdhash_id
(content, prefix: str = "")
nano_graphrag/_utils.py:186
↓ 4 callersMethodhas_node
(self, node_id: str)
nano_graphrag/_storage/gdb_networkx.py:100
↓ 3 callersMethodbatch_process_recipes
批量处理菜谱目录 - 支持断点续传和分批保存
agent/recipe_ai_agent.py:909
↓ 3 callersFunctioncompute_args_hash
(*args)
nano_graphrag/_utils.py:220
↓ 3 callersMethodexport_to_neo4j_csv
导出为Neo4j导入格式的CSV - 支持合并批次数据
agent/recipe_ai_agent.py:1133
↓ 3 callersMethodgenerate_adaptive_answer
智能统一答案生成 自动适应不同类型的查询,无需预先分类
rag_modules/generation_integration.py:37
↓ 3 callersMethodgenerate_concept_id
生成新的概念ID
agent/recipe_ai_agent.py:591
↓ 3 callersMethodhybrid_search
混合检索:使用Round-robin轮询合并策略 公平轮询合并不同检索结果,不使用权重配置
rag_modules/hybrid_retrieval.py:552
↓ 3 callersMethodinsert
(self, string_or_strings)
nano_graphrag/graphrag.py:228
↓ 3 callersFunctionlimit_async_func_call
Add restriction of maximum async calling times for a async func
nano_graphrag/_utils.py:276
↓ 3 callersMethodnormalize_amount
标准化用量表达 Args: amount: 原始用量 unit: 单位 Returns: Tuple[标准化后的用量, 估算数值]
agent/amount_normalizer.py:90
↓ 3 callersMethodsave_batch_data
保存当前批次数据
agent/recipe_ai_agent.py:525
↓ 3 callersMethodsave_progress
保存处理进度
agent/recipe_ai_agent.py:491
↓ 3 callersMethodto_dict
转换为字典
config.py:50
↓ 2 callersMethod_categorize_synonyms_by_language
按语言分类同义词
agent/recipe_ai_agent.py:798
↓ 2 callersMethod_fallback_parse
备用解析方法(基于规则)
agent/recipe_ai_agent.py:277
↓ 2 callersMethod_fallback_subgraph_extraction
降级子图提取
rag_modules/graph_rag_retrieval.py:620
↓ 2 callersMethod_format_synonyms_for_neo4j
格式化同义词用于Neo4j导出
agent/recipe_ai_agent.py:840
↓ 2 callersMethod_format_tags
将标签字段统一为字符串
rag_modules/milvus_index_construction.py:63
↓ 2 callersMethod_get_node_neighbors
获取节点的邻居信息
rag_modules/hybrid_retrieval.py:537
↓ 2 callersFunction_handle_entity_relation_summary
( entity_or_relation_name: str, description: str, global_config: dict, tokenizer_wrapper: Toke
nano_graphrag/_op.py:111
↓ 2 callersMethod_initialize_retrievers
初始化检索器
main.py:185
↓ 2 callersFunction_merge_edges_then_upsert
( src_id: str, tgt_id: str, edges_data: list[dict], knwoledge_graph_inst: BaseGraphStorage,
nano_graphrag/_op.py:230
↓ 2 callersFunction_merge_nodes_then_upsert
( entity_name: str, nodes_data: list[dict], knwoledge_graph_inst: BaseGraphStorage, global_con
nano_graphrag/_op.py:182
↓ 2 callersMethod_paths_to_documents
将图路径转换为Document对象
rag_modules/graph_rag_retrieval.py:519
↓ 2 callersFunction_process_single_content
( chunk_key_dp: tuple[str, TextChunkSchema] )
nano_graphrag/entity_extraction/extract.py:34
↓ 2 callersFunction_sanitize_description
(text: str | None)
rag_modules/text_to_graph_ingestor.py:108
↓ 2 callersMethod_show_knowledge_base_stats
显示知识库统计信息
main.py:202
↓ 2 callersFunctionalways_get_an_event_loop
()
nano_graphrag/_utils.py:22
↓ 2 callersMethodanalyze_query
深度分析查询特征,决定最佳检索策略
rag_modules/intelligent_query_router.py:64
↓ 2 callersFunctionazure_openai_complete_if_cache
( deployment_name, prompt, system_prompt=None, history_messages=[], **kwargs )
nano_graphrag/_llm.py:226
↓ 2 callersMethodbuild_knowledge_base
构建知识库(如果需要)
main.py:124
↓ 2 callersMethodbuild_recipe_documents
构建疾病知识文档,汇总症状、治疗、药物等信息
rag_modules/graph_data_preparation.py:169
↓ 2 callersMethodchunk_documents
对文档进行分块处理 Args: chunk_size: 分块大小 chunk_overlap: 重叠大小 Returns: 分块后的文
rag_modules/graph_data_preparation.py:310
↓ 2 callersMethodcommunity_schema
Return the community representation with report and nodes
nano_graphrag/base.py:181
↓ 2 callersMethodcopy
(self)
nano_graphrag/entity_extraction/module.py:246
↓ 2 callersFunctioncreate_amazon_bedrock_complete_function
Factory function to dynamically create completion functions for Amazon Bedrock Args: model_id (str): Amazon Bedrock model identifier
nano_graphrag/_llm.py:124
↓ 2 callersMethoddecode
(self, tokens: list[int])
nano_graphrag/_utils.py:152
↓ 2 callersMethoddecode_batch
(self, tokens_list: list[list[int]])
nano_graphrag/_utils.py:157
↓ 2 callersMethodedge_degrees_batch
(self, edge_pairs: list[tuple[str, str]])
nano_graphrag/base.py:133
↓ 2 callersMethodexport_to_csv
导出为CSV格式
agent/recipe_ai_agent.py:1043
↓ 2 callersMethodextract_recipe_info
使用AI提取菜谱信息
agent/recipe_ai_agent.py:134
↓ 2 callersMethodfilter_keys
return un-exist keys
nano_graphrag/base.py:105
↓ 2 callersFunctionget_amazon_bedrock_async_client_instance
()
nano_graphrag/_llm.py:38
↓ 2 callersFunctionget_azure_openai_async_client_instance
()
nano_graphrag/_llm.py:31
↓ 2 callersMethodget_by_ids
( self, ids: list[str], fields: Union[set[str], None] = None )
nano_graphrag/base.py:100
↓ 2 callersMethodget_edge
( self, source_node_id: str, target_node_id: str )
nano_graphrag/base.py:142
↓ 2 callersMethodget_entities_by_key
根据索引键获取实体
rag_modules/graph_indexing.py:347
↓ 2 callersMethodget_node
(self, node_id: str)
nano_graphrag/base.py:136
↓ 2 callersMethodget_nodes_batch
(self, node_ids: list[str])
nano_graphrag/base.py:139
↓ 2 callersMethodget_nodes_edges_batch
( self, node_ids: list[str] )
nano_graphrag/base.py:157
↓ 2 callersFunctionget_openai_async_client_instance
()
nano_graphrag/_llm.py:24
↓ 2 callersMethodget_route_statistics
获取路由统计信息
rag_modules/intelligent_query_router.py:270
↓ 2 callersMethodget_statistics
获取键值对存储统计信息
rag_modules/graph_indexing.py:359
↓ 2 callersMethodgraph_rag_search
图RAG主搜索接口:整合所有图RAG能力
rag_modules/graph_rag_retrieval.py:415
↓ 2 callersMethodinitialize
初始化图RAG检索系统
rag_modules/graph_rag_retrieval.py:76
↓ 2 callersMethodload_collection
加载集合到内存 Returns: 是否加载成功
rag_modules/milvus_index_construction.py:482
↓ 2 callersFunctionload_config
加载配置文件
agent/batch_manager.py:14
↓ 2 callersFunctionload_config
加载配置文件
agent/run_ai_agent.py:12
↓ 2 callersMethodload_graph_data
从Neo4j加载图数据 Returns: 包含节点和关系的数据字典
rag_modules/graph_data_preparation.py:86
↓ 2 callersMethodmerge_all_batches
合并所有批次数据到最终输出文件
agent/recipe_ai_agent.py:549
↓ 2 callersFunctionmerge_batches
手动合并所有批次数据
agent/batch_manager.py:95
↓ 2 callersMethodmulti_hop_traversal
多跳图遍历:这是图RAG的核心优势 通过图结构发现隐含的知识关联
rag_modules/graph_rag_retrieval.py:207
↓ 2 callersMethodnode_degrees_batch
(self, node_ids: List[str])
nano_graphrag/base.py:127
↓ 2 callersFunctionopenai_complete_if_cache
( model, prompt, system_prompt=None, history_messages=[], **kwargs )
nano_graphrag/_llm.py:50
↓ 2 callersFunctionpack_user_ass_to_openai_messages
(prompt: str, generated_content: str, using_amazon_bedrock: bool)
nano_graphrag/_utils.py:203
↓ 2 callersMethodquery
(self, query: str, param: QueryParam = QueryParam())
nano_graphrag/graphrag.py:232
↓ 2 callersFunctionsetup_api_key
设置API密钥
agent/run_ai_agent.py:31
↓ 2 callersMethodto_dict
(self)
nano_graphrag/entity_extraction/module.py:78
↓ 2 callersMethodupsert_node
(self, node_id: str, node_data: dict[str, str])
nano_graphrag/base.py:162
↓ 1 callersMethod__init__
( self, lm: dspy.LM = None, max_retries: int = 3, entity_types: list[str] = EN
nano_graphrag/entity_extraction/module.py:262
↓ 1 callersMethod_analyze_query_complexity
分析查询复杂度
rag_modules/graph_rag_retrieval.py:594
↓ 1 callersMethod_build_graph_index
构建图索引
rag_modules/hybrid_retrieval.py:70
↓ 1 callersMethod_build_graph_index
构建图索引以加速查询
rag_modules/graph_rag_retrieval.py:97
↓ 1 callersMethod_build_knowledge_subgraph
构建知识子图对象
rag_modules/graph_rag_retrieval.py:495
↓ 1 callersFunction_build_local_query_context
( query, knowledge_graph_inst: BaseGraphStorage, entities_vdb: BaseVectorStorage, community_re
nano_graphrag/_op.py:844
↓ 1 callersMethod_build_path_description
构建路径的自然语言描述
rag_modules/graph_rag_retrieval.py:566
↓ 1 callersMethod_build_reasoning_chain
构建推理链
rag_modules/graph_rag_retrieval.py:604
↓ 1 callersMethod_build_semantic_graph
Run nano-graphrag over the given documents and return the NetworkX graph.
rag_modules/text_to_graph_ingestor.py:218
↓ 1 callersMethod_build_subgraph_description
构建子图的自然语言描述
rag_modules/graph_rag_retrieval.py:580
↓ 1 callersMethod_canonical_name_from_title
(title: str)
rag_modules/text_to_graph_ingestor.py:211
↓ 1 callersMethod_cleanup
清理资源
main.py:411
↓ 1 callersMethod_cluster_data_to_subgraphs
(self, cluster_data: dict[str, list[dict[str, str]]])
nano_graphrag/_storage/gdb_networkx.py:226
↓ 1 callersMethod_combined_search
组合搜索策略:结合传统检索和图RAG的优势
rag_modules/intelligent_query_router.py:206
↓ 1 callersFunction_community_report_json_to_str
refer official graphrag: index/graph/extractors/community_reports
nano_graphrag/_op.py:603
↓ 1 callersMethod_connect
建立Neo4j连接
rag_modules/graph_data_preparation.py:59
↓ 1 callersMethod_create_collection_schema
创建集合模式 Returns: 集合模式对象
rag_modules/milvus_index_construction.py:99
↓ 1 callersMethod_drop_conflicting_indexes
Drop legacy indexes (without names) that block constraint creation.
rag_modules/text_to_graph_ingestor.py:348
next →1–100 of 365, ranked by callers