rag/ 文件级依赖关系报告包含 116 个 .py 文件的完整依赖图、导入关系和功能描述
生成时间: 2026-06-16 | 版本: ragflow-0.25.6
graph LR __init__["__init__"] class __init__ top_style advanced_rag___init__["advanced_rag/__init__"] class advanced_rag___init__ advanced_rag_style advanced_rag_tree_structured_query_decomposition_retrieval["advanced_rag/tree_structured_query_decomposition_retrieval"] class advanced_rag_tree_structured_query_decomposition_retrieval advanced_rag_style app___init__["app/__init__"] class app___init__ app_style app_audio["app/audio"] class app_audio app_style app_book["app/book"] class app_book app_style app_email["app/email"] class app_email app_style app_laws["app/laws"] class app_laws app_style app_manual["app/manual"] class app_manual app_style app_naive["app/naive"] class app_naive app_style app_one["app/one"] class app_one app_style app_paper["app/paper"] class app_paper app_style app_picture["app/picture"] class app_picture app_style app_presentation["app/presentation"] class app_presentation app_style app_qa["app/qa"] class app_qa app_style app_resume["app/resume"] class app_resume app_style app_table["app/table"] class app_table app_style app_tag["app/tag"] class app_tag app_style benchmark["benchmark"] class benchmark top_style flow___init__["flow/__init__"] class flow___init__ flow_style flow_base["flow/base"] class flow_base flow_style flow_chunker___init__["flow/chunker/__init__"] class flow_chunker___init__ flow_style flow_chunker_schema["flow/chunker/schema"] class flow_chunker_schema flow_style flow_chunker_title_chunker___init__["flow/chunker/title_chunker/__init__"] class flow_chunker_title_chunker___init__ flow_style flow_chunker_title_chunker_common["flow/chunker/title_chunker/common"] class flow_chunker_title_chunker_common flow_style flow_chunker_title_chunker_group_chunker["flow/chunker/title_chunker/group_chunker"] class flow_chunker_title_chunker_group_chunker flow_style flow_chunker_title_chunker_hierarchy_chunker["flow/chunker/title_chunker/hierarchy_chunker"] class flow_chunker_title_chunker_hierarchy_chunker flow_style flow_chunker_title_chunker_schema["flow/chunker/title_chunker/schema"] class flow_chunker_title_chunker_schema flow_style flow_chunker_title_chunker_title_chunker["flow/chunker/title_chunker/title_chunker"] class flow_chunker_title_chunker_title_chunker flow_style flow_chunker_token_chunker["flow/chunker/token_chunker"] class flow_chunker_token_chunker flow_style flow_extractor___init__["flow/extractor/__init__"] class flow_extractor___init__ flow_style flow_extractor_extractor["flow/extractor/extractor"] class flow_extractor_extractor flow_style flow_extractor_schema["flow/extractor/schema"] class flow_extractor_schema flow_style flow_file["flow/file"] class flow_file flow_style flow_parser___init__["flow/parser/__init__"] class flow_parser___init__ flow_style flow_parser_parser["flow/parser/parser"] class flow_parser_parser flow_style flow_parser_pdf_chunk_metadata["flow/parser/pdf_chunk_metadata"] class flow_parser_pdf_chunk_metadata flow_style flow_parser_schema["flow/parser/schema"] class flow_parser_schema flow_style flow_parser_utils["flow/parser/utils"] class flow_parser_utils flow_style flow_pipeline["flow/pipeline"] class flow_pipeline flow_style flow_tests_client["flow/tests/client"] class flow_tests_client flow_style flow_tokenizer___init__["flow/tokenizer/__init__"] class flow_tokenizer___init__ flow_style flow_tokenizer_schema["flow/tokenizer/schema"] class flow_tokenizer_schema flow_style flow_tokenizer_tokenizer["flow/tokenizer/tokenizer"] class flow_tokenizer_tokenizer flow_style graphrag___init__["graphrag/__init__"] class graphrag___init__ graphrag_style graphrag_entity_resolution["graphrag/entity_resolution"] class graphrag_entity_resolution graphrag_style graphrag_entity_resolution_prompt["graphrag/entity_resolution_prompt"] class graphrag_entity_resolution_prompt graphrag_style graphrag_general___init__["graphrag/general/__init__"] class graphrag_general___init__ graphrag_style graphrag_general_community_report_prompt["graphrag/general/community_report_prompt"] class graphrag_general_community_report_prompt graphrag_style graphrag_general_community_reports_extractor["graphrag/general/community_reports_extractor"] class graphrag_general_community_reports_extractor graphrag_style graphrag_general_entity_embedding["graphrag/general/entity_embedding"] class graphrag_general_entity_embedding graphrag_style graphrag_general_extractor["graphrag/general/extractor"] class graphrag_general_extractor graphrag_style graphrag_general_graph_extractor["graphrag/general/graph_extractor"] class graphrag_general_graph_extractor graphrag_style graphrag_general_graph_prompt["graphrag/general/graph_prompt"] class graphrag_general_graph_prompt graphrag_style graphrag_general_index["graphrag/general/index"] class graphrag_general_index graphrag_style graphrag_general_leiden["graphrag/general/leiden"] class graphrag_general_leiden graphrag_style graphrag_general_mind_map_extractor["graphrag/general/mind_map_extractor"] class graphrag_general_mind_map_extractor graphrag_style graphrag_general_mind_map_prompt["graphrag/general/mind_map_prompt"] class graphrag_general_mind_map_prompt graphrag_style graphrag_general_smoke["graphrag/general/smoke"] class graphrag_general_smoke graphrag_style graphrag_light___init__["graphrag/light/__init__"] class graphrag_light___init__ graphrag_style graphrag_light_graph_extractor["graphrag/light/graph_extractor"] class graphrag_light_graph_extractor graphrag_style graphrag_light_graph_prompt["graphrag/light/graph_prompt"] class graphrag_light_graph_prompt graphrag_style graphrag_light_smoke["graphrag/light/smoke"] class graphrag_light_smoke graphrag_style graphrag_ner___init__["graphrag/ner/__init__"] class graphrag_ner___init__ graphrag_style graphrag_ner_graph_extractor["graphrag/ner/graph_extractor"] class graphrag_ner_graph_extractor graphrag_style graphrag_phase_markers["graphrag/phase_markers"] class graphrag_phase_markers graphrag_style graphrag_query_analyze_prompt["graphrag/query_analyze_prompt"] class graphrag_query_analyze_prompt graphrag_style graphrag_search["graphrag/search"] class graphrag_search graphrag_style graphrag_utils["graphrag/utils"] class graphrag_utils graphrag_style llm___init__["llm/__init__"] class llm___init__ llm_style llm_chat_model["llm/chat_model"] class llm_chat_model llm_style llm_cv_model["llm/cv_model"] class llm_cv_model llm_style llm_embedding_model["llm/embedding_model"] class llm_embedding_model llm_style llm_ocr_model["llm/ocr_model"] class llm_ocr_model llm_style llm_rerank_model["llm/rerank_model"] class llm_rerank_model llm_style llm_sequence2txt_model["llm/sequence2txt_model"] class llm_sequence2txt_model llm_style llm_tool_decorator["llm/tool_decorator"] class llm_tool_decorator llm_style llm_tts_model["llm/tts_model"] class llm_tts_model llm_style nlp___init__["nlp/__init__"] class nlp___init__ nlp_style nlp_query["nlp/query"] class nlp_query nlp_style nlp_rag_tokenizer["nlp/rag_tokenizer"] class nlp_rag_tokenizer nlp_style nlp_search["nlp/search"] class nlp_search nlp_style nlp_surname["nlp/surname"] class nlp_surname nlp_style nlp_synonym["nlp/synonym"] class nlp_synonym nlp_style nlp_term_weight["nlp/term_weight"] class nlp_term_weight nlp_style prompts___init__["prompts/__init__"] class prompts___init__ prompts_style prompts_generator["prompts/generator"] class prompts_generator prompts_style prompts_template["prompts/template"] class prompts_template prompts_style raptor["raptor"] class raptor top_style settings["settings"] class settings top_style svr_cache_file_svr["svr/cache_file_svr"] class svr_cache_file_svr svr_style svr_discord_svr["svr/discord_svr"] class svr_discord_svr svr_style svr_sync_data_source["svr/sync_data_source"] class svr_sync_data_source svr_style svr_task_executor["svr/task_executor"] class svr_task_executor svr_style utils___init__["utils/__init__"] class utils___init__ utils_style utils_azure_sas_conn["utils/azure_sas_conn"] class utils_azure_sas_conn utils_style utils_azure_spn_conn["utils/azure_spn_conn"] class utils_azure_spn_conn utils_style utils_base64_image["utils/base64_image"] class utils_base64_image utils_style utils_encrypted_storage["utils/encrypted_storage"] class utils_encrypted_storage utils_style utils_es_conn["utils/es_conn"] class utils_es_conn utils_style utils_file_utils["utils/file_utils"] class utils_file_utils utils_style utils_gcs_conn["utils/gcs_conn"] class utils_gcs_conn utils_style utils_infinity_conn["utils/infinity_conn"] class utils_infinity_conn utils_style utils_lazy_image["utils/lazy_image"] class utils_lazy_image utils_style utils_minio_conn["utils/minio_conn"] class utils_minio_conn utils_style utils_ob_conn["utils/ob_conn"] class utils_ob_conn utils_style utils_opendal_conn["utils/opendal_conn"] class utils_opendal_conn utils_style utils_opensearch_conn["utils/opensearch_conn"] class utils_opensearch_conn utils_style utils_oss_conn["utils/oss_conn"] class utils_oss_conn utils_style utils_raptor_utils["utils/raptor_utils"] class utils_raptor_utils utils_style utils_redis_conn["utils/redis_conn"] class utils_redis_conn utils_style utils_s3_conn["utils/s3_conn"] class utils_s3_conn utils_style utils_storage_factory["utils/storage_factory"] class utils_storage_factory utils_style utils_table_es_metadata["utils/table_es_metadata"] class utils_table_es_metadata utils_style utils_tavily_conn["utils/tavily_conn"] class utils_tavily_conn utils_style utils_tts_cache["utils/tts_cache"] class utils_tts_cache utils_style classDef llm_style fill:#dcfce7,stroke:#16a34a,color:#166534 classDef nlp_style fill:#ffedd5,stroke:#ea580c,color:#9a3412 classDef flow_style fill:#f3e8ff,stroke:#9333ea,color:#6b21a8 classDef app_style fill:#fee2e2,stroke:#dc2626,color:#991b1b classDef graphrag_style fill:#fef3c7,stroke:#f59e0b,color:#92400e classDef utils_style fill:#cffafe,stroke:#0891b2,color:#155e75 classDef prompts_style fill:#ede9fe,stroke:#7c3aed,color:#6d28d9 classDef svr_style fill:#fce7f3,stroke:#db2777,color:#9d174d classDef advanced_rag_style fill:#e0e7ff,stroke:#4f46e5,color:#3730a3 classDef top_style fill:#dbeafe,stroke:#2563eb,color:#1e40af advanced_rag_tree_structured_query_decomposition_retrieval --> prompts_generator advanced_rag_tree_structured_query_decomposition_retrieval --> utils_tavily_conn app_book --> app_naive app_book --> utils_lazy_image app_email --> app_naive app_laws --> app_naive app_manual --> app_naive app_naive --> utils_file_utils app_one --> app_naive app_paper --> app_naive app_presentation --> app_naive app_presentation --> utils_lazy_image app_resume --> prompts_template app_tag --> app_qa flow_chunker___init__ --> flow_chunker_token_chunker flow_chunker_title_chunker___init__ --> flow_chunker_title_chunker_common flow_chunker_title_chunker___init__ --> flow_chunker_title_chunker_title_chunker flow_chunker_title_chunker_common --> flow_base flow_chunker_title_chunker_common --> flow_parser_pdf_chunk_metadata flow_chunker_title_chunker_group_chunker --> flow_chunker_title_chunker_common flow_chunker_title_chunker_hierarchy_chunker --> flow_chunker_title_chunker_common flow_chunker_title_chunker_title_chunker --> flow_base flow_chunker_title_chunker_title_chunker --> flow_chunker_title_chunker_group_chunker flow_chunker_title_chunker_title_chunker --> flow_chunker_title_chunker_hierarchy_chunker flow_chunker_title_chunker_title_chunker --> flow_chunker_title_chunker_schema flow_chunker_token_chunker --> flow_base flow_chunker_token_chunker --> flow_chunker_schema flow_chunker_token_chunker --> flow_parser_pdf_chunk_metadata flow_extractor_extractor --> flow_base flow_extractor_extractor --> prompts_generator flow_file --> flow_base flow_parser_parser --> app_naive flow_parser_parser --> flow_base flow_parser_parser --> flow_parser_pdf_chunk_metadata flow_parser_parser --> flow_parser_schema flow_parser_parser --> flow_parser_utils flow_parser_parser --> llm_cv_model flow_parser_parser --> utils_base64_image flow_parser_pdf_chunk_metadata --> utils_base64_image flow_pipeline --> utils_redis_conn flow_tests_client --> flow_pipeline flow_tokenizer_tokenizer --> flow_base flow_tokenizer_tokenizer --> flow_parser_pdf_chunk_metadata flow_tokenizer_tokenizer --> flow_tokenizer_schema flow_tokenizer_tokenizer --> svr_task_executor graphrag_entity_resolution --> llm_chat_model graphrag_general_community_reports_extractor --> llm_chat_model graphrag_general_extractor --> llm_chat_model graphrag_general_extractor --> prompts_generator graphrag_general_graph_extractor --> llm_chat_model graphrag_general_index --> utils_redis_conn graphrag_general_mind_map_extractor --> llm_chat_model graphrag_light_graph_extractor --> llm_chat_model graphrag_ner_graph_extractor --> llm_chat_model graphrag_phase_markers --> utils_redis_conn graphrag_search --> nlp_search graphrag_utils --> utils_redis_conn llm_chat_model --> llm_tool_decorator llm_cv_model --> llm_chat_model llm_cv_model --> prompts_generator nlp___init__ --> utils_lazy_image nlp_query --> utils_redis_conn nlp_search --> prompts_generator prompts_generator --> prompts_template raptor --> utils_raptor_utils svr_cache_file_svr --> utils_redis_conn svr_task_executor --> flow_pipeline svr_task_executor --> prompts_generator svr_task_executor --> raptor svr_task_executor --> utils_base64_image svr_task_executor --> utils_raptor_utils svr_task_executor --> utils_redis_conn svr_task_executor --> utils_table_es_metadata utils_base64_image --> svr_task_executor utils_base64_image --> utils_lazy_image utils_tts_cache --> utils_redis_conn
graph LR __init__["__init__"] benchmark["benchmark"] raptor["raptor"] settings["settings"]
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
__init__.py | from beartype.claw import beartype_this_package | — | — |
benchmark.py | 主要类: Benchmark | nlp | api.db.joint_services.tenant_model_service api.db.services.knowledgebase_service api.db.services.llm_service argparse asyncio collections +10 more |
raptor.py | 主要类: _PsiTreeNode | graphutils utils.raptor_utils | api.db.services.task_service asyncio common.connection_utils common.exceptions common.misc_utils common.token_utils +7 more |
settings.py | (模块) | — | — |
graph LR advanced_rag___init__["__init__"] advanced_rag_tree_structured_query_decomposition_retrieval["tree_structured_query_decomposition_retrieval"]
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
__init__.py | (模块) | — | — |
tree_structured_query_decomposition_retrieval.py | 主要类: TreeStructuredQueryDecompositionRetrieval | prompts prompts.generator utils.tavily_conn | api.db.services.llm_service asyncio functools logging timeit |
graph LR app___init__["__init__"] app_audio["audio"] app_book["book"] app_email["email"] app_laws["laws"] app_manual["manual"] app_naive["naive"] app_one["one"] app_paper["paper"] app_picture["picture"] app_presentation["presentation"] app_qa["qa"] app_resume["resume"] app_table["table"] app_tag["tag"] app_book --> app_naive app_email --> app_naive app_laws --> app_naive app_manual --> app_naive app_one --> app_naive app_paper --> app_naive app_presentation --> app_naive app_tag --> app_qa
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
__init__.py | (模块) | — | — |
audio.py | (模块) | nlp | api.db.joint_services.tenant_model_service api.db.services.llm_service common.constants logging os re +1 more |
book.py | 主要类: Pdf | app app.naive nlp utils.lazy_image | PIL common.constants common.parser_config_utils deepdoc.parser deepdoc.parser.figure_parser deepdoc.parser.utils +6 more |
email.py | (模块) | app.naive nlp | common.constants deepdoc.parser email email.parser io logging +3 more |
laws.py | 主要类: Docx | app.naive nlp | common.constants common.parser_config_utils deepdoc.parser deepdoc.parser.utils docx io +5 more |
manual.py | 主要类: Pdf | app.naive nlp | common.constants common.parser_config_utils common.token_utils copy deepdoc.parser deepdoc.parser.figure_parser +7 more |
naive.py | 主要类: Docx | nlp utils.file_utils | PIL api.db.joint_services.tenant_model_service api.db.services.llm_service api.db.services.tenant_llm_service base64 bs4 +29 more |
one.py | 主要类: Pdf | app app.naive nlp | common.constants common.parser_config_utils deepdoc.parser deepdoc.parser.figure_parser deepdoc.parser.utils io +5 more |
paper.py | 主要类: Pdf | app.naive nlp | common.constants common.parser_config_utils copy deepdoc.parser deepdoc.parser.figure_parser logging +4 more |
picture.py | (模块) | nlp | PIL api.db.joint_services.tenant_model_service api.db.services.llm_service asyncio common.constants common.string_utils +4 more |
presentation.py | 主要类: Pdf | app.naive nlp utils.lazy_image | collections common.constants common.parser_config_utils copy deepdoc.parser deepdoc.parser.ppt_parser +6 more |
qa.py | 主要类: Excel | nlp | common.constants common.float_utils copy csv deepdoc.parser deepdoc.parser.utils +8 more |
resume.py | Resume parsing module (aligned with SmartResume Pipeline architecture optimization) | nlp prompts.template | api.db.services.llm_service common common.constants concurrent.futures cv2 datetime +15 more |
table.py | from openpyxl import load_workbook, Workbook | nlp | api.db.services.knowledgebase_service collections common common.constants copy csv +11 more |
tag.py | (模块) | app.qa graphutils nlp | api.db.services.knowledgebase_service common copy csv deepdoc.parser.utils json +2 more |
graph LR flow___init__["__init__"] flow_base["base"] flow_file["file"] flow_pipeline["pipeline"] flow_file --> flow_base
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
__init__.py | (模块) | — | importlib inspect pathlib pkgutil types typing |
base.py | 主要类: ProcessParamBase | — | agent.component.base asyncio common.connection_utils functools logging os +2 more |
file.py | 主要类: FileParam | flow.base | api.db.services.document_service |
pipeline.py | 主要类: Pipeline | utils.redis_conn | agent.canvas api.db.services.document_service api.db.services.task_service asyncio common.exceptions datetime +4 more |
graph LR flow_chunker___init__["__init__"] flow_chunker_schema["schema"] flow_chunker_token_chunker["token_chunker"] flow_chunker___init__ --> flow_chunker_token_chunker flow_chunker_token_chunker --> flow_chunker_schema
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
__init__.py | (模块) | flow.chunker.token_chunker | — |
schema.py | 主要类: TokenChunkerFromUpstream | — | pydantic typing |
token_chunker.py | 主要类: TokenChunkerParam | flow.base flow.chunker.schema flow.parser.pdf_chunk_metadata nlp | common.float_utils common.token_utils copy random re |
graph LR flow_chunker_title_chunker___init__["__init__"] flow_chunker_title_chunker_common["common"] flow_chunker_title_chunker_group_chunker["group_chunker"] flow_chunker_title_chunker_hierarchy_chunker["hierarchy_chunker"] flow_chunker_title_chunker_schema["schema"] flow_chunker_title_chunker_title_chunker["title_chunker"] flow_chunker_title_chunker___init__ --> flow_chunker_title_chunker_common flow_chunker_title_chunker___init__ --> flow_chunker_title_chunker_title_chunker flow_chunker_title_chunker_group_chunker --> flow_chunker_title_chunker_common flow_chunker_title_chunker_hierarchy_chunker --> flow_chunker_title_chunker_common flow_chunker_title_chunker_title_chunker --> flow_chunker_title_chunker_group_chunker flow_chunker_title_chunker_title_chunker --> flow_chunker_title_chunker_hierarchy_chunker flow_chunker_title_chunker_title_chunker --> flow_chunker_title_chunker_schema
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
__init__.py | (模块) | flow.chunker.title_chunker.common flow.chunker.title_chunker.title_chunker | — |
common.py | 主要类: TitleChunkerParam | flow.base flow.parser.pdf_chunk_metadata nlp | abc collections copy deepdoc.parser.pdf_parser deepdoc.parser.utils logging +3 more |
group_chunker.py | 主要类: GroupTitleChunker | flow.chunker.title_chunker.common | common.token_utils |
hierarchy_chunker.py | 主要类: _ChunkNode | flow.chunker.title_chunker.common | — |
schema.py | 主要类: TitleChunkerFromUpstream | — | pydantic typing |
title_chunker.py | 主要类: TitleChunker | flow.base flow.chunker.title_chunker.group_chunker flow.chunker.title_chunker.hierarchy_chunker flow.chunker.title_chunker.schema | — |
graph LR flow_extractor___init__["__init__"] flow_extractor_extractor["extractor"] flow_extractor_schema["schema"]
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
__init__.py | (模块) | — | — |
extractor.py | 主要类: ExtractorParam | flow.base prompts.generator | agent.component.llm copy json logging random xxhash |
schema.py | 主要类: ExtractorFromUpstream | — | pydantic typing |
graph LR flow_parser___init__["__init__"] flow_parser_parser["parser"] flow_parser_pdf_chunk_metadata["pdf_chunk_metadata"] flow_parser_schema["schema"] flow_parser_utils["utils"] flow_parser_parser --> flow_parser_pdf_chunk_metadata flow_parser_parser --> flow_parser_schema flow_parser_parser --> flow_parser_utils
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
__init__.py | (模块) | — | — |
parser.py | 主要类: ParserParam | app.naive flow.base flow.parser.pdf_chunk_metadata flow.parser.schema flow.parser.utils llm.cv_model nlp utils.base64_image | PIL api.db.joint_services.tenant_model_service api.db.services.file2document_service api.db.services.file_service api.db.services.llm_service api.db.services.tenant_llm_service +23 more |
pdf_chunk_metadata.py | (模块) | utils.base64_image | PIL api.db.services.file2document_service api.db.services.file_service common common.misc_utils copy +7 more |
schema.py | 主要类: ParserFromUpstream | — | pydantic |
utils.py | (模块) | nlp | api.db.joint_services.tenant_model_service api.db.services.llm_service bs4 common.constants deepdoc.parser.figure_parser docx +2 more |
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
client.py | (模块) | flow.pipeline | argparse asyncio common concurrent.futures json os +1 more |
graph LR flow_tokenizer___init__["__init__"] flow_tokenizer_schema["schema"] flow_tokenizer_tokenizer["tokenizer"] flow_tokenizer_tokenizer --> flow_tokenizer_schema
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
__init__.py | (模块) | — | — |
schema.py | 主要类: TokenizerFromUpstream | — | pydantic typing |
tokenizer.py | 主要类: TokenizerParam | flow.base flow.parser.pdf_chunk_metadata flow.tokenizer.schema nlp svr.task_executor | api.db.joint_services.tenant_model_service api.db.services.knowledgebase_service api.db.services.llm_service common common.connection_utils common.constants +6 more |
graph LR graphrag___init__["__init__"] graphrag_entity_resolution["entity_resolution"] graphrag_entity_resolution_prompt["entity_resolution_prompt"] graphrag_phase_markers["phase_markers"] graphrag_query_analyze_prompt["query_analyze_prompt"] graphrag_search["search"] graphrag_utils["utils"]
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
__init__.py | (模块) | — | — |
entity_resolution.py | 主要类: EntityResolutionResult | graphentity_resolution_prompt graphgeneral.extractor graphutils llm.chat_model nlp | api.db.services.task_service asyncio common.exceptions dataclasses editdistance itertools +5 more |
entity_resolution_prompt.py | -Goal- | — | — |
phase_markers.py | Markers let a re-run of GraphRAG skip phases that already completed in a | utils.redis_conn | __future__ logging |
query_analyze_prompt.py | Reference: | — | — |
search.py | 主要类: KGSearch | graphquery_analyze_prompt graphutils nlp nlp.search | api.db.joint_services.tenant_model_service api.db.services.knowledgebase_service api.db.services.llm_service argparse asyncio collections +11 more |
utils.py | Reference: | nlp utils.redis_conn | asyncio collections common common.asyncio_utils common.connection_utils common.doc_store.doc_store_base +14 more |
graph LR graphrag_general___init__["__init__"] graphrag_general_community_report_prompt["community_report_prompt"] graphrag_general_community_reports_extractor["community_reports_extractor"] graphrag_general_entity_embedding["entity_embedding"] graphrag_general_extractor["extractor"] graphrag_general_graph_extractor["graph_extractor"] graphrag_general_graph_prompt["graph_prompt"] graphrag_general_index["index"] graphrag_general_leiden["leiden"] graphrag_general_mind_map_extractor["mind_map_extractor"] graphrag_general_mind_map_prompt["mind_map_prompt"] graphrag_general_smoke["smoke"]
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
__init__.py | (模块) | — | — |
community_report_prompt.py | Reference: | — | — |
community_reports_extractor.py | Reference: | graphgeneral graphgeneral.community_report_prompt graphgeneral.extractor graphgeneral.leiden graphutils llm.chat_model | api.db.services.task_service asyncio common.exceptions common.token_utils dataclasses json +6 more |
entity_embedding.py | Reference: | graphgeneral.leiden | dataclasses graspologic networkx numpy typing |
extractor.py | 主要类: Extractor | graphgeneral.graph_prompt graphutils llm.chat_model prompts.generator | api.db.services.task_service asyncio collections common.exceptions common.misc_utils common.token_utils +6 more |
graph_extractor.py | Reference: | graphgeneral.extractor graphgeneral.graph_prompt graphutils llm.chat_model | common.token_utils dataclasses networkx re tiktoken typing |
graph_prompt.py | Reference: | — | — |
index.py | (模块) | graphentity_resolution graphgeneral.community_reports_extractor graphgeneral.extractor graphgeneral.graph_extractor graphlight.graph_extractor graphner.graph_extractor graphphase_markers graphutils nlp utils.redis_conn | api.db.services.document_service api.db.services.task_service asyncio common common.connection_utils common.doc_store.doc_store_base +6 more |
leiden.py | Reference: | — | graspologic.partition graspologic.utils html logging networkx typing |
mind_map_extractor.py | 主要类: MindMapResult | graphgeneral.extractor graphgeneral.mind_map_prompt graphutils llm.chat_model | asyncio collections common.token_utils dataclasses functools logging +3 more |
mind_map_prompt.py | - Role: You're a talent text processor to summarize a piece of text into a mind map. | — | — |
smoke.py | (模块) | graphgeneral.graph_extractor graphgeneral.index | api.db.joint_services.tenant_model_service api.db.services.document_service api.db.services.knowledgebase_service api.db.services.llm_service argparse asyncio +5 more |
graph LR graphrag_light___init__["__init__"] graphrag_light_graph_extractor["graph_extractor"] graphrag_light_graph_prompt["graph_prompt"] graphrag_light_smoke["smoke"]
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
__init__.py | (模块) | — | — |
graph_extractor.py | Reference: | graphgeneral.extractor graphlight.graph_prompt graphutils llm.chat_model | common.token_utils dataclasses logging networkx re typing |
graph_prompt.py | Reference: | — | typing |
smoke.py | (模块) | graphgeneral.index graphlight.graph_extractor | api.db.joint_services.tenant_model_service api.db.services.document_service api.db.services.knowledgebase_service api.db.services.llm_service argparse asyncio +5 more |
graph LR graphrag_ner___init__["__init__"] graphrag_ner_graph_extractor["graph_extractor"]
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
__init__.py | (模块) | — | — |
graph_extractor.py | spaCy-based entity and relationship extractor for GraphRAG. | graphgeneral.extractor llm.chat_model | collections logging spacy spacy.cli |
graph LR llm___init__["__init__"] llm_chat_model["chat_model"] llm_cv_model["cv_model"] llm_embedding_model["embedding_model"] llm_ocr_model["ocr_model"] llm_rerank_model["rerank_model"] llm_sequence2txt_model["sequence2txt_model"] llm_tool_decorator["tool_decorator"] llm_tts_model["tts_model"] llm_chat_model --> llm_tool_decorator llm_cv_model --> llm_chat_model
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
__init__.py | 主要类: SupportedLiteLLMProvider | — | enum importlib inspect |
chat_model.py | 主要类: LLMErrorCode | llm llm.tool_decorator nlp svr.jina_server | abc anthropic asyncio base64 boto3 common.misc_utils +21 more |
cv_model.py | 主要类: Base | llm.chat_model nlp prompts.generator | abc anthropic base64 boto3 common.misc_utils common.token_utils +19 more |
embedding_model.py | 主要类: Base | — | abc base64 boto3 cohere common common.http_client +23 more |
ocr_model.py | 主要类: Base | — | deepdoc.parser.mineru_parser deepdoc.parser.opendataloader_parser deepdoc.parser.paddleocr_parser json logging os +1 more |
rerank_model.py | 主要类: Base | — | abc cohere common.log_utils common.token_utils dashscope http +9 more |
sequence2txt_model.py | 主要类: Base | — | abc base64 common.token_utils dashscope ffmpeg imageio_ffmpeg +13 more |
tool_decorator.py | Lets callers register plain Python functions as LLM tools without having to | llm.tool_decorator | __future__ asyncio collections.abc common.misc_utils inspect logging +2 more |
tts_model.py | 主要类: ServeReferenceAudio | — | _thread abc base64 collections common.http_client common.token_utils +22 more |
graph LR nlp___init__["__init__"] nlp_query["query"] nlp_rag_tokenizer["rag_tokenizer"] nlp_search["search"] nlp_surname["surname"] nlp_synonym["synonym"] nlp_term_weight["term_weight"]
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
__init__.py | 主要类: Node | utils.lazy_image | PIL chardet cn2an collections common.token_utils copy +7 more |
query.py | 主要类: FulltextQueryer | nlp utils.redis_conn | collections common.doc_store.doc_store_base common.query_base json logging numpy +2 more |
rag_tokenizer.py | 主要类: RagTokenizer | — | common infinity.rag_tokenizer |
search.py | 主要类: Dealer | nlp prompts.generator | api.db.services.document_service collections common common.constants common.doc_store.doc_store_base common.float_utils +9 more |
surname.py | (模块) | — | — |
synonym.py | Forces NLTK to load the corpus synchronously once, preventing concurrent tasks | — | common.file_utils json logging nltk.corpus os re +1 more |
term_weight.py | 主要类: Dealer | nlp | common.file_utils json logging math numpy os +1 more |
graph LR prompts___init__["__init__"] prompts_generator["generator"] prompts_template["template"] prompts_generator --> prompts_template
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
__init__.py | (模块) | — | — |
generator.py | (模块) | graphutils nlp prompts.template | api.db.joint_services.tenant_model_service api.db.services.llm_service api.db.services.tenant_llm_service asyncio common.constants common.misc_utils +10 more |
template.py | (模块) | — | os |
graph LR svr_cache_file_svr["cache_file_svr"] svr_discord_svr["discord_svr"] svr_sync_data_source["sync_data_source"] svr_task_executor["task_executor"]
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
cache_file_svr.py | (模块) | utils.redis_conn | api.db.db_models api.db.services.task_service common logging time traceback |
discord_svr.py | (模块) | — | asyncio base64 discord logging requests |
sync_data_source.py | from beartype import BeartypeConf | — | api.db.services.connector_service api.db.services.document_service api.db.services.knowledgebase_service api.utils.common asyncio box_sdk_gen +31 more |
task_executor.py | LiteLLM fetches a model cost map from GitHub during import unless this is set. | app flow.pipeline graphgeneral.index graphutils nlp prompts.generator raptor utils.base64_image utils.raptor_utils utils.redis_conn utils.table_es_metadata | api.db api.db.db_models api.db.joint_services.memory_message_service api.db.joint_services.tenant_model_service api.db.services.canvas_service api.db.services.doc_metadata_service +40 more |
graph LR utils___init__["__init__"] utils_azure_sas_conn["azure_sas_conn"] utils_azure_spn_conn["azure_spn_conn"] utils_base64_image["base64_image"] utils_encrypted_storage["encrypted_storage"] utils_es_conn["es_conn"] utils_file_utils["file_utils"] utils_gcs_conn["gcs_conn"] utils_infinity_conn["infinity_conn"] utils_lazy_image["lazy_image"] utils_minio_conn["minio_conn"] utils_ob_conn["ob_conn"] utils_opendal_conn["opendal_conn"] utils_opensearch_conn["opensearch_conn"] utils_oss_conn["oss_conn"] utils_raptor_utils["raptor_utils"] utils_redis_conn["redis_conn"] utils_s3_conn["s3_conn"] utils_storage_factory["storage_factory"] utils_table_es_metadata["table_es_metadata"] utils_tavily_conn["tavily_conn"] utils_tts_cache["tts_cache"] utils_base64_image --> utils_lazy_image utils_tts_cache --> utils_redis_conn
| 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|
__init__.py | (模块) | — | — |
azure_sas_conn.py | 主要类: RAGFlowAzureSasBlob | — | azure.storage.blob common common.decorator io logging os +1 more |
azure_spn_conn.py | 主要类: RAGFlowAzureSpnBlob | — | azure.identity azure.storage.filedatalake common common.decorator logging os +1 more |
base64_image.py | (模块) | svr.task_executor utils.lazy_image | PIL base64 common.misc_utils functools io logging |
encrypted_storage.py | def __init__(self, storage_impl, algorithm="aes-256-cbc", key=None, iv=None): | — | common.crypto_utils logging |
es_conn.py | 主要类: ESConnection | — | common.constants common.decorator common.doc_store.doc_store_base common.doc_store.es_conn_base common.float_utils copy +5 more |
file_utils.py | (模块) | — | docx hashlib io olefile pypdf requests +3 more |
gcs_conn.py | 主要类: RAGFlowGCS | — | common common.decorator datetime google.api_core.exceptions google.cloud io +2 more |
infinity_conn.py | 主要类: InfinityConnection | — | common.constants common.decorator common.doc_store.doc_store_base common.doc_store.infinity_conn_base copy datetime +6 more |
lazy_image.py | 主要类: LazyImage | nlp | PIL io logging numpy |
minio_conn.py | 主要类: RAGFlowMinio | — | common common.decorator io logging minio minio.commonconfig +4 more |
ob_conn.py | 主要类: SearchResult | nlp | common.constants common.decorator common.doc_store.doc_store_base common.doc_store.ob_conn_base common.float_utils elasticsearch_dsl +12 more |
opendal_conn.py | CREATE TABLE IF NOT EXISTS `{}` ( | — | common.config_utils common.decorator logging opendal pymysql re +1 more |
opensearch_conn.py | 主要类: OSConnection | nlp | common common.constants common.decorator common.doc_store.doc_store_base common.file_utils copy +7 more |
oss_conn.py | 主要类: RAGFlowOSS | — | boto3 botocore.config botocore.exceptions common common.decorator io +2 more |
raptor_utils.py | Utility functions for Raptor processing decisions. | — | json logging typing xxhash |
redis_conn.py | 主要类: RedisMsg | — | asyncio common common.decorator json logging uuid +2 more |
s3_conn.py | 主要类: RAGFlowS3 | — | boto3 botocore.config botocore.exceptions common common.decorator io +2 more |
storage_factory.py | (模块) | — | — |
table_es_metadata.py | import logging | — | api.db.services.knowledgebase_service common common.metadata_utils logging |
tavily_conn.py | 主要类: Tavily | nlp | common.misc_utils logging tavily |
tts_cache.py | (模块) | utils.redis_conn | binascii hashlib logging os typing |
| # | 文件 | 被依赖次数 |
|---|---|---|
| 1 | app/naive.py | 16 |
| 2 | llm/chat_model.py | 16 |
| 3 | utils/redis_conn.py | 16 |
| 4 | flow/base.py | 14 |
| 5 | prompts/generator.py | 12 |
| 6 | flow/parser/pdf_chunk_metadata.py | 8 |
| 7 | utils/lazy_image.py | 8 |
| 8 | flow/chunker/title_chunker/common.py | 6 |
| 9 | utils/base64_image.py | 6 |
| 10 | flow/pipeline.py | 4 |
| 11 | llm/tool_decorator.py | 4 |
| 12 | prompts/template.py | 4 |
| 13 | svr/task_executor.py | 4 |
| 14 | utils/raptor_utils.py | 4 |
| 15 | app/qa.py | 2 |
| 16 | flow/chunker/schema.py | 2 |
| 17 | flow/chunker/title_chunker/group_chunker.py | 2 |
| 18 | flow/chunker/title_chunker/hierarchy_chunker.py | 2 |
| 19 | flow/chunker/title_chunker/schema.py | 2 |
| 20 | flow/chunker/title_chunker/title_chunker.py | 2 |
| # | 文件 | 内部依赖数 |
|---|---|---|
| 1 | svr/task_executor.py | 11 |
| 2 | graphrag/general/index.py | 10 |
| 3 | flow/parser/parser.py | 8 |
| 4 | graphrag/general/community_reports_extractor.py | 6 |
| 5 | flow/tokenizer/tokenizer.py | 5 |
| 6 | graphrag/entity_resolution.py | 5 |
| 7 | app/book.py | 4 |
| 8 | flow/chunker/title_chunker/title_chunker.py | 4 |
| 9 | flow/chunker/token_chunker.py | 4 |
| 10 | graphrag/general/extractor.py | 4 |
| 11 | graphrag/general/graph_extractor.py | 4 |
| 12 | graphrag/general/mind_map_extractor.py | 4 |
| 13 | graphrag/light/graph_extractor.py | 4 |
| 14 | graphrag/search.py | 4 |
| 15 | llm/chat_model.py | 4 |
| 16 | advanced_rag/tree_structured_query_decomposition_retrieval.py | 3 |
| 17 | app/one.py | 3 |
| 18 | app/presentation.py | 3 |
| 19 | app/tag.py | 3 |
| 20 | flow/chunker/title_chunker/common.py | 3 |
展示每个 .py 文件的完整 rag 内部依赖和关键外部依赖。
| # | 文件 | 描述 | rag 内部依赖 | 关键外部依赖 |
|---|---|---|---|---|
| 1 | __init__.py | from beartype.claw import beartype_this_package | — | — |
| 2 | advanced_rag/__init__.py | (模块) | — | — |
| 3 | advanced_rag/tree_structured_query_decomposition_retrieval.py | 主要类: TreeStructuredQueryDecompositionRetrieval | prompts prompts.generator utils.tavily_conn | api.db.services.llm_service asyncio functools logging timeit |
| 4 | app/__init__.py | (模块) | — | — |
| 5 | app/audio.py | (模块) | nlp | api.db.joint_services.tenant_model_service api.db.services.llm_service common.constants logging os +2 |
| 6 | app/book.py | 主要类: Pdf | app app.naive nlp utils.lazy_image | PIL common.constants common.parser_config_utils deepdoc.parser deepdoc.parser.figure_parser +7 |
| 7 | app/email.py | (模块) | app.naive nlp | common.constants deepdoc.parser email email.parser io +4 |
| 8 | app/laws.py | 主要类: Docx | app.naive nlp | common.constants common.parser_config_utils deepdoc.parser deepdoc.parser.utils docx +6 |
| 9 | app/manual.py | 主要类: Pdf | app.naive nlp | common.constants common.parser_config_utils common.token_utils copy deepdoc.parser +8 |
| 10 | app/naive.py | 主要类: Docx | nlp utils.file_utils | PIL api.db.joint_services.tenant_model_service api.db.services.llm_service api.db.services.tenant_llm_service base64 +30 |
| 11 | app/one.py | 主要类: Pdf | app app.naive nlp | common.constants common.parser_config_utils deepdoc.parser deepdoc.parser.figure_parser deepdoc.parser.utils +6 |
| 12 | app/paper.py | 主要类: Pdf | app.naive nlp | common.constants common.parser_config_utils copy deepdoc.parser deepdoc.parser.figure_parser +5 |
| 13 | app/picture.py | (模块) | nlp | PIL api.db.joint_services.tenant_model_service api.db.services.llm_service asyncio common.constants +5 |
| 14 | app/presentation.py | 主要类: Pdf | app.naive nlp utils.lazy_image | collections common.constants common.parser_config_utils copy deepdoc.parser +7 |
| 15 | app/qa.py | 主要类: Excel | nlp | common.constants common.float_utils copy csv deepdoc.parser +9 |
| 16 | app/resume.py | Resume parsing module (aligned with SmartResume Pipeline architecture optimization) | nlp prompts.template | api.db.services.llm_service common common.constants concurrent.futures cv2 +16 |
| 17 | app/table.py | from openpyxl import load_workbook, Workbook | nlp | api.db.services.knowledgebase_service collections common common.constants copy +12 |
| 18 | app/tag.py | (模块) | app.qa graphutils nlp | api.db.services.knowledgebase_service common copy csv deepdoc.parser.utils +3 |
| 19 | benchmark.py | 主要类: Benchmark | nlp | api.db.joint_services.tenant_model_service api.db.services.knowledgebase_service api.db.services.llm_service argparse asyncio +11 |
| 20 | flow/__init__.py | (模块) | — | importlib inspect pathlib pkgutil types +1 |
| 21 | flow/base.py | 主要类: ProcessParamBase | — | agent.component.base asyncio common.connection_utils functools logging +3 |
| 22 | flow/chunker/__init__.py | (模块) | flow.chunker.token_chunker | — |
| 23 | flow/chunker/schema.py | 主要类: TokenChunkerFromUpstream | — | pydantic typing |
| 24 | flow/chunker/title_chunker/__init__.py | (模块) | flow.chunker.title_chunker.common flow.chunker.title_chunker.title_chunker | — |
| 25 | flow/chunker/title_chunker/common.py | 主要类: TitleChunkerParam | flow.base flow.parser.pdf_chunk_metadata nlp | abc collections copy deepdoc.parser.pdf_parser deepdoc.parser.utils +4 |
| 26 | flow/chunker/title_chunker/group_chunker.py | 主要类: GroupTitleChunker | flow.chunker.title_chunker.common | common.token_utils |
| 27 | flow/chunker/title_chunker/hierarchy_chunker.py | 主要类: _ChunkNode | flow.chunker.title_chunker.common | — |
| 28 | flow/chunker/title_chunker/schema.py | 主要类: TitleChunkerFromUpstream | — | pydantic typing |
| 29 | flow/chunker/title_chunker/title_chunker.py | 主要类: TitleChunker | flow.base flow.chunker.title_chunker.group_chunker flow.chunker.title_chunker.hierarchy_chunker flow.chunker.title_chunker.schema | — |
| 30 | flow/chunker/token_chunker.py | 主要类: TokenChunkerParam | flow.base flow.chunker.schema flow.parser.pdf_chunk_metadata nlp | common.float_utils common.token_utils copy random re |
| 31 | flow/extractor/__init__.py | (模块) | — | — |
| 32 | flow/extractor/extractor.py | 主要类: ExtractorParam | flow.base prompts.generator | agent.component.llm copy json logging random +1 |
| 33 | flow/extractor/schema.py | 主要类: ExtractorFromUpstream | — | pydantic typing |
| 34 | flow/file.py | 主要类: FileParam | flow.base | api.db.services.document_service |
| 35 | flow/parser/__init__.py | (模块) | — | — |
| 36 | flow/parser/parser.py | 主要类: ParserParam | app.naive flow.base flow.parser.pdf_chunk_metadata flow.parser.schema flow.parser.utils llm.cv_model nlp utils.base64_image | PIL api.db.joint_services.tenant_model_service api.db.services.file2document_service api.db.services.file_service api.db.services.llm_service +24 |
| 37 | flow/parser/pdf_chunk_metadata.py | (模块) | utils.base64_image | PIL api.db.services.file2document_service api.db.services.file_service common common.misc_utils +8 |
| 38 | flow/parser/schema.py | 主要类: ParserFromUpstream | — | pydantic |
| 39 | flow/parser/utils.py | (模块) | nlp | api.db.joint_services.tenant_model_service api.db.services.llm_service bs4 common.constants deepdoc.parser.figure_parser +3 |
| 40 | flow/pipeline.py | 主要类: Pipeline | utils.redis_conn | agent.canvas api.db.services.document_service api.db.services.task_service asyncio common.exceptions +5 |
| 41 | flow/tests/client.py | (模块) | flow.pipeline | argparse asyncio common concurrent.futures json +2 |
| 42 | flow/tokenizer/__init__.py | (模块) | — | — |
| 43 | flow/tokenizer/schema.py | 主要类: TokenizerFromUpstream | — | pydantic typing |
| 44 | flow/tokenizer/tokenizer.py | 主要类: TokenizerParam | flow.base flow.parser.pdf_chunk_metadata flow.tokenizer.schema nlp svr.task_executor | api.db.joint_services.tenant_model_service api.db.services.knowledgebase_service api.db.services.llm_service common common.connection_utils +7 |
| 45 | graphrag/__init__.py | (模块) | — | — |
| 46 | graphrag/entity_resolution.py | 主要类: EntityResolutionResult | graphentity_resolution_prompt graphgeneral.extractor graphutils llm.chat_model nlp | api.db.services.task_service asyncio common.exceptions dataclasses editdistance +6 |
| 47 | graphrag/entity_resolution_prompt.py | -Goal- | — | — |
| 48 | graphrag/general/__init__.py | (模块) | — | — |
| 49 | graphrag/general/community_report_prompt.py | Reference: | — | — |
| 50 | graphrag/general/community_reports_extractor.py | Reference: | graphgeneral graphgeneral.community_report_prompt graphgeneral.extractor graphgeneral.leiden graphutils llm.chat_model | api.db.services.task_service asyncio common.exceptions common.token_utils dataclasses +7 |
| 51 | graphrag/general/entity_embedding.py | Reference: | graphgeneral.leiden | dataclasses graspologic networkx numpy typing |
| 52 | graphrag/general/extractor.py | 主要类: Extractor | graphgeneral.graph_prompt graphutils llm.chat_model prompts.generator | api.db.services.task_service asyncio collections common.exceptions common.misc_utils +7 |
| 53 | graphrag/general/graph_extractor.py | Reference: | graphgeneral.extractor graphgeneral.graph_prompt graphutils llm.chat_model | common.token_utils dataclasses networkx re tiktoken +1 |
| 54 | graphrag/general/graph_prompt.py | Reference: | — | — |
| 55 | graphrag/general/index.py | (模块) | graphentity_resolution graphgeneral.community_reports_extractor graphgeneral.extractor graphgeneral.graph_extractor graphlight.graph_extractor graphner.graph_extractor graphphase_markers graphutils nlp utils.redis_conn | api.db.services.document_service api.db.services.task_service asyncio common common.connection_utils +7 |
| 56 | graphrag/general/leiden.py | Reference: | — | graspologic.partition graspologic.utils html logging networkx +1 |
| 57 | graphrag/general/mind_map_extractor.py | 主要类: MindMapResult | graphgeneral.extractor graphgeneral.mind_map_prompt graphutils llm.chat_model | asyncio collections common.token_utils dataclasses functools +4 |
| 58 | graphrag/general/mind_map_prompt.py | - Role: You're a talent text processor to summarize a piece of text into a mind map. | — | — |
| 59 | graphrag/general/smoke.py | (模块) | graphgeneral.graph_extractor graphgeneral.index | api.db.joint_services.tenant_model_service api.db.services.document_service api.db.services.knowledgebase_service api.db.services.llm_service argparse +6 |
| 60 | graphrag/light/__init__.py | (模块) | — | — |
| 61 | graphrag/light/graph_extractor.py | Reference: | graphgeneral.extractor graphlight.graph_prompt graphutils llm.chat_model | common.token_utils dataclasses logging networkx re +1 |
| 62 | graphrag/light/graph_prompt.py | Reference: | — | typing |
| 63 | graphrag/light/smoke.py | (模块) | graphgeneral.index graphlight.graph_extractor | api.db.joint_services.tenant_model_service api.db.services.document_service api.db.services.knowledgebase_service api.db.services.llm_service argparse +6 |
| 64 | graphrag/ner/__init__.py | (模块) | — | — |
| 65 | graphrag/ner/graph_extractor.py | spaCy-based entity and relationship extractor for GraphRAG. | graphgeneral.extractor llm.chat_model | collections logging spacy spacy.cli |
| 66 | graphrag/phase_markers.py | Markers let a re-run of GraphRAG skip phases that already completed in a | utils.redis_conn | __future__ logging |
| 67 | graphrag/query_analyze_prompt.py | Reference: | — | — |
| 68 | graphrag/search.py | 主要类: KGSearch | graphquery_analyze_prompt graphutils nlp nlp.search | api.db.joint_services.tenant_model_service api.db.services.knowledgebase_service api.db.services.llm_service argparse asyncio +12 |
| 69 | graphrag/utils.py | Reference: | nlp utils.redis_conn | asyncio collections common common.asyncio_utils common.connection_utils +15 |
| 70 | llm/__init__.py | 主要类: SupportedLiteLLMProvider | — | enum importlib inspect |
| 71 | llm/chat_model.py | 主要类: LLMErrorCode | llm llm.tool_decorator nlp svr.jina_server | abc anthropic asyncio base64 boto3 +22 |
| 72 | llm/cv_model.py | 主要类: Base | llm.chat_model nlp prompts.generator | abc anthropic base64 boto3 common.misc_utils +20 |
| 73 | llm/embedding_model.py | 主要类: Base | — | abc base64 boto3 cohere common +24 |
| 74 | llm/ocr_model.py | 主要类: Base | — | deepdoc.parser.mineru_parser deepdoc.parser.opendataloader_parser deepdoc.parser.paddleocr_parser json logging +2 |
| 75 | llm/rerank_model.py | 主要类: Base | — | abc cohere common.log_utils common.token_utils dashscope +10 |
| 76 | llm/sequence2txt_model.py | 主要类: Base | — | abc base64 common.token_utils dashscope ffmpeg +14 |
| 77 | llm/tool_decorator.py | Lets callers register plain Python functions as LLM tools without having to | llm.tool_decorator | __future__ asyncio collections.abc common.misc_utils inspect +3 |
| 78 | llm/tts_model.py | 主要类: ServeReferenceAudio | — | _thread abc base64 collections common.http_client +23 |
| 79 | nlp/__init__.py | 主要类: Node | utils.lazy_image | PIL chardet cn2an collections common.token_utils +8 |
| 80 | nlp/query.py | 主要类: FulltextQueryer | nlp utils.redis_conn | collections common.doc_store.doc_store_base common.query_base json logging +3 |
| 81 | nlp/rag_tokenizer.py | 主要类: RagTokenizer | — | common infinity.rag_tokenizer |
| 82 | nlp/search.py | 主要类: Dealer | nlp prompts.generator | api.db.services.document_service collections common common.constants common.doc_store.doc_store_base +10 |
| 83 | nlp/surname.py | (模块) | — | — |
| 84 | nlp/synonym.py | Forces NLTK to load the corpus synchronously once, preventing concurrent tasks | — | common.file_utils json logging nltk.corpus os +2 |
| 85 | nlp/term_weight.py | 主要类: Dealer | nlp | common.file_utils json logging math numpy +2 |
| 86 | prompts/__init__.py | (模块) | — | — |
| 87 | prompts/generator.py | (模块) | graphutils nlp prompts.template | api.db.joint_services.tenant_model_service api.db.services.llm_service api.db.services.tenant_llm_service asyncio common.constants +11 |
| 88 | prompts/template.py | (模块) | — | os |
| 89 | raptor.py | 主要类: _PsiTreeNode | graphutils utils.raptor_utils | api.db.services.task_service asyncio common.connection_utils common.exceptions common.misc_utils +8 |
| 90 | settings.py | (模块) | — | — |
| 91 | svr/cache_file_svr.py | (模块) | utils.redis_conn | api.db.db_models api.db.services.task_service common logging time +1 |
| 92 | svr/discord_svr.py | (模块) | — | asyncio base64 discord logging requests |
| 93 | svr/sync_data_source.py | from beartype import BeartypeConf | — | api.db.services.connector_service api.db.services.document_service api.db.services.knowledgebase_service api.utils.common asyncio +32 |
| 94 | svr/task_executor.py | LiteLLM fetches a model cost map from GitHub during import unless this is set. | app flow.pipeline graphgeneral.index graphutils nlp prompts.generator raptor utils.base64_image utils.raptor_utils utils.redis_conn utils.table_es_metadata | api.db api.db.db_models api.db.joint_services.memory_message_service api.db.joint_services.tenant_model_service api.db.services.canvas_service +41 |
| 95 | utils/__init__.py | (模块) | — | — |
| 96 | utils/azure_sas_conn.py | 主要类: RAGFlowAzureSasBlob | — | azure.storage.blob common common.decorator io logging +2 |
| 97 | utils/azure_spn_conn.py | 主要类: RAGFlowAzureSpnBlob | — | azure.identity azure.storage.filedatalake common common.decorator logging +2 |
| 98 | utils/base64_image.py | (模块) | svr.task_executor utils.lazy_image | PIL base64 common.misc_utils functools io +1 |
| 99 | utils/encrypted_storage.py | def __init__(self, storage_impl, algorithm="aes-256-cbc", key=None, iv=None): | — | common.crypto_utils logging |
| 100 | utils/es_conn.py | 主要类: ESConnection | — | common.constants common.decorator common.doc_store.doc_store_base common.doc_store.es_conn_base common.float_utils +6 |
| 101 | utils/file_utils.py | (模块) | — | docx hashlib io olefile pypdf +4 |
| 102 | utils/gcs_conn.py | 主要类: RAGFlowGCS | — | common common.decorator datetime google.api_core.exceptions google.cloud +3 |
| 103 | utils/infinity_conn.py | 主要类: InfinityConnection | — | common.constants common.decorator common.doc_store.doc_store_base common.doc_store.infinity_conn_base copy +7 |
| 104 | utils/lazy_image.py | 主要类: LazyImage | nlp | PIL io logging numpy |
| 105 | utils/minio_conn.py | 主要类: RAGFlowMinio | — | common common.decorator io logging minio +5 |
| 106 | utils/ob_conn.py | 主要类: SearchResult | nlp | common.constants common.decorator common.doc_store.doc_store_base common.doc_store.ob_conn_base common.float_utils +13 |
| 107 | utils/opendal_conn.py | CREATE TABLE IF NOT EXISTS `{}` ( | — | common.config_utils common.decorator logging opendal pymysql +2 |
| 108 | utils/opensearch_conn.py | 主要类: OSConnection | nlp | common common.constants common.decorator common.doc_store.doc_store_base common.file_utils +8 |
| 109 | utils/oss_conn.py | 主要类: RAGFlowOSS | — | boto3 botocore.config botocore.exceptions common common.decorator +3 |
| 110 | utils/raptor_utils.py | Utility functions for Raptor processing decisions. | — | json logging typing xxhash |
| 111 | utils/redis_conn.py | 主要类: RedisMsg | — | asyncio common common.decorator json logging +3 |
| 112 | utils/s3_conn.py | 主要类: RAGFlowS3 | — | boto3 botocore.config botocore.exceptions common common.decorator +3 |
| 113 | utils/storage_factory.py | (模块) | — | — |
| 114 | utils/table_es_metadata.py | import logging | — | api.db.services.knowledgebase_service common common.metadata_utils logging |
| 115 | utils/tavily_conn.py | 主要类: Tavily | nlp | common.misc_utils logging tavily |
| 116 | utils/tts_cache.py | (模块) | utils.redis_conn | binascii hashlib logging os typing |