Showing preview only (9,200K chars total). Download the full file or copy to clipboard to get everything.
Repository: 1Panel-dev/MaxKB
Branch: v2
Commit: 641a3a88275c
Files: 1905
Total size: 8.4 MB
Directory structure:
gitextract_dhtxbcma/
├── .dockerignore
├── .editorconfig
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug.yml
│ │ └── feature.yml
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── build-and-push-python-pg.yml
│ ├── build-and-push-vector-model.yml
│ ├── build-and-push.yml
│ ├── create-pr-from-push.yml
│ ├── issue-translator.yml
│ ├── llm-code-review.yml
│ ├── sync2gitee.yml
│ └── typos_check.yml
├── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── README_CN.md
├── SECURITY.md
├── USE-CASES.md
├── apps/
│ ├── __init__.py
│ ├── application/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── api/
│ │ │ ├── application_access_token.py
│ │ │ ├── application_api.py
│ │ │ ├── application_api_key.py
│ │ │ ├── application_chat.py
│ │ │ ├── application_chat_link.py
│ │ │ ├── application_chat_record.py
│ │ │ ├── application_stats.py
│ │ │ └── application_version.py
│ │ ├── apps.py
│ │ ├── chat_pipeline/
│ │ │ ├── I_base_chat_pipeline.py
│ │ │ ├── __init__.py
│ │ │ ├── pipeline_manage.py
│ │ │ └── step/
│ │ │ ├── __init__.py
│ │ │ ├── chat_step/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── i_chat_step.py
│ │ │ │ └── impl/
│ │ │ │ └── base_chat_step.py
│ │ │ ├── generate_human_message_step/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── i_generate_human_message_step.py
│ │ │ │ └── impl/
│ │ │ │ └── base_generate_human_message_step.py
│ │ │ ├── reset_problem_step/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── i_reset_problem_step.py
│ │ │ │ └── impl/
│ │ │ │ └── base_reset_problem_step.py
│ │ │ └── search_dataset_step/
│ │ │ ├── __init__.py
│ │ │ ├── i_search_dataset_step.py
│ │ │ └── impl/
│ │ │ └── base_search_dataset_step.py
│ │ ├── flow/
│ │ │ ├── __init__.py
│ │ │ ├── backend/
│ │ │ │ ├── __init__.py
│ │ │ │ └── sandbox_shell.py
│ │ │ ├── common.py
│ │ │ ├── compare/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── compare.py
│ │ │ │ ├── contain_compare.py
│ │ │ │ ├── end_with.py
│ │ │ │ ├── equal_compare.py
│ │ │ │ ├── ge_compare.py
│ │ │ │ ├── gt_compare.py
│ │ │ │ ├── is_not_null_compare.py
│ │ │ │ ├── is_not_true.py
│ │ │ │ ├── is_null_compare.py
│ │ │ │ ├── is_true.py
│ │ │ │ ├── le_compare.py
│ │ │ │ ├── len_equal_compare.py
│ │ │ │ ├── len_ge_compare.py
│ │ │ │ ├── len_gt_compare.py
│ │ │ │ ├── len_le_compare.py
│ │ │ │ ├── len_lt_compare.py
│ │ │ │ ├── lt_compare.py
│ │ │ │ ├── not_contain_compare.py
│ │ │ │ ├── not_equal_compare.py
│ │ │ │ └── start_with.py
│ │ │ ├── default_workflow.json
│ │ │ ├── default_workflow_en.json
│ │ │ ├── default_workflow_zh.json
│ │ │ ├── default_workflow_zh_Hant.json
│ │ │ ├── i_step_node.py
│ │ │ ├── knowledge_loop_workflow_manage.py
│ │ │ ├── knowledge_workflow_manage.py
│ │ │ ├── loop_workflow_manage.py
│ │ │ ├── step_node/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── ai_chat_step_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_chat_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_chat_node.py
│ │ │ │ ├── application_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_application_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_application_node.py
│ │ │ │ ├── condition_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_condition_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_condition_node.py
│ │ │ │ ├── data_source_local_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_data_source_local_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_data_source_local_node.py
│ │ │ │ ├── data_source_web_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_data_source_web_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_data_source_web_node.py
│ │ │ │ ├── direct_reply_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_reply_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_reply_node.py
│ │ │ │ ├── document_extract_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_document_extract_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_document_extract_node.py
│ │ │ │ ├── document_split_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_document_split_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_document_split_node.py
│ │ │ │ ├── form_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_form_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_form_node.py
│ │ │ │ ├── image_generate_step_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_image_generate_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_image_generate_node.py
│ │ │ │ ├── image_to_video_step_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_image_to_video_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_image_to_video_node.py
│ │ │ │ ├── image_understand_step_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_image_understand_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_image_understand_node.py
│ │ │ │ ├── intent_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_intent_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── base_intent_node.py
│ │ │ │ │ └── prompt_template.py
│ │ │ │ ├── knowledge_write_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_knowledge_write_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_knowledge_write_node.py
│ │ │ │ ├── loop_break_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_loop_break_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_loop_break_node.py
│ │ │ │ ├── loop_continue_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_loop_continue_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_loop_continue_node.py
│ │ │ │ ├── loop_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_loop_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_loop_node.py
│ │ │ │ ├── loop_start_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_loop_start_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_start_node.py
│ │ │ │ ├── mcp_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_mcp_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_mcp_node.py
│ │ │ │ ├── parameter_extraction_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_parameter_extraction_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_parameter_extraction_node.py
│ │ │ │ ├── question_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_question_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_question_node.py
│ │ │ │ ├── reranker_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_reranker_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_reranker_node.py
│ │ │ │ ├── search_document_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_search_document_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_search_document_node.py
│ │ │ │ ├── search_knowledge_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_search_knowledge_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_search_knowledge_node.py
│ │ │ │ ├── speech_to_text_step_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_speech_to_text_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_speech_to_text_node.py
│ │ │ │ ├── start_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_start_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_start_node.py
│ │ │ │ ├── text_to_speech_step_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_text_to_speech_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_text_to_speech_node.py
│ │ │ │ ├── text_to_video_step_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_text_to_video_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_text_to_video_node.py
│ │ │ │ ├── tool_lib_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_tool_lib_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_tool_lib_node.py
│ │ │ │ ├── tool_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_tool_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_tool_node.py
│ │ │ │ ├── tool_start_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_tool_start_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_tool_start_node.py
│ │ │ │ ├── tool_workflow_lib_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_tool_workflow_lib_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_tool_workflow_lib_node.py
│ │ │ │ ├── variable_aggregation_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_variable_aggregation_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_variable_aggregation_node.py
│ │ │ │ ├── variable_assign_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_variable_assign_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_variable_assign_node.py
│ │ │ │ ├── variable_splitting_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_variable_splitting_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_variable_splitting_node.py
│ │ │ │ └── video_understand_step_node/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── i_video_understand_node.py
│ │ │ │ └── impl/
│ │ │ │ ├── __init__.py
│ │ │ │ └── base_video_understand_node.py
│ │ │ ├── tool_loop_workflow_manage.py
│ │ │ ├── tool_workflow_manage.py
│ │ │ ├── tools.py
│ │ │ └── workflow_manage.py
│ │ ├── migrations/
│ │ │ ├── 0001_initial.py
│ │ │ ├── 0002_application_simple_mcp.py
│ │ │ ├── 0003_application_stt_model_params_setting_and_more.py
│ │ │ ├── 0004_application_application_enable_and_more.py
│ │ │ ├── 0005_chatrecord_vote_other_content_chatrecord_vote_reason.py
│ │ │ ├── 0006_application_file_clean_time.py
│ │ │ ├── 0007_applicationapikey_expire_time_and_more.py
│ │ │ ├── 0008_chat_ip_address_chat_source_chatrecord_ip_address_and_more.py
│ │ │ ├── 0009_clean_application_knowledge_mapping.py
│ │ │ ├── 0010_chatsharelink.py
│ │ │ ├── 0011_application_skill_tool_ids.py
│ │ │ ├── 0012_remove_applicationapikey_user.py
│ │ │ └── __init__.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ ├── application.py
│ │ │ ├── application_access_token.py
│ │ │ ├── application_api_key.py
│ │ │ └── application_chat.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ ├── application.py
│ │ │ ├── application_access_token.py
│ │ │ ├── application_api_key.py
│ │ │ ├── application_chat.py
│ │ │ ├── application_chat_link.py
│ │ │ ├── application_chat_record.py
│ │ │ ├── application_folder.py
│ │ │ ├── application_stats.py
│ │ │ ├── application_version.py
│ │ │ └── common.py
│ │ ├── sql/
│ │ │ ├── chat_record_count_trend.sql
│ │ │ ├── count_chat_record.sql
│ │ │ ├── customer_count_trend.sql
│ │ │ ├── export_application_chat.sql
│ │ │ ├── export_application_chat_ee.sql
│ │ │ ├── get_token_usage.sql
│ │ │ ├── get_token_usage_ee.sql
│ │ │ ├── list_application.sql
│ │ │ ├── list_application_chat.sql
│ │ │ ├── list_application_chat_ee.sql
│ │ │ ├── list_application_user.sql
│ │ │ ├── list_application_user_ee.sql
│ │ │ ├── list_knowledge_paragraph_by_paragraph_id.sql
│ │ │ ├── top_questions.sql
│ │ │ └── top_questions_ee.sql
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views/
│ │ ├── __init__.py
│ │ ├── application.py
│ │ ├── application_access_token.py
│ │ ├── application_api_key.py
│ │ ├── application_chat.py
│ │ ├── application_chat_link.py
│ │ ├── application_chat_record.py
│ │ ├── application_stats.py
│ │ └── application_version.py
│ ├── chat/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── api/
│ │ │ ├── chat_api.py
│ │ │ ├── chat_authentication_api.py
│ │ │ ├── chat_embed_api.py
│ │ │ └── vote_api.py
│ │ ├── apps.py
│ │ ├── mcp/
│ │ │ ├── __init__.py
│ │ │ └── tools.py
│ │ ├── migrations/
│ │ │ └── __init__.py
│ │ ├── models/
│ │ │ └── __init__.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ ├── chat.py
│ │ │ ├── chat_authentication.py
│ │ │ ├── chat_embed_serializers.py
│ │ │ └── chat_record.py
│ │ ├── template/
│ │ │ ├── embed.js
│ │ │ └── generate_prompt_system
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views/
│ │ ├── __init__.py
│ │ ├── chat.py
│ │ ├── chat_embed.py
│ │ ├── chat_record.py
│ │ └── mcp.py
│ ├── common/
│ │ ├── __init__.py
│ │ ├── auth/
│ │ │ ├── __init__.py
│ │ │ ├── authenticate.py
│ │ │ ├── authentication.py
│ │ │ ├── common.py
│ │ │ └── handle/
│ │ │ ├── __init__.py
│ │ │ ├── auth_base_handle.py
│ │ │ └── impl/
│ │ │ ├── __init__.py
│ │ │ ├── application_key.py
│ │ │ ├── chat_anonymous_user_token.py
│ │ │ └── user_token.py
│ │ ├── cache/
│ │ │ ├── __init__.py
│ │ │ └── mem_cache.py
│ │ ├── cache_data/
│ │ │ ├── __init__.py
│ │ │ ├── application_access_token_cache.py
│ │ │ └── application_api_key_cache.py
│ │ ├── chunk/
│ │ │ ├── __init__.py
│ │ │ ├── i_chunk_handle.py
│ │ │ └── impl/
│ │ │ ├── __init__.py
│ │ │ └── mark_chunk_handle.py
│ │ ├── config/
│ │ │ ├── __init__.py
│ │ │ ├── embedding_config.py
│ │ │ └── tokenizer_manage_config.py
│ │ ├── constants/
│ │ │ ├── __init__.py
│ │ │ ├── authentication_type.py
│ │ │ ├── cache_version.py
│ │ │ ├── exception_code_constants.py
│ │ │ └── permission_constants.py
│ │ ├── database_model_manage/
│ │ │ ├── __init__.py
│ │ │ ├── database_model_manage.py
│ │ │ └── handle/
│ │ │ ├── __init__.py
│ │ │ ├── base_handle.py
│ │ │ └── impl/
│ │ │ ├── __init__.py
│ │ │ └── default_base_model_handle.py
│ │ ├── db/
│ │ │ ├── __init__.py
│ │ │ ├── compiler.py
│ │ │ ├── search.py
│ │ │ └── sql_execute.py
│ │ ├── encoder/
│ │ │ ├── __init__.py
│ │ │ └── encoder.py
│ │ ├── event/
│ │ │ ├── __init__.py
│ │ │ ├── common.py
│ │ │ └── listener_manage.py
│ │ ├── exception/
│ │ │ ├── __init__.py
│ │ │ ├── app_exception.py
│ │ │ └── handle_exception.py
│ │ ├── field/
│ │ │ ├── __init__.py
│ │ │ └── common.py
│ │ ├── forms/
│ │ │ ├── __init__.py
│ │ │ ├── array_object_card.py
│ │ │ ├── base_field.py
│ │ │ ├── base_form.py
│ │ │ ├── label/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── base_label.py
│ │ │ │ └── tooltip_label.py
│ │ │ ├── multi_select.py
│ │ │ ├── object_card.py
│ │ │ ├── password_input.py
│ │ │ ├── radio_button_field.py
│ │ │ ├── radio_card_field.py
│ │ │ ├── radio_field.py
│ │ │ ├── single_select_field.py
│ │ │ ├── slider_field.py
│ │ │ ├── switch_field.py
│ │ │ ├── tab_card.py
│ │ │ ├── table_checkbox.py
│ │ │ ├── table_radio.py
│ │ │ └── text_input_field.py
│ │ ├── handle/
│ │ │ ├── __init__.py
│ │ │ ├── base_parse_qa_handle.py
│ │ │ ├── base_parse_table_handle.py
│ │ │ ├── base_split_handle.py
│ │ │ ├── base_to_response.py
│ │ │ ├── handle_exception.py
│ │ │ └── impl/
│ │ │ ├── __init__.py
│ │ │ ├── common_handle.py
│ │ │ ├── qa/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── csv_parse_qa_handle.py
│ │ │ │ ├── md_parse_qa_handle.py
│ │ │ │ ├── xls_parse_qa_handle.py
│ │ │ │ ├── xlsx_parse_qa_handle.py
│ │ │ │ └── zip_parse_qa_handle.py
│ │ │ ├── response/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── loop_to_response.py
│ │ │ │ ├── openai_to_response.py
│ │ │ │ └── system_to_response.py
│ │ │ ├── table/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── csv_parse_table_handle.py
│ │ │ │ ├── xls_parse_table_handle.py
│ │ │ │ └── xlsx_parse_table_handle.py
│ │ │ └── text/
│ │ │ ├── __init__.py
│ │ │ ├── csv_split_handle.py
│ │ │ ├── doc_split_handle.py
│ │ │ ├── html_split_handle.py
│ │ │ ├── pdf_split_handle.py
│ │ │ ├── text_split_handle.py
│ │ │ ├── xls_split_handle.py
│ │ │ ├── xlsx_split_handle.py
│ │ │ └── zip_split_handle.py
│ │ ├── init/
│ │ │ ├── init_doc.py
│ │ │ └── init_template.py
│ │ ├── job/
│ │ │ ├── __init__.py
│ │ │ ├── clean_chat_job.py
│ │ │ ├── clean_debug_file_job.py
│ │ │ ├── client_access_num_job.py
│ │ │ └── scheduler.py
│ │ ├── lock/
│ │ │ ├── __init__.py
│ │ │ ├── base_lock.py
│ │ │ └── impl/
│ │ │ └── __init__.py
│ │ ├── log/
│ │ │ ├── __init__.py
│ │ │ └── log.py
│ │ ├── management/
│ │ │ ├── __init__.py
│ │ │ └── commands/
│ │ │ ├── __init__.py
│ │ │ ├── celery.py
│ │ │ ├── restart.py
│ │ │ ├── services/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── command.py
│ │ │ │ ├── hands.py
│ │ │ │ ├── services/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── base.py
│ │ │ │ │ ├── celery_base.py
│ │ │ │ │ ├── celery_default.py
│ │ │ │ │ ├── gunicorn.py
│ │ │ │ │ ├── local_model.py
│ │ │ │ │ └── scheduler.py
│ │ │ │ └── utils.py
│ │ │ ├── start.py
│ │ │ ├── status.py
│ │ │ └── stop.py
│ │ ├── middleware/
│ │ │ ├── __init__.py
│ │ │ ├── chat_headers_middleware.py
│ │ │ ├── cross_domain_middleware.py
│ │ │ ├── doc_headers_middleware.py
│ │ │ └── gzip.py
│ │ ├── mixins/
│ │ │ ├── __init__.py
│ │ │ ├── api_mixin.py
│ │ │ └── app_model_mixin.py
│ │ ├── result/
│ │ │ ├── __init__.py
│ │ │ ├── api.py
│ │ │ └── result.py
│ │ ├── sql/
│ │ │ └── list_embedding_text.sql
│ │ ├── template/
│ │ │ ├── email_template_en.html
│ │ │ ├── email_template_zh.html
│ │ │ └── email_template_zh_Hant.html
│ │ └── utils/
│ │ ├── __init__.py
│ │ ├── cache_util.py
│ │ ├── chat_link_code.py
│ │ ├── common.py
│ │ ├── fork.py
│ │ ├── lock.py
│ │ ├── logger.py
│ │ ├── page_utils.py
│ │ ├── rsa_util.py
│ │ ├── shared_resource_auth.py
│ │ ├── split_model.py
│ │ ├── tool_code.py
│ │ └── ts_vecto_util.py
│ ├── folders/
│ │ ├── __init__.py
│ │ ├── api/
│ │ │ ├── __init__.py
│ │ │ └── folder.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ └── folder.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ └── folder.py
│ │ ├── urls.py
│ │ └── views/
│ │ ├── __init__.py
│ │ └── folder.py
│ ├── knowledge/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── api/
│ │ │ ├── __init__.py
│ │ │ ├── document.py
│ │ │ ├── file.py
│ │ │ ├── knowledge.py
│ │ │ ├── knowledge_version.py
│ │ │ ├── knowledge_workflow.py
│ │ │ ├── paragraph.py
│ │ │ ├── problem.py
│ │ │ └── tag.py
│ │ ├── apps.py
│ │ ├── migrations/
│ │ │ ├── 0001_initial.py
│ │ │ ├── 0002_alter_file_source_type.py
│ │ │ ├── 0003_tag_documenttag.py
│ │ │ ├── 0004_alter_document_type_alter_knowledge_type_and_more.py
│ │ │ ├── 0005_knowledgeaction.py
│ │ │ ├── 0006_paragraph_chunks.py
│ │ │ ├── 0007_remove_knowledgeworkflowversion_workflow_and_more.py
│ │ │ └── __init__.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ ├── knowledge.py
│ │ │ └── knowledge_action.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ ├── common.py
│ │ │ ├── document.py
│ │ │ ├── knowledge.py
│ │ │ ├── knowledge_folder.py
│ │ │ ├── knowledge_version.py
│ │ │ ├── knowledge_workflow.py
│ │ │ ├── paragraph.py
│ │ │ ├── problem.py
│ │ │ └── tag.py
│ │ ├── sql/
│ │ │ ├── blend_search.sql
│ │ │ ├── embedding_search.sql
│ │ │ ├── hit_test.sql
│ │ │ ├── keywords_search.sql
│ │ │ ├── list_document.sql
│ │ │ ├── list_knowledge.sql
│ │ │ ├── list_knowledge_application.sql
│ │ │ ├── list_knowledge_user.sql
│ │ │ ├── list_knowledge_user_ee.sql
│ │ │ ├── list_paragraph.sql
│ │ │ ├── list_paragraph_document_name.sql
│ │ │ ├── list_problem.sql
│ │ │ ├── list_problem_mapping.sql
│ │ │ ├── update_document_char_length.sql
│ │ │ ├── update_document_status_meta.sql
│ │ │ └── update_paragraph_status.sql
│ │ ├── task/
│ │ │ ├── __init__.py
│ │ │ ├── embedding.py
│ │ │ ├── generate.py
│ │ │ ├── handler.py
│ │ │ └── sync.py
│ │ ├── template/
│ │ │ ├── csv_template_en.csv
│ │ │ ├── csv_template_zh.csv
│ │ │ ├── csv_template_zh_Hant.csv
│ │ │ ├── excel_template_en.xlsx
│ │ │ ├── excel_template_zh.xlsx
│ │ │ ├── excel_template_zh_Hant.xlsx
│ │ │ ├── table_template_en.csv
│ │ │ ├── table_template_en.xlsx
│ │ │ ├── table_template_zh.csv
│ │ │ ├── table_template_zh.xlsx
│ │ │ ├── table_template_zh_Hant.csv
│ │ │ └── table_template_zh_Hant.xlsx
│ │ ├── tests.py
│ │ ├── urls.py
│ │ ├── vector/
│ │ │ ├── __init__.py
│ │ │ ├── base_vector.py
│ │ │ └── pg_vector.py
│ │ └── views/
│ │ ├── __init__.py
│ │ ├── common.py
│ │ ├── document.py
│ │ ├── knowledge.py
│ │ ├── knowledge_workflow.py
│ │ ├── knowledge_workflow_version.py
│ │ ├── paragraph.py
│ │ ├── problem.py
│ │ └── tag.py
│ ├── local_model/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── migrations/
│ │ │ └── __init__.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ ├── model_management.py
│ │ │ ├── system_setting.py
│ │ │ └── user.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ ├── model_apply_serializers.py
│ │ │ └── rsa_util.py
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views/
│ │ ├── __init__.py
│ │ └── model_apply.py
│ ├── locales/
│ │ ├── en_US/
│ │ │ └── LC_MESSAGES/
│ │ │ └── django.po
│ │ ├── zh_CN/
│ │ │ └── LC_MESSAGES/
│ │ │ └── django.po
│ │ └── zh_Hant/
│ │ └── LC_MESSAGES/
│ │ └── django.po
│ ├── manage.py
│ ├── maxkb/
│ │ ├── __init__.py
│ │ ├── asgi.py
│ │ ├── conf.py
│ │ ├── const.py
│ │ ├── settings/
│ │ │ ├── __init__.py
│ │ │ ├── auth/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── model.py
│ │ │ │ └── web.py
│ │ │ ├── base/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── model.py
│ │ │ │ └── web.py
│ │ │ ├── lib.py
│ │ │ ├── logging.py
│ │ │ └── mem.py
│ │ ├── urls/
│ │ │ ├── __init__.py
│ │ │ ├── model.py
│ │ │ └── web.py
│ │ └── wsgi/
│ │ ├── __init__.py
│ │ ├── model.py
│ │ └── web.py
│ ├── models_provider/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── api/
│ │ │ ├── __init__.py
│ │ │ ├── model.py
│ │ │ └── provide.py
│ │ ├── apps.py
│ │ ├── base_model_provider.py
│ │ ├── base_ttv.py
│ │ ├── constants/
│ │ │ ├── __init__.py
│ │ │ └── model_provider_constants.py
│ │ ├── impl/
│ │ │ ├── __init__.py
│ │ │ ├── aliyun_bai_lian_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── aliyun_bai_lian_model_provider.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── itv.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── reranker.py
│ │ │ │ │ ├── stt/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── asr_stt.py
│ │ │ │ │ │ ├── default_stt.py
│ │ │ │ │ │ ├── omni_stt.py
│ │ │ │ │ │ └── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ ├── tts.py
│ │ │ │ │ └── ttv.py
│ │ │ │ └── model/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── embedding.py
│ │ │ │ ├── image.py
│ │ │ │ ├── llm.py
│ │ │ │ ├── reranker.py
│ │ │ │ ├── stt/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── asr_stt.py
│ │ │ │ │ ├── default_stt.py
│ │ │ │ │ ├── omni_stt.py
│ │ │ │ │ └── stt.py
│ │ │ │ ├── tti.py
│ │ │ │ ├── tts.py
│ │ │ │ └── ttv.py
│ │ │ ├── anthropic_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── anthropic_model_provider.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ └── llm.py
│ │ │ │ └── model/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── image.py
│ │ │ │ └── llm.py
│ │ │ ├── aws_bedrock_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── aws_bedrock_model_provider.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ └── reranker.py
│ │ │ │ └── model/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── embedding.py
│ │ │ │ ├── image.py
│ │ │ │ ├── llm.py
│ │ │ │ └── reranker.py
│ │ │ ├── azure_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── azure_model_provider.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ └── tts.py
│ │ │ │ └── model/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── azure_chat_model.py
│ │ │ │ ├── embedding.py
│ │ │ │ ├── image.py
│ │ │ │ ├── stt.py
│ │ │ │ ├── tti.py
│ │ │ │ └── tts.py
│ │ │ ├── base_chat_open_ai.py
│ │ │ ├── base_stt.py
│ │ │ ├── base_tti.py
│ │ │ ├── base_tts.py
│ │ │ ├── deepseek_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── llm.py
│ │ │ │ ├── deepseek_model_provider.py
│ │ │ │ └── model/
│ │ │ │ ├── __init__.py
│ │ │ │ └── llm.py
│ │ │ ├── docker_ai_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── reranker.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ └── tts.py
│ │ │ │ ├── docker_ai_model_provider.py
│ │ │ │ └── model/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── embedding.py
│ │ │ │ ├── image.py
│ │ │ │ ├── llm.py
│ │ │ │ ├── reranker.py
│ │ │ │ ├── stt.py
│ │ │ │ ├── tti.py
│ │ │ │ └── tts.py
│ │ │ ├── gemini_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ └── tti.py
│ │ │ │ ├── gemini_model_provider.py
│ │ │ │ └── model/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── embedding.py
│ │ │ │ ├── image.py
│ │ │ │ ├── llm.py
│ │ │ │ ├── stt.py
│ │ │ │ └── tti.py
│ │ │ ├── kimi_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── llm.py
│ │ │ │ ├── kimi_model_provider.py
│ │ │ │ └── model/
│ │ │ │ ├── __init__.py
│ │ │ │ └── llm.py
│ │ │ ├── local_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── model.py
│ │ │ │ │ │ └── web.py
│ │ │ │ │ └── reranker/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── model.py
│ │ │ │ │ └── web.py
│ │ │ │ ├── local_model_provider.py
│ │ │ │ └── model/
│ │ │ │ ├── embedding/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── model.py
│ │ │ │ │ └── web.py
│ │ │ │ └── reranker/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── model.py
│ │ │ │ └── web.py
│ │ │ ├── ollama_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ └── reranker.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ └── reranker.py
│ │ │ │ └── ollama_model_provider.py
│ │ │ ├── openai_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ └── tts.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ └── tts.py
│ │ │ │ └── openai_model_provider.py
│ │ │ ├── qwen_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ └── __init__.py
│ │ │ │ └── model/
│ │ │ │ └── __init__.py
│ │ │ ├── regolo_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ └── tti.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ └── tti.py
│ │ │ │ └── regolo_model_provider.py
│ │ │ ├── siliconCloud_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── reranker.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ └── tts.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── reranker.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ └── tts.py
│ │ │ │ └── siliconCloud_model_provider.py
│ │ │ ├── tencent_cloud_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── llm.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── llm.py
│ │ │ │ └── tencent_cloud_model_provider.py
│ │ │ ├── tencent_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ └── tti.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── hunyuan.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ └── tti.py
│ │ │ │ └── tencent_model_provider.py
│ │ │ ├── vllm_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── reranker.py
│ │ │ │ │ └── whisper_stt.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── reranker.py
│ │ │ │ │ └── whisper_sst.py
│ │ │ │ └── vllm_model_provider.py
│ │ │ ├── volcanic_engine_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── bigModel_stt.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ ├── tts.py
│ │ │ │ │ └── ttv.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── bigModel_stt.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ ├── tts.py
│ │ │ │ │ └── ttv.py
│ │ │ │ └── volcanic_engine_model_provider.py
│ │ │ ├── wenxin_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ └── llm.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ └── llm.py
│ │ │ │ └── wenxin_model_provider.py
│ │ │ ├── xf_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tts/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── default_tts.py
│ │ │ │ │ │ ├── super_humanoid_tts.py
│ │ │ │ │ │ └── tts.py
│ │ │ │ │ └── zh_en_stt.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tts/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── default_tts.py
│ │ │ │ │ │ ├── super_humanoid_tts.py
│ │ │ │ │ │ └── tts.py
│ │ │ │ │ └── zh_en_stt.py
│ │ │ │ └── xf_model_provider.py
│ │ │ ├── xinference_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── reranker.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ └── tts.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── reranker.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ └── tts.py
│ │ │ │ └── xinference_model_provider.py
│ │ │ └── zhipu_model_provider/
│ │ │ ├── __init__.py
│ │ │ ├── credential/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── image.py
│ │ │ │ ├── llm.py
│ │ │ │ └── tti.py
│ │ │ ├── model/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── image.py
│ │ │ │ ├── llm.py
│ │ │ │ └── tti.py
│ │ │ └── zhipu_model_provider.py
│ │ ├── migrations/
│ │ │ ├── 0001_initial.py
│ │ │ └── __init__.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ └── model_management.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ ├── model_apply_serializers.py
│ │ │ └── model_serializer.py
│ │ ├── sql/
│ │ │ ├── list_model.sql
│ │ │ ├── list_model_user.sql
│ │ │ └── list_model_user_ee.sql
│ │ ├── tests.py
│ │ ├── tools.py
│ │ ├── urls.py
│ │ └── views/
│ │ ├── __init__.py
│ │ ├── model.py
│ │ ├── model_apply.py
│ │ └── provide.py
│ ├── ops/
│ │ ├── __init__.py
│ │ └── celery/
│ │ ├── __init__.py
│ │ ├── const.py
│ │ ├── decorator.py
│ │ ├── heartbeat.py
│ │ ├── hmac_signed_serializer.py
│ │ ├── logger.py
│ │ ├── signal_handler.py
│ │ └── utils.py
│ ├── oss/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── migrations/
│ │ │ └── __init__.py
│ │ ├── models.py
│ │ ├── retrieval_urls.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ └── file.py
│ │ ├── tests.py
│ │ ├── urls.py
│ │ ├── views/
│ │ │ ├── __init__.py
│ │ │ └── file.py
│ │ └── views.py
│ ├── system_manage/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── api/
│ │ │ ├── __init__.py
│ │ │ ├── email_setting.py
│ │ │ ├── resource_mapping.py
│ │ │ ├── system.py
│ │ │ └── user_resource_permission.py
│ │ ├── apps.py
│ │ ├── migrations/
│ │ │ ├── 0001_initial.py
│ │ │ ├── 0002_refresh_collation_reindex.py
│ │ │ ├── 0003_alter_workspaceuserresourcepermission_target.py
│ │ │ ├── 0004_alter_systemsetting_type_and_more.py
│ │ │ ├── 0005_resourcemapping.py
│ │ │ └── __init__.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ ├── chat_user.py
│ │ │ ├── log_management.py
│ │ │ ├── resource_mapping.py
│ │ │ ├── system_setting.py
│ │ │ └── workspace_user_permission.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ ├── email_setting.py
│ │ │ ├── resource_mapping_serializers.py
│ │ │ ├── system.py
│ │ │ ├── user_resource_permission.py
│ │ │ └── valid_serializers.py
│ │ ├── sql/
│ │ │ ├── check_member_permission_target_exists.sql
│ │ │ ├── get_application_user_resource_permission.sql
│ │ │ ├── get_knowledge_user_resource_permission.sql
│ │ │ ├── get_model_user_resource_permission.sql
│ │ │ ├── get_resource_user_permission_detail.sql
│ │ │ ├── get_resource_user_permission_detail_ee.sql
│ │ │ ├── get_tool_user_resource_permission.sql
│ │ │ ├── get_user_resource_permission.sql
│ │ │ ├── list_resource_mapping.sql
│ │ │ └── list_resource_mapping_ee.sql
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views/
│ │ ├── __init__.py
│ │ ├── email_setting.py
│ │ ├── log_management.py
│ │ ├── resource_mapping.py
│ │ ├── system_profile.py
│ │ ├── user_resource_permission.py
│ │ └── valid.py
│ ├── tools/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── api/
│ │ │ ├── __init__.py
│ │ │ ├── tool.py
│ │ │ └── tool_workflow.py
│ │ ├── apps.py
│ │ ├── migrations/
│ │ │ ├── 0001_initial.py
│ │ │ ├── 0002_alter_tool_tool_type.py
│ │ │ ├── 0003_alter_tool_template_id.py
│ │ │ ├── 0004_alter_tool_tool_type.py
│ │ │ ├── 0005_taskrecord.py
│ │ │ ├── 0006_alter_tool_tool_type.py
│ │ │ ├── 0007_alter_tool_tool_type_toolworkflow_and_more.py
│ │ │ ├── __init__.py
│ │ │ └── internal_tool.sql
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ ├── tool.py
│ │ │ └── tool_workflow.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ ├── tool.py
│ │ │ ├── tool_folder.py
│ │ │ ├── tool_version.py
│ │ │ └── tool_workflow.py
│ │ ├── sql/
│ │ │ ├── list_tool.sql
│ │ │ ├── list_tool_user.sql
│ │ │ └── list_tool_user_ee.sql
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views/
│ │ ├── __init__.py
│ │ ├── tool.py
│ │ ├── tool_workflow.py
│ │ └── tool_workflow_version.py
│ ├── trigger/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── api/
│ │ │ ├── __init__.py
│ │ │ ├── trigger.py
│ │ │ └── trigger_task.py
│ │ ├── apps.py
│ │ ├── handler/
│ │ │ ├── base_task.py
│ │ │ ├── base_trigger.py
│ │ │ ├── impl/
│ │ │ │ ├── task/
│ │ │ │ │ ├── application_task.py
│ │ │ │ │ └── tool_task.py
│ │ │ │ └── trigger/
│ │ │ │ ├── event_trigger.py
│ │ │ │ └── scheduled_trigger.py
│ │ │ └── simple_tools.py
│ │ ├── migrations/
│ │ │ ├── 0001_initial.py
│ │ │ ├── 0002_remove_taskrecord_trigger_task_and_more.py
│ │ │ └── __init__.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ └── trigger.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ ├── task_source_trigger.py
│ │ │ ├── trigger.py
│ │ │ └── trigger_task.py
│ │ ├── sql/
│ │ │ ├── get_trigger_page_list.sql
│ │ │ └── get_trigger_task_record_page_list.sql
│ │ ├── tasks.py
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views/
│ │ ├── __init__.py
│ │ ├── trigger.py
│ │ └── trigger_task.py
│ └── users/
│ ├── __init__.py
│ ├── admin.py
│ ├── api/
│ │ ├── __init__.py
│ │ ├── login.py
│ │ └── user.py
│ ├── apps.py
│ ├── migrations/
│ │ ├── 0001_initial.py
│ │ └── __init__.py
│ ├── models/
│ │ ├── __init__.py
│ │ └── user.py
│ ├── serializers/
│ │ ├── __init__.py
│ │ ├── login.py
│ │ └── user.py
│ ├── tests.py
│ ├── urls.py
│ └── views/
│ ├── __init__.py
│ ├── login.py
│ └── user.py
├── installer/
│ ├── Dockerfile
│ ├── Dockerfile-base
│ ├── Dockerfile-vector-model
│ ├── init.sql
│ ├── install_model.py
│ ├── install_model_bert_base_cased.py
│ ├── sandbox.c
│ ├── start-all.sh
│ ├── start-maxkb.sh
│ ├── start-postgres.sh
│ └── start-redis.sh
├── main.py
├── pyproject.toml
└── ui/
├── .editorconfig
├── .gitattributes
├── .gitignore
├── .prettierrc.json
├── README.md
├── admin.html
├── chat.html
├── env.d.ts
├── eslint.config.ts
├── package.json
├── public/
│ └── tool/
│ ├── bochaai/
│ │ └── detail.md
│ ├── google_search/
│ │ └── detail.md
│ ├── langsearch/
│ │ └── detail.md
│ ├── mysql/
│ │ └── detail.md
│ └── postgresql/
│ └── detail.md
├── src/
│ ├── App.vue
│ ├── api/
│ │ ├── application/
│ │ │ ├── application-key.ts
│ │ │ ├── application.ts
│ │ │ ├── chat-log.ts
│ │ │ └── workflow-version.ts
│ │ ├── chat/
│ │ │ └── chat.ts
│ │ ├── chat-user/
│ │ │ ├── auth-setting.ts
│ │ │ └── chat-user.ts
│ │ ├── image.ts
│ │ ├── knowledge/
│ │ │ ├── document.ts
│ │ │ ├── knowledge.ts
│ │ │ ├── paragraph.ts
│ │ │ └── problem.ts
│ │ ├── model/
│ │ │ ├── model.ts
│ │ │ └── provider.ts
│ │ ├── shared-workspace.ts
│ │ ├── system/
│ │ │ ├── api-key.ts
│ │ │ ├── auth.ts
│ │ │ ├── chat-user.ts
│ │ │ ├── license.ts
│ │ │ ├── operate-log.ts
│ │ │ ├── platform-source.ts
│ │ │ ├── resource-authorization.ts
│ │ │ ├── role.ts
│ │ │ ├── user-group.ts
│ │ │ ├── user-manage.ts
│ │ │ └── workspace.ts
│ │ ├── system-resource-management/
│ │ │ ├── application-key.ts
│ │ │ ├── application.ts
│ │ │ ├── chat-log.ts
│ │ │ ├── chat-user.ts
│ │ │ ├── document.ts
│ │ │ ├── folder.ts
│ │ │ ├── knowledge.ts
│ │ │ ├── model.ts
│ │ │ ├── paragraph.ts
│ │ │ ├── problem.ts
│ │ │ ├── resource-authorization.ts
│ │ │ ├── resource-mapping.ts
│ │ │ ├── tool.ts
│ │ │ ├── trigger.ts
│ │ │ └── workflow-version.ts
│ │ ├── system-settings/
│ │ │ ├── auth-setting.ts
│ │ │ ├── email-setting.ts
│ │ │ ├── platform-source.ts
│ │ │ └── theme.ts
│ │ ├── system-shared/
│ │ │ ├── authorization.ts
│ │ │ ├── chat-user.ts
│ │ │ ├── document.ts
│ │ │ ├── knowledge.ts
│ │ │ ├── model.ts
│ │ │ ├── paragraph.ts
│ │ │ ├── problem.ts
│ │ │ ├── resource-mapping.ts
│ │ │ └── tool.ts
│ │ ├── tool/
│ │ │ ├── store.ts
│ │ │ └── tool.ts
│ │ ├── trigger/
│ │ │ └── trigger.ts
│ │ ├── type/
│ │ │ ├── application.ts
│ │ │ ├── chat.ts
│ │ │ ├── common.ts
│ │ │ ├── knowledge.ts
│ │ │ ├── login.ts
│ │ │ ├── model.ts
│ │ │ ├── role.ts
│ │ │ ├── systemChatUser.ts
│ │ │ ├── tool.ts
│ │ │ ├── trigger.ts
│ │ │ ├── user.ts
│ │ │ ├── workspace.ts
│ │ │ └── workspaceChatUser.ts
│ │ ├── user/
│ │ │ ├── login.ts
│ │ │ └── user.ts
│ │ └── workspace/
│ │ ├── chat-user.ts
│ │ ├── folder.ts
│ │ ├── resource-authorization.ts
│ │ ├── resource-mapping.ts
│ │ ├── role.ts
│ │ ├── user-group.ts
│ │ └── workspace.ts
│ ├── bus/
│ │ └── index.ts
│ ├── chat.ts
│ ├── components/
│ │ ├── ai-chat/
│ │ │ ├── component/
│ │ │ │ ├── answer-content/
│ │ │ │ │ └── index.vue
│ │ │ │ ├── chat-input-operate/
│ │ │ │ │ ├── TouchChat.vue
│ │ │ │ │ └── index.vue
│ │ │ │ ├── control/
│ │ │ │ │ └── index.vue
│ │ │ │ ├── knowledge-source-component/
│ │ │ │ │ ├── ExecutionDetailContent.vue
│ │ │ │ │ ├── ParagraphCard.vue
│ │ │ │ │ ├── ParagraphDocumentContent.vue
│ │ │ │ │ ├── ParagraphSourceContent.vue
│ │ │ │ │ └── index.vue
│ │ │ │ ├── operation-button/
│ │ │ │ │ ├── ChatOperationButton.vue
│ │ │ │ │ ├── LogOperationButton.vue
│ │ │ │ │ ├── MobileVoteReasonDrawer.vue
│ │ │ │ │ ├── ShareOperationButton.vue
│ │ │ │ │ ├── VoteReasonContent.vue
│ │ │ │ │ └── index.vue
│ │ │ │ ├── prologue-content/
│ │ │ │ │ └── index.vue
│ │ │ │ ├── question-content/
│ │ │ │ │ └── index.vue
│ │ │ │ ├── transition-content/
│ │ │ │ │ └── index.vue
│ │ │ │ └── user-form/
│ │ │ │ └── index.vue
│ │ │ ├── index.scss
│ │ │ └── index.vue
│ │ ├── app-charts/
│ │ │ ├── components/
│ │ │ │ ├── BarCharts.vue
│ │ │ │ └── LineCharts.vue
│ │ │ └── index.vue
│ │ ├── app-icon/
│ │ │ ├── AppIcon.vue
│ │ │ ├── KnowledgeIcon.vue
│ │ │ ├── ToolIcon.vue
│ │ │ ├── TriggerIcon.vue
│ │ │ ├── icons/
│ │ │ │ ├── about.ts
│ │ │ │ ├── application.ts
│ │ │ │ ├── document.ts
│ │ │ │ ├── folder.ts
│ │ │ │ ├── knowledge.ts
│ │ │ │ ├── menu.ts
│ │ │ │ ├── system.ts
│ │ │ │ ├── tool.ts
│ │ │ │ └── trigger.ts
│ │ │ └── index.ts
│ │ ├── app-table/
│ │ │ └── index.vue
│ │ ├── app-table-infinite-scroll/
│ │ │ └── index.vue
│ │ ├── auto-tooltip/
│ │ │ └── index.vue
│ │ ├── back-button/
│ │ │ └── index.vue
│ │ ├── card-box/
│ │ │ └── index.vue
│ │ ├── card-checkbox/
│ │ │ └── index.vue
│ │ ├── codemirror-editor/
│ │ │ └── index.vue
│ │ ├── common-list/
│ │ │ └── index.vue
│ │ ├── dynamics-form/
│ │ │ ├── Demo.vue
│ │ │ ├── DemoConstructor.vue
│ │ │ ├── FormItem.vue
│ │ │ ├── FormItemLabel.vue
│ │ │ ├── constructor/
│ │ │ │ ├── data.ts
│ │ │ │ ├── index.vue
│ │ │ │ └── items/
│ │ │ │ ├── DatePickerConstructor.vue
│ │ │ │ ├── JsonInputConstructor.vue
│ │ │ │ ├── ModelConstructor.vue
│ │ │ │ ├── MultiRowConstructor.vue
│ │ │ │ ├── MultiSelectConstructor.vue
│ │ │ │ ├── PasswordInputConstructor.vue
│ │ │ │ ├── RadioCardConstructor.vue
│ │ │ │ ├── RadioRowConstructor.vue
│ │ │ │ ├── SingleSelectConstructor.vue
│ │ │ │ ├── SliderConstructor.vue
│ │ │ │ ├── SwitchInputConstructor.vue
│ │ │ │ ├── TextInputConstructor.vue
│ │ │ │ ├── TextareaInputConstructor.vue
│ │ │ │ └── UploadInputConstructor.vue
│ │ │ ├── index.ts
│ │ │ ├── index.vue
│ │ │ ├── items/
│ │ │ │ ├── DatePicker.vue
│ │ │ │ ├── JsonInput.vue
│ │ │ │ ├── MultiRow.vue
│ │ │ │ ├── PasswordInput.vue
│ │ │ │ ├── TextInput.vue
│ │ │ │ ├── TextareaInput.vue
│ │ │ │ ├── complex/
│ │ │ │ │ ├── ArrayObjectCard.vue
│ │ │ │ │ ├── ObjectCard.vue
│ │ │ │ │ └── TabCard.vue
│ │ │ │ ├── label/
│ │ │ │ │ ├── SettingLabel.vue
│ │ │ │ │ └── TooltipLabel.vue
│ │ │ │ ├── layout/
│ │ │ │ │ └── RowLayout.vue
│ │ │ │ ├── model/
│ │ │ │ │ ├── Model.vue
│ │ │ │ │ └── provider-data.ts
│ │ │ │ ├── radio/
│ │ │ │ │ ├── Radio.vue
│ │ │ │ │ ├── RadioButton.vue
│ │ │ │ │ ├── RadioCard.vue
│ │ │ │ │ └── RadioRow.vue
│ │ │ │ ├── select/
│ │ │ │ │ ├── MultiSelect.vue
│ │ │ │ │ └── SingleSelect.vue
│ │ │ │ ├── slider/
│ │ │ │ │ └── Slider.vue
│ │ │ │ ├── switch/
│ │ │ │ │ └── SwitchInput.vue
│ │ │ │ ├── table/
│ │ │ │ │ ├── ProgressTableItem.vue
│ │ │ │ │ ├── TableCheckbox.vue
│ │ │ │ │ ├── TableColumn.vue
│ │ │ │ │ └── TableRadio.vue
│ │ │ │ ├── tree/
│ │ │ │ │ └── Tree.vue
│ │ │ │ └── upload/
│ │ │ │ ├── LocalFileUpload.vue
│ │ │ │ └── UploadInput.vue
│ │ │ └── type.ts
│ │ ├── execution-detail-card/
│ │ │ └── index.vue
│ │ ├── folder-breadcrumb/
│ │ │ └── index.vue
│ │ ├── folder-tree/
│ │ │ ├── CreateFolderDialog.vue
│ │ │ ├── MoveToDialog.vue
│ │ │ ├── constant.ts
│ │ │ └── index.vue
│ │ ├── generate-related-dialog/
│ │ │ └── index.vue
│ │ ├── index.ts
│ │ ├── infinite-scroll/
│ │ │ └── index.vue
│ │ ├── layout-container/
│ │ │ ├── ContentContainer.vue
│ │ │ └── index.vue
│ │ ├── loading/
│ │ │ └── DownloadLoading.vue
│ │ ├── logo/
│ │ │ ├── LogoFull.vue
│ │ │ ├── LogoIcon.vue
│ │ │ └── SendIcon.vue
│ │ ├── markdown/
│ │ │ ├── EchartsRander.vue
│ │ │ ├── FormRander.vue
│ │ │ ├── HtmlRander.vue
│ │ │ ├── IframeRender.vue
│ │ │ ├── MdEditor.vue
│ │ │ ├── MdEditorMagnify.vue
│ │ │ ├── MdPreview.vue
│ │ │ ├── MdRenderer.vue
│ │ │ ├── ReasoningRander.vue
│ │ │ ├── assets/
│ │ │ │ └── markdown-iconfont.js
│ │ │ └── tool-calls-render/
│ │ │ ├── content/
│ │ │ │ ├── index.vue
│ │ │ │ └── simple-tool-calls/
│ │ │ │ └── index.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── model-select/
│ │ │ └── index.vue
│ │ ├── pdf-export/
│ │ │ └── index.vue
│ │ ├── read-write/
│ │ │ └── index.vue
│ │ ├── resource-authorization-drawer/
│ │ │ └── index.vue
│ │ ├── resource_mapping/
│ │ │ └── index.vue
│ │ ├── select-knowledge-document/
│ │ │ └── index.vue
│ │ ├── tag-ellipsis/
│ │ │ └── index.vue
│ │ ├── tag-group/
│ │ │ └── index.vue
│ │ ├── workflow-dropdown-menu/
│ │ │ ├── application/
│ │ │ │ ├── NodeContent.vue
│ │ │ │ └── index.vue
│ │ │ ├── index.scss
│ │ │ ├── index.vue
│ │ │ ├── knowledge/
│ │ │ │ ├── NodeContent.vue
│ │ │ │ └── index.vue
│ │ │ ├── knowledge-inner/
│ │ │ │ ├── NodeContent.vue
│ │ │ │ └── index.vue
│ │ │ └── tool/
│ │ │ ├── NodeContent.vue
│ │ │ └── index.vue
│ │ └── workspace-dropdown/
│ │ └── index.vue
│ ├── directives/
│ │ ├── clickoutside.ts
│ │ ├── hasPermission.ts
│ │ ├── index.ts
│ │ ├── infiniteScrollUp.ts
│ │ └── resize.ts
│ ├── enums/
│ │ ├── application.ts
│ │ ├── common.ts
│ │ ├── document.ts
│ │ ├── model.ts
│ │ ├── system.ts
│ │ ├── tool.ts
│ │ └── trigger.ts
│ ├── layout/
│ │ ├── app-main/
│ │ │ └── index.vue
│ │ ├── components/
│ │ │ ├── breadcrumb/
│ │ │ │ └── index.vue
│ │ │ └── sidebar/
│ │ │ ├── SidebarItem.vue
│ │ │ └── index.vue
│ │ ├── hooks/
│ │ │ └── useResize.ts
│ │ ├── layout-header/
│ │ │ ├── SystemHeader.vue
│ │ │ ├── UserHeader.vue
│ │ │ ├── avatar/
│ │ │ │ ├── APIKeyDialog.vue
│ │ │ │ ├── AboutDialog.vue
│ │ │ │ ├── ResetPassword.vue
│ │ │ │ └── index.vue
│ │ │ ├── top-about/
│ │ │ │ └── index.vue
│ │ │ └── top-menu/
│ │ │ ├── MenuItem.vue
│ │ │ └── index.vue
│ │ ├── layout-template/
│ │ │ ├── MainLayout.vue
│ │ │ ├── SimpleLayout.vue
│ │ │ ├── SystemMainLayout.vue
│ │ │ └── index.scss
│ │ └── login-layout/
│ │ ├── LoginContainer.vue
│ │ ├── LoginLayout.vue
│ │ └── UserLoginLayout.vue
│ ├── locales/
│ │ ├── index.ts
│ │ ├── lang/
│ │ │ ├── en-US/
│ │ │ │ ├── ai-chat.ts
│ │ │ │ ├── common.ts
│ │ │ │ ├── components.ts
│ │ │ │ ├── dynamics-form.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── layout.ts
│ │ │ │ ├── theme.ts
│ │ │ │ ├── views/
│ │ │ │ │ ├── application-overview.ts
│ │ │ │ │ ├── application.ts
│ │ │ │ │ ├── chat-log.ts
│ │ │ │ │ ├── chat-user.ts
│ │ │ │ │ ├── document.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── knowledge.ts
│ │ │ │ │ ├── login.ts
│ │ │ │ │ ├── model.ts
│ │ │ │ │ ├── operate-log.ts
│ │ │ │ │ ├── paragraph.ts
│ │ │ │ │ ├── problem.ts
│ │ │ │ │ ├── role.ts
│ │ │ │ │ ├── shared.ts
│ │ │ │ │ ├── system.ts
│ │ │ │ │ ├── tool.ts
│ │ │ │ │ ├── trigger.ts
│ │ │ │ │ ├── user-manage.ts
│ │ │ │ │ └── workspace.ts
│ │ │ │ └── workflow.ts
│ │ │ ├── zh-CN/
│ │ │ │ ├── ai-chat.ts
│ │ │ │ ├── common.ts
│ │ │ │ ├── components.ts
│ │ │ │ ├── dynamics-form.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── layout.ts
│ │ │ │ ├── theme.ts
│ │ │ │ ├── views/
│ │ │ │ │ ├── application-overview.ts
│ │ │ │ │ ├── application.ts
│ │ │ │ │ ├── chat-log.ts
│ │ │ │ │ ├── chat-user.ts
│ │ │ │ │ ├── document.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── knowledge.ts
│ │ │ │ │ ├── login.ts
│ │ │ │ │ ├── model.ts
│ │ │ │ │ ├── operate-log.ts
│ │ │ │ │ ├── paragraph.ts
│ │ │ │ │ ├── problem.ts
│ │ │ │ │ ├── role.ts
│ │ │ │ │ ├── shared.ts
│ │ │ │ │ ├── system.ts
│ │ │ │ │ ├── tool.ts
│ │ │ │ │ ├── trigger.ts
│ │ │ │ │ ├── user-manage.ts
│ │ │ │ │ └── workspace.ts
│ │ │ │ └── workflow.ts
│ │ │ └── zh-Hant/
│ │ │ ├── ai-chat.ts
│ │ │ ├── common.ts
│ │ │ ├── components.ts
│ │ │ ├── dynamics-form.ts
│ │ │ ├── index.ts
│ │ │ ├── layout.ts
│ │ │ ├── theme.ts
│ │ │ ├── views/
│ │ │ │ ├── application-overview.ts
│ │ │ │ ├── application.ts
│ │ │ │ ├── chat-log.ts
│ │ │ │ ├── chat-user.ts
│ │ │ │ ├── document.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── knowledge.ts
│ │ │ │ ├── login.ts
│ │ │ │ ├── model.ts
│ │ │ │ ├── operate-log.ts
│ │ │ │ ├── paragraph.ts
│ │ │ │ ├── problem.ts
│ │ │ │ ├── role.ts
│ │ │ │ ├── shared.ts
│ │ │ │ ├── system.ts
│ │ │ │ ├── tool.ts
│ │ │ │ ├── trigger.ts
│ │ │ │ ├── user-manage.ts
│ │ │ │ └── workspace.ts
│ │ │ └── workflow.ts
│ │ └── useLocale.ts
│ ├── main.ts
│ ├── permission/
│ │ ├── application/
│ │ │ ├── index.ts
│ │ │ ├── system-manage.ts
│ │ │ └── workspace.ts
│ │ ├── index.ts
│ │ ├── knowledge/
│ │ │ ├── index.ts
│ │ │ ├── system-manage.ts
│ │ │ ├── system-share.ts
│ │ │ ├── workspace-share.ts
│ │ │ └── workspace.ts
│ │ ├── model/
│ │ │ ├── index.ts
│ │ │ ├── system-manage.ts
│ │ │ ├── system-share.ts
│ │ │ └── workspace.ts
│ │ └── tool/
│ │ ├── index.ts
│ │ ├── system-manage.ts
│ │ ├── system-share.ts
│ │ └── workspace.ts
│ ├── request/
│ │ ├── Result.ts
│ │ ├── chat/
│ │ │ ├── Result.ts
│ │ │ └── index.ts
│ │ └── index.ts
│ ├── router/
│ │ ├── chat/
│ │ │ ├── index.ts
│ │ │ └── routes.ts
│ │ ├── common.ts
│ │ ├── index.ts
│ │ ├── modules/
│ │ │ ├── application-detail.ts
│ │ │ ├── application.ts
│ │ │ ├── document.ts
│ │ │ ├── knowledge.ts
│ │ │ ├── model.ts
│ │ │ ├── paragraph.ts
│ │ │ ├── system.ts
│ │ │ ├── tool.ts
│ │ │ └── trigger.ts
│ │ └── routes.ts
│ ├── stores/
│ │ ├── index.ts
│ │ └── modules/
│ │ ├── application.ts
│ │ ├── chat-user.ts
│ │ ├── common.ts
│ │ ├── folder.ts
│ │ ├── knowledge.ts
│ │ ├── login.ts
│ │ ├── model.ts
│ │ ├── prompt.ts
│ │ ├── theme.ts
│ │ ├── tool.ts
│ │ └── user.ts
│ ├── styles/
│ │ ├── app.scss
│ │ ├── component.scss
│ │ ├── element-plus.scss
│ │ ├── font/
│ │ │ └── AlibabaPuHuiTi-3-55-Regular.otf
│ │ ├── index.scss
│ │ ├── md-editor.scss
│ │ └── variables.scss
│ ├── utils/
│ │ ├── application.ts
│ │ ├── array.ts
│ │ ├── bus.ts
│ │ ├── clipboard.ts
│ │ ├── common.ts
│ │ ├── dynamics-api/
│ │ │ ├── permission-api.ts
│ │ │ └── shared-api.ts
│ │ ├── folder.ts
│ │ ├── message.ts
│ │ ├── permission/
│ │ │ ├── data.ts
│ │ │ ├── index.ts
│ │ │ └── type.ts
│ │ ├── status.ts
│ │ ├── theme.ts
│ │ ├── time.ts
│ │ └── trigger.ts
│ ├── views/
│ │ ├── Permission.vue
│ │ ├── application/
│ │ │ ├── ApplicationAccess.vue
│ │ │ ├── ApplicationSetting.vue
│ │ │ ├── component/
│ │ │ │ ├── AIModeParamSettingDialog.vue
│ │ │ │ ├── AccessSettingDrawer.vue
│ │ │ │ ├── AddKnowledgeDialog.vue
│ │ │ │ ├── ApplicationDialog.vue
│ │ │ │ ├── CopyApplicationDialog.vue
│ │ │ │ ├── CreateApplicationDialog.vue
│ │ │ │ ├── GeneratePromptDialog.vue
│ │ │ │ ├── McpServersDialog.vue
│ │ │ │ ├── ParamSettingDialog.vue
│ │ │ │ ├── ReasoningParamSettingDialog.vue
│ │ │ │ ├── STTModelParamSettingDialog.vue
│ │ │ │ ├── TTSModeParamSettingDialog.vue
│ │ │ │ └── ToolDialog.vue
│ │ │ ├── index.vue
│ │ │ └── template-store/
│ │ │ ├── InternalDescDrawer.vue
│ │ │ ├── TemplateCard.vue
│ │ │ └── TemplateStoreDialog.vue
│ │ ├── application-overview/
│ │ │ ├── component/
│ │ │ │ ├── APIKeyDialog.vue
│ │ │ │ ├── DisplaySettingDialog.vue
│ │ │ │ ├── EmbedDialog.vue
│ │ │ │ ├── LimitDialog.vue
│ │ │ │ ├── SettingAPIKeyDialog.vue
│ │ │ │ ├── SettingAPIKeyDrawer.vue
│ │ │ │ └── StatisticsCharts.vue
│ │ │ ├── index.vue
│ │ │ └── xpack-component/
│ │ │ ├── XPackDisplaySettingDialog.vue
│ │ │ └── XPackLimitDrawer.vue
│ │ ├── application-workflow/
│ │ │ ├── component/
│ │ │ │ └── PublishHistory.vue
│ │ │ └── index.vue
│ │ ├── chat/
│ │ │ ├── Share.vue
│ │ │ ├── auth/
│ │ │ │ ├── component/
│ │ │ │ │ └── password.vue
│ │ │ │ └── index.vue
│ │ │ ├── component/
│ │ │ │ ├── EditTitleDialog.vue
│ │ │ │ └── HistoryPanel.vue
│ │ │ ├── embed/
│ │ │ │ ├── component/
│ │ │ │ │ └── ChatHistoryDrawer.vue
│ │ │ │ └── index.vue
│ │ │ ├── index.vue
│ │ │ ├── mobile/
│ │ │ │ ├── component/
│ │ │ │ │ ├── ChatHistoryDrawer.vue
│ │ │ │ │ ├── ResetPasswordDrawer.vue
│ │ │ │ │ └── UserCenterDrawer.vue
│ │ │ │ └── index.vue
│ │ │ ├── no-service/
│ │ │ │ └── index.vue
│ │ │ ├── pc/
│ │ │ │ └── index.vue
│ │ │ └── user-login/
│ │ │ ├── index.vue
│ │ │ └── scanCompinents/
│ │ │ ├── QrCodeTab.vue
│ │ │ ├── dingtalkQrCode.vue
│ │ │ ├── larkQrCode.vue
│ │ │ └── wecomQrCode.vue
│ │ ├── chat-log/
│ │ │ ├── component/
│ │ │ │ ├── ChatRecordDrawer.vue
│ │ │ │ ├── EditContentDialog.vue
│ │ │ │ └── EditMarkDialog.vue
│ │ │ └── index.vue
│ │ ├── chat-user/
│ │ │ └── index.vue
│ │ ├── demo/
│ │ │ └── index.vue
│ │ ├── document/
│ │ │ ├── ImportLarkDocument.vue
│ │ │ ├── ImportWorkflowDocument.vue
│ │ │ ├── UploadDocument.vue
│ │ │ ├── component/
│ │ │ │ ├── EmbeddingContentDialog.vue
│ │ │ │ ├── ImportDocumentDialog.vue
│ │ │ │ ├── SelectKnowledgeDialog.vue
│ │ │ │ ├── Status.vue
│ │ │ │ └── StatusTable.vue
│ │ │ ├── index.scss
│ │ │ ├── index.vue
│ │ │ ├── tag/
│ │ │ │ ├── CreateTagDialog.vue
│ │ │ │ ├── EditTagDialog.vue
│ │ │ │ ├── MulAddTagDialog.vue
│ │ │ │ ├── TagDrawer.vue
│ │ │ │ ├── TagSettingDrawer.vue
│ │ │ │ └── TaglinkedDocumentDialog.vue
│ │ │ └── upload/
│ │ │ ├── ResultSuccess.vue
│ │ │ ├── SetRules.vue
│ │ │ └── UploadComponent.vue
│ │ ├── error/
│ │ │ ├── 404.vue
│ │ │ ├── NoPermission.vue
│ │ │ └── NoService.vue
│ │ ├── hit-test/
│ │ │ └── index.vue
│ │ ├── knowledge/
│ │ │ ├── KnowledgeSetting.vue
│ │ │ ├── WorkflowTransform.vue
│ │ │ ├── component/
│ │ │ │ ├── BaseForm.vue
│ │ │ │ ├── EditParagraphDialog.vue
│ │ │ │ ├── KnowledgeListContainer.vue
│ │ │ │ ├── ParagraphList.vue
│ │ │ │ ├── ParagraphPreview.vue
│ │ │ │ └── SyncWebDialog.vue
│ │ │ ├── create-component/
│ │ │ │ ├── CreateKnowledgeDialog.vue
│ │ │ │ ├── CreateLarkKnowledgeDialog.vue
│ │ │ │ ├── CreateWebKnowledgeDialog.vue
│ │ │ │ └── CreateWorkflowKnowledgeDialog.vue
│ │ │ ├── index.vue
│ │ │ └── template-store/
│ │ │ ├── InternalDescDrawer.vue
│ │ │ ├── TemplateCard.vue
│ │ │ └── TemplateStoreDialog.vue
│ │ ├── knowledge-workflow/
│ │ │ ├── component/
│ │ │ │ ├── DebugDrawer.vue
│ │ │ │ ├── PublishHistory.vue
│ │ │ │ ├── action/
│ │ │ │ │ ├── DataSource.vue
│ │ │ │ │ ├── KnowledgeBase.vue
│ │ │ │ │ └── Result.vue
│ │ │ │ └── execution-record/
│ │ │ │ ├── ExecutionDetailDrawer.vue
│ │ │ │ └── ExecutionRecordDrawer.vue
│ │ │ └── index.vue
│ │ ├── login/
│ │ │ ├── ForgotPassword.vue
│ │ │ ├── ResetPassword.vue
│ │ │ ├── index.vue
│ │ │ └── scanCompinents/
│ │ │ ├── QrCodeTab.vue
│ │ │ ├── dingtalkQrCode.vue
│ │ │ ├── larkQrCode.vue
│ │ │ └── wecomQrCode.vue
│ │ ├── model/
│ │ │ ├── component/
│ │ │ │ ├── AddParamDrawer.vue
│ │ │ │ ├── CreateModelDialog.vue
│ │ │ │ ├── EditModel.vue
│ │ │ │ ├── ModelCard.vue
│ │ │ │ ├── ParamSettingDialog.vue
│ │ │ │ ├── Provider.vue
│ │ │ │ ├── SelectProviderDialog.vue
│ │ │ │ └── data.ts
│ │ │ └── index.vue
│ │ ├── paragraph/
│ │ │ ├── component/
│ │ │ │ ├── ParagraphCard.vue
│ │ │ │ ├── ParagraphDialog.vue
│ │ │ │ ├── ParagraphForm.vue
│ │ │ │ ├── ProblemComponent.vue
│ │ │ │ └── SelectDocumentDialog.vue
│ │ │ └── index.vue
│ │ ├── problem/
│ │ │ ├── component/
│ │ │ │ ├── CreateProblemDialog.vue
│ │ │ │ ├── DetailProblemDrawer.vue
│ │ │ │ └── RelateProblemDialog.vue
│ │ │ └── index.vue
│ │ ├── system/
│ │ │ ├── operate-log/
│ │ │ │ ├── component/
│ │ │ │ │ └── DetailDialog.vue
│ │ │ │ └── index.vue
│ │ │ ├── resource-authorization/
│ │ │ │ ├── component/
│ │ │ │ │ └── PermissionTable.vue
│ │ │ │ ├── constant.ts
│ │ │ │ └── index.vue
│ │ │ ├── role/
│ │ │ │ ├── component/
│ │ │ │ │ ├── AddMemberDrawer.vue
│ │ │ │ │ ├── CreateOrUpdateRoleDialog.vue
│ │ │ │ │ ├── Member.vue
│ │ │ │ │ ├── MemberFormContent.vue
│ │ │ │ │ └── PermissionConfiguration.vue
│ │ │ │ ├── index.ts
│ │ │ │ └── index.vue
│ │ │ ├── user-manage/
│ │ │ │ ├── component/
│ │ │ │ │ ├── SetUserRoleDialog.vue
│ │ │ │ │ ├── UserDrawer.vue
│ │ │ │ │ └── UserPwdDialog.vue
│ │ │ │ └── index.vue
│ │ │ └── workspace/
│ │ │ ├── component/
│ │ │ │ ├── AddMemberDrawer.vue
│ │ │ │ ├── CreateOrUpdateWorkspaceDialog.vue
│ │ │ │ └── Member.vue
│ │ │ └── index.vue
│ │ ├── system-chat-user/
│ │ │ ├── authentication/
│ │ │ │ ├── component/
│ │ │ │ │ ├── CAS.vue
│ │ │ │ │ ├── EditModal.vue
│ │ │ │ │ ├── LDAP.vue
│ │ │ │ │ ├── OAuth2.vue
│ │ │ │ │ ├── OIDC.vue
│ │ │ │ │ └── SCAN.vue
│ │ │ │ └── index.vue
│ │ │ ├── chat-user/
│ │ │ │ ├── component/
│ │ │ │ │ ├── SetUserGroupsDialog.vue
│ │ │ │ │ ├── SyncUsersDialog.vue
│ │ │ │ │ ├── UserDrawer.vue
│ │ │ │ │ └── UserPwdDialog.vue
│ │ │ │ └── index.vue
│ │ │ └── group/
│ │ │ ├── component/
│ │ │ │ ├── CreateGroupUserDialog.vue
│ │ │ │ └── CreateOrUpdateGroupDialog.vue
│ │ │ └── index.vue
│ │ ├── system-resource-management/
│ │ │ ├── ApplicationResourceIndex.vue
│ │ │ ├── KnowledgeResourceIndex.vue
│ │ │ ├── ModelResourceIndex.vue
│ │ │ └── ToolResourceIndex.vue
│ │ ├── system-setting/
│ │ │ ├── authentication/
│ │ │ │ ├── component/
│ │ │ │ │ ├── CAS.vue
│ │ │ │ │ ├── EditModal.vue
│ │ │ │ │ ├── LDAP.vue
│ │ │ │ │ ├── OAuth2.vue
│ │ │ │ │ ├── OIDC.vue
│ │ │ │ │ ├── SCAN.vue
│ │ │ │ │ ├── Saml2.vue
│ │ │ │ │ └── Setting.vue
│ │ │ │ └── index.vue
│ │ │ ├── email/
│ │ │ │ └── index.vue
│ │ │ └── theme/
│ │ │ ├── LoginPreview.vue
│ │ │ └── index.vue
│ │ ├── system-shared/
│ │ │ ├── AuthorizedWorkspaceDialog.vue
│ │ │ ├── KnowLedgeSharedIndex.vue
│ │ │ ├── ModelSharedIndex.vue
│ │ │ └── ToolSharedIndex.vue
│ │ ├── tool/
│ │ │ ├── DataSourceToolFormDrawer.vue
│ │ │ ├── McpToolFormDrawer.vue
│ │ │ ├── SkillToolFormDrawer.vue
│ │ │ ├── ToolDebugDrawer.vue
│ │ │ ├── ToolFormDrawer.vue
│ │ │ ├── WorkflowFormDialog.vue
│ │ │ ├── component/
│ │ │ │ ├── EditAvatarDialog.vue
│ │ │ │ ├── FieldFormDialog.vue
│ │ │ │ ├── InitParamDrawer.vue
│ │ │ │ ├── McpToolConfigDialog.vue
│ │ │ │ ├── ToolListContainer.vue
│ │ │ │ ├── ToolStoreDescDrawer.vue
│ │ │ │ └── UserFieldFormDialog.vue
│ │ │ ├── execution-record/
│ │ │ │ ├── ExecutionDetailDrawer.vue
│ │ │ │ └── TriggerRecordDrawer.vue
│ │ │ ├── index.vue
│ │ │ └── tool-store/
│ │ │ ├── AddInternalToolDialog.vue
│ │ │ ├── InternalDescDrawer.vue
│ │ │ ├── ToolCard.vue
│ │ │ └── ToolStoreDialog.vue
│ │ ├── tool-workflow/
│ │ │ ├── component/
│ │ │ │ ├── PublishHistory.vue
│ │ │ │ ├── debug/
│ │ │ │ │ ├── index.vue
│ │ │ │ │ ├── parameters/
│ │ │ │ │ │ └── index.vue
│ │ │ │ │ └── result/
│ │ │ │ │ └── index.vue
│ │ │ │ └── debug-drawer/
│ │ │ │ └── index.vue
│ │ │ └── index.vue
│ │ └── trigger/
│ │ ├── ResourceTriggerDrawer.vue
│ │ ├── TriggerDrawer.vue
│ │ ├── component/
│ │ │ ├── ApplicationParameter.vue
│ │ │ └── ToolParameter.vue
│ │ ├── execution-record/
│ │ │ ├── ExecutionDetailDrawer.vue
│ │ │ └── TriggerTaskRecordDrawer.vue
│ │ └── index.vue
│ └── workflow/
│ ├── common/
│ │ ├── AddFormCollect.vue
│ │ ├── CustomLine.vue
│ │ ├── EditFormCollect.vue
│ │ ├── NodeCascader.vue
│ │ ├── NodeContainer.vue
│ │ ├── NodeControl.vue
│ │ ├── NodeSearch.vue
│ │ ├── app-node.ts
│ │ ├── data.ts
│ │ ├── edge.ts
│ │ ├── loopEdge.ts
│ │ ├── shortcut.ts
│ │ ├── teleport.ts
│ │ ├── template.ts
│ │ └── validate.ts
│ ├── icons/
│ │ ├── ai-chat-node-icon.vue
│ │ ├── application-node-icon.vue
│ │ ├── base-node-icon.vue
│ │ ├── chat-icon.vue
│ │ ├── condition-node-icon.vue
│ │ ├── data-source-local-node-icon.vue
│ │ ├── data-source-web-node-icon.vue
│ │ ├── document-extract-node-icon.vue
│ │ ├── document-split-node-icon.vue
│ │ ├── form-node-icon.vue
│ │ ├── global-icon.vue
│ │ ├── image-generate-node-icon.vue
│ │ ├── image-to-video-node-icon.vue
│ │ ├── image-understand-node-icon.vue
│ │ ├── intent-node-icon.vue
│ │ ├── knowledge-base-node-icon.vue
│ │ ├── knowledge-write-node-icon.vue
│ │ ├── loop-break-node-icon.vue
│ │ ├── loop-continue-node-icon.vue
│ │ ├── loop-icon.vue
│ │ ├── loop-node-icon.vue
│ │ ├── loop-start-node-icon.vue
│ │ ├── mcp-node-icon.vue
│ │ ├── output-icon.vue
│ │ ├── parameter-extraction-node-icon.vue
│ │ ├── question-node-icon.vue
│ │ ├── reply-node-icon.vue
│ │ ├── reranker-node-icon.vue
│ │ ├── search-document-node-icon.vue
│ │ ├── search-knowledge-node-icon.vue
│ │ ├── speech-to-text-node-icon.vue
│ │ ├── start-node-icon.vue
│ │ ├── text-to-speech-node-icon.vue
│ │ ├── text-to-video-node-icon.vue
│ │ ├── tool-base-node-icon.vue
│ │ ├── tool-lib-node-icon.vue
│ │ ├── tool-node-icon.vue
│ │ ├── tool-start-node-icon.vue
│ │ ├── tool-workflow-lib-node-icon.vue
│ │ ├── utils.ts
│ │ ├── variable-aggregation-node-icon.vue
│ │ ├── variable-assign-node-icon.vue
│ │ ├── variable-splitting-node-icon.vue
│ │ └── video-understand-node-icon.vue
│ ├── index.vue
│ ├── nodes/
│ │ ├── ai-chat-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── application-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── base-node/
│ │ │ ├── component/
│ │ │ │ ├── ApiFieldFormDialog.vue
│ │ │ │ ├── ApiInputFieldTable.vue
│ │ │ │ ├── ChatFieldDialog.vue
│ │ │ │ ├── ChatFieldTable.vue
│ │ │ │ ├── FileUploadSettingDialog.vue
│ │ │ │ ├── UserFieldFormDialog.vue
│ │ │ │ ├── UserInputFieldTable.vue
│ │ │ │ └── UserInputTitleDialog.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── condition-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── data-source-local-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── data-source-web-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── document-extract-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── document-split-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── form-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── image-generate/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── image-to-video/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── image-understand/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── intent-classify-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── knowledge-base-node/
│ │ │ ├── component/
│ │ │ │ ├── UserFieldFormDialog.vue
│ │ │ │ ├── UserInputFieldTable.vue
│ │ │ │ └── UserInputTitleDialog.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── knowledge-write-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── loop-body-node/
│ │ │ ├── LoopBodyContainer.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── loop-break-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── loop-continue-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── loop-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── loop-start-node/
│ │ │ ├── component/
│ │ │ │ ├── LoopFieldDialog.vue
│ │ │ │ └── LoopFieldTable.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── mcp-node/
│ │ │ ├── component/
│ │ │ │ └── McpServerInputDialog.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── parameter-extraction-node/
│ │ │ ├── component/
│ │ │ │ ├── ParametersFieldDialog.vue
│ │ │ │ └── ParametersFieldTable.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── question-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── reply-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── reranker-node/
│ │ │ ├── ParamSettingDialog.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── search-document-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── search-knowledge-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── speech-to-text-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── start-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── text-to-speech-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── text-to-video/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── tool-base-node/
│ │ │ ├── component/
│ │ │ │ ├── input/
│ │ │ │ │ ├── InputFieldFormDialog.vue
│ │ │ │ │ ├── InputFieldTable.vue
│ │ │ │ │ └── InputTitleDialog.vue
│ │ │ │ └── output/
│ │ │ │ ├── OutputFieldFormDialog.vue
│ │ │ │ ├── OutputFieldTable.vue
│ │ │ │ └── OutputTitleDialog.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── tool-lib-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── tool-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── tool-start-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── tool-workflow-lib-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── variable-aggregation-node/
│ │ │ ├── component/
│ │ │ │ └── GroupFieldDialog.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── variable-assign-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── variable-splitting/
│ │ │ ├── component/
│ │ │ │ ├── VariableFieldDialog.vue
│ │ │ │ └── VariableFieldTable.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ └── video-understand/
│ │ ├── index.ts
│ │ └── index.vue
│ └── plugins/
│ └── dagre.ts
├── tsconfig.app.json
├── tsconfig.json
├── tsconfig.node.json
└── vite.config.ts
================================================
FILE CONTENTS
================================================
================================================
FILE: .dockerignore
================================================
.git*
.idea*
*.md
.venv/
================================================
FILE: .editorconfig
================================================
root = true
[*.py]
max_line_length = 120
================================================
FILE: .github/ISSUE_TEMPLATE/bug.yml
================================================
name: 'Bug Report'
description: 'Report an Bug'
title: "[Bug] "
assignees: zyyfit
body:
- type: markdown
attributes:
value: "## Contact Information"
- type: input
validations:
required: false
attributes:
label: "Contact Information"
description: "The ways to quickly contact you: WeChat group number and nickname, email, etc."
- type: markdown
attributes:
value: "## Environment Information"
- type: input
validations:
required: true
attributes:
label: "MaxKB Version"
description: "Log in to the MaxKB Web Console and check the current version on the `About` page in the top right corner."
- type: markdown
attributes:
value: "## Detailed information"
- type: textarea
attributes:
label: "Problem Description"
description: "Briefly describe the issue you’ve encountered."
validations:
required: true
- type: textarea
attributes:
label: "Steps to Reproduce"
description: "How can this issue be reproduced."
validations:
required: true
- type: textarea
attributes:
label: "The expected correct result"
- type: textarea
attributes:
label: "Related log output"
description: "Please paste any relevant log output here. It will automatically be formatted as code, so no backticks are necessary."
render: shell
- type: textarea
attributes:
label: "Additional Information"
description: "If you have any additional information to provide, you can include it here (screenshots, videos, etc., are welcome)."
================================================
FILE: .github/ISSUE_TEMPLATE/feature.yml
================================================
name: 'Feature Request'
description: 'Suggest an idea'
title: '[Feature] '
assignees: baixin513
body:
- type: markdown
attributes:
value: "## Environment Information"
- type: input
validations:
required: true
attributes:
label: "MaxKB Version"
description: "Log in to the MaxKB Web Console and check the current version on the `About` page in the top right corner."
- type: markdown
attributes:
value: "## Detailed information"
- type: textarea
attributes:
label: "Please describe your needs or suggestions for improvements"
validations:
required: true
- type: textarea
attributes:
label: "Please describe the solution you suggest"
- type: textarea
attributes:
label: "Additional Information"
description: "If you have any additional information to provide, you can include it here (screenshots, videos, etc., are welcome)."
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
#### What this PR does / why we need it?
#### Summary of your change
#### Please indicate you've done the following:
- [ ] Made sure tests are passing and test coverage is added if needed.
- [ ] Made sure commit message follow the rule of [Conventional Commits specification](https://www.conventionalcommits.org/).
- [ ] Considered the docs impact and opened a new docs issue or PR with docs changes if needed.
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
timezone: "Asia/Shanghai"
day: "friday"
target-branch: "v3"
================================================
FILE: .github/workflows/build-and-push-python-pg.yml
================================================
name: build-and-push-python-pg
on:
workflow_dispatch:
inputs:
architecture:
description: 'Architecture'
required: true
default: 'linux/amd64'
type: choice
options:
- linux/amd64
- linux/arm64
- linux/amd64,linux/arm64
jobs:
build-and-push-python-pg-to-ghcr:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- name: Prepare
id: prepare
run: |
DOCKER_IMAGE=ghcr.io/1panel-dev/maxkb-base
DOCKER_PLATFORMS=${{ github.event.inputs.architecture }}
TAG_NAME=python3.11-pg17.7-20260212
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}"
echo ::set-output name=docker_image::${DOCKER_IMAGE}
echo ::set-output name=version::${TAG_NAME}
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} --no-cache \
--build-arg VERSION=${TAG_NAME} \
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
--build-arg VCS_REF=${GITHUB_SHA::8} \
${DOCKER_IMAGE_TAGS} .
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
cache-image: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_TOKEN }}
- name: Docker Buildx (build-and-push)
run: |
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile-base
================================================
FILE: .github/workflows/build-and-push-vector-model.yml
================================================
name: build-and-push-vector-model
on:
workflow_dispatch:
inputs:
dockerImageTag:
description: 'Docker Image Tag'
default: 'v2.0.3'
required: true
architecture:
description: 'Architecture'
required: true
default: 'linux/amd64'
type: choice
options:
- linux/amd64
- linux/arm64
- linux/amd64,linux/arm64
jobs:
build-and-push-vector-model-to-ghcr:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- name: Prepare
id: prepare
run: |
DOCKER_IMAGE=ghcr.io/1panel-dev/maxkb-vector-model
DOCKER_PLATFORMS=${{ github.event.inputs.architecture }}
TAG_NAME=${{ github.event.inputs.dockerImageTag }}
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:latest"
echo ::set-output name=docker_image::${DOCKER_IMAGE}
echo ::set-output name=version::${TAG_NAME}
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} --no-cache \
--build-arg VERSION=${TAG_NAME} \
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
--build-arg VCS_REF=${GITHUB_SHA::8} \
${DOCKER_IMAGE_TAGS} .
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
cache-image: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_TOKEN }}
- name: Docker Buildx (build-and-push)
run: |
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile-vector-model
================================================
FILE: .github/workflows/build-and-push.yml
================================================
name: build-and-push
run-name: 构建镜像并推送仓库 ${{ github.event.inputs.dockerImageTag }} (${{ github.event.inputs.registry }}) (${{ github.event.inputs.architecture }})
on:
workflow_dispatch:
inputs:
dockerImageTag:
description: 'Image Tag'
default: 'v2.6.0-dev'
required: true
dockerImageTagWithLatest:
description: '是否发布latest tag(正式发版时选择,测试版本切勿选择)'
default: false
required: true
type: boolean
architecture:
description: 'Architecture'
required: true
default: 'linux/amd64'
type: choice
options:
- linux/amd64
- linux/arm64
- linux/amd64,linux/arm64
registry:
description: 'Push To Registry'
required: true
default: 'fit2cloud-registry'
type: choice
options:
- fit2cloud-registry
- dockerhub
- dockerhub, fit2cloud-registry
jobs:
build-and-push-to-fit2cloud-registry:
if: ${{ contains(github.event.inputs.registry, 'fit2cloud') }}
runs-on: ubuntu-latest
steps:
- name: Clear Work Dir
run: |
ls -la
rm -rf -- ./* ./.??*
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- name: Prepare
id: prepare
run: |
DOCKER_IMAGE=${{ secrets.FIT2CLOUD_REGISTRY_HOST }}/maxkb/maxkb
DOCKER_PLATFORMS=${{ github.event.inputs.architecture }}
TAG_NAME=${{ github.event.inputs.dockerImageTag }}
TAG_NAME_WITH_LATEST=${{ github.event.inputs.dockerImageTagWithLatest }}
if [[ ${TAG_NAME_WITH_LATEST} == 'true' ]]; then
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:${TAG_NAME%%.*} --tag ${DOCKER_IMAGE}:latest"
else
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}"
fi
echo "buildx_args=--platform ${DOCKER_PLATFORMS} --memory-swap -1 \
--build-arg DOCKER_IMAGE_TAG=${{ github.event.inputs.dockerImageTag }} --build-arg BUILD_AT=$(TZ=Asia/Shanghai date +'%Y-%m-%dT%H:%M') --build-arg GITHUB_COMMIT=`git rev-parse --short HEAD` --no-cache \
${DOCKER_IMAGE_TAGS} ." >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
cache-image: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_TOKEN }}
- name: Login to FIT2CLOUD Registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.FIT2CLOUD_REGISTRY_HOST }}
username: ${{ secrets.FIT2CLOUD_REGISTRY_USERNAME }}
password: ${{ secrets.FIT2CLOUD_REGISTRY_PASSWORD }}
- name: Build Web
run: |
docker buildx build --no-cache --target web-build --output type=local,dest=./web-build-output . -f installer/Dockerfile
rm -rf ./ui
cp -r ./web-build-output/ui ./
rm -rf ./web-build-output
- name: Docker Buildx (build-and-push)
run: |
sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -m
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile
build-and-push-to-dockerhub:
if: ${{ contains(github.event.inputs.registry, 'dockerhub') }}
runs-on: ubuntu-latest
steps:
- name: Clear Work Dir
run: |
ls -la
rm -rf -- ./* ./.??*
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- name: Prepare
id: prepare
run: |
DOCKER_IMAGE=1panel/maxkb
DOCKER_PLATFORMS=${{ github.event.inputs.architecture }}
TAG_NAME=${{ github.event.inputs.dockerImageTag }}
TAG_NAME_WITH_LATEST=${{ github.event.inputs.dockerImageTagWithLatest }}
if [[ ${TAG_NAME_WITH_LATEST} == 'true' ]]; then
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:${TAG_NAME%%.*} --tag ${DOCKER_IMAGE}:latest"
else
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}"
fi
echo "buildx_args=--platform ${DOCKER_PLATFORMS} --memory-swap -1 \
--build-arg DOCKER_IMAGE_TAG=${{ github.event.inputs.dockerImageTag }} --build-arg BUILD_AT=$(TZ=Asia/Shanghai date +'%Y-%m-%dT%H:%M') --build-arg GITHUB_COMMIT=`git rev-parse --short HEAD` --no-cache \
${DOCKER_IMAGE_TAGS} ." >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
cache-image: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Web
run: |
docker buildx build --no-cache --target web-build --output type=local,dest=./web-build-output . -f installer/Dockerfile
rm -rf ./ui
cp -r ./web-build-output/ui ./
rm -rf ./web-build-output
- name: Docker Buildx (build-and-push)
run: |
sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -m
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile
================================================
FILE: .github/workflows/create-pr-from-push.yml
================================================
on:
push:
branches:
- 'pr@**'
- 'repr@**'
name: 针对特定分支名自动创建 PR
jobs:
generic_handler:
name: 自动创建 PR
runs-on: ubuntu-latest
steps:
- name: Create pull request
uses: jumpserver/action-generic-handler@master
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
================================================
FILE: .github/workflows/issue-translator.yml
================================================
name: Issue Translator
on:
issue_comment:
types: [created]
issues:
types: [opened]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: usthe/issues-translate-action@v2.7
with:
IS_MODIFY_TITLE: true
BOT_GITHUB_TOKEN: ${{ secrets.FIT2CLOUDRD_LLM_CODE_REVIEW_TOKEN }}
================================================
FILE: .github/workflows/llm-code-review.yml
================================================
name: LLM Code Review
permissions:
contents: read
pull-requests: write
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
llm-code-review:
runs-on: ubuntu-latest
steps:
- uses: fit2cloud/LLM-CodeReview-Action@main
env:
GITHUB_TOKEN: ${{ secrets.FIT2CLOUDRD_LLM_CODE_REVIEW_TOKEN }}
OPENAI_API_KEY: ${{ secrets.ALIYUN_LLM_API_KEY }}
LANGUAGE: English
OPENAI_API_ENDPOINT: https://dashscope.aliyuncs.com/compatible-mode/v1
MODEL: qwen2.5-coder-3b-instruct
PROMPT: "Please check the following code for any irregularities, potential issues, or optimization suggestions, and provide your answers in English."
top_p: 1
temperature: 1
# max_tokens: 10000
MAX_PATCH_LENGTH: 10000
IGNORE_PATTERNS: "/node_modules,*.md,/dist,/.github"
FILE_PATTERNS: "*.java,*.go,*.py,*.vue,*.ts,*.js,*.css,*.scss,*.html"
================================================
FILE: .github/workflows/sync2gitee.yml
================================================
name: sync2gitee
on: [push]
jobs:
repo-sync:
runs-on: ubuntu-latest
steps:
- name: Mirror the Github organization repos to Gitee.
uses: Yikun/hub-mirror-action@master
with:
src: 'github/1Panel-dev'
dst: 'gitee/fit2cloud-feizhiyun'
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
dst_token: ${{ secrets.GITEE_TOKEN }}
static_list: "MaxKB"
force_update: true
================================================
FILE: .github/workflows/typos_check.yml
================================================
name: Typos Check
on:
workflow_dispatch:
push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
run:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- name: Create config file
run: |
cat <<EOF > typo-check-config.toml
[files]
extend-exclude = [
"**/*_svg",
"**/migrations/**",
"**/loopEdge.ts",
"**/edge.ts",
]
EOF
- name: Check spelling
uses: crate-ci/typos@master
with:
config: ./typo-check-config.toml
================================================
FILE: .gitignore
================================================
# Mac
.DS_Store
*/.DS_Store
# VS Code
.vscode
*.project
*.factorypath
# IntelliJ IDEA
.idea/*
!.idea/icon.png
*.iws
*.iml
*.ipr
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script forms a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
# env/
venv/
# ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
ui/package-lock.json
ui/node_modules
ui/dist
apps/static
models/
apps/xpack
!apps/**/models/
data
.dev
poetry.lock
uv.lock
apps/models_provider/impl/*/icon/
apps/models_provider/impl/tencent_model_provider/credential/stt.py
apps/models_provider/impl/tencent_model_provider/model/stt.py
tmp/
config.yml
.SANDBOX_BANNED_HOSTS
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
support@fit2cloud.com.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing
As a contributor, you should agree that:
- The producer can adjust the open-source agreement to be more strict or relaxed as deemed necessary.
- Your contributed code may be used for commercial purposes, including but not limited to its cloud business operations.
## Create pull request
PR are always welcome, even if they only contain small fixes like typos or a few lines of code. If there will be a significant effort, please document it as an issue and get a discussion going before starting to work on it.
Please submit a PR broken down into small changes bit by bit. A PR consisting of a lot of features and code changes may be hard to review. It is recommended to submit PRs in an incremental fashion.
This [development guideline](https://github.com/1Panel-dev/MaxKB/wiki/3-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA) contains information about repository structure, how to set up development environment, how to run it, and more.
Note: If you split your pull request to small changes, please make sure any of the changes goes to master will not break anything. Otherwise, it can not be merged until this feature complete.
## Report issues
It is a great way to contribute by reporting an issue. Well-written and complete bug reports are always welcome! Please open an issue and follow the template to fill in required information.
Before opening any issue, please look up the existing issues to avoid submitting a duplication.
If you find a match, you can "subscribe" to it to get notified on updates. If you have additional helpful information about the issue, please leave a comment.
When reporting issues, always include:
* Which version you are using.
* Steps to reproduce the issue.
* Snapshots or log files if needed
Because the issues are open to the public, when submitting files, be sure to remove any sensitive information, e.g. user name, password, IP address, and company name. You can
replace those parts with "REDACTED" or other strings like "****".
================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
================================================
FILE: README.md
================================================
<p align="center"><img src= "https://github.com/1Panel-dev/maxkb/assets/52996290/c0694996-0eed-40d8-b369-322bf2a380bf" alt="MaxKB" width="300" /></p>
<h3 align="center">Open-source platform for building enterprise-grade agents</h3>
<h3 align="center">强大易用的企业级智能体平台</h3>
<p align="center"><a href="https://trendshift.io/repositories/9113" target="_blank"><img src="https://trendshift.io/api/badge/repositories/9113" alt="1Panel-dev%2FMaxKB | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a></p>
<p align="center">
<a href="https://www.gnu.org/licenses/gpl-3.0.html#license-text"><img src="https://img.shields.io/github/license/1Panel-dev/maxkb?color=%231890FF" alt="License: GPL v3"></a>
<a href="https://github.com/1Panel-dev/maxkb/releases/latest"><img src="https://img.shields.io/github/v/release/1Panel-dev/maxkb" alt="Latest release"></a>
<a href="https://github.com/1Panel-dev/maxkb"><img src="https://img.shields.io/github/stars/1Panel-dev/maxkb?color=%231890FF&style=flat-square" alt="Stars"></a>
<a href="https://hub.docker.com/r/1panel/maxkb"><img src="https://img.shields.io/docker/pulls/1panel/maxkb?label=downloads" alt="Download"></a><br/>
[<a href="/README_CN.md">中文(简体)</a>] | [<a href="/README.md">English</a>]
</p>
<hr/>
MaxKB = Max Knowledge Brain, it is an open-source platform for building enterprise-grade agents. MaxKB integrates Retrieval-Augmented Generation (RAG) pipelines, supports robust workflows, and provides advanced MCP tool-use capabilities. MaxKB is widely applied in scenarios such as intelligent customer service, corporate internal knowledge bases, academic research, and education.
- **RAG Pipeline**: Supports direct uploading of documents / automatic crawling of online documents, with features for automatic text splitting, vectorization. This effectively reduces hallucinations in large models, providing a superior smart Q&A interaction experience.
- **Agentic Workflow**: Equipped with a powerful workflow engine, function library and MCP tool-use, enabling the orchestration of AI processes to meet the needs of complex business scenarios.
- **Seamless Integration**: Facilitates zero-coding rapid integration into third-party business systems, quickly equipping existing systems with intelligent Q&A capabilities to enhance user satisfaction.
- **Model-Agnostic**: Supports various large models, including private models (such as DeepSeek, Llama, Qwen, etc.) and public models (like OpenAI, Claude, Gemini, etc.).
- **Multi Modal**: Native support for input and output text, image, audio and video.
## Quick start
Execute the script below to start a MaxKB container using Docker:
```bash
docker run -d --name=maxkb --restart=always -p 8080:8080 -v ~/.maxkb:/opt/maxkb 1panel/maxkb
```
Access MaxKB web interface at `http://your_server_ip:8080` with default admin credentials:
- username: admin
- password: MaxKB@123..
中国用户如遇到 Docker 镜像 Pull 失败问题,请参照该 [离线安装文档](https://maxkb.cn/docs/v2/installation/offline_installtion/) 进行安装。
## Screenshots
<table style="border-collapse: collapse; border: 1px solid black;">
<tr>
<td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/user-attachments/assets/eb285512-a66a-4752-8941-c65ed1592238" alt="MaxKB Demo1" /></td>
<td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/user-attachments/assets/f732f1f5-472c-4fd2-93c1-a277eda83d04" alt="MaxKB Demo2" /></td>
</tr>
<tr>
<td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/user-attachments/assets/c927474a-9a23-4830-822f-5db26025c9b2" alt="MaxKB Demo3" /></td>
<td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/user-attachments/assets/e6268996-a46d-4e58-9f30-31139df78ad2" alt="MaxKB Demo4" /></td>
</tr>
</table>
## Technical stack
- Frontend:[Vue.js](https://vuejs.org/)
- Backend:[Python / Django](https://www.djangoproject.com/)
- LLM Framework:[LangChain](https://www.langchain.com/)
- Database:[PostgreSQL + pgvector](https://www.postgresql.org/)
## Star History
[](https://star-history.com/#1Panel-dev/MaxKB&Date)
## License
Licensed under The GNU General Public License version 3 (GPLv3) (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
<https://www.gnu.org/licenses/gpl-3.0.html>
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
================================================
FILE: README_CN.md
================================================
<p align="center"><img src= "https://github.com/1Panel-dev/maxkb/assets/52996290/c0694996-0eed-40d8-b369-322bf2a380bf" alt="MaxKB" width="300" /></p>
<h3 align="center">强大易用的企业级智能体平台</h3>
<p align="center">
<a href="https://trendshift.io/repositories/9113" target="_blank"><img src="https://trendshift.io/api/badge/repositories/9113" alt="1Panel-dev%2FMaxKB | Trendshift" style="width: 250px; height: auto;" /></a>
</p>
<p align="center">
<a href="README_EN.md"><img src="https://img.shields.io/badge/English_README-blue" alt="English README"></a>
<a href="https://www.gnu.org/licenses/gpl-3.0.html#license-text"><img src="https://img.shields.io/github/license/1Panel-dev/maxkb?color=%231890FF" alt="License: GPL v3"></a>
<a href="https://github.com/1Panel-dev/maxkb/releases/latest"><img src="https://img.shields.io/github/v/release/1Panel-dev/maxkb" alt="Latest release"></a>
<a href="https://github.com/1Panel-dev/maxkb"><img src="https://img.shields.io/github/stars/1Panel-dev/maxkb?style=flat-square" alt="Stars"></a>
<a href="https://hub.docker.com/r/1panel/maxkb"><img src="https://img.shields.io/docker/pulls/1panel/maxkb?label=downloads" alt="Download"></a>
<a href="https://gitee.com/fit2cloud-feizhiyun/MaxKB"><img src="https://gitee.com/fit2cloud-feizhiyun/MaxKB/badge/star.svg?theme=gvp" alt="Gitee Stars"></a>
<a href="https://gitcode.com/feizhiyun/MaxKB"><img src="https://gitcode.com/feizhiyun/MaxKB/star/badge.svg" alt="GitCode Stars"></a>
</p>
<hr/>
MaxKB = Max Knowledge Brain,是一个强大易用的企业级智能体平台,致力于解决企业 AI 落地面临的技术门槛高、部署成本高、迭代周期长等问题,助力企业在人工智能时代赢得先机。秉承“开箱即用,伴随成长”的设计理念,MaxKB 支持企业快速接入主流大模型,高效构建专属知识库,并提供从基础问答(RAG)、复杂流程自动化(工作流)到智能体(Agent)的渐进式升级路径,全面赋能智能客服、智能办公助手等多种应用场景。
- **RAG 检索增强生成**:高效搭建本地 AI 知识库,支持直接上传文档 / 自动爬取在线文档,支持文本自动拆分、向量化,有效减少大模型幻觉,提升问答效果;
- **灵活编排**:内置强大的工作流引擎、函数库和 MCP 工具调用能力,支持编排 AI 工作过程,满足复杂业务场景下的需求;
- **无缝嵌入**:支持零编码快速嵌入到第三方业务系统,让已有系统快速拥有智能问答能力,提高用户满意度;
- **模型中立**:支持对接各种大模型,包括本地私有大模型(DeepSeek R1 / Qwen 3 等)、国内公共大模型(通义千问 / 腾讯混元 / 字节豆包 / 百度千帆 / 智谱 AI / Kimi 等)和国外公共大模型(OpenAI / Claude / Gemini 等)。
MaxKB 三分钟视频介绍:https://www.bilibili.com/video/BV18JypYeEkj/
## 快速开始
```
# Linux 机器
docker run -d --name=maxkb --restart=always -p 8080:8080 -v ~/.maxkb:/opt/maxkb registry.fit2cloud.com/maxkb/maxkb
# Windows 机器
docker run -d --name=maxkb --restart=always -p 8080:8080 -v C:/maxkb:/opt/maxkb registry.fit2cloud.com/maxkb/maxkb
# 用户名: admin
# 密码: MaxKB@123..
```
- 你也可以通过 [1Panel 应用商店](https://apps.fit2cloud.com/1panel) 快速部署 MaxKB;
- 如果是内网环境,推荐使用 [离线安装包](https://community.fit2cloud.com/#/products/maxkb/downloads) 进行安装部署;
- MaxKB 不同产品产品版本的对比请参见:[MaxKB 产品版本对比](https://maxkb.cn/price);
- 如果您需要向团队介绍 MaxKB,可以使用这个 [官方 PPT 材料](https://fit2cloud.com/maxkb/download/introduce-maxkb_2026.pdf)。
如你有更多问题,可以查看使用手册,或者通过论坛与我们交流。
- [案例展示](USE-CASES.md)
- [使用手册](https://maxkb.cn/docs/)
- [论坛求助](https://bbs.fit2cloud.com/c/mk/11)
- 技术交流群
<image height="150px" width="150px" src="https://github.com/1Panel-dev/MaxKB/assets/52996290/a083d214-02be-4178-a1db-4f428124153a"/>
## UI 展示
<table style="border-collapse: collapse; border: 1px solid black;">
<tr>
<td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/user-attachments/assets/eb285512-a66a-4752-8941-c65ed1592238" alt="MaxKB Demo1" /></td>
<td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/user-attachments/assets/f732f1f5-472c-4fd2-93c1-a277eda83d04" alt="MaxKB Demo2" /></td>
</tr>
<tr>
<td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/user-attachments/assets/c927474a-9a23-4830-822f-5db26025c9b2" alt="MaxKB Demo3" /></td>
<td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/user-attachments/assets/e6268996-a46d-4e58-9f30-31139df78ad2" alt="MaxKB Demo4" /></td>
</tr>
</table>
## 技术栈
- 前端:[Vue.js](https://cn.vuejs.org/)
- 后端:[Python / Django](https://www.djangoproject.com/)
- LangChain:[LangChain](https://www.langchain.com/)
- 向量数据库:[PostgreSQL / pgvector](https://www.postgresql.org/)
## 飞致云的其他明星项目
- [Cordys CRM](https://github.com/1Panel-dev/CordysCRM) - 新一代的开源 AI CRM 系统
- [1Panel](https://github.com/1panel-dev/1panel/) - 现代化、开源的 Linux 服务器运维管理面板
- [JumpServer](https://github.com/jumpserver/jumpserver/) - 广受欢迎的开源堡垒机
- [DataEase](https://github.com/dataease/dataease/) - 人人可用的开源数据可视化分析工具
- [MeterSphere](https://github.com/metersphere/metersphere/) - 新一代的开源持续测试工具
- [Halo](https://github.com/halo-dev/halo/) - 强大易用的开源建站工具
## License
Copyright (c) 2014-2026 飞致云 FIT2CLOUD, All rights reserved.
Licensed under The GNU General Public License version 3 (GPLv3) (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
<https://www.gnu.org/licenses/gpl-3.0.html>
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
================================================
FILE: SECURITY.md
================================================
# 安全说明
如果您发现安全问题,请直接联系我们:
- support@fit2cloud.com
- 400-052-0755
感谢您的支持!
# Security Policy
All security bugs should be reported to the contact as below:
- support@fit2cloud.com
- 400-052-0755
Thanks for your support!
================================================
FILE: USE-CASES.md
================================================
<h3 align="center">MaxKB 应用案例,持续更新中...</h3>
------------------------------
- [MaxKB 应用案例:中国农业大学-小鹉哥](https://mp.weixin.qq.com/s/4g_gySMBQZCJ9OZ-yBkmvw)
- [MaxKB 应用案例:东北财经大学-小银杏](https://mp.weixin.qq.com/s/3BoxkY7EMomMmmvFYxvDIA)
- [MaxKB 应用案例:中铁水务](https://mp.weixin.qq.com/s/voNAddbK2CJOrJJs1ewZ8g)
- [MaxKB 应用案例:解放军总医院](https://mp.weixin.qq.com/s/ETrZC-vrA4Aap0eF-15EeQ)
- [MaxKB 应用案例:无锡市数据局](https://mp.weixin.qq.com/s/enfUFLevvL_La74PQ0kIXw)
- [MaxKB 应用案例:中核西仪研究院-西仪睿答](https://mp.weixin.qq.com/s/CbKr4mev8qahKLAtV6Dxdg)
- [MaxKB 应用案例:南京中医药大学](https://mp.weixin.qq.com/s/WUmAKYbZjp3272HIecpRFA)
- [MaxKB 应用案例:西北电力设计院-AI数字助理Memex](https://mp.weixin.qq.com/s/ezHFdB7C7AVL9MTtDwYGSA)
- [MaxKB 应用案例:西安国际医院中心医院-国医小助](https://mp.weixin.qq.com/s/DSOUvwrQrxbqQxKBilTCFQ)
- [MaxKB 应用案例:华莱士智能AI客服助手上线啦!](https://www.bilibili.com/video/BV1hQtVeXEBL)
- [MaxKB 应用案例:把医疗行业知识转化为知识库问答助手!](https://www.bilibili.com/video/BV157wme9EgB)
- [MaxKB 应用案例:会展AI智能客服体验](https://www.bilibili.com/video/BV1J7BqY6EKA)
- [MaxKB 应用案例:孩子要上幼儿园了,AI 智能助手择校好帮手](https://www.bilibili.com/video/BV1wKrhYvEer)
- [MaxKB 应用案例:产品使用指南AI助手,新手小白也能轻松搞定!](https://www.bilibili.com/video/BV1Yz6gYtEqX)
- [MaxKB 应用案例:生物医药AI客服智能体验!](https://www.bilibili.com/video/BV13JzvYsE3e)
- [MaxKB 应用案例:高校行政管理AI小助手](https://www.bilibili.com/video/BV1yvBMYvEdy)
- [MaxKB 应用案例:岳阳市人民医院-OA小助手](https://mp.weixin.qq.com/s/O94Qo3UH-MiUtDdWCVg8sQ)
- [MaxKB 应用案例:常熟市第一人民医院](https://mp.weixin.qq.com/s/s5XXGTR3_MUo41NbJ8WzZQ)
- [MaxKB 应用案例:华北水利水电大学](https://mp.weixin.qq.com/s/PoOFAcMCr9qJdvSj8c08qg)
- [MaxKB 应用案例:唐山海事局-“小海”AI语音助手](https://news.qq.com/rain/a/20250223A030BE00)
- [MaxKB 应用案例:湖南汉寿政务](http://hsds.hsdj.gov.cn:19999/ui/chat/a2c976736739aadc)
- [MaxKB 应用案例:广州市妇女儿童医疗中心-AI医疗数据分类分级小助手](https://mp.weixin.qq.com/s/YHUMkUOAaUomBV8bswpK3g)
- [MaxKB 应用案例:苏州热工研究院有限公司-维修大纲评估质量自查AI小助手](https://mp.weixin.qq.com/s/Ts5FQdnv7Tu9Jp7bvofCVA)
- [MaxKB 应用案例:国核自仪系统工程有限公司-NuCON AI帮](https://mp.weixin.qq.com/s/HNPc7u5xVfGLJr8IQz3vjQ)
- [MaxKB 应用案例:深圳通开启Deep Seek智能应用新篇章](https://mp.weixin.qq.com/s/SILN0GSescH9LyeQqYP0VQ)
- [MaxKB 应用案例:南通智慧出行领跑长三角!首款接入DeepSeek的"畅行南通"APP上线AI新场景](https://mp.weixin.qq.com/s/WEC9UQ6msY0VS8LhTZh-Ew)
- [MaxKB 应用案例:中船动力人工智能"智慧动力云助手"及首批数字员工正式上线](https://mp.weixin.qq.com/s/OGcEkjh9DzGO1Tkc9nr7qg)
- [MaxKB 应用案例:AI+矿山:DeepSeek助力绿色智慧矿山智慧“升级”](https://mp.weixin.qq.com/s/SZstxTvVoLZg0ECbZbfpIA)
- [MaxKB 应用案例:DeepSeek落地弘盛铜业:国产大模型点亮"黑灯工厂"新引擎](https://mp.weixin.qq.com/s/Eczdx574MS5RMF7WfHN7_A)
- [MaxKB 应用案例:拥抱智能时代!中国五矿以 “AI+”赋能企业发展](https://mp.weixin.qq.com/s/D5vBtlX2E81pWE3_2OgWSw)
- [MaxKB 应用案例:DeepSeek赋能中冶武勘AI智能体](https://mp.weixin.qq.com/s/8m0vxGcWXNdZazziQrLyxg)
- [MaxKB 应用案例:重磅!陕西广电网络“秦岭云”平台实现DeepSeek本地化部署](https://mp.weixin.qq.com/s/ZKmEU_wWShK1YDomKJHQeA)
- [MaxKB 应用案例:粤海集团完成DeepSeek私有化部署,助力集团智能化管理](https://mp.weixin.qq.com/s/2JbVp0-kr9Hfp-0whH4cvg)
- [MaxKB 应用案例:建筑材料工业信息中心完成DeepSeek本地化部署,推动行业数智化转型新发展](https://mp.weixin.qq.com/s/HThGSnND3qDF8ySEqiM4jw)
- [MaxKB 应用案例:一起DeepSeek!福建设计以AI大模型开启新篇章](https://mp.weixin.qq.com/s/m67e-H7iQBg3d24NM82UjA)
================================================
FILE: apps/__init__.py
================================================
================================================
FILE: apps/application/__init__.py
================================================
================================================
FILE: apps/application/admin.py
================================================
from django.contrib import admin
# Register your models here.
================================================
FILE: apps/application/api/application_access_token.py
================================================
# coding=utf-8
"""
@project: MaxKB
@Author:虎虎
@file: application_access_token.py
@date:2025/6/9 17:46
@desc:
"""
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter
from application.serializers.application_access_token import AccessTokenEditSerializer
from common.mixins.api_mixin import APIMixin
class ApplicationAccessTokenAPI(APIMixin):
@staticmethod
def get_parameters():
return [OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
), OpenApiParameter(
name="application_id",
description="应用id",
type=OpenApiTypes.STR,
location='path',
required=True,
)]
@staticmethod
def get_request():
return AccessTokenEditSerializer
================================================
FILE: apps/application/api/application_api.py
================================================
# coding=utf-8
"""
@project: MaxKB
@Author:虎虎
@file: application.py
@date:2025/5/26 16:59
@desc:
"""
from django.utils.translation import gettext_lazy as _
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter
from rest_framework import serializers
from application.serializers.application import ApplicationCreateSerializer, ApplicationListResponse, \
ApplicationImportRequest, ApplicationEditSerializer, TextToSpeechRequest, SpeechToTextRequest, PlayDemoTextRequest
from common.mixins.api_mixin import APIMixin
from common.result import ResultSerializer, ResultPageSerializer, DefaultResultSerializer
class ApplicationCreateRequest(ApplicationCreateSerializer.SimplateRequest):
work_flow = serializers.DictField(required=True, label=_("Workflow Objects"))
class ApplicationCreateResponse(ResultSerializer):
def get_data(self):
return ApplicationCreateSerializer.ApplicationResponse()
class ApplicationListResult(ResultSerializer):
def get_data(self):
return ApplicationListResponse(many=True)
class ApplicationPageResult(ResultPageSerializer):
def get_data(self):
return ApplicationListResponse(many=True)
class ApplicationQueryAPI(APIMixin):
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="current_page",
description=_("Current page"),
type=OpenApiTypes.INT,
location='path',
required=True,
),
OpenApiParameter(
name="page_size",
description=_("Page size"),
type=OpenApiTypes.INT,
location='path',
required=True,
),
OpenApiParameter(
name="folder_id",
description=_("folder id"),
type=OpenApiTypes.STR,
location='query',
required=False,
),
OpenApiParameter(
name="name",
description=_("Application Name"),
type=OpenApiTypes.STR,
location='query',
required=False,
),
OpenApiParameter(
name="desc",
description=_("Application Description"),
type=OpenApiTypes.STR,
location='query',
required=False,
),
OpenApiParameter(
name="user_id",
description=_("User ID"),
type=OpenApiTypes.STR,
location='query',
required=False,
),
OpenApiParameter(
name="publish_status",
description=_("Publish status") + '(published|unpublished)',
type=OpenApiTypes.STR,
location='query',
required=False,
)
]
@staticmethod
def get_response():
return ApplicationListResult
@staticmethod
def get_page_response():
return ApplicationPageResult
class ApplicationCreateAPI(APIMixin):
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
)
]
@staticmethod
def get_request():
return ApplicationCreateRequest
@staticmethod
def get_response():
return ApplicationCreateResponse
class ApplicationImportAPI(APIMixin):
@staticmethod
def get_parameters():
ApplicationCreateAPI.get_parameters()
@staticmethod
def get_request():
return ApplicationImportRequest
class ApplicationOperateAPI(APIMixin):
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="application_id",
description="应用id",
type=OpenApiTypes.STR,
location='path',
required=True,
)
]
class ApplicationExportAPI(APIMixin):
@staticmethod
def get_parameters():
return ApplicationOperateAPI.get_parameters()
@staticmethod
def get_response():
return DefaultResultSerializer
class ApplicationEditAPI(APIMixin):
@staticmethod
def get_request():
return ApplicationEditSerializer
class TextToSpeechAPI(APIMixin):
@staticmethod
def get_parameters():
return ApplicationOperateAPI.get_parameters()
@staticmethod
def get_request():
return TextToSpeechRequest
@staticmethod
def get_response():
return DefaultResultSerializer
class SpeechToTextAPI(APIMixin):
@staticmethod
def get_parameters():
return ApplicationOperateAPI.get_parameters()
@staticmethod
def get_request():
return SpeechToTextRequest
@staticmethod
def get_response():
return DefaultResultSerializer
class PlayDemoTextAPI(APIMixin):
@staticmethod
def get_parameters():
return ApplicationOperateAPI.get_parameters()
@staticmethod
def get_request():
return PlayDemoTextRequest
@staticmethod
def get_response():
return DefaultResultSerializer
================================================
FILE: apps/application/api/application_api_key.py
================================================
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter
from application.serializers.application_api_key import EditApplicationKeySerializer, ApplicationKeySerializerModel
from common.mixins.api_mixin import APIMixin
from common.result import ResultSerializer
class ApplicationKeyListResult(ResultSerializer):
def get_data(self):
return ApplicationKeySerializerModel(many=True)
class ApplicationKeyResult(ResultSerializer):
def get_data(self):
return ApplicationKeySerializerModel()
class ApplicationKeyAPI(APIMixin):
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="application_id",
description="application ID",
type=OpenApiTypes.STR,
location='path',
required=True,
)
]
@staticmethod
def get_response():
return ApplicationKeyResult
class List(APIMixin):
@staticmethod
def get_response():
return ApplicationKeyListResult
class Operate(APIMixin):
@staticmethod
def get_parameters():
return [*ApplicationKeyAPI.get_parameters(), OpenApiParameter(
name="api_key_id",
description="ApiKeyId",
type=OpenApiTypes.STR,
location='path',
required=True,
)]
@staticmethod
def get_request():
return EditApplicationKeySerializer
================================================
FILE: apps/application/api/application_chat.py
================================================
# coding=utf-8
"""
@project: MaxKB
@Author:虎虎
@file: application_chat.py
@date:2025/6/10 13:54
@desc:
"""
from django.utils.translation import gettext_lazy as _
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter
from application.serializers.application_chat import ApplicationChatQuerySerializers, \
ApplicationChatResponseSerializers, ApplicationChatRecordExportRequest
from common.mixins.api_mixin import APIMixin
from common.result import ResultSerializer, ResultPageSerializer
class ApplicationChatListResponseSerializers(ResultSerializer):
def get_data(self):
return ApplicationChatResponseSerializers(many=True)
class ApplicationChatPageResponseSerializers(ResultPageSerializer):
def get_data(self):
return ApplicationChatResponseSerializers(many=True)
class ApplicationChatQueryAPI(APIMixin):
@staticmethod
def get_request():
return ApplicationChatQuerySerializers
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="application_id",
description="application ID",
type=OpenApiTypes.STR,
location='path',
required=True,
), OpenApiParameter(
name="start_time",
description="start Time",
type=OpenApiTypes.STR,
required=True,
),
OpenApiParameter(
name="end_time",
description="end Time",
type=OpenApiTypes.STR,
required=True,
),
OpenApiParameter(
name="abstract",
description="summary",
type=OpenApiTypes.STR,
required=False,
),
OpenApiParameter(
name="username",
description="username",
type=OpenApiTypes.STR,
required=False,
),
OpenApiParameter(
name="min_star",
description=_("Minimum number of likes"),
type=OpenApiTypes.INT,
required=False,
),
OpenApiParameter(
name="min_trample",
description=_("Minimum number of clicks"),
type=OpenApiTypes.INT,
required=False,
),
OpenApiParameter(
name="comparer",
description=_("Comparator"),
type=OpenApiTypes.STR,
required=False,
),
]
@staticmethod
def get_response():
return ApplicationChatListResponseSerializers
class ApplicationChatQueryPageAPI(APIMixin):
@staticmethod
def get_request():
return ApplicationChatQueryAPI.get_request()
@staticmethod
def get_parameters():
return [
*ApplicationChatQueryAPI.get_parameters(),
OpenApiParameter(
name="current_page",
description=_("Current page"),
type=OpenApiTypes.INT,
location='path',
required=True,
),
OpenApiParameter(
name="page_size",
description=_("Page size"),
type=OpenApiTypes.INT,
location='path',
required=True,
),
]
@staticmethod
def get_response():
return ApplicationChatPageResponseSerializers
class ApplicationChatExportAPI(APIMixin):
@staticmethod
def get_request():
return ApplicationChatRecordExportRequest
@staticmethod
def get_parameters():
return ApplicationChatQueryAPI.get_parameters()
@staticmethod
def get_response():
return None
================================================
FILE: apps/application/api/application_chat_link.py
================================================
"""
@project: MaxKB
@Author: niu
@file: application_chat_link.py
@date: 2026/2/9 16:59
@desc:
"""
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter
from django.utils.translation import gettext_lazy as _
from application.serializers.application_chat_link import ChatRecordShareLinkRequestSerializer
from common.mixins.api_mixin import APIMixin
from common.result import DefaultResultSerializer
class ChatRecordLinkAPI(APIMixin):
@staticmethod
def get_response():
return DefaultResultSerializer
@staticmethod
def get_request():
return ChatRecordShareLinkRequestSerializer
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="application_id",
description="Application ID",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="chat_id",
description=_("Chat ID"),
type=OpenApiTypes.STR,
location='path',
required=True,
),
]
class ChatRecordDetailShareAPI(APIMixin):
@staticmethod
def get_response():
return DefaultResultSerializer
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="link",
description="链接",
type=OpenApiTypes.STR,
location='path',
required=True,
)
]
================================================
FILE: apps/application/api/application_chat_record.py
================================================
# coding=utf-8
"""
@project: MaxKB
@Author:虎虎
@file: application_chat_record.py
@date:2025/6/10 15:19
@desc:
"""
from django.utils.translation import gettext_lazy as _
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter
from application.serializers.application_chat_record import ApplicationChatRecordAddKnowledgeSerializer, \
ApplicationChatRecordImproveInstanceSerializer
from common.mixins.api_mixin import APIMixin
class ApplicationChatRecordQueryAPI(APIMixin):
@staticmethod
def get_response():
pass
@staticmethod
def get_request():
pass
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="application_id",
description="Application ID",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="chat_id",
description=_("Chat ID"),
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="order_asc",
description=_("Is it in order"),
type=OpenApiTypes.BOOL,
required=True,
)
]
class ApplicationChatRecordPageQueryAPI(APIMixin):
@staticmethod
def get_response():
pass
@staticmethod
def get_request():
pass
@staticmethod
def get_parameters():
return [*ApplicationChatRecordQueryAPI.get_parameters(),
OpenApiParameter(
name="current_page",
description=_("Current page"),
type=OpenApiTypes.INT,
location='path',
required=True,
),
OpenApiParameter(
name="page_size",
description=_("Page size"),
type=OpenApiTypes.INT,
location='path',
required=True,
)]
class ApplicationChatRecordImproveParagraphAPI(APIMixin):
@staticmethod
def get_response():
pass
@staticmethod
def get_request():
return ApplicationChatRecordImproveInstanceSerializer
@staticmethod
def get_parameters():
return [OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="application_id",
description="Application ID",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="chat_id",
description=_("Chat ID"),
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="chat_record_id",
description=_("Chat Record ID"),
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="knowledge_id",
description=_("Knowledge ID"),
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="document_id",
description=_("Document ID"),
type=OpenApiTypes.STR,
location='path',
required=True,
)
]
class Operate(APIMixin):
@staticmethod
def get_parameters():
return [*ApplicationChatRecordImproveParagraphAPI.get_parameters(), OpenApiParameter(
name="paragraph_id",
description=_("Paragraph ID"),
type=OpenApiTypes.STR,
location='path',
required=True,
)]
class ApplicationChatRecordAddKnowledgeAPI(APIMixin):
@staticmethod
def get_request():
return ApplicationChatRecordAddKnowledgeSerializer
@staticmethod
def get_response():
return None
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="application_id",
description="Application ID",
type=OpenApiTypes.STR,
location='path',
required=True,
)]
================================================
FILE: apps/application/api/application_stats.py
================================================
# coding=utf-8
"""
@project: MaxKB
@Author:虎虎
@file: application_stats.py
@date:2025/6/9 20:45
@desc:
"""
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter
from application.serializers.application_stats import ApplicationStatsSerializer
from common.mixins.api_mixin import APIMixin
from common.result import ResultSerializer
class ApplicationStatsResult(ResultSerializer):
def get_data(self):
return ApplicationStatsSerializer(many=True)
class ApplicationStatsAPI(APIMixin):
@staticmethod
def get_parameters():
return [OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="application_id",
description="application ID",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="start_time",
description="start Time",
type=OpenApiTypes.STR,
required=True,
),
OpenApiParameter(
name="end_time",
description="end Time",
type=OpenApiTypes.STR,
required=True,
),
]
@staticmethod
def get_response():
return ApplicationStatsResult
================================================
FILE: apps/application/api/application_version.py
================================================
# coding=utf-8
"""
@project: MaxKB
@Author:虎虎
@file: application_version.py
@date:2025/6/4 17:33
@desc:
"""
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter
from application.serializers.application_version import ApplicationVersionModelSerializer
from common.mixins.api_mixin import APIMixin
from common.result import ResultSerializer, PageDataResponse, ResultPageSerializer
class ApplicationListVersionResult(ResultSerializer):
def get_data(self):
return ApplicationVersionModelSerializer(many=True)
class ApplicationPageVersionResult(ResultPageSerializer):
def get_data(self):
return ApplicationVersionModelSerializer(many=True)
class ApplicationWorkflowVersionResult(ResultSerializer):
def get_data(self):
return ApplicationVersionModelSerializer()
class ApplicationVersionAPI(APIMixin):
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="application_id",
description="application ID",
type=OpenApiTypes.STR,
location='path',
required=True,
)
]
class ApplicationVersionOperateAPI(APIMixin):
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="application_version_id",
description="工作流版本id",
type=OpenApiTypes.STR,
location='path',
required=True,
)
, *ApplicationVersionAPI.get_parameters()
]
@staticmethod
def get_response():
return ApplicationWorkflowVersionResult
class ApplicationVersionListAPI(APIMixin):
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="name",
description="Version Name",
type=OpenApiTypes.STR,
required=False,
)
, *ApplicationVersionAPI.get_parameters()]
@staticmethod
def get_response():
return ApplicationListVersionResult
class ApplicationVersionPageAPI(APIMixin):
@staticmethod
def get_parameters():
return ApplicationVersionListAPI.get_parameters()
@staticmethod
def get_response():
return ApplicationPageVersionResult
================================================
FILE: apps/application/apps.py
================================================
from django.apps import AppConfig
class ApplicationConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'application'
================================================
FILE: apps/application/chat_pipeline/I_base_chat_pipeline.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: I_base_chat_pipeline.py
@date:2024/1/9 17:25
@desc:
"""
import time
from abc import abstractmethod
from typing import Type
import uuid_utils.compat as uuid
from rest_framework import serializers
from knowledge.models import Paragraph
class ParagraphPipelineModel:
def __init__(self, _id: str, document_id: str, knowledge_id: str, content: str, title: str, status: str,
is_active: bool, comprehensive_score: float, similarity: float, knowledge_name: str,
document_name: str,
hit_handling_method: str, directly_return_similarity: float, knowledge_type, meta: dict = None):
self.id = _id
self.document_id = document_id
self.knowledge_id = knowledge_id
self.content = content
self.title = title
self.status = status,
self.is_active = is_active
self.comprehensive_score = comprehensive_score
self.similarity = similarity
self.knowledge_name = knowledge_name
self.document_name = document_name
self.hit_handling_method = hit_handling_method
self.directly_return_similarity = directly_return_similarity
self.meta = meta
self.knowledge_type = knowledge_type
def to_dict(self):
return {
'id': self.id,
'document_id': self.document_id,
'knowledge_id': self.knowledge_id,
'content': self.content,
'title': self.title,
'status': self.status,
'is_active': self.is_active,
'comprehensive_score': self.comprehensive_score,
'similarity': self.similarity,
'knowledge_name': self.knowledge_name,
'document_name': self.document_name,
'knowledge_type': self.knowledge_type,
'meta': self.meta,
}
class builder:
def __init__(self):
self.similarity = None
self.paragraph = {}
self.comprehensive_score = None
self.document_name = None
self.knowledge_name = None
self.knowledge_type = None
self.hit_handling_method = None
self.directly_return_similarity = 0.9
self.meta = {}
def add_paragraph(self, paragraph):
if isinstance(paragraph, Paragraph):
self.paragraph = {'id': paragraph.id,
'document_id': paragraph.document_id,
'knowledge_id': paragraph.knowledge_id,
'content': paragraph.content,
'title': paragraph.title,
'status': paragraph.status,
'is_active': paragraph.is_active,
}
else:
self.paragraph = paragraph
return self
def add_knowledge_name(self, knowledge_name):
self.knowledge_name = knowledge_name
return self
def add_knowledge_type(self, knowledge_type):
self.knowledge_type = knowledge_type
return self
def add_document_name(self, document_name):
self.document_name = document_name
return self
def add_hit_handling_method(self, hit_handling_method):
self.hit_handling_method = hit_handling_method
return self
def add_directly_return_similarity(self, directly_return_similarity):
self.directly_return_similarity = directly_return_similarity
return self
def add_comprehensive_score(self, comprehensive_score: float):
self.comprehensive_score = comprehensive_score
return self
def add_similarity(self, similarity: float):
self.similarity = similarity
return self
def add_meta(self, meta: dict):
self.meta = meta
return self
def build(self):
return ParagraphPipelineModel(str(self.paragraph.get('id')), str(self.paragraph.get('document_id')),
str(self.paragraph.get('knowledge_id')),
self.paragraph.get('content'), self.paragraph.get('title'),
self.paragraph.get('status'),
self.paragraph.get('is_active'),
self.comprehensive_score, self.similarity, self.knowledge_name,
self.document_name, self.hit_handling_method, self.directly_return_similarity,
self.knowledge_type,
self.meta)
class IBaseChatPipelineStep:
def __init__(self):
# 当前步骤上下文,用于存储当前步骤信息
self.context = {}
self.status = 200
self.err_message = ''
@abstractmethod
def get_step_serializer(self, manage) -> Type[serializers.Serializer]:
pass
def valid_args(self, manage):
step_serializer_clazz = self.get_step_serializer(manage)
step_serializer = step_serializer_clazz(data=manage.context)
step_serializer.is_valid(raise_exception=True)
self.context['step_args'] = step_serializer.data
def run(self, manage):
"""
:param manage: 步骤管理器
:return: 执行结果
"""
try:
start_time = time.time()
self.context['start_time'] = start_time
# 校验参数,
self.valid_args(manage)
self._run(manage)
self.context['run_time'] = time.time() - start_time
except Exception as e:
self.err_message = str(e)
self.status = 500
chat_record_id = manage.context.get('chat_record_id') or str(uuid.uuid7())
manage.context['message_tokens'] = 0
manage.context['answer_tokens'] = 0
end_time = time.time()
manage.context['run_time'] = end_time - (manage.context.get('start_time') or end_time)
post_response_handler = manage.context.get('post_response_handler')
post_response_handler.handler(manage.context.get('chat_id'), chat_record_id,
manage.context.get('paragraph_list') or [],
manage.context.get('problem_text'),
str(e), manage, self, manage.context.get('padding_problem_text'),
reasoning_content='')
raise e
def _run(self, manage):
pass
def execute(self, **kwargs):
pass
def get_details(self, manage, **kwargs):
"""
运行详情
:return: 步骤详情
"""
return None
================================================
FILE: apps/application/chat_pipeline/__init__.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: __init__.py.py
@date:2024/1/9 17:23
@desc:
"""
================================================
FILE: apps/application/chat_pipeline/pipeline_manage.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: pipeline_manage.py
@date:2024/1/9 17:40
@desc:
"""
import time
from functools import reduce
from typing import List, Type, Dict
from application.chat_pipeline.I_base_chat_pipeline import IBaseChatPipelineStep
from common.handle.base_to_response import BaseToResponse
from common.handle.impl.response.system_to_response import SystemToResponse
class PipelineManage:
def __init__(self, step_list: List[Type[IBaseChatPipelineStep]],
base_to_response: BaseToResponse = SystemToResponse(),
debug=False):
# 步骤执行器
self.step_list = [step() for step in step_list]
self.run_step_list = []
# 上下文
self.context = {'message_tokens': 0, 'answer_tokens': 0}
self.base_to_response = base_to_response
self.debug = debug
def run(self, context: Dict = None):
self.context['start_time'] = time.time()
if context is not None:
for key, value in context.items():
self.context[key] = value
for step in self.step_list:
self.run_step_list.append(step)
step.run(self)
def get_details(self):
return reduce(lambda x, y: {**x, **y}, [{item.get('step_type'): item} for item in
filter(lambda r: r is not None,
[row.get_details(self) for row in self.run_step_list])], {})
def get_base_to_response(self):
return self.base_to_response
class builder:
def __init__(self):
self.step_list: List[Type[IBaseChatPipelineStep]] = []
self.base_to_response = SystemToResponse()
self.debug = False
def append_step(self, step: Type[IBaseChatPipelineStep]):
self.step_list.append(step)
return self
def add_base_to_response(self, base_to_response: BaseToResponse):
self.base_to_response = base_to_response
return self
def add_debug(self, debug):
self.debug = debug
return self
def build(self):
return PipelineManage(step_list=self.step_list, base_to_response=self.base_to_response, debug=self.debug)
================================================
FILE: apps/application/chat_pipeline/step/__init__.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: __init__.py.py
@date:2024/1/9 18:23
@desc:
"""
================================================
FILE: apps/application/chat_pipeline/step/chat_step/__init__.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: __init__.py.py
@date:2024/1/9 18:23
@desc:
"""
================================================
FILE: apps/application/chat_pipeline/step/chat_step/i_chat_step.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: i_chat_step.py
@date:2024/1/9 18:17
@desc: 对话
"""
from abc import abstractmethod
from typing import Type, List
from django.utils.translation import gettext_lazy as _
from langchain.chat_models.base import BaseChatModel
from langchain_core.messages import BaseMessage
from rest_framework import serializers
from application.chat_pipeline.I_base_chat_pipeline import IBaseChatPipelineStep, ParagraphPipelineModel
from application.chat_pipeline.pipeline_manage import PipelineManage
from application.serializers.application import NoReferencesSetting
from common.field.common import InstanceField
class ModelField(serializers.Field):
def to_internal_value(self, data):
if not isinstance(data, BaseChatModel):
self.fail(_('Model type error'), value=data)
return data
def to_representation(self, value):
return value
class MessageField(serializers.Field):
def to_internal_value(self, data):
if not isinstance(data, BaseMessage):
self.fail(_('Message type error'), value=data)
return data
def to_representation(self, value):
return value
class PostResponseHandler:
@abstractmethod
def handler(self, chat_id, chat_record_id, paragraph_list: List[ParagraphPipelineModel], problem_text: str,
answer_text,
manage, step, padding_problem_text: str = None, **kwargs):
pass
class IChatStep(IBaseChatPipelineStep):
class InstanceSerializer(serializers.Serializer):
# 对话列表
message_list = serializers.ListField(required=True, child=MessageField(required=True),
label=_("Conversation list"))
model_id = serializers.UUIDField(required=False, allow_null=True, label=_("Model id"))
# 段落列表
paragraph_list = serializers.ListField(label=_("Paragraph List"))
# 对话id
chat_id = serializers.UUIDField(required=True, label=_("Conversation ID"))
# 用户问题
problem_text = serializers.CharField(required=True, label=_("User Questions"))
# 后置处理器
post_response_handler = InstanceField(model_type=PostResponseHandler,
label=_("Post-processor"))
# 补全问题
padding_problem_text = serializers.CharField(required=False,
label=_("Completion Question"))
# 是否使用流的形式输出
stream = serializers.BooleanField(required=False, label=_("Streaming Output"))
chat_user_id = serializers.CharField(required=True, label=_("Chat user id"))
chat_record_id = serializers.CharField(required=False, label=_("Chat record id"))
chat_user_type = serializers.CharField(required=True, label=_("Chat user Type"))
# 未查询到引用分段
no_references_setting = NoReferencesSetting(required=True,
label=_("No reference segment settings"))
workspace_id = serializers.CharField(required=True, label=_("Workspace ID"))
model_setting = serializers.DictField(required=True, allow_null=True,
label=_("Model settings"))
model_params_setting = serializers.DictField(required=False, allow_null=True,
label=_("Model parameter settings"))
mcp_tool_ids = serializers.JSONField(label="MCP工具ID列表", required=False, default=list)
mcp_servers = serializers.JSONField(label="MCP服务列表", required=False, default=dict)
mcp_source = serializers.CharField(label="MCP Source", required=False, default="referencing")
tool_ids = serializers.JSONField(label="工具ID列表", required=False, default=list)
application_ids = serializers.JSONField(label="应用ID列表", required=False, default=list)
skill_tool_ids = serializers.JSONField(label="技能ID列表", required=False, default=list)
mcp_output_enable = serializers.BooleanField(label="MCP输出是否启用", required=False, default=True)
def is_valid(self, *, raise_exception=False):
super().is_valid(raise_exception=True)
message_list: List = self.initial_data.get('message_list')
for message in message_list:
if not isinstance(message, BaseMessage):
raise Exception(_("message type error"))
def get_step_serializer(self, manage: PipelineManage) -> Type[serializers.Serializer]:
return self.InstanceSerializer
def _run(self, manage: PipelineManage):
chat_result = self.execute(**self.context['step_args'], manage=manage)
manage.context['chat_result'] = chat_result
@abstractmethod
def execute(self, message_list: List[BaseMessage],
chat_id, problem_text,
post_response_handler: PostResponseHandler,
model_id: str = None,
workspace_id: str = None,
paragraph_list=None,
manage: PipelineManage = None,
padding_problem_text: str = None, stream: bool = True, chat_user_id=None, chat_user_type=None,
no_references_setting=None, model_params_setting=None, model_setting=None,
mcp_tool_ids=None, mcp_servers='', mcp_source="referencing",
tool_ids=None, application_ids=None, skill_tool_ids=None, mcp_output_enable=True,
**kwargs):
pass
================================================
FILE: apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: base_chat_step.py
@date:2024/1/9 18:25
@desc: 对话step Base实现
"""
import json
import time
import traceback
from typing import List
import uuid_utils.compat as uuid
from django.db.models import QuerySet
from django.http import StreamingHttpResponse
from django.utils.translation import gettext as _
from langchain.chat_models.base import BaseChatModel
from langchain_core.messages import AIMessageChunk, SystemMessage, BaseMessage, HumanMessage, AIMessage
from rest_framework import status
from application.chat_pipeline.I_base_chat_pipeline import ParagraphPipelineModel
from application.chat_pipeline.pipeline_manage import PipelineManage
from application.chat_pipeline.step.chat_step.i_chat_step import IChatStep, PostResponseHandler
from application.flow.tools import Reasoning, mcp_response_generator
from application.models import ApplicationChatUserStats, ChatUserType, Application, ApplicationApiKey, \
ApplicationAccessToken
from common.exception.app_exception import AppApiException
from common.utils.logger import maxkb_logger
from common.utils.rsa_util import rsa_long_decrypt
from common.utils.shared_resource_auth import filter_authorized_ids
from common.utils.tool_code import ToolExecutor
from models_provider.tools import get_model_instance_by_model_workspace_id
from tools.models import Tool
def add_access_num(chat_user_id=None, chat_user_type=None, application_id=None):
if [ChatUserType.ANONYMOUS_USER.value, ChatUserType.CHAT_USER.value].__contains__(
chat_user_type) and application_id is not None:
application_public_access_client = (QuerySet(ApplicationChatUserStats).filter(chat_user_id=chat_user_id,
chat_user_type=chat_user_type,
application_id=application_id)
.first())
if application_public_access_client is not None:
application_public_access_client.access_num = application_public_access_client.access_num + 1
application_public_access_client.intraday_access_num = application_public_access_client.intraday_access_num + 1
application_public_access_client.save()
def write_context(step, manage, request_token, response_token, all_text):
step.context['message_tokens'] = request_token
step.context['answer_tokens'] = response_token
current_time = time.time()
step.context['answer_text'] = all_text
step.context['run_time'] = current_time - step.context['start_time']
manage.context['run_time'] = current_time - manage.context['start_time']
manage.context['message_tokens'] = manage.context['message_tokens'] + request_token
manage.context['answer_tokens'] = manage.context['answer_tokens'] + response_token
def event_content(response,
chat_id,
chat_record_id,
paragraph_list: List[ParagraphPipelineModel],
post_response_handler: PostResponseHandler,
manage,
step,
chat_model,
message_list: List[BaseMessage],
problem_text: str,
padding_problem_text: str = None,
chat_user_id=None, chat_user_type=None,
is_ai_chat: bool = None,
model_setting=None):
if model_setting is None:
model_setting = {}
reasoning_content_enable = model_setting.get('reasoning_content_enable', False)
reasoning_content_start = model_setting.get('reasoning_content_start', '<think>')
reasoning_content_end = model_setting.get('reasoning_content_end', '</think>')
reasoning = Reasoning(reasoning_content_start,
reasoning_content_end)
all_text = ''
reasoning_content = ''
try:
response_reasoning_content = False
for chunk in response:
reasoning_chunk = reasoning.get_reasoning_content(chunk)
content_chunk = reasoning_chunk.get('content')
if 'reasoning_content' in chunk.additional_kwargs:
response_reasoning_content = True
reasoning_content_chunk = chunk.additional_kwargs.get('reasoning_content', '')
else:
reasoning_content_chunk = reasoning_chunk.get('reasoning_content')
content_chunk = reasoning._normalize_content(content_chunk)
all_text += content_chunk
if reasoning_content_chunk is None:
reasoning_content_chunk = ''
reasoning_content += reasoning_content_chunk
yield manage.get_base_to_response().to_stream_chunk_response(chat_id, str(chat_record_id), 'ai-chat-node',
[], content_chunk,
False,
0, 0, {'node_is_end': False,
'view_type': 'many_view',
'node_type': 'ai-chat-node',
'real_node_id': 'ai-chat-node',
'reasoning_content': reasoning_content_chunk if reasoning_content_enable else ''})
reasoning_chunk = reasoning.get_end_reasoning_content()
all_text += reasoning_chunk.get('content')
reasoning_content_chunk = ""
if not response_reasoning_content:
reasoning_content_chunk = reasoning_chunk.get(
'reasoning_content')
yield manage.get_base_to_response().to_stream_chunk_response(chat_id, str(chat_record_id), 'ai-chat-node',
[], reasoning_chunk.get('content'),
False,
0, 0, {'node_is_end': False,
'view_type': 'many_view',
'node_type': 'ai-chat-node',
'real_node_id': 'ai-chat-node',
'reasoning_content'
: reasoning_content_chunk if reasoning_content_enable else ''})
# 获取token
if is_ai_chat:
try:
request_token = chat_model.get_num_tokens_from_messages(message_list)
response_token = chat_model.get_num_tokens(all_text)
except Exception as e:
request_token = 0
response_token = 0
else:
request_token = 0
response_token = 0
write_context(step, manage, request_token, response_token, all_text)
post_response_handler.handler(chat_id, chat_record_id, paragraph_list, problem_text,
all_text, manage, step, padding_problem_text,
reasoning_content=reasoning_content if reasoning_content_enable else '')
yield manage.get_base_to_response().to_stream_chunk_response(chat_id, str(chat_record_id), 'ai-chat-node',
[], '', True,
request_token, response_token,
{'node_is_end': True, 'view_type': 'many_view',
'node_type': 'ai-chat-node'})
if not manage.debug:
add_access_num(chat_user_id, chat_user_type, manage.context.get('application_id'))
except Exception as e:
maxkb_logger.error(f'{str(e)}:{traceback.format_exc()}')
all_text = 'Exception:' + str(e)
write_context(step, manage, 0, 0, all_text)
post_response_handler.handler(chat_id, chat_record_id, paragraph_list, problem_text,
all_text, manage, step, padding_problem_text, reasoning_content='')
if not manage.debug:
add_access_num(chat_user_id, chat_user_type, manage.context.get('application_id'))
yield manage.get_base_to_response().to_stream_chunk_response(chat_id, str(chat_record_id), 'ai-chat-node',
[], all_text,
False,
0, 0, {'node_is_end': False,
'view_type': 'many_view',
'node_type': 'ai-chat-node',
'real_node_id': 'ai-chat-node',
'reasoning_content': ''})
class BaseChatStep(IChatStep):
def execute(self, message_list: List[BaseMessage],
chat_id,
problem_text,
post_response_handler: PostResponseHandler,
model_id: str = None,
workspace_id: str = None,
paragraph_list=None,
manage: PipelineManage = None,
padding_problem_text: str = None,
stream: bool = True,
chat_user_id=None, chat_user_type=None,
no_references_setting=None,
model_params_setting=None,
model_setting=None,
mcp_tool_ids=None,
mcp_servers='',
mcp_source="referencing",
tool_ids=None,
application_ids=None,
skill_tool_ids=None,
mcp_output_enable=True,
**kwargs):
chat_model = get_model_instance_by_model_workspace_id(model_id, workspace_id,
**model_params_setting) if model_id is not None else None
if stream:
return self.execute_stream(message_list, chat_id, problem_text, post_response_handler, chat_model,
paragraph_list,
manage, padding_problem_text, chat_user_id, chat_user_type,
no_references_setting,
model_setting,
mcp_tool_ids, mcp_servers, mcp_source, tool_ids,
application_ids,
skill_tool_ids,
workspace_id,
mcp_output_enable)
else:
return self.execute_block(message_list, chat_id, problem_text, post_response_handler, chat_model,
paragraph_list,
manage, padding_problem_text, chat_user_id, chat_user_type, no_references_setting,
model_setting,
mcp_tool_ids, mcp_servers, mcp_source, tool_ids,
application_ids,
skill_tool_ids,
workspace_id,
mcp_output_enable)
def get_details(self, manage, **kwargs):
return {
'status': self.status,
'err_message': self.err_message,
'step_type': 'chat_step',
'run_time': self.context.get('run_time') or 0,
'model_id': str(manage.context['model_id']),
'message_list': self.reset_message_list(self.context['step_args'].get('message_list'),
self.context.get('answer_text')),
'message_tokens': self.context.get('message_tokens'),
'answer_tokens': self.context.get('answer_tokens'),
'cost': 0,
}
@staticmethod
def reset_message_list(message_list: List[BaseMessage], answer_text):
result = [{'role': 'user' if isinstance(message, HumanMessage) else (
'system' if isinstance(message, SystemMessage) else 'ai'), 'content': message.content} for
message
in
message_list]
result.append({'role': 'ai', 'content': answer_text})
return result
def _handle_mcp_request(self, mcp_source, mcp_servers, mcp_tool_ids, tool_ids,
application_ids, skill_tool_ids, mcp_output_enable, chat_model, message_list, agent_id,
chat_id):
mcp_servers_config = {}
# 迁移过来mcp_source是None
if mcp_source is None:
mcp_source = 'custom'
# 兼容老数据
if not mcp_tool_ids:
mcp_tool_ids = []
if mcp_source == 'custom' and mcp_servers and '"stdio"' not in mcp_servers:
mcp_servers_config = json.loads(mcp_servers)
elif mcp_tool_ids:
mcp_tools = QuerySet(Tool).filter(id__in=mcp_tool_ids).values()
for mcp_tool in mcp_tools:
if mcp_tool and mcp_tool['is_active']:
mcp_servers_config = {**mcp_servers_config, **json.loads(mcp_tool['code'])}
tool_init_params = {}
if tool_ids and len(tool_ids) > 0: # 如果有工具ID,则将其转换为MCP
self.context['tool_ids'] = tool_ids
for tool_id in tool_ids:
tool = QuerySet(Tool).filter(id=tool_id).first()
if tool is None or tool.is_active is False:
continue
executor = ToolExecutor()
if tool.init_params is not None:
params = json.loads(rsa_long_decrypt(tool.init_params))
tool_init_params = json.loads(rsa_long_decrypt(tool.init_params))
else:
params = {}
tool_config = executor.get_tool_mcp_config(tool, params)
mcp_servers_config[str(tool.id)] = tool_config
if application_ids and len(application_ids) > 0:
self.context['application_ids'] = application_ids
for application_id in application_ids:
app = QuerySet(Application).filter(id=application_id, is_publish=True).first()
if app is None:
continue
app_key = QuerySet(ApplicationApiKey).filter(application_id=application_id, is_active=True).first()
if app_key is not None:
api_key = app_key.secret_key
application_access_token = QuerySet(ApplicationAccessToken).filter(
application_id=app_key.application_id
).first()
if application_access_token is not None and application_access_token.authentication:
raise AppApiException(
500,
_('Agent 【{name}】 access token authentication is not supported for agent tool').format(
name=app.name)
)
else:
raise AppApiException(
500,
_('Agent Key is required for agent tool 【{name}】').format(name=app.name)
)
executor = ToolExecutor()
app_config = executor.get_app_mcp_config(api_key)
mcp_servers_config[app.name] = app_config
if skill_tool_ids and len(skill_tool_ids) > 0:
self.context['skill_tool_ids'] = skill_tool_ids
skill_file_items = []
for tool_id in skill_tool_ids:
tool = QuerySet(Tool).filter(id=tool_id, is_active=True).first()
if tool is None or tool.is_active is False:
continue
init_params_default_value = {i["field"]: i.get('default_value') for i in tool.init_field_list}
if tool.init_params is not None:
params = init_params_default_value | json.loads(rsa_long_decrypt(tool.init_params))
else:
params = init_params_default_value
skill_file_items.append({
'tool_id': str(tool.id),
'file_id': tool.code,
'params': params
})
mcp_servers_config['skills'] = skill_file_items
if len(mcp_servers_config) > 0:
source_id = agent_id
source_type = 'APPLICATION'
return mcp_response_generator(
chat_model, message_list, json.dumps(mcp_servers_config), mcp_output_enable,
tool_init_params, source_id, source_type, chat_id
)
return None
def get_stream_result(self, message_list: List[BaseMessage],
chat_model: BaseChatModel = None,
paragraph_list=None,
no_references_setting=None,
problem_text=None,
mcp_tool_ids=None,
mcp_servers='',
mcp_source="referencing",
tool_ids=None,
application_ids=None,
skill_tool_ids=None,
workspace_id=None,
mcp_output_enable=True,
agent_id=None,
chat_id=None
):
if paragraph_list is None:
paragraph_list = []
directly_return_chunk_list = [AIMessageChunk(content=paragraph.content)
for paragraph in paragraph_list if (
paragraph.hit_handling_method == 'directly_return' and paragraph.similarity >= paragraph.directly_return_similarity)]
if directly_return_chunk_list is not None and len(directly_return_chunk_list) > 0:
return iter(directly_return_chunk_list), False
elif len(paragraph_list) == 0 and no_references_setting.get(
'status') == 'designated_answer':
return iter(
[AIMessageChunk(content=no_references_setting.get('value').replace('{question}', problem_text))]), False
if chat_model is None:
return iter([AIMessageChunk(
_('Sorry, the AI model is not configured. Please go to the application to set up the AI model first.'))]), False
else:
# 过滤tool_id
all_tool_ids = list(set(
(mcp_tool_ids or []) +
(tool_ids or []) +
(skill_tool_ids or [])
))
authorized_set = set(filter_authorized_ids('tool', all_tool_ids, workspace_id))
mcp_tool_ids = [i for i in (mcp_tool_ids or []) if i in authorized_set]
tool_ids = [i for i in (tool_ids or []) if i in authorized_set]
skill_tool_ids = [i for i in (skill_tool_ids or []) if i in authorized_set]
# 处理 MCP 请求
mcp_result = self._handle_mcp_request(
mcp_source, mcp_servers, mcp_tool_ids, tool_ids,
application_ids, skill_tool_ids, mcp_output_enable, chat_model,
message_list, agent_id, chat_id
)
if mcp_result:
return mcp_result, True
return chat_model.stream(message_list), True
def execute_stream(self, message_list: List[BaseMessage],
chat_id,
problem_text,
post_response_handler: PostResponseHandler,
chat_model: BaseChatModel = None,
paragraph_list=None,
manage: PipelineManage = None,
padding_problem_text: str = None,
chat_user_id=None, chat_user_type=None,
no_references_setting=None,
model_setting=None,
mcp_tool_ids=None,
mcp_servers='',
mcp_source="referencing",
tool_ids=None,
application_ids=None,
skill_tool_ids=None,
workspace_id=None,
mcp_output_enable=True):
chat_result, is_ai_chat = self.get_stream_result(message_list, chat_model, paragraph_list,
no_references_setting, problem_text, mcp_tool_ids,
mcp_servers, mcp_source, tool_ids,
application_ids, skill_tool_ids, workspace_id,
mcp_output_enable, manage.context.get('application_id'),
chat_id)
chat_record_id = self.context.get('step_args', {}).get('chat_record_id') if self.context.get('step_args',
{}).get(
'chat_record_id') else uuid.uuid7()
r = StreamingHttpResponse(
streaming_content=event_content(chat_result, chat_id, chat_record_id, paragraph_list,
post_response_handler, manage, self, chat_model, message_list, problem_text,
padding_problem_text, chat_user_id, chat_user_type, is_ai_chat,
model_setting),
content_type='text/event-stream;charset=utf-8')
r['Cache-Control'] = 'no-cache'
return r
def get_block_result(self, message_list: List[BaseMessage],
chat_model: BaseChatModel = None,
paragraph_list=None,
no_references_setting=None,
problem_text=None,
mcp_tool_ids=None,
mcp_servers='',
mcp_source="referencing",
tool_ids=None,
application_ids=None,
skill_tool_ids=None,
workspace_id=None,
mcp_output_enable=True,
application_id=None,
chat_id=None
):
if paragraph_list is None:
paragraph_list = []
directly_return_chunk_list = [AIMessageChunk(content=paragraph.content)
for paragraph in paragraph_list if (
paragraph.hit_handling_method == 'directly_return' and paragraph.similarity >= paragraph.directly_return_similarity)]
if directly_return_chunk_list is not None and len(directly_return_chunk_list) > 0:
return directly_return_chunk_list[0], False
elif len(paragraph_list) == 0 and no_references_setting.get(
'status') == 'designated_answer':
return AIMessage(no_references_setting.get('value').replace('{question}', problem_text)), False
if chat_model is None:
return AIMessage(
_('Sorry, the AI model is not configured. Please go to the application to set up the AI model first.')), False
else:
# 过滤tool_id
all_tool_ids = list(set(
(mcp_tool_ids or []) +
(tool_ids or []) +
(skill_tool_ids or [])
))
authorized_set = set(filter_authorized_ids('tool', all_tool_ids, workspace_id))
mcp_tool_ids = [i for i in (mcp_tool_ids or []) if i in authorized_set]
tool_ids = [i for i in (tool_ids or []) if i in authorized_set]
skill_tool_ids = [i for i in (skill_tool_ids or []) if i in authorized_set]
# 处理 MCP 请求
mcp_result = self._handle_mcp_request(
mcp_source, mcp_servers, mcp_tool_ids, tool_ids,
application_ids, skill_tool_ids, mcp_output_enable,
chat_model, message_list, application_id, chat_id
)
if mcp_result:
return mcp_result, True
return chat_model.invoke(message_list), True
def execute_block(self, message_list: List[BaseMessage],
chat_id,
problem_text,
post_response_handler: PostResponseHandler,
chat_model: BaseChatModel = None,
paragraph_list=None,
manage: PipelineManage = None,
padding_problem_text: str = None,
chat_user_id=None, chat_user_type=None, no_references_setting=None,
model_setting=None,
mcp_tool_ids=None,
mcp_servers='',
mcp_source="referencing",
tool_ids=None,
application_ids=None,
skill_tool_ids=None,
workspace_id=None,
mcp_output_enable=True):
reasoning_content_enable = model_setting.get('reasoning_content_enable', False)
reasoning_content_start = model_setting.get('reasoning_content_start', '<think>')
reasoning_content_end = model_setting.get('reasoning_content_end', '</think>')
reasoning = Reasoning(reasoning_content_start,
reasoning_content_end)
chat_record_id = uuid.uuid7()
# 调用模型
try:
chat_result, is_ai_chat = self.get_block_result(message_list, chat_model, paragraph_list,
no_references_setting, problem_text,
mcp_tool_ids, mcp_servers, mcp_source,
tool_ids, application_ids, skill_tool_ids,workspace_id,
mcp_output_enable, manage.context.get('application_id'),
chat_id)
if is_ai_chat:
request_token = chat_model.get_num_tokens_from_messages(message_list)
response_token = chat_model.get_num_tokens(chat_result.content)
else:
request_token = 0
response_token = 0
write_context(self, manage, request_token, response_token, chat_result.content)
reasoning_result = reasoning.get_reasoning_content(chat_result)
reasoning_result_end = reasoning.get_end_reasoning_content()
content = reasoning_result.get('content') + reasoning_result_end.get('content')
if 'reasoning_content' in chat_result.response_metadata:
reasoning_content = (chat_result.response_metadata.get('reasoning_content', '') or '')
else:
reasoning_content = (reasoning_result.get('reasoning_content') or "") + (reasoning_result_end.get(
'reasoning_content') or "")
post_response_handler.handler(chat_id, chat_record_id, paragraph_list, problem_text,
content, manage, self, padding_problem_text,
reasoning_content=reasoning_content)
if not manage.debug:
add_access_num(chat_user_id, chat_user_type, manage.context.get('application_id'))
return manage.get_base_to_response().to_block_response(str(chat_id), str(chat_record_id),
content, True,
request_token, response_token,
{
'reasoning_content': reasoning_content if reasoning_content_enable else '',
'answer_list': [{
'content': content,
'reasoning_content': reasoning_content if reasoning_content_enable else ''
}]})
except Exception as e:
all_text = 'Exception:' + str(e)
write_context(self, manage, 0, 0, all_text)
post_response_handler.handler(chat_id, chat_record_id, paragraph_list, problem_text,
all_text, manage, self, padding_problem_text, reasoning_content='')
if not manage.debug:
add_access_num(chat_user_id, chat_user_type, manage.context.get('application_id'))
return manage.get_base_to_response().to_block_response(str(chat_id), str(chat_record_id), all_text, True, 0,
0, _status=status.HTTP_500_INTERNAL_SERVER_ERROR)
================================================
FILE: apps/application/chat_pipeline/step/generate_human_message_step/__init__.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: __init__.py.py
@date:2024/1/9 18:23
@desc:
"""
================================================
FILE: apps/application/chat_pipeline/step/generate_human_message_step/i_generate_human_message_step.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: i_generate_human_message_step.py
@date:2024/1/9 18:15
@desc: 生成对话模板
"""
from abc import abstractmethod
from typing import Type, List
from django.utils.translation import gettext_lazy as _
from langchain_core.messages import BaseMessage
from rest_framework import serializers
from application.chat_pipeline.I_base_chat_pipeline import IBaseChatPipelineStep, ParagraphPipelineModel
from application.chat_pipeline.pipeline_manage import PipelineManage
from application.models import ChatRecord
from application.serializers.application import NoReferencesSetting
from common.field.common import InstanceField
class IGenerateHumanMessageStep(IBaseChatPipelineStep):
class InstanceSerializer(serializers.Serializer):
# 问题
problem_text = serializers.CharField(required=True, label=_("question"))
# 段落列表
paragraph_list = serializers.ListField(child=InstanceField(model_type=ParagraphPipelineModel, required=True),
label=_("Paragraph List"))
# 历史对答
history_chat_record = serializers.ListField(child=InstanceField(model_type=ChatRecord, required=True),
label=_("History Questions"))
# 多轮对话数量
dialogue_number = serializers.IntegerField(required=True, label=_("Number of multi-round conversations"))
# 最大携带知识库段落长度
max_paragraph_char_number = serializers.IntegerField(required=True,
label=_("Maximum length of the knowledge base paragraph"))
# 模板
prompt = serializers.CharField(required=True, label=_("Prompt word"))
system = serializers.CharField(required=False, allow_null=True, allow_blank=True,
label=_("System prompt words (role)"))
# 补齐问题
padding_problem_text = serializers.CharField(required=False,
label=_("Completion problem"))
# 未查询到引用分段
no_references_setting = NoReferencesSetting(required=True,
label=_("No reference segment settings"))
def get_step_serializer(self, manage: PipelineManage) -> Type[serializers.Serializer]:
return self.InstanceSerializer
def _run(self, manage: PipelineManage):
message_list = self.execute(**self.context['step_args'])
manage.context['message_list'] = message_list
@abstractmethod
def execute(self,
problem_text: str,
paragraph_list: List[ParagraphPipelineModel],
history_chat_record: List[ChatRecord],
dialogue_number: int,
max_paragraph_char_number: int,
prompt: str,
padding_problem_text: str = None,
no_references_setting=None,
system=None,
**kwargs) -> List[BaseMessage]:
"""
:param problem_text: 原始问题文本
:param paragraph_list: 段落列表
:param history_chat_record: 历史对话记录
:param dialogue_number: 多轮对话数量
:param max_paragraph_char_number: 最大段落长度
:param prompt: 模板
:param padding_problem_text 用户修改文本
:param kwargs: 其他参数
:param no_references_setting: 无引用分段设置
:param system 系统提示称
:return:
"""
pass
================================================
FILE: apps/application/chat_pipeline/step/generate_human_message_step/impl/base_generate_human_message_step.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: base_generate_human_message_step.py.py
@date:2024/1/10 17:50
@desc:
"""
from typing import List, Dict
from langchain_core.messages import SystemMessage, BaseMessage, HumanMessage
from application.chat_pipeline.I_base_chat_pipeline import ParagraphPipelineModel
from application.chat_pipeline.step.generate_human_message_step.i_generate_human_message_step import \
IGenerateHumanMessageStep
from application.models import ChatRecord
from common.utils.common import flat_map
class BaseGenerateHumanMessageStep(IGenerateHumanMessageStep):
def execute(self, problem_text: str,
paragraph_list: List[ParagraphPipelineModel],
history_chat_record: List[ChatRecord],
dialogue_number: int,
max_paragraph_char_number: int,
prompt: str,
padding_problem_text: str = None,
no_references_setting=None,
system=None,
**kwargs) -> List[BaseMessage]:
prompt = prompt if (paragraph_list is not None and len(paragraph_list) > 0) else no_references_setting.get(
'value')
exec_problem_text = padding_problem_text if padding_problem_text is not None else problem_text
start_index = len(history_chat_record) - dialogue_number
history_message = [[history_chat_record[index].get_human_message(), history_chat_record[index].get_ai_message()]
for index in
range(start_index if start_index > 0 else 0, len(history_chat_record))]
if system is not None and len(system) > 0:
return [SystemMessage(system), *flat_map(history_message),
self.to_human_message(prompt, exec_problem_text, max_paragraph_char_number, paragraph_list,
no_references_setting)]
return [*flat_map(history_message),
self.to_human_message(prompt, exec_problem_text, max_paragraph_char_number, paragraph_list,
no_references_setting)]
@staticmethod
def to_human_message(prompt: str,
problem: str,
max_paragraph_char_number: int,
paragraph_list: List[ParagraphPipelineModel],
no_references_setting: Dict):
if paragraph_list is None or len(paragraph_list) == 0:
if no_references_setting.get('status') == 'ai_questioning':
return HumanMessage(
content=no_references_setting.get('value').replace('{question}', problem))
else:
return HumanMessage(content=prompt.replace('{data}', "").replace('{question}', problem))
temp_data = ""
data_list = []
for p in paragraph_list:
content = f"{p.title}:{p.content}"
temp_data += content
if len(temp_data) > max_paragraph_char_number:
row_data = content[0:max_paragraph_char_number - len(temp_data)]
data_list.append(f"<data>{row_data}</data>")
break
else:
data_list.append(f"<data>{content}</data>")
data = "\n".join(data_list)
return HumanMessage(content=prompt.replace('{data}', data).replace('{question}', problem))
def get_details(self, manage, **kwargs):
return {
'status': self.status,
'err_message': self.err_message,
'step_type': 'generate_human_message',
}
================================================
FILE: apps/application/chat_pipeline/step/reset_problem_step/__init__.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: __init__.py.py
@date:2024/1/9 18:23
@desc:
"""
================================================
FILE: apps/application/chat_pipeline/step/reset_problem_step/i_reset_problem_step.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: i_reset_problem_step.py
@date:2024/1/9 18:12
@desc: 重写处理问题
"""
from abc import abstractmethod
from typing import Type, List
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from application.chat_pipeline.I_base_chat_pipeline import IBaseChatPipelineStep
from application.chat_pipeline.pipeline_manage import PipelineManage
from application.models import ChatRecord
from common.field.common import InstanceField
class IResetProblemStep(IBaseChatPipelineStep):
class InstanceSerializer(serializers.Serializer):
# 问题文本
problem_text = serializers.CharField(required=True, label=_("question"))
# 历史对答
history_chat_record = serializers.ListField(child=InstanceField(model_type=ChatRecord, required=True),
label=_("History Questions"))
# 大语言模型
model_id = serializers.UUIDField(required=False, allow_null=True, label=_("Model id"))
workspace_id = serializers.CharField(required=True, label=_("User ID"))
problem_optimization_prompt = serializers.CharField(required=False, max_length=102400,
label=_("Question completion prompt"))
def get_step_serializer(self, manage: PipelineManage) -> Type[serializers.Serializer]:
return self.InstanceSerializer
def _run(self, manage: PipelineManage):
padding_problem = self.execute(**self.context.get('step_args'))
# 用户输入问题
source_problem_text = self.context.get('step_args').get('problem_text')
self.context['problem_text'] = source_problem_text
self.context['padding_problem_text'] = padding_problem
manage.context['problem_text'] = source_problem_text
manage.context['padding_problem_text'] = padding_problem
# 累加tokens
manage.context['message_tokens'] = manage.context.get('message_tokens', 0) + self.context.get('message_tokens',
0)
manage.context['answer_tokens'] = manage.context.get('answer_tokens', 0) + self.context.get('answer_tokens', 0)
@abstractmethod
def execute(self, problem_text: str, history_chat_record: List[ChatRecord] = None, model_id: str = None,
problem_optimization_prompt=None,
workspace_id=None,
**kwargs):
pass
================================================
FILE: apps/application/chat_pipeline/step/reset_problem_step/impl/base_reset_problem_step.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: base_reset_problem_step.py
@date:2024/1/10 14:35
@desc:
"""
from typing import List
from django.utils.translation import gettext as _
from langchain_core.messages import HumanMessage
from application.chat_pipeline.step.reset_problem_step.i_reset_problem_step import IResetProblemStep
from application.models import ChatRecord
from common.utils.split_model import flat_map
from models_provider.tools import get_model_instance_by_model_workspace_id
prompt = _(
"() contains the user's question. Answer the guessed user's question based on the context ({question}) Requirement: Output a complete question and put it in the <data></data> tag")
class BaseResetProblemStep(IResetProblemStep):
def execute(self, problem_text: str, history_chat_record: List[ChatRecord] = None, model_id: str = None,
problem_optimization_prompt=None,
workspace_id=None,
**kwargs) -> str:
chat_model = get_model_instance_by_model_workspace_id(model_id, workspace_id) if model_id is not None else None
if chat_model is None:
return problem_text
start_index = len(history_chat_record) - 3
history_message = [[history_chat_record[index].get_human_message(), history_chat_record[index].get_ai_message()]
for index in
range(start_index if start_index > 0 else 0, len(history_chat_record))]
reset_prompt = problem_optimization_prompt if problem_optimization_prompt else prompt
message_list = [*flat_map(history_message),
HumanMessage(content=reset_prompt.replace('{question}', problem_text))]
response = chat_model.invoke(message_list)
padding_problem = problem_text
if response.content.__contains__("<data>") and response.content.__contains__('</data>'):
padding_problem_data = response.content[
response.content.index('<data>') + 6:response.content.index('</data>')]
if padding_problem_data is not None and len(padding_problem_data.strip()) > 0:
padding_problem = padding_problem_data
elif len(response.content) > 0:
padding_problem = response.content
try:
request_token = chat_model.get_num_tokens_from_messages(message_list)
response_token = chat_model.get_num_tokens(padding_problem)
except Exception as e:
request_token = 0
response_token = 0
self.context['message_tokens'] = request_token
self.context['answer_tokens'] = response_token
return padding_problem
def get_details(self, manage, **kwargs):
return {'status': self.status,
'err_message': self.err_message,
'step_type': 'problem_padding',
'run_time': self.context['run_time'],
'model_id': str(manage.context['model_id']) if 'model_id' in manage.context else None,
'message_tokens': self.context.get('message_tokens', 0),
'answer_tokens': self.context.get('answer_tokens', 0),
'cost': 0,
'padding_problem_text': self.context.get('padding_problem_text'),
'problem_text': self.context.get("step_args").get('problem_text'),
}
================================================
FILE: apps/application/chat_pipeline/step/search_dataset_step/__init__.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: __init__.py.py
@date:2024/1/9 18:24
@desc:
"""
================================================
FILE: apps/application/chat_pipeline/step/search_dataset_step/i_search_dataset_step.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: i_search_dataset_step.py
@date:2024/1/9 18:10
@desc: 检索知识库
"""
import re
from abc import abstractmethod
from typing import List, Type
from django.core import validators
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from application.chat_pipeline.I_base_chat_pipeline import IBaseChatPipelineStep, ParagraphPipelineModel
from application.chat_pipeline.pipeline_manage import PipelineManage
class ISearchDatasetStep(IBaseChatPipelineStep):
class InstanceSerializer(serializers.Serializer):
# 原始问题文本
problem_text = serializers.CharField(required=True, label=_("question"))
# 系统补全问题文本
padding_problem_text = serializers.CharField(required=False,
label=_("System completes question text"))
# 需要查询的数据集id列表
knowledge_id_list = serializers.ListField(required=True, child=serializers.UUIDField(required=True),
label=_("Dataset id list"))
# 需要排除的文档id
exclude_document_id_list = serializers.ListField(required=True, child=serializers.UUIDField(required=True),
label=_("List of document ids to exclude"))
# 需要排除向量id
exclude_paragraph_id_list = serializers.ListField(required=True, child=serializers.UUIDField(required=True),
label=_("List of exclusion vector ids"))
# 需要查询的条数
top_n = serializers.IntegerField(required=True,
label=_("Reference segment number"))
# 相似度 0-1之间
similarity = serializers.FloatField(required=True, max_value=1, min_value=0,
label=_("Similarity"))
search_mode = serializers.CharField(required=True, validators=[
validators.RegexValidator(regex=re.compile("^embedding|keywords|blend$"),
message=_("The type only supports embedding|keywords|blend"), code=500)
], label=_("Retrieval Mode"))
workspace_id = serializers.CharField(required=True, label=_("Workspace ID"))
def get_step_serializer(self, manage: PipelineManage) -> Type[InstanceSerializer]:
return self.InstanceSerializer
def _run(self, manage: PipelineManage):
paragraph_list = self.execute(**self.context['step_args'], manage=manage)
manage.context['paragraph_list'] = paragraph_list
self.context['paragraph_list'] = paragraph_list
@abstractmethod
def execute(self, problem_text: str, knowledge_id_list: list[str], exclude_document_id_list: list[str],
exclude_paragraph_id_list: list[str], top_n: int, similarity: float, padding_problem_text: str = None,
search_mode: str = None,
workspace_id=None,
manage: PipelineManage = None,
**kwargs) -> List[ParagraphPipelineModel]:
"""
关于 用户和补全问题 说明: 补全问题如果有就使用补全问题去查询 反之就用用户原始问题查询
:param similarity: 相关性
:param top_n: 查询多少条
:param problem_text: 用户问题
:param knowledge_id_list: 需要查询的数据集id列表
:param exclude_document_id_list: 需要排除的文档id
:param exclude_paragraph_id_list: 需要排除段落id
:param padding_problem_text 补全问题
:param search_mode 检索模式
:param workspace_id 工作空间id
:return: 段落列表
"""
pass
================================================
FILE: apps/application/chat_pipeline/step/search_dataset_step/impl/base_search_dataset_step.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: base_search_dataset_step.py
@date:2024/1/10 10:33
@desc:
"""
import os
from typing import List, Dict
from django.db.models import QuerySet
from django.utils.translation import gettext_lazy as _
from rest_framework.utils.formatting import lazy_format
from application.chat_pipeline.I_base_chat_pipeline import ParagraphPipelineModel
from application.chat_pipeline.step.search_dataset_step.i_search_dataset_step import ISearchDatasetStep
from common.config.embedding_config import VectorStore, ModelManage
from common.constants.permission_constants import RoleConstants
from common.database_model_manage.database_model_manage import DatabaseModelManage
from common.db.search import native_search
from common.utils.common import get_file_content
from knowledge.models import Paragraph, Knowledge
from knowledge.models import SearchMode
from maxkb.conf import PROJECT_DIR
from models_provider.models import Model
from models_provider.tools import get_model, get_model_by_id, get_model_default_params
def reset_meta(meta):
if not meta.get('allow_download', False):
return {'allow_download': False}
return meta
def get_embedding_id(knowledge_id_list):
knowledge_list = QuerySet(Knowledge).filter(id__in=knowledge_id_list)
if len(set([knowledge.embedding_model_id for knowledge in knowledge_list])) > 1:
raise Exception(
_("The vector model of the associated knowledge base is inconsistent and the segmentation cannot be recalled."))
if len(knowledge_list) == 0:
raise Exception(_("The knowledge base setting is wrong, please reset the knowledge base"))
return knowledge_list[0].embedding_model_id
class BaseSearchDatasetStep(ISearchDatasetStep):
def execute(self, problem_text: str, knowledge_id_list: list[str], exclude_document_id_list: list[str],
exclude_paragraph_id_list: list[str], top_n: int, similarity: float, padding_problem_text: str = None,
search_mode: str = None,
workspace_id=None,
manage=None,
**kwargs) -> List[ParagraphPipelineModel]:
get_knowledge_list_of_authorized = DatabaseModelManage.get_model('get_knowledge_list_of_authorized')
chat_user_type = manage.context.get('chat_user_type')
if get_knowledge_list_of_authorized is not None and RoleConstants.CHAT_USER.value.name == chat_user_type:
knowledge_id_list = get_knowledge_list_of_authorized(manage.context.get('chat_user_id'),
knowledge_id_list)
if len(knowledge_id_list) == 0:
return []
exec_problem_text = padding_problem_text if padding_problem_text is not None else problem_text
model_id = get_embedding_id(knowledge_id_list)
model = get_model_by_id(model_id, workspace_id)
if model.model_type != "EMBEDDING":
raise Exception(_("Model does not exist"))
self.context['model_name'] = model.name
default_params = get_model_default_params(model)
embedding_model = ModelManage.get_model(model_id, lambda _id: get_model(model, **{**default_params}))
embedding_value = embedding_model.embed_query(exec_problem_text)
vector = VectorStore.get_embedding_vector()
embedding_list = vector.query(exec_problem_text, embedding_value, knowledge_id_list, None,
exclude_document_id_list,
exclude_paragraph_id_list, True, top_n, similarity, SearchMode(search_mode))
if embedding_list is None:
return []
paragraph_list = self.list_paragraph(embedding_list, vector)
result = [self.reset_paragraph(paragraph, embedding_list) for paragraph in paragraph_list]
return result
@staticmethod
def reset_paragraph(paragraph: Dict, embedding_list: List) -> ParagraphPipelineModel:
filter_embedding_list = [embedding for embedding in embedding_list if
str(embedding.get('paragraph_id')) == str(paragraph.get('id'))]
if filter_embedding_list is not None and len(filter_embedding_list) > 0:
find_embedding = filter_embedding_list[-1]
return (ParagraphPipelineModel.builder()
.add_paragraph(paragraph)
.add_similarity(find_embedding.get('similarity'))
.add_comprehensive_score(find_embedding.get('comprehensive_score'))
.add_knowledge_name(paragraph.get('knowledge_name'))
.add_knowledge_type(paragraph.get('knowledge_type'))
.add_document_name(paragraph.get('document_name'))
.add_hit_handling_method(paragraph.get('hit_handling_method'))
.add_directly_return_similarity(paragraph.get('directly_return_similarity'))
.add_meta(reset_meta(paragraph.get('meta')))
.build())
@staticmethod
def get_similarity(paragraph, embedding_list: List):
filter_embedding_list = [embedding for embedding in embedding_list if
str(embedding.get('paragraph_id')) == str(paragraph.get('id'))]
if filter_embedding_list is not None and len(filter_embedding_list) > 0:
find_embedding = filter_embedding_list[-1]
return find_embedding.get('comprehensive_score')
return 0
@staticmethod
def list_paragraph(embedding_list: List, vector):
paragraph_id_list = [row.get('paragraph_id') for row in embedding_list]
if paragraph_id_list is None or len(paragraph_id_list) == 0:
return []
paragraph_list = native_search(QuerySet(Paragraph).filter(id__in=paragraph_id_list),
get_file_content(
os.path.join(PROJECT_DIR, "apps", "application", 'sql',
'list_knowledge_paragraph_by_paragraph_id.sql')),
with_table_name=True)
# 如果向量库中存在脏数据 直接删除
if len(paragraph_list) != len(paragraph_id_list):
exist_paragraph_list = [row.get('id') for row in paragraph_list]
for paragraph_id in paragraph_id_list:
if not exist_paragraph_list.__contains__(paragraph_id):
vector.delete_by_paragraph_id(paragraph_id)
# 如果存在直接返回的则取直接返回段落
hit_handling_method_paragraph = [paragraph for paragraph in paragraph_list if
(paragraph.get(
'hit_handling_method') == 'directly_return' and BaseSearchDatasetStep.get_similarity(
paragraph, embedding_list) >= paragraph.get(
'directly_return_similarity'))]
if len(hit_handling_method_paragraph) > 0:
# 找到评分最高的
return [sorted(hit_handling_method_paragraph,
key=lambda p: BaseSearchDatasetStep.get_similarity(p, embedding_list))[-1]]
return paragraph_list
def get_details(self, manage, **kwargs):
step_args = self.context.get('step_args') or {}
return {
'status': self.status,
'err_message': self.err_message,
'step_type': 'search_step',
'paragraph_list': [row.to_dict() for row in (self.context.get('paragraph_list') or [])],
'run_time': self.context.get('run_time') or 0,
'problem_text': step_args.get(
'padding_problem_text') if 'padding_problem_text' in step_args else step_args.get('problem_text'),
'model_name': self.context.get('model_name'),
'message_tokens': 0,
'answer_tokens': 0,
'cost': 0
}
================================================
FILE: apps/application/flow/__init__.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: __init__.py.py
@date:2024/6/7 14:43
@desc:
"""
================================================
FILE: apps/application/flow/backend/__init__.py
================================================
================================================
FILE: apps/application/flow/backend/sandbox_shell.py
================================================
import getpass
import os
import re
from deepagents.backends import LocalShellBackend
from deepagents.backends.protocol import ExecuteResponse
from maxkb.const import CONFIG
_enable_sandbox = bool(int(CONFIG.get('SANDBOX', 0)))
_run_user = 'sandbox' if _enable_sandbox else getpass.getuser()
_sandbox_python_sys_path = CONFIG.get_sandbox_python_package_paths().replace(',', ':')
class SandboxShellBackend(LocalShellBackend):
def __init__(self, root_dir: str, **kwargs):
if 'env' not in kwargs and not kwargs.get('inherit_env', False):
env = os.environ.copy()
path = env.get('PATH', '/usr/bin:/bin')
# 将 sandbox 路径分解为列表,检查每个路径是否已存在
existing_paths = set(path.split(os.pathsep))
sandbox_paths = _sandbox_python_sys_path.split(os.pathsep) if _sandbox_python_sys_path else []
new_paths = [p for p in sandbox_paths if p and p not in existing_paths]
if new_paths:
env['PATH'] = f"{os.pathsep.join(new_paths)}{os.pathsep}{path}"
kwargs['env'] = env
super().__init__(root_dir=root_dir, **kwargs)
def _translate_virtual_paths(self, command: str) -> str:
"""Translate virtual absolute paths in the command to real filesystem paths.
In virtual_mode=True, file tools (ls, glob, read_file) return virtual absolute
paths like /skills/foo.py which map to {root_dir}/skills/foo.py. But execute()
runs a real shell where /skills/foo.py does not exist. This method replaces
any path token that exists under root_dir with its real path, while leaving
genuine system paths (e.g. /usr/bin/python3) untouched.
"""
root = str(self.cwd)
def translate(m: re.Match) -> str:
virtual_path = m.group(0)
real_path = root + virtual_path
return real_path if os.path.lexists(real_path) else virtual_path
# Match absolute-path-like tokens: / followed by a non-whitespace sequence
# that isn't clearly a flag (e.g. avoid matching -/something).
# Only translate when virtual_mode is active.
return re.sub(r'(?<![.\w\-])/[A-Za-z_][^\s\'"\\;|&><:,]*', translate, command)
def execute(
self,
command: str,
*,
timeout: int | None = None,
) -> ExecuteResponse:
if self.virtual_mode:
command = self._translate_virtual_paths(command)
if _enable_sandbox:
# 用 runuser 在子进程里切换用户,父进程凭据保持不变,
# 避免父进程 ruid/euid 不一致导致 execve 报 Permission denied
command = f"runuser -u {_run_user} -- env -i LD_PRELOAD=/opt/maxkb-app/sandbox/lib/sandbox.so PATH=${{PATH}} {command}"
# command = f"runuser -u {_run_user} -- env -i PATH=${{PATH}} {command}"
# print(f"Executing command in sandbox: {command}")
return super().execute(command=command, timeout=timeout)
================================================
FILE: apps/application/flow/common.py
================================================
# coding=utf-8
"""
@project: MaxKB
@Author:虎
@file: common.py
@date:2024/12/11 17:57
@desc:
"""
from enum import Enum
from typing import List, Dict
from django.db.models import QuerySet
from django.utils.translation import gettext as _
from rest_framework.exceptions import ErrorDetail, ValidationError
from common.exception.app_exception import AppApiException
from common.utils.common import group_by
from models_provider.models import Model
from models_provider.tools import get_model_credential
from tools.models.tool import Tool
end_nodes = ['ai-chat-node', 'reply-node', 'function-node', 'function-lib-node', 'application-node',
'image-understand-node', 'speech-to-text-node', 'text-to-speech-node', 'image-generate-node',
'variable-assign-node']
class Answer:
def __init__(self, content, view_type, runtime_node_id, chat_record_id, child_node, real_node_id,
reasoning_content):
self.view_type = view_type
self.content = content
self.reasoning_content = reasoning_content
self.runtime_node_id = runtime_node_id
self.chat_record_id = chat_record_id
self.child_node = child_node
self.real_node_id = real_node_id
def to_dict(self):
return {'view_type': self.view_type, 'content': self.content, 'runtime_node_id': self.runtime_node_id,
'chat_record_id': self.chat_record_id,
'child_node': self.child_node,
'reasoning_content': self.reasoning_content,
'real_node_id': self.real_node_id}
class NodeChunk:
def __init__(self):
self.status = 0
self.chunk_list = []
def add_chunk(self, chunk):
self.chunk_list.append(chunk)
def end(self, chunk=None):
if chunk is not None:
self.add_chunk(chunk)
self.status = 200
def is_end(self):
return self.status == 200
class Edge:
def __init__(self, _id: str, _type: str, sourceNodeId: str, targetNodeId: str, **keywords):
self.id = _id
self.type = _type
self.sourceNodeId = sourceNodeId
self.targetNodeId = targetNodeId
for keyword in keywords:
self.__setattr__(keyword, keywords.get(keyword))
class Node:
def __init__(self, _id: str, _type: str, x: int, y: int, properties: dict, **kwargs):
self.id = _id
self.type = _type
self.x = x
self.y = y
self.properties = properties
for keyword in kwargs:
self.__setattr__(keyword, kwargs.get(keyword))
class EdgeNode:
edge: Edge
node: Node
def __init__(self, edge, node):
self.edge = edge
self.node = node
class WorkflowMode(Enum):
APPLICATION = "application"
APPLICATION_LOOP = "application-loop"
KNOWLEDGE = "knowledge"
KNOWLEDGE_LOOP = "knowledge-loop"
TOOL = "tool"
TOOL_LOOP = "tool-loop"
class Workflow:
"""
节点列表
"""
nodes: List[Node]
"""
线列表
"""
edges: List[Edge]
"""
节点id:node
"""
node_map: Dict[str, Node]
"""
节点id:当前节点id上面的所有节点
"""
up_node_map: Dict[str, List[EdgeNode]]
"""
节点id:当前节点id下面的所有节点
"""
next_node_map: Dict[str, List[EdgeNode]]
workflow_mode: WorkflowMode
def __init__(self, nodes: List[Node], edges: List[Edge],
workflow_mode: WorkflowMode = WorkflowMode.APPLICATION.value):
self.nodes = nodes
self.edges = edges
self.node_map = {node.id: node for node in nodes}
self.up_node_map = {key: [EdgeNode(edge, self.node_map.get(edge.sourceNodeId)) for
edge in edges] for
key, edges in
group_by(edges, key=lambda edge: edge.targetNodeId).items()}
self.next_node_map = {key: [EdgeNode(edge, self.node_map.get(edge.targetNodeId)) for edge in edges] for
key, edges in
group_by(edges, key=lambda edge: edge.sourceNodeId).items()}
self.workflow_mode = workflow_mode
def get_node(self, node_id):
"""
根据node_id 获取节点信息
@param node_id: node_id
@return: 节点信息
"""
return self.node_map.get(node_id)
def get_up_edge_nodes(self, node_id) -> List[EdgeNode]:
"""
根据节点id 获取当前连接前置节点和连线
@param node_id: 节点id
@return: 节点连线列表
"""
return self.up_node_map.get(node_id)
def get_next_edge_nodes(self, node_id) -> List[EdgeNode]:
"""
根据节点id 获取当前连接目标节点和连线
@param node_id: 节点id
@return: 节点连线列表
"""
return self.next_node_map.get(node_id)
def get_up_nodes(self, node_id) -> List[Node]:
"""
根据节点id 获取当前连接前置节点
@param node_id: 节点id
@return: 节点列表
"""
return [en.node for en in (self.up_node_map.get(node_id) or [])]
def get_next_nodes(self, node_id) -> List[Node]:
"""
根据节点id 获取当前连接目标节点
@param node_id: 节点id
@return: 节点列表
"""
return [en.node for en in self.next_node_map.get(node_id, [])]
@staticmethod
def new_instance(flow_obj: Dict, workflow_mode: WorkflowMode = WorkflowMode.APPLICATION):
nodes = flow_obj.get('nodes')
edges = flow_obj.get('edges')
nodes = [Node(node.get('id'), node.get('type'), **node)
for node in nodes]
edges = [Edge(edge.get('id'), edge.get('type'), **edge) for edge in edges]
return Workflow(nodes, edges, workflow_mode)
def get_start_node(self):
return self.get_node('start-node')
def get_search_node(self):
return [node for node in self.nodes if node.type == 'search-dataset-node']
def is_valid(self):
"""
校验工作流数据
"""
self.is_valid_model_params()
self.is_valid_start_node()
self.is_valid_base_node()
self.is_valid_work_flow()
def is_valid_node_params(self, node: Node):
from application.flow.step_node import get_node
get_node(node.type, self.workflow_mode)(node, None, None)
def is_valid_node(self, node: Node):
self.is_valid_node_params(node)
if node.type == 'condition-node':
branch_list = node.properties.get('node_data').get('branch')
for branch in branch_list:
source_anchor_id = f"{node.id}_{branch.get('id')}_right"
edge_list = [edge for edge in self.edges if edge.sourceAnchorId == source_anchor_id]
if len(edge_list) == 0:
raise AppApiException(500,
_('The branch {branch} of the {node} node needs to be connected').format(
node=node.properties.get("stepName"), branch=branch.get("type")))
else:
edge_list = [edge for edge in self.edges if edge.sourceNodeId == node.id]
if len(edge_list) == 0 and not end_nodes.__contains__(node.type):
raise AppApiException(500, _("{node} Nodes cannot be considered as end nodes").format(
node=node.properties.get("stepName")))
def is_valid_work_flow(self, up_node=None):
if up_node is None:
up_node = self.get_start_node()
self.is_valid_node(up_node)
next_nodes = self.get_next_nodes(up_node)
for next_node in next_nodes:
self.is_valid_work_flow(next_node)
def is_valid_start_node(self):
start_node_list = [node for node in self.nodes if node.id == 'start-node']
if len(start_node_list) == 0:
raise AppApiException(500, _('The starting node is required'))
if len(start_node_list) > 1:
raise AppApiException(500, _('There can only be one starting node'))
def is_valid_model_params(self):
node_list = [node for node in self.nodes if (
node.type == 'ai-chat-node' or node.type == 'question-node' or node.type == 'parameter-extraction-node')]
for node in node_list:
model = QuerySet(Model).filter(id=node.properties.get('node_data', {}).get('model_id')).first()
if model is None:
raise ValidationError(ErrorDetail(
_('The node {node} model does not exist').format(node=node.properties.get("stepName"))))
credential = get_model_credential(model.provider, model.model_type, model.model_name)
model_params_setting = node.properties.get('node_data', {}).get('model_params_setting')
model_params_setting_form = credential.get_model_params_setting_form(
model.model_name)
if model_params_setting is None:
model_params_setting = model_params_setting_form.get_default_form_data()
node.properties.get('node_data', {})['model_params_setting'] = model_params_setting
if node.properties.get('status', 200) != 200:
raise ValidationError(
ErrorDetail(_("Node {node} is unavailable").format(node.properties.get("stepName"))))
node_list = [node for node in self.nodes if (node.type == 'function-lib-node')]
for node in node_list:
function_lib_id = node.properties.get('node_data', {}).get('function_lib_id')
if function_lib_id is None:
raise ValidationError(ErrorDetail(
_('The library ID of node {node} cannot be empty').format(node=node.properties.get("stepName"))))
f_lib = QuerySet(Tool).filter(id=function_lib_id).first()
if f_lib is None:
raise ValidationError(ErrorDetail(_("The function library for node {node} is not available").format(
node=node.properties.get("stepName"))))
def is_valid_base_node(self):
base_node_list = [node for node in self.nodes if node.id == 'base-node']
if len(base_node_list) == 0:
raise AppApiException(500, _('Basic information node is required'))
if len(base_node_list) > 1:
raise AppApiException(500, _('There can only be one basic information node'))
================================================
FILE: apps/application/flow/compare/__init__.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: __init__.py.py
@date:2024/6/7 14:43
@desc:
"""
from .contain_compare import *
from .end_with import EndWithCompare
from .equal_compare import *
from .ge_compare import *
from .gt_compare import *
from .is_not_null_compare import *
from .is_not_true import IsNotTrueCompare
from .is_null_compare import *
from .is_true import IsTrueCompare
from .le_compare import *
from .len_equal_compare import *
from .len_ge_compare import *
from .len_gt_compare import *
from .len_le_compare import *
from .len_lt_compare import *
from .lt_compare import *
from .not_contain_compare import *
from .not_equal_compare import *
from .start_with import StartWithCompare
compare_handle_list = [GECompare(), GTCompare(), ContainCompare(), EqualCompare(), LTCompare(), LECompare(),
LenLECompare(), LenGECompare(), LenEqualCompare(), LenGTCompare(), LenLTCompare(),
IsNullCompare(),
IsNotNullCompare(), NotContainCompare(), NotEqualCompare(), IsTrueCompare(), IsNotTrueCompare(), StartWithCompare(),
EndWithCompare()]
================================================
FILE: apps/application/flow/compare/compare.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: compare.py
@date:2024/6/7 14:37
@desc:
"""
from abc import abstractmethod
from typing import List
class Compare:
@abstractmethod
def support(self, node_id, fields: List[str], source_value, compare, target_value):
pass
@abstractmethod
def compare(self, source_value, compare, target_value):
pass
================================================
FILE: apps/application/flow/compare/contain_compare.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: contain_compare.py
@date:2024/6/11 10:02
@desc:
"""
from typing import List
from application.flow.compare.compare import Compare
class ContainCompare(Compare):
def support(self, node_id, fields: List[str], source_value, compare, target_value):
if compare == 'contain':
return True
def compare(self, source_value, compare, target_value):
if isinstance(source_value, str):
return str(target_value) in source_value
elif isinstance(source_value, list):
return any([str(item) == str(target_value) for item in source_value])
else:
return str(target_value) in str(source_value)
================================================
FILE: apps/application/flow/compare/end_with.py
================================================
# coding=utf-8
"""
@project: MaxKB
@Author:虎虎
@file: start_with.py
@date:2025/10/20 10:37
@desc:
"""
from typing import List
from application.flow.compare import Compare
class EndWithCompare(Compare):
def support(self, node_id, fields: List[str], source_value, compare, target_value):
if compare == 'end_with':
return True
def compare(self, source_value, compare, target_value):
source_value = str(source_value)
return source_value.endswith(str(target_value))
================================================
FILE: apps/application/flow/compare/equal_compare.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: equal_compare.py
@date:2024/6/7 14:44
@desc:
"""
from typing import List
from application.flow.compare import Compare
class EqualCompare(Compare):
def support(self, node_id, fields: List[str], source_value, compare, target_value):
if compare == 'eq':
return True
def compare(self, source_value, compare, target_value):
return str(source_value) == str(target_value)
================================================
FILE: apps/application/flow/compare/ge_compare.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: lt_compare.py
@date:2024/6/11 9:52
@desc: 大于比较器
"""
from typing import List
from application.flow.compare import Compare
class GECompare(Compare):
def support(self, node_id, fields: List[str], source_value, compare, target_value):
if compare == 'ge':
return True
def compare(self, source_value, compare, target_value):
try:
return float(source_value) >= float(target_value)
except Exception as e:
try:
return str(source_value) >= str(target_value)
except Exception as _:
pass
return False
================================================
FILE: apps/application/flow/compare/gt_compare.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: lt_compare.py
@date:2024/6/11 9:52
@desc: 大于比较器
"""
from typing import List
from application.flow.compare import Compare
class GTCompare(Compare):
def support(self, node_id, fields: List[str], source_value, compare, target_value):
if compare == 'gt':
return True
def compare(self, source_value, compare, target_value):
try:
return float(source_value) > float(target_value)
except Exception as e:
try:
return str(source_value) > str(target_value)
except Exception as _:
pass
return False
================================================
FILE: apps/application/flow/compare/is_not_null_compare.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: is_not_null_compare.py
@date:2024/6/28 10:45
@desc:
"""
from typing import List
from application.flow.compare import Compare
class IsNotNullCompare(Compare):
def support(self, node_id, fields: List[str], source_value, compare, target_value):
if compare == 'is_not_null':
return True
def compare(self, source_value, compare, target_value):
return source_value is not None and len(source_value) > 0
================================================
FILE: apps/application/flow/compare/is_not_true.py
================================================
# coding=utf-8
"""
@project: MaxKB
@Author:虎
@file: is_not_true.py
@date:2025/4/7 13:44
@desc:
"""
from typing import List
from application.flow.compare import Compare
class IsNotTrueCompare(Compare):
def support(self, node_id, fields: List[str], source_value, compare, target_value):
if compare == 'is_not_true':
return True
def compare(self, source_value, compare, target_value):
try:
return source_value is False
except Exception as e:
return False
================================================
FILE: apps/application/flow/compare/is_null_compare.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: is_null_compare.py
@date:2024/6/28 10:45
@desc:
"""
from typing import List
from application.flow.compare import Compare
class IsNullCompare(Compare):
def support(self, node_id, fields: List[str], source_value, compare, target_value):
if compare == 'is_null':
return True
def compare(self, source_value, compare, target_value):
try:
return source_value is None or len(source_value) == 0
except Exception as e:
return False
================================================
FILE: apps/application/flow/compare/is_true.py
================================================
# coding=utf-8
"""
@project: MaxKB
@Author:虎
@file: IsTrue.py
@date:2025/4/7 13:38
@desc:
"""
from typing import List
from application.flow.compare import Compare
class IsTrueCompare(Compare):
def support(self, node_id, fields: List[str], source_value, compare, target_value):
if compare == 'is_true':
return True
def compare(self, source_value, compare, target_value):
try:
return source_value is True
except Exception as e:
return False
================================================
FILE: apps/application/flow/compare/le_compare.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: lt_compare.py
@date:2024/6/11 9:52
@desc: 小于比较器
"""
from typing import List
from application.flow.compare import Compare
class LECompare(Compare):
def support(self, node_id, fields: List[str], source_value, compare, target_value):
if compare == 'le':
return True
def compare(self, source_value, compare, target_value):
try:
return float(source_value) <= float(target_value)
except Exception as e:
try:
return str(source_value) <= str(target_value)
except Exception as _:
pass
return False
================================================
FILE: apps/application/flow/compare/len_equal_compare.py
================================================
# coding=utf-8
"""
@project: maxkb
@Author:虎
@file: equal_compare.py
@date:2024/6/7 14:44
@desc:
"""
from typing import List
from application.flow.compare import Compare
class LenEqualCompare(Compare):
def support(self, node_id, fields: List[str], source_value, compare, target_value):
if compare == 'len_eq':
return True
def compare(self, source_value, compare, target_value):
try:
return len(source_value) == int(t
gitextract_dhtxbcma/
├── .dockerignore
├── .editorconfig
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug.yml
│ │ └── feature.yml
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── build-and-push-python-pg.yml
│ ├── build-and-push-vector-model.yml
│ ├── build-and-push.yml
│ ├── create-pr-from-push.yml
│ ├── issue-translator.yml
│ ├── llm-code-review.yml
│ ├── sync2gitee.yml
│ └── typos_check.yml
├── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── README_CN.md
├── SECURITY.md
├── USE-CASES.md
├── apps/
│ ├── __init__.py
│ ├── application/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── api/
│ │ │ ├── application_access_token.py
│ │ │ ├── application_api.py
│ │ │ ├── application_api_key.py
│ │ │ ├── application_chat.py
│ │ │ ├── application_chat_link.py
│ │ │ ├── application_chat_record.py
│ │ │ ├── application_stats.py
│ │ │ └── application_version.py
│ │ ├── apps.py
│ │ ├── chat_pipeline/
│ │ │ ├── I_base_chat_pipeline.py
│ │ │ ├── __init__.py
│ │ │ ├── pipeline_manage.py
│ │ │ └── step/
│ │ │ ├── __init__.py
│ │ │ ├── chat_step/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── i_chat_step.py
│ │ │ │ └── impl/
│ │ │ │ └── base_chat_step.py
│ │ │ ├── generate_human_message_step/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── i_generate_human_message_step.py
│ │ │ │ └── impl/
│ │ │ │ └── base_generate_human_message_step.py
│ │ │ ├── reset_problem_step/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── i_reset_problem_step.py
│ │ │ │ └── impl/
│ │ │ │ └── base_reset_problem_step.py
│ │ │ └── search_dataset_step/
│ │ │ ├── __init__.py
│ │ │ ├── i_search_dataset_step.py
│ │ │ └── impl/
│ │ │ └── base_search_dataset_step.py
│ │ ├── flow/
│ │ │ ├── __init__.py
│ │ │ ├── backend/
│ │ │ │ ├── __init__.py
│ │ │ │ └── sandbox_shell.py
│ │ │ ├── common.py
│ │ │ ├── compare/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── compare.py
│ │ │ │ ├── contain_compare.py
│ │ │ │ ├── end_with.py
│ │ │ │ ├── equal_compare.py
│ │ │ │ ├── ge_compare.py
│ │ │ │ ├── gt_compare.py
│ │ │ │ ├── is_not_null_compare.py
│ │ │ │ ├── is_not_true.py
│ │ │ │ ├── is_null_compare.py
│ │ │ │ ├── is_true.py
│ │ │ │ ├── le_compare.py
│ │ │ │ ├── len_equal_compare.py
│ │ │ │ ├── len_ge_compare.py
│ │ │ │ ├── len_gt_compare.py
│ │ │ │ ├── len_le_compare.py
│ │ │ │ ├── len_lt_compare.py
│ │ │ │ ├── lt_compare.py
│ │ │ │ ├── not_contain_compare.py
│ │ │ │ ├── not_equal_compare.py
│ │ │ │ └── start_with.py
│ │ │ ├── default_workflow.json
│ │ │ ├── default_workflow_en.json
│ │ │ ├── default_workflow_zh.json
│ │ │ ├── default_workflow_zh_Hant.json
│ │ │ ├── i_step_node.py
│ │ │ ├── knowledge_loop_workflow_manage.py
│ │ │ ├── knowledge_workflow_manage.py
│ │ │ ├── loop_workflow_manage.py
│ │ │ ├── step_node/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── ai_chat_step_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_chat_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_chat_node.py
│ │ │ │ ├── application_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_application_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_application_node.py
│ │ │ │ ├── condition_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_condition_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_condition_node.py
│ │ │ │ ├── data_source_local_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_data_source_local_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_data_source_local_node.py
│ │ │ │ ├── data_source_web_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_data_source_web_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_data_source_web_node.py
│ │ │ │ ├── direct_reply_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_reply_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_reply_node.py
│ │ │ │ ├── document_extract_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_document_extract_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_document_extract_node.py
│ │ │ │ ├── document_split_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_document_split_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_document_split_node.py
│ │ │ │ ├── form_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_form_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_form_node.py
│ │ │ │ ├── image_generate_step_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_image_generate_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_image_generate_node.py
│ │ │ │ ├── image_to_video_step_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_image_to_video_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_image_to_video_node.py
│ │ │ │ ├── image_understand_step_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_image_understand_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_image_understand_node.py
│ │ │ │ ├── intent_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_intent_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── base_intent_node.py
│ │ │ │ │ └── prompt_template.py
│ │ │ │ ├── knowledge_write_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_knowledge_write_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_knowledge_write_node.py
│ │ │ │ ├── loop_break_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_loop_break_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_loop_break_node.py
│ │ │ │ ├── loop_continue_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_loop_continue_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_loop_continue_node.py
│ │ │ │ ├── loop_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_loop_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_loop_node.py
│ │ │ │ ├── loop_start_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_loop_start_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_start_node.py
│ │ │ │ ├── mcp_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_mcp_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_mcp_node.py
│ │ │ │ ├── parameter_extraction_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_parameter_extraction_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_parameter_extraction_node.py
│ │ │ │ ├── question_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_question_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_question_node.py
│ │ │ │ ├── reranker_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_reranker_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_reranker_node.py
│ │ │ │ ├── search_document_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_search_document_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_search_document_node.py
│ │ │ │ ├── search_knowledge_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_search_knowledge_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_search_knowledge_node.py
│ │ │ │ ├── speech_to_text_step_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_speech_to_text_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_speech_to_text_node.py
│ │ │ │ ├── start_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_start_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_start_node.py
│ │ │ │ ├── text_to_speech_step_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_text_to_speech_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_text_to_speech_node.py
│ │ │ │ ├── text_to_video_step_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_text_to_video_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_text_to_video_node.py
│ │ │ │ ├── tool_lib_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_tool_lib_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_tool_lib_node.py
│ │ │ │ ├── tool_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_tool_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_tool_node.py
│ │ │ │ ├── tool_start_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_tool_start_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_tool_start_node.py
│ │ │ │ ├── tool_workflow_lib_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_tool_workflow_lib_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_tool_workflow_lib_node.py
│ │ │ │ ├── variable_aggregation_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_variable_aggregation_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_variable_aggregation_node.py
│ │ │ │ ├── variable_assign_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_variable_assign_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_variable_assign_node.py
│ │ │ │ ├── variable_splitting_node/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── i_variable_splitting_node.py
│ │ │ │ │ └── impl/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── base_variable_splitting_node.py
│ │ │ │ └── video_understand_step_node/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── i_video_understand_node.py
│ │ │ │ └── impl/
│ │ │ │ ├── __init__.py
│ │ │ │ └── base_video_understand_node.py
│ │ │ ├── tool_loop_workflow_manage.py
│ │ │ ├── tool_workflow_manage.py
│ │ │ ├── tools.py
│ │ │ └── workflow_manage.py
│ │ ├── migrations/
│ │ │ ├── 0001_initial.py
│ │ │ ├── 0002_application_simple_mcp.py
│ │ │ ├── 0003_application_stt_model_params_setting_and_more.py
│ │ │ ├── 0004_application_application_enable_and_more.py
│ │ │ ├── 0005_chatrecord_vote_other_content_chatrecord_vote_reason.py
│ │ │ ├── 0006_application_file_clean_time.py
│ │ │ ├── 0007_applicationapikey_expire_time_and_more.py
│ │ │ ├── 0008_chat_ip_address_chat_source_chatrecord_ip_address_and_more.py
│ │ │ ├── 0009_clean_application_knowledge_mapping.py
│ │ │ ├── 0010_chatsharelink.py
│ │ │ ├── 0011_application_skill_tool_ids.py
│ │ │ ├── 0012_remove_applicationapikey_user.py
│ │ │ └── __init__.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ ├── application.py
│ │ │ ├── application_access_token.py
│ │ │ ├── application_api_key.py
│ │ │ └── application_chat.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ ├── application.py
│ │ │ ├── application_access_token.py
│ │ │ ├── application_api_key.py
│ │ │ ├── application_chat.py
│ │ │ ├── application_chat_link.py
│ │ │ ├── application_chat_record.py
│ │ │ ├── application_folder.py
│ │ │ ├── application_stats.py
│ │ │ ├── application_version.py
│ │ │ └── common.py
│ │ ├── sql/
│ │ │ ├── chat_record_count_trend.sql
│ │ │ ├── count_chat_record.sql
│ │ │ ├── customer_count_trend.sql
│ │ │ ├── export_application_chat.sql
│ │ │ ├── export_application_chat_ee.sql
│ │ │ ├── get_token_usage.sql
│ │ │ ├── get_token_usage_ee.sql
│ │ │ ├── list_application.sql
│ │ │ ├── list_application_chat.sql
│ │ │ ├── list_application_chat_ee.sql
│ │ │ ├── list_application_user.sql
│ │ │ ├── list_application_user_ee.sql
│ │ │ ├── list_knowledge_paragraph_by_paragraph_id.sql
│ │ │ ├── top_questions.sql
│ │ │ └── top_questions_ee.sql
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views/
│ │ ├── __init__.py
│ │ ├── application.py
│ │ ├── application_access_token.py
│ │ ├── application_api_key.py
│ │ ├── application_chat.py
│ │ ├── application_chat_link.py
│ │ ├── application_chat_record.py
│ │ ├── application_stats.py
│ │ └── application_version.py
│ ├── chat/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── api/
│ │ │ ├── chat_api.py
│ │ │ ├── chat_authentication_api.py
│ │ │ ├── chat_embed_api.py
│ │ │ └── vote_api.py
│ │ ├── apps.py
│ │ ├── mcp/
│ │ │ ├── __init__.py
│ │ │ └── tools.py
│ │ ├── migrations/
│ │ │ └── __init__.py
│ │ ├── models/
│ │ │ └── __init__.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ ├── chat.py
│ │ │ ├── chat_authentication.py
│ │ │ ├── chat_embed_serializers.py
│ │ │ └── chat_record.py
│ │ ├── template/
│ │ │ ├── embed.js
│ │ │ └── generate_prompt_system
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views/
│ │ ├── __init__.py
│ │ ├── chat.py
│ │ ├── chat_embed.py
│ │ ├── chat_record.py
│ │ └── mcp.py
│ ├── common/
│ │ ├── __init__.py
│ │ ├── auth/
│ │ │ ├── __init__.py
│ │ │ ├── authenticate.py
│ │ │ ├── authentication.py
│ │ │ ├── common.py
│ │ │ └── handle/
│ │ │ ├── __init__.py
│ │ │ ├── auth_base_handle.py
│ │ │ └── impl/
│ │ │ ├── __init__.py
│ │ │ ├── application_key.py
│ │ │ ├── chat_anonymous_user_token.py
│ │ │ └── user_token.py
│ │ ├── cache/
│ │ │ ├── __init__.py
│ │ │ └── mem_cache.py
│ │ ├── cache_data/
│ │ │ ├── __init__.py
│ │ │ ├── application_access_token_cache.py
│ │ │ └── application_api_key_cache.py
│ │ ├── chunk/
│ │ │ ├── __init__.py
│ │ │ ├── i_chunk_handle.py
│ │ │ └── impl/
│ │ │ ├── __init__.py
│ │ │ └── mark_chunk_handle.py
│ │ ├── config/
│ │ │ ├── __init__.py
│ │ │ ├── embedding_config.py
│ │ │ └── tokenizer_manage_config.py
│ │ ├── constants/
│ │ │ ├── __init__.py
│ │ │ ├── authentication_type.py
│ │ │ ├── cache_version.py
│ │ │ ├── exception_code_constants.py
│ │ │ └── permission_constants.py
│ │ ├── database_model_manage/
│ │ │ ├── __init__.py
│ │ │ ├── database_model_manage.py
│ │ │ └── handle/
│ │ │ ├── __init__.py
│ │ │ ├── base_handle.py
│ │ │ └── impl/
│ │ │ ├── __init__.py
│ │ │ └── default_base_model_handle.py
│ │ ├── db/
│ │ │ ├── __init__.py
│ │ │ ├── compiler.py
│ │ │ ├── search.py
│ │ │ └── sql_execute.py
│ │ ├── encoder/
│ │ │ ├── __init__.py
│ │ │ └── encoder.py
│ │ ├── event/
│ │ │ ├── __init__.py
│ │ │ ├── common.py
│ │ │ └── listener_manage.py
│ │ ├── exception/
│ │ │ ├── __init__.py
│ │ │ ├── app_exception.py
│ │ │ └── handle_exception.py
│ │ ├── field/
│ │ │ ├── __init__.py
│ │ │ └── common.py
│ │ ├── forms/
│ │ │ ├── __init__.py
│ │ │ ├── array_object_card.py
│ │ │ ├── base_field.py
│ │ │ ├── base_form.py
│ │ │ ├── label/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── base_label.py
│ │ │ │ └── tooltip_label.py
│ │ │ ├── multi_select.py
│ │ │ ├── object_card.py
│ │ │ ├── password_input.py
│ │ │ ├── radio_button_field.py
│ │ │ ├── radio_card_field.py
│ │ │ ├── radio_field.py
│ │ │ ├── single_select_field.py
│ │ │ ├── slider_field.py
│ │ │ ├── switch_field.py
│ │ │ ├── tab_card.py
│ │ │ ├── table_checkbox.py
│ │ │ ├── table_radio.py
│ │ │ └── text_input_field.py
│ │ ├── handle/
│ │ │ ├── __init__.py
│ │ │ ├── base_parse_qa_handle.py
│ │ │ ├── base_parse_table_handle.py
│ │ │ ├── base_split_handle.py
│ │ │ ├── base_to_response.py
│ │ │ ├── handle_exception.py
│ │ │ └── impl/
│ │ │ ├── __init__.py
│ │ │ ├── common_handle.py
│ │ │ ├── qa/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── csv_parse_qa_handle.py
│ │ │ │ ├── md_parse_qa_handle.py
│ │ │ │ ├── xls_parse_qa_handle.py
│ │ │ │ ├── xlsx_parse_qa_handle.py
│ │ │ │ └── zip_parse_qa_handle.py
│ │ │ ├── response/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── loop_to_response.py
│ │ │ │ ├── openai_to_response.py
│ │ │ │ └── system_to_response.py
│ │ │ ├── table/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── csv_parse_table_handle.py
│ │ │ │ ├── xls_parse_table_handle.py
│ │ │ │ └── xlsx_parse_table_handle.py
│ │ │ └── text/
│ │ │ ├── __init__.py
│ │ │ ├── csv_split_handle.py
│ │ │ ├── doc_split_handle.py
│ │ │ ├── html_split_handle.py
│ │ │ ├── pdf_split_handle.py
│ │ │ ├── text_split_handle.py
│ │ │ ├── xls_split_handle.py
│ │ │ ├── xlsx_split_handle.py
│ │ │ └── zip_split_handle.py
│ │ ├── init/
│ │ │ ├── init_doc.py
│ │ │ └── init_template.py
│ │ ├── job/
│ │ │ ├── __init__.py
│ │ │ ├── clean_chat_job.py
│ │ │ ├── clean_debug_file_job.py
│ │ │ ├── client_access_num_job.py
│ │ │ └── scheduler.py
│ │ ├── lock/
│ │ │ ├── __init__.py
│ │ │ ├── base_lock.py
│ │ │ └── impl/
│ │ │ └── __init__.py
│ │ ├── log/
│ │ │ ├── __init__.py
│ │ │ └── log.py
│ │ ├── management/
│ │ │ ├── __init__.py
│ │ │ └── commands/
│ │ │ ├── __init__.py
│ │ │ ├── celery.py
│ │ │ ├── restart.py
│ │ │ ├── services/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── command.py
│ │ │ │ ├── hands.py
│ │ │ │ ├── services/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── base.py
│ │ │ │ │ ├── celery_base.py
│ │ │ │ │ ├── celery_default.py
│ │ │ │ │ ├── gunicorn.py
│ │ │ │ │ ├── local_model.py
│ │ │ │ │ └── scheduler.py
│ │ │ │ └── utils.py
│ │ │ ├── start.py
│ │ │ ├── status.py
│ │ │ └── stop.py
│ │ ├── middleware/
│ │ │ ├── __init__.py
│ │ │ ├── chat_headers_middleware.py
│ │ │ ├── cross_domain_middleware.py
│ │ │ ├── doc_headers_middleware.py
│ │ │ └── gzip.py
│ │ ├── mixins/
│ │ │ ├── __init__.py
│ │ │ ├── api_mixin.py
│ │ │ └── app_model_mixin.py
│ │ ├── result/
│ │ │ ├── __init__.py
│ │ │ ├── api.py
│ │ │ └── result.py
│ │ ├── sql/
│ │ │ └── list_embedding_text.sql
│ │ ├── template/
│ │ │ ├── email_template_en.html
│ │ │ ├── email_template_zh.html
│ │ │ └── email_template_zh_Hant.html
│ │ └── utils/
│ │ ├── __init__.py
│ │ ├── cache_util.py
│ │ ├── chat_link_code.py
│ │ ├── common.py
│ │ ├── fork.py
│ │ ├── lock.py
│ │ ├── logger.py
│ │ ├── page_utils.py
│ │ ├── rsa_util.py
│ │ ├── shared_resource_auth.py
│ │ ├── split_model.py
│ │ ├── tool_code.py
│ │ └── ts_vecto_util.py
│ ├── folders/
│ │ ├── __init__.py
│ │ ├── api/
│ │ │ ├── __init__.py
│ │ │ └── folder.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ └── folder.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ └── folder.py
│ │ ├── urls.py
│ │ └── views/
│ │ ├── __init__.py
│ │ └── folder.py
│ ├── knowledge/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── api/
│ │ │ ├── __init__.py
│ │ │ ├── document.py
│ │ │ ├── file.py
│ │ │ ├── knowledge.py
│ │ │ ├── knowledge_version.py
│ │ │ ├── knowledge_workflow.py
│ │ │ ├── paragraph.py
│ │ │ ├── problem.py
│ │ │ └── tag.py
│ │ ├── apps.py
│ │ ├── migrations/
│ │ │ ├── 0001_initial.py
│ │ │ ├── 0002_alter_file_source_type.py
│ │ │ ├── 0003_tag_documenttag.py
│ │ │ ├── 0004_alter_document_type_alter_knowledge_type_and_more.py
│ │ │ ├── 0005_knowledgeaction.py
│ │ │ ├── 0006_paragraph_chunks.py
│ │ │ ├── 0007_remove_knowledgeworkflowversion_workflow_and_more.py
│ │ │ └── __init__.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ ├── knowledge.py
│ │ │ └── knowledge_action.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ ├── common.py
│ │ │ ├── document.py
│ │ │ ├── knowledge.py
│ │ │ ├── knowledge_folder.py
│ │ │ ├── knowledge_version.py
│ │ │ ├── knowledge_workflow.py
│ │ │ ├── paragraph.py
│ │ │ ├── problem.py
│ │ │ └── tag.py
│ │ ├── sql/
│ │ │ ├── blend_search.sql
│ │ │ ├── embedding_search.sql
│ │ │ ├── hit_test.sql
│ │ │ ├── keywords_search.sql
│ │ │ ├── list_document.sql
│ │ │ ├── list_knowledge.sql
│ │ │ ├── list_knowledge_application.sql
│ │ │ ├── list_knowledge_user.sql
│ │ │ ├── list_knowledge_user_ee.sql
│ │ │ ├── list_paragraph.sql
│ │ │ ├── list_paragraph_document_name.sql
│ │ │ ├── list_problem.sql
│ │ │ ├── list_problem_mapping.sql
│ │ │ ├── update_document_char_length.sql
│ │ │ ├── update_document_status_meta.sql
│ │ │ └── update_paragraph_status.sql
│ │ ├── task/
│ │ │ ├── __init__.py
│ │ │ ├── embedding.py
│ │ │ ├── generate.py
│ │ │ ├── handler.py
│ │ │ └── sync.py
│ │ ├── template/
│ │ │ ├── csv_template_en.csv
│ │ │ ├── csv_template_zh.csv
│ │ │ ├── csv_template_zh_Hant.csv
│ │ │ ├── excel_template_en.xlsx
│ │ │ ├── excel_template_zh.xlsx
│ │ │ ├── excel_template_zh_Hant.xlsx
│ │ │ ├── table_template_en.csv
│ │ │ ├── table_template_en.xlsx
│ │ │ ├── table_template_zh.csv
│ │ │ ├── table_template_zh.xlsx
│ │ │ ├── table_template_zh_Hant.csv
│ │ │ └── table_template_zh_Hant.xlsx
│ │ ├── tests.py
│ │ ├── urls.py
│ │ ├── vector/
│ │ │ ├── __init__.py
│ │ │ ├── base_vector.py
│ │ │ └── pg_vector.py
│ │ └── views/
│ │ ├── __init__.py
│ │ ├── common.py
│ │ ├── document.py
│ │ ├── knowledge.py
│ │ ├── knowledge_workflow.py
│ │ ├── knowledge_workflow_version.py
│ │ ├── paragraph.py
│ │ ├── problem.py
│ │ └── tag.py
│ ├── local_model/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── migrations/
│ │ │ └── __init__.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ ├── model_management.py
│ │ │ ├── system_setting.py
│ │ │ └── user.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ ├── model_apply_serializers.py
│ │ │ └── rsa_util.py
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views/
│ │ ├── __init__.py
│ │ └── model_apply.py
│ ├── locales/
│ │ ├── en_US/
│ │ │ └── LC_MESSAGES/
│ │ │ └── django.po
│ │ ├── zh_CN/
│ │ │ └── LC_MESSAGES/
│ │ │ └── django.po
│ │ └── zh_Hant/
│ │ └── LC_MESSAGES/
│ │ └── django.po
│ ├── manage.py
│ ├── maxkb/
│ │ ├── __init__.py
│ │ ├── asgi.py
│ │ ├── conf.py
│ │ ├── const.py
│ │ ├── settings/
│ │ │ ├── __init__.py
│ │ │ ├── auth/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── model.py
│ │ │ │ └── web.py
│ │ │ ├── base/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── model.py
│ │ │ │ └── web.py
│ │ │ ├── lib.py
│ │ │ ├── logging.py
│ │ │ └── mem.py
│ │ ├── urls/
│ │ │ ├── __init__.py
│ │ │ ├── model.py
│ │ │ └── web.py
│ │ └── wsgi/
│ │ ├── __init__.py
│ │ ├── model.py
│ │ └── web.py
│ ├── models_provider/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── api/
│ │ │ ├── __init__.py
│ │ │ ├── model.py
│ │ │ └── provide.py
│ │ ├── apps.py
│ │ ├── base_model_provider.py
│ │ ├── base_ttv.py
│ │ ├── constants/
│ │ │ ├── __init__.py
│ │ │ └── model_provider_constants.py
│ │ ├── impl/
│ │ │ ├── __init__.py
│ │ │ ├── aliyun_bai_lian_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── aliyun_bai_lian_model_provider.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── itv.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── reranker.py
│ │ │ │ │ ├── stt/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── asr_stt.py
│ │ │ │ │ │ ├── default_stt.py
│ │ │ │ │ │ ├── omni_stt.py
│ │ │ │ │ │ └── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ ├── tts.py
│ │ │ │ │ └── ttv.py
│ │ │ │ └── model/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── embedding.py
│ │ │ │ ├── image.py
│ │ │ │ ├── llm.py
│ │ │ │ ├── reranker.py
│ │ │ │ ├── stt/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── asr_stt.py
│ │ │ │ │ ├── default_stt.py
│ │ │ │ │ ├── omni_stt.py
│ │ │ │ │ └── stt.py
│ │ │ │ ├── tti.py
│ │ │ │ ├── tts.py
│ │ │ │ └── ttv.py
│ │ │ ├── anthropic_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── anthropic_model_provider.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ └── llm.py
│ │ │ │ └── model/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── image.py
│ │ │ │ └── llm.py
│ │ │ ├── aws_bedrock_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── aws_bedrock_model_provider.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ └── reranker.py
│ │ │ │ └── model/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── embedding.py
│ │ │ │ ├── image.py
│ │ │ │ ├── llm.py
│ │ │ │ └── reranker.py
│ │ │ ├── azure_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── azure_model_provider.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ └── tts.py
│ │ │ │ └── model/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── azure_chat_model.py
│ │ │ │ ├── embedding.py
│ │ │ │ ├── image.py
│ │ │ │ ├── stt.py
│ │ │ │ ├── tti.py
│ │ │ │ └── tts.py
│ │ │ ├── base_chat_open_ai.py
│ │ │ ├── base_stt.py
│ │ │ ├── base_tti.py
│ │ │ ├── base_tts.py
│ │ │ ├── deepseek_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── llm.py
│ │ │ │ ├── deepseek_model_provider.py
│ │ │ │ └── model/
│ │ │ │ ├── __init__.py
│ │ │ │ └── llm.py
│ │ │ ├── docker_ai_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── reranker.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ └── tts.py
│ │ │ │ ├── docker_ai_model_provider.py
│ │ │ │ └── model/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── embedding.py
│ │ │ │ ├── image.py
│ │ │ │ ├── llm.py
│ │ │ │ ├── reranker.py
│ │ │ │ ├── stt.py
│ │ │ │ ├── tti.py
│ │ │ │ └── tts.py
│ │ │ ├── gemini_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ └── tti.py
│ │ │ │ ├── gemini_model_provider.py
│ │ │ │ └── model/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── embedding.py
│ │ │ │ ├── image.py
│ │ │ │ ├── llm.py
│ │ │ │ ├── stt.py
│ │ │ │ └── tti.py
│ │ │ ├── kimi_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── llm.py
│ │ │ │ ├── kimi_model_provider.py
│ │ │ │ └── model/
│ │ │ │ ├── __init__.py
│ │ │ │ └── llm.py
│ │ │ ├── local_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── model.py
│ │ │ │ │ │ └── web.py
│ │ │ │ │ └── reranker/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── model.py
│ │ │ │ │ └── web.py
│ │ │ │ ├── local_model_provider.py
│ │ │ │ └── model/
│ │ │ │ ├── embedding/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── model.py
│ │ │ │ │ └── web.py
│ │ │ │ └── reranker/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── model.py
│ │ │ │ └── web.py
│ │ │ ├── ollama_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ └── reranker.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ └── reranker.py
│ │ │ │ └── ollama_model_provider.py
│ │ │ ├── openai_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ └── tts.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ └── tts.py
│ │ │ │ └── openai_model_provider.py
│ │ │ ├── qwen_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ └── __init__.py
│ │ │ │ └── model/
│ │ │ │ └── __init__.py
│ │ │ ├── regolo_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ └── tti.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ └── tti.py
│ │ │ │ └── regolo_model_provider.py
│ │ │ ├── siliconCloud_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── reranker.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ └── tts.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── reranker.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ └── tts.py
│ │ │ │ └── siliconCloud_model_provider.py
│ │ │ ├── tencent_cloud_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── llm.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── llm.py
│ │ │ │ └── tencent_cloud_model_provider.py
│ │ │ ├── tencent_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ └── tti.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── hunyuan.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ └── tti.py
│ │ │ │ └── tencent_model_provider.py
│ │ │ ├── vllm_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── reranker.py
│ │ │ │ │ └── whisper_stt.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── reranker.py
│ │ │ │ │ └── whisper_sst.py
│ │ │ │ └── vllm_model_provider.py
│ │ │ ├── volcanic_engine_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── bigModel_stt.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ ├── tts.py
│ │ │ │ │ └── ttv.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── bigModel_stt.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ ├── tts.py
│ │ │ │ │ └── ttv.py
│ │ │ │ └── volcanic_engine_model_provider.py
│ │ │ ├── wenxin_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ └── llm.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ └── llm.py
│ │ │ │ └── wenxin_model_provider.py
│ │ │ ├── xf_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tts/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── default_tts.py
│ │ │ │ │ │ ├── super_humanoid_tts.py
│ │ │ │ │ │ └── tts.py
│ │ │ │ │ └── zh_en_stt.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tts/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── default_tts.py
│ │ │ │ │ │ ├── super_humanoid_tts.py
│ │ │ │ │ │ └── tts.py
│ │ │ │ │ └── zh_en_stt.py
│ │ │ │ └── xf_model_provider.py
│ │ │ ├── xinference_model_provider/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── credential/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── reranker.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ └── tts.py
│ │ │ │ ├── model/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── embedding.py
│ │ │ │ │ ├── image.py
│ │ │ │ │ ├── llm.py
│ │ │ │ │ ├── reranker.py
│ │ │ │ │ ├── stt.py
│ │ │ │ │ ├── tti.py
│ │ │ │ │ └── tts.py
│ │ │ │ └── xinference_model_provider.py
│ │ │ └── zhipu_model_provider/
│ │ │ ├── __init__.py
│ │ │ ├── credential/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── image.py
│ │ │ │ ├── llm.py
│ │ │ │ └── tti.py
│ │ │ ├── model/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── image.py
│ │ │ │ ├── llm.py
│ │ │ │ └── tti.py
│ │ │ └── zhipu_model_provider.py
│ │ ├── migrations/
│ │ │ ├── 0001_initial.py
│ │ │ └── __init__.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ └── model_management.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ ├── model_apply_serializers.py
│ │ │ └── model_serializer.py
│ │ ├── sql/
│ │ │ ├── list_model.sql
│ │ │ ├── list_model_user.sql
│ │ │ └── list_model_user_ee.sql
│ │ ├── tests.py
│ │ ├── tools.py
│ │ ├── urls.py
│ │ └── views/
│ │ ├── __init__.py
│ │ ├── model.py
│ │ ├── model_apply.py
│ │ └── provide.py
│ ├── ops/
│ │ ├── __init__.py
│ │ └── celery/
│ │ ├── __init__.py
│ │ ├── const.py
│ │ ├── decorator.py
│ │ ├── heartbeat.py
│ │ ├── hmac_signed_serializer.py
│ │ ├── logger.py
│ │ ├── signal_handler.py
│ │ └── utils.py
│ ├── oss/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── migrations/
│ │ │ └── __init__.py
│ │ ├── models.py
│ │ ├── retrieval_urls.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ └── file.py
│ │ ├── tests.py
│ │ ├── urls.py
│ │ ├── views/
│ │ │ ├── __init__.py
│ │ │ └── file.py
│ │ └── views.py
│ ├── system_manage/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── api/
│ │ │ ├── __init__.py
│ │ │ ├── email_setting.py
│ │ │ ├── resource_mapping.py
│ │ │ ├── system.py
│ │ │ └── user_resource_permission.py
│ │ ├── apps.py
│ │ ├── migrations/
│ │ │ ├── 0001_initial.py
│ │ │ ├── 0002_refresh_collation_reindex.py
│ │ │ ├── 0003_alter_workspaceuserresourcepermission_target.py
│ │ │ ├── 0004_alter_systemsetting_type_and_more.py
│ │ │ ├── 0005_resourcemapping.py
│ │ │ └── __init__.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ ├── chat_user.py
│ │ │ ├── log_management.py
│ │ │ ├── resource_mapping.py
│ │ │ ├── system_setting.py
│ │ │ └── workspace_user_permission.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ ├── email_setting.py
│ │ │ ├── resource_mapping_serializers.py
│ │ │ ├── system.py
│ │ │ ├── user_resource_permission.py
│ │ │ └── valid_serializers.py
│ │ ├── sql/
│ │ │ ├── check_member_permission_target_exists.sql
│ │ │ ├── get_application_user_resource_permission.sql
│ │ │ ├── get_knowledge_user_resource_permission.sql
│ │ │ ├── get_model_user_resource_permission.sql
│ │ │ ├── get_resource_user_permission_detail.sql
│ │ │ ├── get_resource_user_permission_detail_ee.sql
│ │ │ ├── get_tool_user_resource_permission.sql
│ │ │ ├── get_user_resource_permission.sql
│ │ │ ├── list_resource_mapping.sql
│ │ │ └── list_resource_mapping_ee.sql
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views/
│ │ ├── __init__.py
│ │ ├── email_setting.py
│ │ ├── log_management.py
│ │ ├── resource_mapping.py
│ │ ├── system_profile.py
│ │ ├── user_resource_permission.py
│ │ └── valid.py
│ ├── tools/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── api/
│ │ │ ├── __init__.py
│ │ │ ├── tool.py
│ │ │ └── tool_workflow.py
│ │ ├── apps.py
│ │ ├── migrations/
│ │ │ ├── 0001_initial.py
│ │ │ ├── 0002_alter_tool_tool_type.py
│ │ │ ├── 0003_alter_tool_template_id.py
│ │ │ ├── 0004_alter_tool_tool_type.py
│ │ │ ├── 0005_taskrecord.py
│ │ │ ├── 0006_alter_tool_tool_type.py
│ │ │ ├── 0007_alter_tool_tool_type_toolworkflow_and_more.py
│ │ │ ├── __init__.py
│ │ │ └── internal_tool.sql
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ ├── tool.py
│ │ │ └── tool_workflow.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ ├── tool.py
│ │ │ ├── tool_folder.py
│ │ │ ├── tool_version.py
│ │ │ └── tool_workflow.py
│ │ ├── sql/
│ │ │ ├── list_tool.sql
│ │ │ ├── list_tool_user.sql
│ │ │ └── list_tool_user_ee.sql
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views/
│ │ ├── __init__.py
│ │ ├── tool.py
│ │ ├── tool_workflow.py
│ │ └── tool_workflow_version.py
│ ├── trigger/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── api/
│ │ │ ├── __init__.py
│ │ │ ├── trigger.py
│ │ │ └── trigger_task.py
│ │ ├── apps.py
│ │ ├── handler/
│ │ │ ├── base_task.py
│ │ │ ├── base_trigger.py
│ │ │ ├── impl/
│ │ │ │ ├── task/
│ │ │ │ │ ├── application_task.py
│ │ │ │ │ └── tool_task.py
│ │ │ │ └── trigger/
│ │ │ │ ├── event_trigger.py
│ │ │ │ └── scheduled_trigger.py
│ │ │ └── simple_tools.py
│ │ ├── migrations/
│ │ │ ├── 0001_initial.py
│ │ │ ├── 0002_remove_taskrecord_trigger_task_and_more.py
│ │ │ └── __init__.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ └── trigger.py
│ │ ├── serializers/
│ │ │ ├── __init__.py
│ │ │ ├── task_source_trigger.py
│ │ │ ├── trigger.py
│ │ │ └── trigger_task.py
│ │ ├── sql/
│ │ │ ├── get_trigger_page_list.sql
│ │ │ └── get_trigger_task_record_page_list.sql
│ │ ├── tasks.py
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views/
│ │ ├── __init__.py
│ │ ├── trigger.py
│ │ └── trigger_task.py
│ └── users/
│ ├── __init__.py
│ ├── admin.py
│ ├── api/
│ │ ├── __init__.py
│ │ ├── login.py
│ │ └── user.py
│ ├── apps.py
│ ├── migrations/
│ │ ├── 0001_initial.py
│ │ └── __init__.py
│ ├── models/
│ │ ├── __init__.py
│ │ └── user.py
│ ├── serializers/
│ │ ├── __init__.py
│ │ ├── login.py
│ │ └── user.py
│ ├── tests.py
│ ├── urls.py
│ └── views/
│ ├── __init__.py
│ ├── login.py
│ └── user.py
├── installer/
│ ├── Dockerfile
│ ├── Dockerfile-base
│ ├── Dockerfile-vector-model
│ ├── init.sql
│ ├── install_model.py
│ ├── install_model_bert_base_cased.py
│ ├── sandbox.c
│ ├── start-all.sh
│ ├── start-maxkb.sh
│ ├── start-postgres.sh
│ └── start-redis.sh
├── main.py
├── pyproject.toml
└── ui/
├── .editorconfig
├── .gitattributes
├── .gitignore
├── .prettierrc.json
├── README.md
├── admin.html
├── chat.html
├── env.d.ts
├── eslint.config.ts
├── package.json
├── public/
│ └── tool/
│ ├── bochaai/
│ │ └── detail.md
│ ├── google_search/
│ │ └── detail.md
│ ├── langsearch/
│ │ └── detail.md
│ ├── mysql/
│ │ └── detail.md
│ └── postgresql/
│ └── detail.md
├── src/
│ ├── App.vue
│ ├── api/
│ │ ├── application/
│ │ │ ├── application-key.ts
│ │ │ ├── application.ts
│ │ │ ├── chat-log.ts
│ │ │ └── workflow-version.ts
│ │ ├── chat/
│ │ │ └── chat.ts
│ │ ├── chat-user/
│ │ │ ├── auth-setting.ts
│ │ │ └── chat-user.ts
│ │ ├── image.ts
│ │ ├── knowledge/
│ │ │ ├── document.ts
│ │ │ ├── knowledge.ts
│ │ │ ├── paragraph.ts
│ │ │ └── problem.ts
│ │ ├── model/
│ │ │ ├── model.ts
│ │ │ └── provider.ts
│ │ ├── shared-workspace.ts
│ │ ├── system/
│ │ │ ├── api-key.ts
│ │ │ ├── auth.ts
│ │ │ ├── chat-user.ts
│ │ │ ├── license.ts
│ │ │ ├── operate-log.ts
│ │ │ ├── platform-source.ts
│ │ │ ├── resource-authorization.ts
│ │ │ ├── role.ts
│ │ │ ├── user-group.ts
│ │ │ ├── user-manage.ts
│ │ │ └── workspace.ts
│ │ ├── system-resource-management/
│ │ │ ├── application-key.ts
│ │ │ ├── application.ts
│ │ │ ├── chat-log.ts
│ │ │ ├── chat-user.ts
│ │ │ ├── document.ts
│ │ │ ├── folder.ts
│ │ │ ├── knowledge.ts
│ │ │ ├── model.ts
│ │ │ ├── paragraph.ts
│ │ │ ├── problem.ts
│ │ │ ├── resource-authorization.ts
│ │ │ ├── resource-mapping.ts
│ │ │ ├── tool.ts
│ │ │ ├── trigger.ts
│ │ │ └── workflow-version.ts
│ │ ├── system-settings/
│ │ │ ├── auth-setting.ts
│ │ │ ├── email-setting.ts
│ │ │ ├── platform-source.ts
│ │ │ └── theme.ts
│ │ ├── system-shared/
│ │ │ ├── authorization.ts
│ │ │ ├── chat-user.ts
│ │ │ ├── document.ts
│ │ │ ├── knowledge.ts
│ │ │ ├── model.ts
│ │ │ ├── paragraph.ts
│ │ │ ├── problem.ts
│ │ │ ├── resource-mapping.ts
│ │ │ └── tool.ts
│ │ ├── tool/
│ │ │ ├── store.ts
│ │ │ └── tool.ts
│ │ ├── trigger/
│ │ │ └── trigger.ts
│ │ ├── type/
│ │ │ ├── application.ts
│ │ │ ├── chat.ts
│ │ │ ├── common.ts
│ │ │ ├── knowledge.ts
│ │ │ ├── login.ts
│ │ │ ├── model.ts
│ │ │ ├── role.ts
│ │ │ ├── systemChatUser.ts
│ │ │ ├── tool.ts
│ │ │ ├── trigger.ts
│ │ │ ├── user.ts
│ │ │ ├── workspace.ts
│ │ │ └── workspaceChatUser.ts
│ │ ├── user/
│ │ │ ├── login.ts
│ │ │ └── user.ts
│ │ └── workspace/
│ │ ├── chat-user.ts
│ │ ├── folder.ts
│ │ ├── resource-authorization.ts
│ │ ├── resource-mapping.ts
│ │ ├── role.ts
│ │ ├── user-group.ts
│ │ └── workspace.ts
│ ├── bus/
│ │ └── index.ts
│ ├── chat.ts
│ ├── components/
│ │ ├── ai-chat/
│ │ │ ├── component/
│ │ │ │ ├── answer-content/
│ │ │ │ │ └── index.vue
│ │ │ │ ├── chat-input-operate/
│ │ │ │ │ ├── TouchChat.vue
│ │ │ │ │ └── index.vue
│ │ │ │ ├── control/
│ │ │ │ │ └── index.vue
│ │ │ │ ├── knowledge-source-component/
│ │ │ │ │ ├── ExecutionDetailContent.vue
│ │ │ │ │ ├── ParagraphCard.vue
│ │ │ │ │ ├── ParagraphDocumentContent.vue
│ │ │ │ │ ├── ParagraphSourceContent.vue
│ │ │ │ │ └── index.vue
│ │ │ │ ├── operation-button/
│ │ │ │ │ ├── ChatOperationButton.vue
│ │ │ │ │ ├── LogOperationButton.vue
│ │ │ │ │ ├── MobileVoteReasonDrawer.vue
│ │ │ │ │ ├── ShareOperationButton.vue
│ │ │ │ │ ├── VoteReasonContent.vue
│ │ │ │ │ └── index.vue
│ │ │ │ ├── prologue-content/
│ │ │ │ │ └── index.vue
│ │ │ │ ├── question-content/
│ │ │ │ │ └── index.vue
│ │ │ │ ├── transition-content/
│ │ │ │ │ └── index.vue
│ │ │ │ └── user-form/
│ │ │ │ └── index.vue
│ │ │ ├── index.scss
│ │ │ └── index.vue
│ │ ├── app-charts/
│ │ │ ├── components/
│ │ │ │ ├── BarCharts.vue
│ │ │ │ └── LineCharts.vue
│ │ │ └── index.vue
│ │ ├── app-icon/
│ │ │ ├── AppIcon.vue
│ │ │ ├── KnowledgeIcon.vue
│ │ │ ├── ToolIcon.vue
│ │ │ ├── TriggerIcon.vue
│ │ │ ├── icons/
│ │ │ │ ├── about.ts
│ │ │ │ ├── application.ts
│ │ │ │ ├── document.ts
│ │ │ │ ├── folder.ts
│ │ │ │ ├── knowledge.ts
│ │ │ │ ├── menu.ts
│ │ │ │ ├── system.ts
│ │ │ │ ├── tool.ts
│ │ │ │ └── trigger.ts
│ │ │ └── index.ts
│ │ ├── app-table/
│ │ │ └── index.vue
│ │ ├── app-table-infinite-scroll/
│ │ │ └── index.vue
│ │ ├── auto-tooltip/
│ │ │ └── index.vue
│ │ ├── back-button/
│ │ │ └── index.vue
│ │ ├── card-box/
│ │ │ └── index.vue
│ │ ├── card-checkbox/
│ │ │ └── index.vue
│ │ ├── codemirror-editor/
│ │ │ └── index.vue
│ │ ├── common-list/
│ │ │ └── index.vue
│ │ ├── dynamics-form/
│ │ │ ├── Demo.vue
│ │ │ ├── DemoConstructor.vue
│ │ │ ├── FormItem.vue
│ │ │ ├── FormItemLabel.vue
│ │ │ ├── constructor/
│ │ │ │ ├── data.ts
│ │ │ │ ├── index.vue
│ │ │ │ └── items/
│ │ │ │ ├── DatePickerConstructor.vue
│ │ │ │ ├── JsonInputConstructor.vue
│ │ │ │ ├── ModelConstructor.vue
│ │ │ │ ├── MultiRowConstructor.vue
│ │ │ │ ├── MultiSelectConstructor.vue
│ │ │ │ ├── PasswordInputConstructor.vue
│ │ │ │ ├── RadioCardConstructor.vue
│ │ │ │ ├── RadioRowConstructor.vue
│ │ │ │ ├── SingleSelectConstructor.vue
│ │ │ │ ├── SliderConstructor.vue
│ │ │ │ ├── SwitchInputConstructor.vue
│ │ │ │ ├── TextInputConstructor.vue
│ │ │ │ ├── TextareaInputConstructor.vue
│ │ │ │ └── UploadInputConstructor.vue
│ │ │ ├── index.ts
│ │ │ ├── index.vue
│ │ │ ├── items/
│ │ │ │ ├── DatePicker.vue
│ │ │ │ ├── JsonInput.vue
│ │ │ │ ├── MultiRow.vue
│ │ │ │ ├── PasswordInput.vue
│ │ │ │ ├── TextInput.vue
│ │ │ │ ├── TextareaInput.vue
│ │ │ │ ├── complex/
│ │ │ │ │ ├── ArrayObjectCard.vue
│ │ │ │ │ ├── ObjectCard.vue
│ │ │ │ │ └── TabCard.vue
│ │ │ │ ├── label/
│ │ │ │ │ ├── SettingLabel.vue
│ │ │ │ │ └── TooltipLabel.vue
│ │ │ │ ├── layout/
│ │ │ │ │ └── RowLayout.vue
│ │ │ │ ├── model/
│ │ │ │ │ ├── Model.vue
│ │ │ │ │ └── provider-data.ts
│ │ │ │ ├── radio/
│ │ │ │ │ ├── Radio.vue
│ │ │ │ │ ├── RadioButton.vue
│ │ │ │ │ ├── RadioCard.vue
│ │ │ │ │ └── RadioRow.vue
│ │ │ │ ├── select/
│ │ │ │ │ ├── MultiSelect.vue
│ │ │ │ │ └── SingleSelect.vue
│ │ │ │ ├── slider/
│ │ │ │ │ └── Slider.vue
│ │ │ │ ├── switch/
│ │ │ │ │ └── SwitchInput.vue
│ │ │ │ ├── table/
│ │ │ │ │ ├── ProgressTableItem.vue
│ │ │ │ │ ├── TableCheckbox.vue
│ │ │ │ │ ├── TableColumn.vue
│ │ │ │ │ └── TableRadio.vue
│ │ │ │ ├── tree/
│ │ │ │ │ └── Tree.vue
│ │ │ │ └── upload/
│ │ │ │ ├── LocalFileUpload.vue
│ │ │ │ └── UploadInput.vue
│ │ │ └── type.ts
│ │ ├── execution-detail-card/
│ │ │ └── index.vue
│ │ ├── folder-breadcrumb/
│ │ │ └── index.vue
│ │ ├── folder-tree/
│ │ │ ├── CreateFolderDialog.vue
│ │ │ ├── MoveToDialog.vue
│ │ │ ├── constant.ts
│ │ │ └── index.vue
│ │ ├── generate-related-dialog/
│ │ │ └── index.vue
│ │ ├── index.ts
│ │ ├── infinite-scroll/
│ │ │ └── index.vue
│ │ ├── layout-container/
│ │ │ ├── ContentContainer.vue
│ │ │ └── index.vue
│ │ ├── loading/
│ │ │ └── DownloadLoading.vue
│ │ ├── logo/
│ │ │ ├── LogoFull.vue
│ │ │ ├── LogoIcon.vue
│ │ │ └── SendIcon.vue
│ │ ├── markdown/
│ │ │ ├── EchartsRander.vue
│ │ │ ├── FormRander.vue
│ │ │ ├── HtmlRander.vue
│ │ │ ├── IframeRender.vue
│ │ │ ├── MdEditor.vue
│ │ │ ├── MdEditorMagnify.vue
│ │ │ ├── MdPreview.vue
│ │ │ ├── MdRenderer.vue
│ │ │ ├── ReasoningRander.vue
│ │ │ ├── assets/
│ │ │ │ └── markdown-iconfont.js
│ │ │ └── tool-calls-render/
│ │ │ ├── content/
│ │ │ │ ├── index.vue
│ │ │ │ └── simple-tool-calls/
│ │ │ │ └── index.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── model-select/
│ │ │ └── index.vue
│ │ ├── pdf-export/
│ │ │ └── index.vue
│ │ ├── read-write/
│ │ │ └── index.vue
│ │ ├── resource-authorization-drawer/
│ │ │ └── index.vue
│ │ ├── resource_mapping/
│ │ │ └── index.vue
│ │ ├── select-knowledge-document/
│ │ │ └── index.vue
│ │ ├── tag-ellipsis/
│ │ │ └── index.vue
│ │ ├── tag-group/
│ │ │ └── index.vue
│ │ ├── workflow-dropdown-menu/
│ │ │ ├── application/
│ │ │ │ ├── NodeContent.vue
│ │ │ │ └── index.vue
│ │ │ ├── index.scss
│ │ │ ├── index.vue
│ │ │ ├── knowledge/
│ │ │ │ ├── NodeContent.vue
│ │ │ │ └── index.vue
│ │ │ ├── knowledge-inner/
│ │ │ │ ├── NodeContent.vue
│ │ │ │ └── index.vue
│ │ │ └── tool/
│ │ │ ├── NodeContent.vue
│ │ │ └── index.vue
│ │ └── workspace-dropdown/
│ │ └── index.vue
│ ├── directives/
│ │ ├── clickoutside.ts
│ │ ├── hasPermission.ts
│ │ ├── index.ts
│ │ ├── infiniteScrollUp.ts
│ │ └── resize.ts
│ ├── enums/
│ │ ├── application.ts
│ │ ├── common.ts
│ │ ├── document.ts
│ │ ├── model.ts
│ │ ├── system.ts
│ │ ├── tool.ts
│ │ └── trigger.ts
│ ├── layout/
│ │ ├── app-main/
│ │ │ └── index.vue
│ │ ├── components/
│ │ │ ├── breadcrumb/
│ │ │ │ └── index.vue
│ │ │ └── sidebar/
│ │ │ ├── SidebarItem.vue
│ │ │ └── index.vue
│ │ ├── hooks/
│ │ │ └── useResize.ts
│ │ ├── layout-header/
│ │ │ ├── SystemHeader.vue
│ │ │ ├── UserHeader.vue
│ │ │ ├── avatar/
│ │ │ │ ├── APIKeyDialog.vue
│ │ │ │ ├── AboutDialog.vue
│ │ │ │ ├── ResetPassword.vue
│ │ │ │ └── index.vue
│ │ │ ├── top-about/
│ │ │ │ └── index.vue
│ │ │ └── top-menu/
│ │ │ ├── MenuItem.vue
│ │ │ └── index.vue
│ │ ├── layout-template/
│ │ │ ├── MainLayout.vue
│ │ │ ├── SimpleLayout.vue
│ │ │ ├── SystemMainLayout.vue
│ │ │ └── index.scss
│ │ └── login-layout/
│ │ ├── LoginContainer.vue
│ │ ├── LoginLayout.vue
│ │ └── UserLoginLayout.vue
│ ├── locales/
│ │ ├── index.ts
│ │ ├── lang/
│ │ │ ├── en-US/
│ │ │ │ ├── ai-chat.ts
│ │ │ │ ├── common.ts
│ │ │ │ ├── components.ts
│ │ │ │ ├── dynamics-form.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── layout.ts
│ │ │ │ ├── theme.ts
│ │ │ │ ├── views/
│ │ │ │ │ ├── application-overview.ts
│ │ │ │ │ ├── application.ts
│ │ │ │ │ ├── chat-log.ts
│ │ │ │ │ ├── chat-user.ts
│ │ │ │ │ ├── document.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── knowledge.ts
│ │ │ │ │ ├── login.ts
│ │ │ │ │ ├── model.ts
│ │ │ │ │ ├── operate-log.ts
│ │ │ │ │ ├── paragraph.ts
│ │ │ │ │ ├── problem.ts
│ │ │ │ │ ├── role.ts
│ │ │ │ │ ├── shared.ts
│ │ │ │ │ ├── system.ts
│ │ │ │ │ ├── tool.ts
│ │ │ │ │ ├── trigger.ts
│ │ │ │ │ ├── user-manage.ts
│ │ │ │ │ └── workspace.ts
│ │ │ │ └── workflow.ts
│ │ │ ├── zh-CN/
│ │ │ │ ├── ai-chat.ts
│ │ │ │ ├── common.ts
│ │ │ │ ├── components.ts
│ │ │ │ ├── dynamics-form.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── layout.ts
│ │ │ │ ├── theme.ts
│ │ │ │ ├── views/
│ │ │ │ │ ├── application-overview.ts
│ │ │ │ │ ├── application.ts
│ │ │ │ │ ├── chat-log.ts
│ │ │ │ │ ├── chat-user.ts
│ │ │ │ │ ├── document.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── knowledge.ts
│ │ │ │ │ ├── login.ts
│ │ │ │ │ ├── model.ts
│ │ │ │ │ ├── operate-log.ts
│ │ │ │ │ ├── paragraph.ts
│ │ │ │ │ ├── problem.ts
│ │ │ │ │ ├── role.ts
│ │ │ │ │ ├── shared.ts
│ │ │ │ │ ├── system.ts
│ │ │ │ │ ├── tool.ts
│ │ │ │ │ ├── trigger.ts
│ │ │ │ │ ├── user-manage.ts
│ │ │ │ │ └── workspace.ts
│ │ │ │ └── workflow.ts
│ │ │ └── zh-Hant/
│ │ │ ├── ai-chat.ts
│ │ │ ├── common.ts
│ │ │ ├── components.ts
│ │ │ ├── dynamics-form.ts
│ │ │ ├── index.ts
│ │ │ ├── layout.ts
│ │ │ ├── theme.ts
│ │ │ ├── views/
│ │ │ │ ├── application-overview.ts
│ │ │ │ ├── application.ts
│ │ │ │ ├── chat-log.ts
│ │ │ │ ├── chat-user.ts
│ │ │ │ ├── document.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── knowledge.ts
│ │ │ │ ├── login.ts
│ │ │ │ ├── model.ts
│ │ │ │ ├── operate-log.ts
│ │ │ │ ├── paragraph.ts
│ │ │ │ ├── problem.ts
│ │ │ │ ├── role.ts
│ │ │ │ ├── shared.ts
│ │ │ │ ├── system.ts
│ │ │ │ ├── tool.ts
│ │ │ │ ├── trigger.ts
│ │ │ │ ├── user-manage.ts
│ │ │ │ └── workspace.ts
│ │ │ └── workflow.ts
│ │ └── useLocale.ts
│ ├── main.ts
│ ├── permission/
│ │ ├── application/
│ │ │ ├── index.ts
│ │ │ ├── system-manage.ts
│ │ │ └── workspace.ts
│ │ ├── index.ts
│ │ ├── knowledge/
│ │ │ ├── index.ts
│ │ │ ├── system-manage.ts
│ │ │ ├── system-share.ts
│ │ │ ├── workspace-share.ts
│ │ │ └── workspace.ts
│ │ ├── model/
│ │ │ ├── index.ts
│ │ │ ├── system-manage.ts
│ │ │ ├── system-share.ts
│ │ │ └── workspace.ts
│ │ └── tool/
│ │ ├── index.ts
│ │ ├── system-manage.ts
│ │ ├── system-share.ts
│ │ └── workspace.ts
│ ├── request/
│ │ ├── Result.ts
│ │ ├── chat/
│ │ │ ├── Result.ts
│ │ │ └── index.ts
│ │ └── index.ts
│ ├── router/
│ │ ├── chat/
│ │ │ ├── index.ts
│ │ │ └── routes.ts
│ │ ├── common.ts
│ │ ├── index.ts
│ │ ├── modules/
│ │ │ ├── application-detail.ts
│ │ │ ├── application.ts
│ │ │ ├── document.ts
│ │ │ ├── knowledge.ts
│ │ │ ├── model.ts
│ │ │ ├── paragraph.ts
│ │ │ ├── system.ts
│ │ │ ├── tool.ts
│ │ │ └── trigger.ts
│ │ └── routes.ts
│ ├── stores/
│ │ ├── index.ts
│ │ └── modules/
│ │ ├── application.ts
│ │ ├── chat-user.ts
│ │ ├── common.ts
│ │ ├── folder.ts
│ │ ├── knowledge.ts
│ │ ├── login.ts
│ │ ├── model.ts
│ │ ├── prompt.ts
│ │ ├── theme.ts
│ │ ├── tool.ts
│ │ └── user.ts
│ ├── styles/
│ │ ├── app.scss
│ │ ├── component.scss
│ │ ├── element-plus.scss
│ │ ├── font/
│ │ │ └── AlibabaPuHuiTi-3-55-Regular.otf
│ │ ├── index.scss
│ │ ├── md-editor.scss
│ │ └── variables.scss
│ ├── utils/
│ │ ├── application.ts
│ │ ├── array.ts
│ │ ├── bus.ts
│ │ ├── clipboard.ts
│ │ ├── common.ts
│ │ ├── dynamics-api/
│ │ │ ├── permission-api.ts
│ │ │ └── shared-api.ts
│ │ ├── folder.ts
│ │ ├── message.ts
│ │ ├── permission/
│ │ │ ├── data.ts
│ │ │ ├── index.ts
│ │ │ └── type.ts
│ │ ├── status.ts
│ │ ├── theme.ts
│ │ ├── time.ts
│ │ └── trigger.ts
│ ├── views/
│ │ ├── Permission.vue
│ │ ├── application/
│ │ │ ├── ApplicationAccess.vue
│ │ │ ├── ApplicationSetting.vue
│ │ │ ├── component/
│ │ │ │ ├── AIModeParamSettingDialog.vue
│ │ │ │ ├── AccessSettingDrawer.vue
│ │ │ │ ├── AddKnowledgeDialog.vue
│ │ │ │ ├── ApplicationDialog.vue
│ │ │ │ ├── CopyApplicationDialog.vue
│ │ │ │ ├── CreateApplicationDialog.vue
│ │ │ │ ├── GeneratePromptDialog.vue
│ │ │ │ ├── McpServersDialog.vue
│ │ │ │ ├── ParamSettingDialog.vue
│ │ │ │ ├── ReasoningParamSettingDialog.vue
│ │ │ │ ├── STTModelParamSettingDialog.vue
│ │ │ │ ├── TTSModeParamSettingDialog.vue
│ │ │ │ └── ToolDialog.vue
│ │ │ ├── index.vue
│ │ │ └── template-store/
│ │ │ ├── InternalDescDrawer.vue
│ │ │ ├── TemplateCard.vue
│ │ │ └── TemplateStoreDialog.vue
│ │ ├── application-overview/
│ │ │ ├── component/
│ │ │ │ ├── APIKeyDialog.vue
│ │ │ │ ├── DisplaySettingDialog.vue
│ │ │ │ ├── EmbedDialog.vue
│ │ │ │ ├── LimitDialog.vue
│ │ │ │ ├── SettingAPIKeyDialog.vue
│ │ │ │ ├── SettingAPIKeyDrawer.vue
│ │ │ │ └── StatisticsCharts.vue
│ │ │ ├── index.vue
│ │ │ └── xpack-component/
│ │ │ ├── XPackDisplaySettingDialog.vue
│ │ │ └── XPackLimitDrawer.vue
│ │ ├── application-workflow/
│ │ │ ├── component/
│ │ │ │ └── PublishHistory.vue
│ │ │ └── index.vue
│ │ ├── chat/
│ │ │ ├── Share.vue
│ │ │ ├── auth/
│ │ │ │ ├── component/
│ │ │ │ │ └── password.vue
│ │ │ │ └── index.vue
│ │ │ ├── component/
│ │ │ │ ├── EditTitleDialog.vue
│ │ │ │ └── HistoryPanel.vue
│ │ │ ├── embed/
│ │ │ │ ├── component/
│ │ │ │ │ └── ChatHistoryDrawer.vue
│ │ │ │ └── index.vue
│ │ │ ├── index.vue
│ │ │ ├── mobile/
│ │ │ │ ├── component/
│ │ │ │ │ ├── ChatHistoryDrawer.vue
│ │ │ │ │ ├── ResetPasswordDrawer.vue
│ │ │ │ │ └── UserCenterDrawer.vue
│ │ │ │ └── index.vue
│ │ │ ├── no-service/
│ │ │ │ └── index.vue
│ │ │ ├── pc/
│ │ │ │ └── index.vue
│ │ │ └── user-login/
│ │ │ ├── index.vue
│ │ │ └── scanCompinents/
│ │ │ ├── QrCodeTab.vue
│ │ │ ├── dingtalkQrCode.vue
│ │ │ ├── larkQrCode.vue
│ │ │ └── wecomQrCode.vue
│ │ ├── chat-log/
│ │ │ ├── component/
│ │ │ │ ├── ChatRecordDrawer.vue
│ │ │ │ ├── EditContentDialog.vue
│ │ │ │ └── EditMarkDialog.vue
│ │ │ └── index.vue
│ │ ├── chat-user/
│ │ │ └── index.vue
│ │ ├── demo/
│ │ │ └── index.vue
│ │ ├── document/
│ │ │ ├── ImportLarkDocument.vue
│ │ │ ├── ImportWorkflowDocument.vue
│ │ │ ├── UploadDocument.vue
│ │ │ ├── component/
│ │ │ │ ├── EmbeddingContentDialog.vue
│ │ │ │ ├── ImportDocumentDialog.vue
│ │ │ │ ├── SelectKnowledgeDialog.vue
│ │ │ │ ├── Status.vue
│ │ │ │ └── StatusTable.vue
│ │ │ ├── index.scss
│ │ │ ├── index.vue
│ │ │ ├── tag/
│ │ │ │ ├── CreateTagDialog.vue
│ │ │ │ ├── EditTagDialog.vue
│ │ │ │ ├── MulAddTagDialog.vue
│ │ │ │ ├── TagDrawer.vue
│ │ │ │ ├── TagSettingDrawer.vue
│ │ │ │ └── TaglinkedDocumentDialog.vue
│ │ │ └── upload/
│ │ │ ├── ResultSuccess.vue
│ │ │ ├── SetRules.vue
│ │ │ └── UploadComponent.vue
│ │ ├── error/
│ │ │ ├── 404.vue
│ │ │ ├── NoPermission.vue
│ │ │ └── NoService.vue
│ │ ├── hit-test/
│ │ │ └── index.vue
│ │ ├── knowledge/
│ │ │ ├── KnowledgeSetting.vue
│ │ │ ├── WorkflowTransform.vue
│ │ │ ├── component/
│ │ │ │ ├── BaseForm.vue
│ │ │ │ ├── EditParagraphDialog.vue
│ │ │ │ ├── KnowledgeListContainer.vue
│ │ │ │ ├── ParagraphList.vue
│ │ │ │ ├── ParagraphPreview.vue
│ │ │ │ └── SyncWebDialog.vue
│ │ │ ├── create-component/
│ │ │ │ ├── CreateKnowledgeDialog.vue
│ │ │ │ ├── CreateLarkKnowledgeDialog.vue
│ │ │ │ ├── CreateWebKnowledgeDialog.vue
│ │ │ │ └── CreateWorkflowKnowledgeDialog.vue
│ │ │ ├── index.vue
│ │ │ └── template-store/
│ │ │ ├── InternalDescDrawer.vue
│ │ │ ├── TemplateCard.vue
│ │ │ └── TemplateStoreDialog.vue
│ │ ├── knowledge-workflow/
│ │ │ ├── component/
│ │ │ │ ├── DebugDrawer.vue
│ │ │ │ ├── PublishHistory.vue
│ │ │ │ ├── action/
│ │ │ │ │ ├── DataSource.vue
│ │ │ │ │ ├── KnowledgeBase.vue
│ │ │ │ │ └── Result.vue
│ │ │ │ └── execution-record/
│ │ │ │ ├── ExecutionDetailDrawer.vue
│ │ │ │ └── ExecutionRecordDrawer.vue
│ │ │ └── index.vue
│ │ ├── login/
│ │ │ ├── ForgotPassword.vue
│ │ │ ├── ResetPassword.vue
│ │ │ ├── index.vue
│ │ │ └── scanCompinents/
│ │ │ ├── QrCodeTab.vue
│ │ │ ├── dingtalkQrCode.vue
│ │ │ ├── larkQrCode.vue
│ │ │ └── wecomQrCode.vue
│ │ ├── model/
│ │ │ ├── component/
│ │ │ │ ├── AddParamDrawer.vue
│ │ │ │ ├── CreateModelDialog.vue
│ │ │ │ ├── EditModel.vue
│ │ │ │ ├── ModelCard.vue
│ │ │ │ ├── ParamSettingDialog.vue
│ │ │ │ ├── Provider.vue
│ │ │ │ ├── SelectProviderDialog.vue
│ │ │ │ └── data.ts
│ │ │ └── index.vue
│ │ ├── paragraph/
│ │ │ ├── component/
│ │ │ │ ├── ParagraphCard.vue
│ │ │ │ ├── ParagraphDialog.vue
│ │ │ │ ├── ParagraphForm.vue
│ │ │ │ ├── ProblemComponent.vue
│ │ │ │ └── SelectDocumentDialog.vue
│ │ │ └── index.vue
│ │ ├── problem/
│ │ │ ├── component/
│ │ │ │ ├── CreateProblemDialog.vue
│ │ │ │ ├── DetailProblemDrawer.vue
│ │ │ │ └── RelateProblemDialog.vue
│ │ │ └── index.vue
│ │ ├── system/
│ │ │ ├── operate-log/
│ │ │ │ ├── component/
│ │ │ │ │ └── DetailDialog.vue
│ │ │ │ └── index.vue
│ │ │ ├── resource-authorization/
│ │ │ │ ├── component/
│ │ │ │ │ └── PermissionTable.vue
│ │ │ │ ├── constant.ts
│ │ │ │ └── index.vue
│ │ │ ├── role/
│ │ │ │ ├── component/
│ │ │ │ │ ├── AddMemberDrawer.vue
│ │ │ │ │ ├── CreateOrUpdateRoleDialog.vue
│ │ │ │ │ ├── Member.vue
│ │ │ │ │ ├── MemberFormContent.vue
│ │ │ │ │ └── PermissionConfiguration.vue
│ │ │ │ ├── index.ts
│ │ │ │ └── index.vue
│ │ │ ├── user-manage/
│ │ │ │ ├── component/
│ │ │ │ │ ├── SetUserRoleDialog.vue
│ │ │ │ │ ├── UserDrawer.vue
│ │ │ │ │ └── UserPwdDialog.vue
│ │ │ │ └── index.vue
│ │ │ └── workspace/
│ │ │ ├── component/
│ │ │ │ ├── AddMemberDrawer.vue
│ │ │ │ ├── CreateOrUpdateWorkspaceDialog.vue
│ │ │ │ └── Member.vue
│ │ │ └── index.vue
│ │ ├── system-chat-user/
│ │ │ ├── authentication/
│ │ │ │ ├── component/
│ │ │ │ │ ├── CAS.vue
│ │ │ │ │ ├── EditModal.vue
│ │ │ │ │ ├── LDAP.vue
│ │ │ │ │ ├── OAuth2.vue
│ │ │ │ │ ├── OIDC.vue
│ │ │ │ │ └── SCAN.vue
│ │ │ │ └── index.vue
│ │ │ ├── chat-user/
│ │ │ │ ├── component/
│ │ │ │ │ ├── SetUserGroupsDialog.vue
│ │ │ │ │ ├── SyncUsersDialog.vue
│ │ │ │ │ ├── UserDrawer.vue
│ │ │ │ │ └── UserPwdDialog.vue
│ │ │ │ └── index.vue
│ │ │ └── group/
│ │ │ ├── component/
│ │ │ │ ├── CreateGroupUserDialog.vue
│ │ │ │ └── CreateOrUpdateGroupDialog.vue
│ │ │ └── index.vue
│ │ ├── system-resource-management/
│ │ │ ├── ApplicationResourceIndex.vue
│ │ │ ├── KnowledgeResourceIndex.vue
│ │ │ ├── ModelResourceIndex.vue
│ │ │ └── ToolResourceIndex.vue
│ │ ├── system-setting/
│ │ │ ├── authentication/
│ │ │ │ ├── component/
│ │ │ │ │ ├── CAS.vue
│ │ │ │ │ ├── EditModal.vue
│ │ │ │ │ ├── LDAP.vue
│ │ │ │ │ ├── OAuth2.vue
│ │ │ │ │ ├── OIDC.vue
│ │ │ │ │ ├── SCAN.vue
│ │ │ │ │ ├── Saml2.vue
│ │ │ │ │ └── Setting.vue
│ │ │ │ └── index.vue
│ │ │ ├── email/
│ │ │ │ └── index.vue
│ │ │ └── theme/
│ │ │ ├── LoginPreview.vue
│ │ │ └── index.vue
│ │ ├── system-shared/
│ │ │ ├── AuthorizedWorkspaceDialog.vue
│ │ │ ├── KnowLedgeSharedIndex.vue
│ │ │ ├── ModelSharedIndex.vue
│ │ │ └── ToolSharedIndex.vue
│ │ ├── tool/
│ │ │ ├── DataSourceToolFormDrawer.vue
│ │ │ ├── McpToolFormDrawer.vue
│ │ │ ├── SkillToolFormDrawer.vue
│ │ │ ├── ToolDebugDrawer.vue
│ │ │ ├── ToolFormDrawer.vue
│ │ │ ├── WorkflowFormDialog.vue
│ │ │ ├── component/
│ │ │ │ ├── EditAvatarDialog.vue
│ │ │ │ ├── FieldFormDialog.vue
│ │ │ │ ├── InitParamDrawer.vue
│ │ │ │ ├── McpToolConfigDialog.vue
│ │ │ │ ├── ToolListContainer.vue
│ │ │ │ ├── ToolStoreDescDrawer.vue
│ │ │ │ └── UserFieldFormDialog.vue
│ │ │ ├── execution-record/
│ │ │ │ ├── ExecutionDetailDrawer.vue
│ │ │ │ └── TriggerRecordDrawer.vue
│ │ │ ├── index.vue
│ │ │ └── tool-store/
│ │ │ ├── AddInternalToolDialog.vue
│ │ │ ├── InternalDescDrawer.vue
│ │ │ ├── ToolCard.vue
│ │ │ └── ToolStoreDialog.vue
│ │ ├── tool-workflow/
│ │ │ ├── component/
│ │ │ │ ├── PublishHistory.vue
│ │ │ │ ├── debug/
│ │ │ │ │ ├── index.vue
│ │ │ │ │ ├── parameters/
│ │ │ │ │ │ └── index.vue
│ │ │ │ │ └── result/
│ │ │ │ │ └── index.vue
│ │ │ │ └── debug-drawer/
│ │ │ │ └── index.vue
│ │ │ └── index.vue
│ │ └── trigger/
│ │ ├── ResourceTriggerDrawer.vue
│ │ ├── TriggerDrawer.vue
│ │ ├── component/
│ │ │ ├── ApplicationParameter.vue
│ │ │ └── ToolParameter.vue
│ │ ├── execution-record/
│ │ │ ├── ExecutionDetailDrawer.vue
│ │ │ └── TriggerTaskRecordDrawer.vue
│ │ └── index.vue
│ └── workflow/
│ ├── common/
│ │ ├── AddFormCollect.vue
│ │ ├── CustomLine.vue
│ │ ├── EditFormCollect.vue
│ │ ├── NodeCascader.vue
│ │ ├── NodeContainer.vue
│ │ ├── NodeControl.vue
│ │ ├── NodeSearch.vue
│ │ ├── app-node.ts
│ │ ├── data.ts
│ │ ├── edge.ts
│ │ ├── loopEdge.ts
│ │ ├── shortcut.ts
│ │ ├── teleport.ts
│ │ ├── template.ts
│ │ └── validate.ts
│ ├── icons/
│ │ ├── ai-chat-node-icon.vue
│ │ ├── application-node-icon.vue
│ │ ├── base-node-icon.vue
│ │ ├── chat-icon.vue
│ │ ├── condition-node-icon.vue
│ │ ├── data-source-local-node-icon.vue
│ │ ├── data-source-web-node-icon.vue
│ │ ├── document-extract-node-icon.vue
│ │ ├── document-split-node-icon.vue
│ │ ├── form-node-icon.vue
│ │ ├── global-icon.vue
│ │ ├── image-generate-node-icon.vue
│ │ ├── image-to-video-node-icon.vue
│ │ ├── image-understand-node-icon.vue
│ │ ├── intent-node-icon.vue
│ │ ├── knowledge-base-node-icon.vue
│ │ ├── knowledge-write-node-icon.vue
│ │ ├── loop-break-node-icon.vue
│ │ ├── loop-continue-node-icon.vue
│ │ ├── loop-icon.vue
│ │ ├── loop-node-icon.vue
│ │ ├── loop-start-node-icon.vue
│ │ ├── mcp-node-icon.vue
│ │ ├── output-icon.vue
│ │ ├── parameter-extraction-node-icon.vue
│ │ ├── question-node-icon.vue
│ │ ├── reply-node-icon.vue
│ │ ├── reranker-node-icon.vue
│ │ ├── search-document-node-icon.vue
│ │ ├── search-knowledge-node-icon.vue
│ │ ├── speech-to-text-node-icon.vue
│ │ ├── start-node-icon.vue
│ │ ├── text-to-speech-node-icon.vue
│ │ ├── text-to-video-node-icon.vue
│ │ ├── tool-base-node-icon.vue
│ │ ├── tool-lib-node-icon.vue
│ │ ├── tool-node-icon.vue
│ │ ├── tool-start-node-icon.vue
│ │ ├── tool-workflow-lib-node-icon.vue
│ │ ├── utils.ts
│ │ ├── variable-aggregation-node-icon.vue
│ │ ├── variable-assign-node-icon.vue
│ │ ├── variable-splitting-node-icon.vue
│ │ └── video-understand-node-icon.vue
│ ├── index.vue
│ ├── nodes/
│ │ ├── ai-chat-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── application-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── base-node/
│ │ │ ├── component/
│ │ │ │ ├── ApiFieldFormDialog.vue
│ │ │ │ ├── ApiInputFieldTable.vue
│ │ │ │ ├── ChatFieldDialog.vue
│ │ │ │ ├── ChatFieldTable.vue
│ │ │ │ ├── FileUploadSettingDialog.vue
│ │ │ │ ├── UserFieldFormDialog.vue
│ │ │ │ ├── UserInputFieldTable.vue
│ │ │ │ └── UserInputTitleDialog.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── condition-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── data-source-local-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── data-source-web-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── document-extract-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── document-split-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── form-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── image-generate/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── image-to-video/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── image-understand/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── intent-classify-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── knowledge-base-node/
│ │ │ ├── component/
│ │ │ │ ├── UserFieldFormDialog.vue
│ │ │ │ ├── UserInputFieldTable.vue
│ │ │ │ └── UserInputTitleDialog.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── knowledge-write-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── loop-body-node/
│ │ │ ├── LoopBodyContainer.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── loop-break-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── loop-continue-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── loop-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── loop-start-node/
│ │ │ ├── component/
│ │ │ │ ├── LoopFieldDialog.vue
│ │ │ │ └── LoopFieldTable.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── mcp-node/
│ │ │ ├── component/
│ │ │ │ └── McpServerInputDialog.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── parameter-extraction-node/
│ │ │ ├── component/
│ │ │ │ ├── ParametersFieldDialog.vue
│ │ │ │ └── ParametersFieldTable.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── question-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── reply-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── reranker-node/
│ │ │ ├── ParamSettingDialog.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── search-document-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── search-knowledge-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── speech-to-text-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── start-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── text-to-speech-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── text-to-video/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── tool-base-node/
│ │ │ ├── component/
│ │ │ │ ├── input/
│ │ │ │ │ ├── InputFieldFormDialog.vue
│ │ │ │ │ ├── InputFieldTable.vue
│ │ │ │ │ └── InputTitleDialog.vue
│ │ │ │ └── output/
│ │ │ │ ├── OutputFieldFormDialog.vue
│ │ │ │ ├── OutputFieldTable.vue
│ │ │ │ └── OutputTitleDialog.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── tool-lib-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── tool-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── tool-start-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── tool-workflow-lib-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── variable-aggregation-node/
│ │ │ ├── component/
│ │ │ │ └── GroupFieldDialog.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── variable-assign-node/
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ ├── variable-splitting/
│ │ │ ├── component/
│ │ │ │ ├── VariableFieldDialog.vue
│ │ │ │ └── VariableFieldTable.vue
│ │ │ ├── index.ts
│ │ │ └── index.vue
│ │ └── video-understand/
│ │ ├── index.ts
│ │ └── index.vue
│ └── plugins/
│ └── dagre.ts
├── tsconfig.app.json
├── tsconfig.json
├── tsconfig.node.json
└── vite.config.ts
Showing preview only (536K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (6049 symbols across 777 files)
FILE: apps/application/api/application_access_token.py
class ApplicationAccessTokenAPI (line 16) | class ApplicationAccessTokenAPI(APIMixin):
method get_parameters (line 18) | def get_parameters():
method get_request (line 34) | def get_request():
FILE: apps/application/api/application_api.py
class ApplicationCreateRequest (line 20) | class ApplicationCreateRequest(ApplicationCreateSerializer.SimplateReque...
class ApplicationCreateResponse (line 24) | class ApplicationCreateResponse(ResultSerializer):
method get_data (line 25) | def get_data(self):
class ApplicationListResult (line 29) | class ApplicationListResult(ResultSerializer):
method get_data (line 30) | def get_data(self):
class ApplicationPageResult (line 34) | class ApplicationPageResult(ResultPageSerializer):
method get_data (line 35) | def get_data(self):
class ApplicationQueryAPI (line 39) | class ApplicationQueryAPI(APIMixin):
method get_parameters (line 41) | def get_parameters():
method get_response (line 102) | def get_response():
method get_page_response (line 106) | def get_page_response():
class ApplicationCreateAPI (line 110) | class ApplicationCreateAPI(APIMixin):
method get_parameters (line 112) | def get_parameters():
method get_request (line 124) | def get_request():
method get_response (line 128) | def get_response():
class ApplicationImportAPI (line 132) | class ApplicationImportAPI(APIMixin):
method get_parameters (line 134) | def get_parameters():
method get_request (line 138) | def get_request():
class ApplicationOperateAPI (line 142) | class ApplicationOperateAPI(APIMixin):
method get_parameters (line 144) | def get_parameters():
class ApplicationExportAPI (line 163) | class ApplicationExportAPI(APIMixin):
method get_parameters (line 165) | def get_parameters():
method get_response (line 169) | def get_response():
class ApplicationEditAPI (line 173) | class ApplicationEditAPI(APIMixin):
method get_request (line 175) | def get_request():
class TextToSpeechAPI (line 179) | class TextToSpeechAPI(APIMixin):
method get_parameters (line 181) | def get_parameters():
method get_request (line 185) | def get_request():
method get_response (line 189) | def get_response():
class SpeechToTextAPI (line 193) | class SpeechToTextAPI(APIMixin):
method get_parameters (line 195) | def get_parameters():
method get_request (line 199) | def get_request():
method get_response (line 203) | def get_response():
class PlayDemoTextAPI (line 207) | class PlayDemoTextAPI(APIMixin):
method get_parameters (line 209) | def get_parameters():
method get_request (line 213) | def get_request():
method get_response (line 217) | def get_response():
FILE: apps/application/api/application_api_key.py
class ApplicationKeyListResult (line 9) | class ApplicationKeyListResult(ResultSerializer):
method get_data (line 10) | def get_data(self):
class ApplicationKeyResult (line 14) | class ApplicationKeyResult(ResultSerializer):
method get_data (line 15) | def get_data(self):
class ApplicationKeyAPI (line 19) | class ApplicationKeyAPI(APIMixin):
method get_parameters (line 21) | def get_parameters():
method get_response (line 40) | def get_response():
class List (line 43) | class List(APIMixin):
method get_response (line 45) | def get_response():
class Operate (line 48) | class Operate(APIMixin):
method get_parameters (line 50) | def get_parameters():
method get_request (line 60) | def get_request():
FILE: apps/application/api/application_chat.py
class ApplicationChatListResponseSerializers (line 19) | class ApplicationChatListResponseSerializers(ResultSerializer):
method get_data (line 20) | def get_data(self):
class ApplicationChatPageResponseSerializers (line 24) | class ApplicationChatPageResponseSerializers(ResultPageSerializer):
method get_data (line 25) | def get_data(self):
class ApplicationChatQueryAPI (line 29) | class ApplicationChatQueryAPI(APIMixin):
method get_request (line 31) | def get_request():
method get_parameters (line 35) | def get_parameters():
method get_response (line 95) | def get_response():
class ApplicationChatQueryPageAPI (line 99) | class ApplicationChatQueryPageAPI(APIMixin):
method get_request (line 101) | def get_request():
method get_parameters (line 105) | def get_parameters():
method get_response (line 126) | def get_response():
class ApplicationChatExportAPI (line 130) | class ApplicationChatExportAPI(APIMixin):
method get_request (line 132) | def get_request():
method get_parameters (line 136) | def get_parameters():
method get_response (line 140) | def get_response():
FILE: apps/application/api/application_chat_link.py
class ChatRecordLinkAPI (line 17) | class ChatRecordLinkAPI(APIMixin):
method get_response (line 19) | def get_response():
method get_request (line 23) | def get_request():
method get_parameters (line 27) | def get_parameters():
class ChatRecordDetailShareAPI (line 45) | class ChatRecordDetailShareAPI(APIMixin):
method get_response (line 47) | def get_response():
method get_parameters (line 53) | def get_parameters():
FILE: apps/application/api/application_chat_record.py
class ApplicationChatRecordQueryAPI (line 18) | class ApplicationChatRecordQueryAPI(APIMixin):
method get_response (line 20) | def get_response():
method get_request (line 24) | def get_request():
method get_parameters (line 28) | def get_parameters():
class ApplicationChatRecordPageQueryAPI (line 60) | class ApplicationChatRecordPageQueryAPI(APIMixin):
method get_response (line 62) | def get_response():
method get_request (line 66) | def get_request():
method get_parameters (line 70) | def get_parameters():
class ApplicationChatRecordImproveParagraphAPI (line 88) | class ApplicationChatRecordImproveParagraphAPI(APIMixin):
method get_response (line 90) | def get_response():
method get_request (line 94) | def get_request():
method get_parameters (line 98) | def get_parameters():
class Operate (line 143) | class Operate(APIMixin):
method get_parameters (line 145) | def get_parameters():
class ApplicationChatRecordAddKnowledgeAPI (line 155) | class ApplicationChatRecordAddKnowledgeAPI(APIMixin):
method get_request (line 157) | def get_request():
method get_response (line 161) | def get_response():
method get_parameters (line 165) | def get_parameters():
FILE: apps/application/api/application_stats.py
class ApplicationStatsResult (line 17) | class ApplicationStatsResult(ResultSerializer):
method get_data (line 18) | def get_data(self):
class ApplicationStatsAPI (line 22) | class ApplicationStatsAPI(APIMixin):
method get_parameters (line 24) | def get_parameters():
method get_response (line 54) | def get_response():
FILE: apps/application/api/application_version.py
class ApplicationListVersionResult (line 17) | class ApplicationListVersionResult(ResultSerializer):
method get_data (line 18) | def get_data(self):
class ApplicationPageVersionResult (line 22) | class ApplicationPageVersionResult(ResultPageSerializer):
method get_data (line 23) | def get_data(self):
class ApplicationWorkflowVersionResult (line 27) | class ApplicationWorkflowVersionResult(ResultSerializer):
method get_data (line 28) | def get_data(self):
class ApplicationVersionAPI (line 32) | class ApplicationVersionAPI(APIMixin):
method get_parameters (line 34) | def get_parameters():
class ApplicationVersionOperateAPI (line 53) | class ApplicationVersionOperateAPI(APIMixin):
method get_parameters (line 55) | def get_parameters():
method get_response (line 68) | def get_response():
class ApplicationVersionListAPI (line 72) | class ApplicationVersionListAPI(APIMixin):
method get_parameters (line 74) | def get_parameters():
method get_response (line 85) | def get_response():
class ApplicationVersionPageAPI (line 89) | class ApplicationVersionPageAPI(APIMixin):
method get_parameters (line 91) | def get_parameters():
method get_response (line 95) | def get_response():
FILE: apps/application/apps.py
class ApplicationConfig (line 4) | class ApplicationConfig(AppConfig):
FILE: apps/application/chat_pipeline/I_base_chat_pipeline.py
class ParagraphPipelineModel (line 18) | class ParagraphPipelineModel:
method __init__ (line 20) | def __init__(self, _id: str, document_id: str, knowledge_id: str, cont...
method to_dict (line 40) | def to_dict(self):
class builder (line 57) | class builder:
method __init__ (line 58) | def __init__(self):
method add_paragraph (line 69) | def add_paragraph(self, paragraph):
method add_knowledge_name (line 83) | def add_knowledge_name(self, knowledge_name):
method add_knowledge_type (line 87) | def add_knowledge_type(self, knowledge_type):
method add_document_name (line 91) | def add_document_name(self, document_name):
method add_hit_handling_method (line 95) | def add_hit_handling_method(self, hit_handling_method):
method add_directly_return_similarity (line 99) | def add_directly_return_similarity(self, directly_return_similarity):
method add_comprehensive_score (line 103) | def add_comprehensive_score(self, comprehensive_score: float):
method add_similarity (line 107) | def add_similarity(self, similarity: float):
method add_meta (line 111) | def add_meta(self, meta: dict):
method build (line 115) | def build(self):
class IBaseChatPipelineStep (line 127) | class IBaseChatPipelineStep:
method __init__ (line 128) | def __init__(self):
method get_step_serializer (line 135) | def get_step_serializer(self, manage) -> Type[serializers.Serializer]:
method valid_args (line 138) | def valid_args(self, manage):
method run (line 144) | def run(self, manage):
method _run (line 174) | def _run(self, manage):
method execute (line 177) | def execute(self, **kwargs):
method get_details (line 180) | def get_details(self, manage, **kwargs):
FILE: apps/application/chat_pipeline/pipeline_manage.py
class PipelineManage (line 18) | class PipelineManage:
method __init__ (line 19) | def __init__(self, step_list: List[Type[IBaseChatPipelineStep]],
method run (line 30) | def run(self, context: Dict = None):
method get_details (line 39) | def get_details(self):
method get_base_to_response (line 44) | def get_base_to_response(self):
class builder (line 47) | class builder:
method __init__ (line 48) | def __init__(self):
method append_step (line 53) | def append_step(self, step: Type[IBaseChatPipelineStep]):
method add_base_to_response (line 57) | def add_base_to_response(self, base_to_response: BaseToResponse):
method add_debug (line 61) | def add_debug(self, debug):
method build (line 65) | def build(self):
FILE: apps/application/chat_pipeline/step/chat_step/i_chat_step.py
class ModelField (line 23) | class ModelField(serializers.Field):
method to_internal_value (line 24) | def to_internal_value(self, data):
method to_representation (line 29) | def to_representation(self, value):
class MessageField (line 33) | class MessageField(serializers.Field):
method to_internal_value (line 34) | def to_internal_value(self, data):
method to_representation (line 39) | def to_representation(self, value):
class PostResponseHandler (line 43) | class PostResponseHandler:
method handler (line 45) | def handler(self, chat_id, chat_record_id, paragraph_list: List[Paragr...
class IChatStep (line 51) | class IChatStep(IBaseChatPipelineStep):
class InstanceSerializer (line 52) | class InstanceSerializer(serializers.Serializer):
method is_valid (line 94) | def is_valid(self, *, raise_exception=False):
method get_step_serializer (line 101) | def get_step_serializer(self, manage: PipelineManage) -> Type[serializ...
method _run (line 104) | def _run(self, manage: PipelineManage):
method execute (line 109) | def execute(self, message_list: List[BaseMessage],
FILE: apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py
function add_access_num (line 37) | def add_access_num(chat_user_id=None, chat_user_type=None, application_i...
function write_context (line 50) | def write_context(step, manage, request_token, response_token, all_text):
function event_content (line 61) | def event_content(response,
class BaseChatStep (line 162) | class BaseChatStep(IChatStep):
method execute (line 163) | def execute(self, message_list: List[BaseMessage],
method get_details (line 209) | def get_details(self, manage, **kwargs):
method reset_message_list (line 224) | def reset_message_list(message_list: List[BaseMessage], answer_text):
method _handle_mcp_request (line 233) | def _handle_mcp_request(self, mcp_source, mcp_servers, mcp_tool_ids, t...
method get_stream_result (line 328) | def get_stream_result(self, message_list: List[BaseMessage],
method execute_stream (line 380) | def execute_stream(self, message_list: List[BaseMessage],
method get_block_result (line 418) | def get_block_result(self, message_list: List[BaseMessage],
method execute_block (line 469) | def execute_block(self, message_list: List[BaseMessage],
FILE: apps/application/chat_pipeline/step/generate_human_message_step/i_generate_human_message_step.py
class IGenerateHumanMessageStep (line 23) | class IGenerateHumanMessageStep(IBaseChatPipelineStep):
class InstanceSerializer (line 24) | class InstanceSerializer(serializers.Serializer):
method get_step_serializer (line 49) | def get_step_serializer(self, manage: PipelineManage) -> Type[serializ...
method _run (line 52) | def _run(self, manage: PipelineManage):
method execute (line 57) | def execute(self,
FILE: apps/application/chat_pipeline/step/generate_human_message_step/impl/base_generate_human_message_step.py
class BaseGenerateHumanMessageStep (line 20) | class BaseGenerateHumanMessageStep(IGenerateHumanMessageStep):
method execute (line 22) | def execute(self, problem_text: str,
method to_human_message (line 49) | def to_human_message(prompt: str,
method get_details (line 74) | def get_details(self, manage, **kwargs):
FILE: apps/application/chat_pipeline/step/reset_problem_step/i_reset_problem_step.py
class IResetProblemStep (line 21) | class IResetProblemStep(IBaseChatPipelineStep):
class InstanceSerializer (line 22) | class InstanceSerializer(serializers.Serializer):
method get_step_serializer (line 34) | def get_step_serializer(self, manage: PipelineManage) -> Type[serializ...
method _run (line 37) | def _run(self, manage: PipelineManage):
method execute (line 51) | def execute(self, problem_text: str, history_chat_record: List[ChatRec...
FILE: apps/application/chat_pipeline/step/reset_problem_step/impl/base_reset_problem_step.py
class BaseResetProblemStep (line 23) | class BaseResetProblemStep(IResetProblemStep):
method execute (line 24) | def execute(self, problem_text: str, history_chat_record: List[ChatRec...
method get_details (line 58) | def get_details(self, manage, **kwargs):
FILE: apps/application/chat_pipeline/step/search_dataset_step/i_search_dataset_step.py
class ISearchDatasetStep (line 21) | class ISearchDatasetStep(IBaseChatPipelineStep):
class InstanceSerializer (line 22) | class InstanceSerializer(serializers.Serializer):
method get_step_serializer (line 49) | def get_step_serializer(self, manage: PipelineManage) -> Type[Instance...
method _run (line 52) | def _run(self, manage: PipelineManage):
method execute (line 58) | def execute(self, problem_text: str, knowledge_id_list: list[str], exc...
FILE: apps/application/chat_pipeline/step/search_dataset_step/impl/base_search_dataset_step.py
function reset_meta (line 30) | def reset_meta(meta):
function get_embedding_id (line 36) | def get_embedding_id(knowledge_id_list):
class BaseSearchDatasetStep (line 46) | class BaseSearchDatasetStep(ISearchDatasetStep):
method execute (line 48) | def execute(self, problem_text: str, knowledge_id_list: list[str], exc...
method reset_paragraph (line 81) | def reset_paragraph(paragraph: Dict, embedding_list: List) -> Paragrap...
method get_similarity (line 99) | def get_similarity(paragraph, embedding_list: List):
method list_paragraph (line 108) | def list_paragraph(embedding_list: List, vector):
method get_details (line 135) | def get_details(self, manage, **kwargs):
FILE: apps/application/flow/backend/sandbox_shell.py
class SandboxShellBackend (line 15) | class SandboxShellBackend(LocalShellBackend):
method __init__ (line 16) | def __init__(self, root_dir: str, **kwargs):
method _translate_virtual_paths (line 32) | def _translate_virtual_paths(self, command: str) -> str:
method execute (line 53) | def execute(
FILE: apps/application/flow/common.py
class Answer (line 27) | class Answer:
method __init__ (line 28) | def __init__(self, content, view_type, runtime_node_id, chat_record_id...
method to_dict (line 38) | def to_dict(self):
class NodeChunk (line 46) | class NodeChunk:
method __init__ (line 47) | def __init__(self):
method add_chunk (line 51) | def add_chunk(self, chunk):
method end (line 54) | def end(self, chunk=None):
method is_end (line 59) | def is_end(self):
class Edge (line 63) | class Edge:
method __init__ (line 64) | def __init__(self, _id: str, _type: str, sourceNodeId: str, targetNode...
class Node (line 73) | class Node:
method __init__ (line 74) | def __init__(self, _id: str, _type: str, x: int, y: int, properties: d...
class EdgeNode (line 84) | class EdgeNode:
method __init__ (line 88) | def __init__(self, edge, node):
class WorkflowMode (line 93) | class WorkflowMode(Enum):
class Workflow (line 107) | class Workflow:
method __init__ (line 131) | def __init__(self, nodes: List[Node], edges: List[Edge],
method get_node (line 147) | def get_node(self, node_id):
method get_up_edge_nodes (line 155) | def get_up_edge_nodes(self, node_id) -> List[EdgeNode]:
method get_next_edge_nodes (line 163) | def get_next_edge_nodes(self, node_id) -> List[EdgeNode]:
method get_up_nodes (line 171) | def get_up_nodes(self, node_id) -> List[Node]:
method get_next_nodes (line 179) | def get_next_nodes(self, node_id) -> List[Node]:
method new_instance (line 188) | def new_instance(flow_obj: Dict, workflow_mode: WorkflowMode = Workflo...
method get_start_node (line 196) | def get_start_node(self):
method get_search_node (line 199) | def get_search_node(self):
method is_valid (line 202) | def is_valid(self):
method is_valid_node_params (line 211) | def is_valid_node_params(self, node: Node):
method is_valid_node (line 215) | def is_valid_node(self, node: Node):
method is_valid_work_flow (line 233) | def is_valid_work_flow(self, up_node=None):
method is_valid_start_node (line 241) | def is_valid_start_node(self):
method is_valid_model_params (line 248) | def is_valid_model_params(self):
method is_valid_base_node (line 277) | def is_valid_base_node(self):
FILE: apps/application/flow/compare/compare.py
class Compare (line 13) | class Compare:
method support (line 15) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 19) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/contain_compare.py
class ContainCompare (line 14) | class ContainCompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/end_with.py
class EndWithCompare (line 14) | class EndWithCompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/equal_compare.py
class EqualCompare (line 14) | class EqualCompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/ge_compare.py
class GECompare (line 14) | class GECompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/gt_compare.py
class GTCompare (line 14) | class GTCompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/is_not_null_compare.py
class IsNotNullCompare (line 14) | class IsNotNullCompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/is_not_true.py
class IsNotTrueCompare (line 14) | class IsNotTrueCompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/is_null_compare.py
class IsNullCompare (line 14) | class IsNullCompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/is_true.py
class IsTrueCompare (line 14) | class IsTrueCompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/le_compare.py
class LECompare (line 14) | class LECompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/len_equal_compare.py
class LenEqualCompare (line 14) | class LenEqualCompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/len_ge_compare.py
class LenGECompare (line 14) | class LenGECompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/len_gt_compare.py
class LenGTCompare (line 14) | class LenGTCompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/len_le_compare.py
class LenLECompare (line 14) | class LenLECompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/len_lt_compare.py
class LenLTCompare (line 14) | class LenLTCompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/lt_compare.py
class LTCompare (line 14) | class LTCompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/not_contain_compare.py
class NotContainCompare (line 14) | class NotContainCompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/not_equal_compare.py
class NotEqualCompare (line 14) | class NotEqualCompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/compare/start_with.py
class StartWithCompare (line 14) | class StartWithCompare(Compare):
method support (line 16) | def support(self, node_id, fields: List[str], source_value, compare, t...
method compare (line 20) | def compare(self, source_value, compare, target_value):
FILE: apps/application/flow/i_step_node.py
function write_context (line 30) | def write_context(step_variable: Dict, global_variable: Dict, node, work...
function is_interrupt (line 44) | def is_interrupt(node, step_variable: Dict, global_variable: Dict):
class WorkFlowPostHandler (line 48) | class WorkFlowPostHandler:
method __init__ (line 49) | def __init__(self, chat_info):
method handler (line 52) | def handler(self, workflow):
class KnowledgeWorkflowPostHandler (line 106) | class KnowledgeWorkflowPostHandler(WorkFlowPostHandler):
method __init__ (line 107) | def __init__(self, chat_info, knowledge_action_id):
method handler (line 111) | def handler(self, workflow):
function get_tool_workflow_state (line 119) | def get_tool_workflow_state(workflow):
class ToolWorkflowPostHandler (line 131) | class ToolWorkflowPostHandler(WorkFlowPostHandler):
method __init__ (line 132) | def __init__(self, chat_info, tool_id):
method handler (line 136) | def handler(self, workflow):
function get_loop_workflow_node (line 153) | def get_loop_workflow_node(node_list):
function get_workflow_state (line 163) | def get_workflow_state(workflow):
class NodeResult (line 178) | class NodeResult:
method __init__ (line 179) | def __init__(self, node_variable: Dict, workflow_variable: Dict,
method write_context (line 186) | def write_context(self, node, workflow):
method is_assertion_result (line 189) | def is_assertion_result(self):
method is_interrupt_exec (line 192) | def is_interrupt_exec(self, current_node):
class ReferenceAddressSerializer (line 201) | class ReferenceAddressSerializer(serializers.Serializer):
class FlowParamsSerializer (line 208) | class FlowParamsSerializer(serializers.Serializer):
class KnowledgeFlowParamsSerializer (line 234) | class KnowledgeFlowParamsSerializer(serializers.Serializer):
class ToolFlowParamsSerializer (line 242) | class ToolFlowParamsSerializer(serializers.Serializer):
class INode (line 247) | class INode:
method save_context (line 251) | def save_context(self, details, workflow_manage):
method get_answer_list (line 254) | def get_answer_list(self) -> List[Answer] | None:
method __init__ (line 263) | def __init__(self, node, workflow_params, workflow_manage, up_node_id_...
method valid_args (line 287) | def valid_args(self, node_params, flow_params):
method get_reference_field (line 299) | def get_reference_field(self, fields: List[str]):
method get_field (line 303) | def get_field(obj, fields: List[str]):
method get_node_params_serializer_class (line 313) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method get_flow_params_serializer_class (line 316) | def get_flow_params_serializer_class(self) -> Type[serializers.Seriali...
method get_write_error_context (line 319) | def get_write_error_context(self, e):
method run (line 331) | def run(self) -> NodeResult:
method _run (line 341) | def _run(self):
method execute (line 345) | def execute(self, **kwargs) -> NodeResult:
method get_details (line 348) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/knowledge_loop_workflow_manage.py
class KnowledgeLoopWorkflowManage (line 13) | class KnowledgeLoopWorkflowManage(LoopWorkflowManage):
method get_params_serializer_class (line 14) | def get_params_serializer_class(self):
method get_source_type (line 17) | def get_source_type(self):
method get_source_id (line 20) | def get_source_id(self):
FILE: apps/application/flow/knowledge_workflow_manage.py
class KnowledgeWorkflowManage (line 26) | class KnowledgeWorkflowManage(WorkflowManage):
method __init__ (line 28) | def __init__(self, flow: Workflow,
method get_params_serializer_class (line 38) | def get_params_serializer_class(self):
method get_start_node (line 41) | def get_start_node(self):
method run (line 46) | def run(self):
method _run (line 50) | def _run(self):
method get_node_details (line 60) | def get_node_details(current_node, node, index):
method run_chain (line 73) | def run_chain(self, current_node, node_result_future=None):
method hand_node_result (line 85) | def hand_node_result(self, current_node, node_result_future):
method get_source_type (line 126) | def get_source_type(self):
method get_source_id (line 129) | def get_source_id(self):
FILE: apps/application/flow/loop_workflow_manage.py
class NodeResultFuture (line 26) | class NodeResultFuture:
method __init__ (line 27) | def __init__(self, r, e, status=200):
method result (line 32) | def result(self):
function await_result (line 39) | def await_result(result, timeout=1):
class NodeChunkManage (line 47) | class NodeChunkManage:
method __init__ (line 49) | def __init__(self, work_flow):
method add_node_chunk (line 54) | def add_node_chunk(self, node_chunk):
method contains (line 57) | def contains(self, node_chunk):
method pop (line 60) | def pop(self):
class LoopWorkflowManage (line 85) | class LoopWorkflowManage(WorkflowManage):
method __init__ (line 87) | def __init__(self, flow: Workflow,
method get_node_cls_by_id (line 104) | def get_node_cls_by_id(self, node_id, up_node_id_list=None,
method stream (line 115) | def stream(self):
method get_index (line 121) | def get_index(self):
method get_start_node (line 124) | def get_start_node(self):
method get_reference_field (line 129) | def get_reference_field(self, node_id: str, fields: List[str]):
method get_workflow_content (line 148) | def get_workflow_content(self):
method init_fields (line 159) | def init_fields(self):
method reset_prompt (line 172) | def reset_prompt(self, prompt: str):
method generate_prompt (line 182) | def generate_prompt(self, prompt: str):
method get_source_type (line 195) | def get_source_type(self):
method get_source_id (line 198) | def get_source_id(self):
FILE: apps/application/flow/step_node/__init__.py
function get_node (line 62) | def get_node(node_type, workflow_model):
FILE: apps/application/flow/step_node/ai_chat_step_node/i_chat_node.py
class ChatNodeSerializer (line 18) | class ChatNodeSerializer(serializers.Serializer):
class IChatNode (line 53) | class IChatNode(INode):
method get_node_params_serializer_class (line 58) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 61) | def _run(self):
method execute (line 70) | def execute(self, model_id, system, prompt, dialogue_number, history_c...
FILE: apps/application/flow/step_node/ai_chat_step_node/impl/base_chat_node.py
function _write_context (line 31) | def _write_context(node_variable: Dict, workflow_variable: Dict, node: I...
function write_context_stream (line 46) | def write_context_stream(node_variable: Dict, workflow_variable: Dict, n...
function write_context (line 94) | def write_context(node_variable: Dict, workflow_variable: Dict, node: IN...
function get_default_model_params_setting (line 119) | def get_default_model_params_setting(model_id):
function get_node_message (line 127) | def get_node_message(chat_record, runtime_node_id):
function get_workflow_message (line 134) | def get_workflow_message(chat_record):
function get_message (line 138) | def get_message(chat_record, dialogue_type, runtime_node_id):
class BaseChatNode (line 143) | class BaseChatNode(IChatNode):
method save_context (line 144) | def save_context(self, details, workflow_manage):
method execute (line 152) | def execute(self, model_id, system, prompt, dialogue_number, history_c...
method _handle_mcp_request (line 237) | def _handle_mcp_request(self, mcp_source, mcp_servers, mcp_tool_id, mc...
method handle_variables (line 346) | def handle_variables(self, tool_params):
method get_reference_content (line 357) | def get_reference_content(self, fields: List[str]):
method get_history_message (line 363) | def get_history_message(history_chat_record, dialogue_number, dialogue...
method generate_prompt_question (line 374) | def generate_prompt_question(self, prompt):
method generate_message_list (line 377) | def generate_message_list(self, system: str, prompt: str, history_mess...
method reset_message_list (line 385) | def reset_message_list(message_list: List[BaseMessage], answer_text):
method get_details (line 393) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/application_node/i_application_node.py
class ApplicationNodeSerializer (line 14) | class ApplicationNodeSerializer(serializers.Serializer):
class IApplicationNode (line 30) | class IApplicationNode(INode):
method get_node_params_serializer_class (line 34) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 37) | def _run(self):
method execute (line 100) | def execute(self, application_id, message, chat_id, chat_record_id, st...
FILE: apps/application/flow/step_node/application_node/impl/base_application_node.py
function string_to_uuid (line 14) | def string_to_uuid(input_str):
function _is_interrupt_exec (line 18) | def _is_interrupt_exec(node, node_variable: Dict, workflow_variable: Dict):
function _write_context (line 22) | def _write_context(node_variable: Dict, workflow_variable: Dict, node: I...
function write_context_stream (line 39) | def write_context_stream(node_variable: Dict, workflow_variable: Dict, n...
function write_context (line 105) | def write_context(node_variable: Dict, workflow_variable: Dict, node: IN...
function reset_application_node_dict (line 125) | def reset_application_node_dict(application_node_dict, runtime_node_id, ...
class BaseApplicationNode (line 147) | class BaseApplicationNode(IApplicationNode):
method get_answer_list (line 148) | def get_answer_list(self) -> List[Answer] | None:
method save_context (line 165) | def save_context(self, details, workflow_manage):
method get_chat_asker (line 175) | def get_chat_asker(self, kwargs):
method execute (line 183) | def execute(self, application_id, message, chat_id, chat_record_id, st...
method get_details (line 255) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/condition_node/i_condition_node.py
class ConditionSerializer (line 18) | class ConditionSerializer(serializers.Serializer):
class ConditionBranchSerializer (line 24) | class ConditionBranchSerializer(serializers.Serializer):
class ConditionNodeParamsSerializer (line 31) | class ConditionNodeParamsSerializer(serializers.Serializer):
class IConditionNode (line 35) | class IConditionNode(INode):
method get_node_params_serializer_class (line 36) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
FILE: apps/application/flow/step_node/condition_node/impl/base_condition_node.py
class BaseConditionNode (line 16) | class BaseConditionNode(IConditionNode):
method save_context (line 17) | def save_context(self, details, workflow_manage):
method execute (line 22) | def execute(self, **kwargs) -> NodeResult:
method _execute (line 28) | def _execute(self, branch_list: List):
method branch_assertion (line 33) | def branch_assertion(self, branch):
method assertion (line 39) | def assertion(self, field_list: List[str], compare: str, value):
method get_details (line 53) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/data_source_local_node/i_data_source_local_node.py
class DataSourceLocalNodeParamsSerializer (line 19) | class DataSourceLocalNodeParamsSerializer(serializers.Serializer):
class IDataSourceLocalNode (line 25) | class IDataSourceLocalNode(INode):
method get_form_list (line 30) | def get_form_list(node):
method get_node_params_serializer_class (line 33) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 36) | def _run(self):
method execute (line 39) | def execute(self, file_type_list, file_size_limit, file_count_limit, *...
FILE: apps/application/flow/step_node/data_source_local_node/impl/base_data_source_local_node.py
class BaseDataSourceLocalNodeForm (line 15) | class BaseDataSourceLocalNodeForm(BaseForm):
class BaseDataSourceLocalNode (line 19) | class BaseDataSourceLocalNode(IDataSourceLocalNode):
method save_context (line 20) | def save_context(self, details, workflow_manage):
method get_form_list (line 24) | def get_form_list(node):
method execute (line 37) | def execute(self, file_type_list, file_size_limit, file_count_limit, *...
method get_details (line 41) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/data_source_web_node/i_data_source_web_node.py
class IDataSourceWebNode (line 15) | class IDataSourceWebNode(INode):
method get_form_list (line 21) | def get_form_list(node):
method _run (line 24) | def _run(self):
method execute (line 27) | def execute(self, **kwargs) -> NodeResult:
FILE: apps/application/flow/step_node/data_source_web_node/impl/base_data_source_web_node.py
class BaseDataSourceWebNodeForm (line 21) | class BaseDataSourceWebNodeForm(BaseForm):
class InterruptedTaskException (line 28) | class InterruptedTaskException(Exception):
method __init__ (line 29) | def __init__(self, *args, **kwargs): # real signature unknown
function get_collect_handler (line 33) | def get_collect_handler(workflow_manage):
class BaseDataSourceWebNode (line 54) | class BaseDataSourceWebNode(IDataSourceWebNode):
method save_context (line 55) | def save_context(self, details, workflow_manage):
method get_form_list (line 59) | def get_form_list(node):
method execute (line 62) | def execute(self, **kwargs) -> NodeResult:
method get_details (line 86) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/direct_reply_node/i_reply_node.py
class ReplyNodeParamsSerializer (line 20) | class ReplyNodeParamsSerializer(serializers.Serializer):
method is_valid (line 28) | def is_valid(self, *, raise_exception=False):
class IReplyNode (line 40) | class IReplyNode(INode):
method get_node_params_serializer_class (line 45) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 48) | def _run(self):
method execute (line 57) | def execute(self, reply_type, stream, fields=None, content=None, **kwa...
FILE: apps/application/flow/step_node/direct_reply_node/impl/base_reply_node.py
class BaseReplyNode (line 15) | class BaseReplyNode(IReplyNode):
method save_context (line 16) | def save_context(self, details, workflow_manage):
method execute (line 22) | def execute(self, reply_type, stream, fields=None, content=None, **kwa...
method generate_reply_content (line 29) | def generate_reply_content(self, prompt):
method get_reference_content (line 32) | def get_reference_content(self, fields: List[str]):
method get_details (line 37) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/document_extract_node/i_document_extract_node.py
class DocumentExtractNodeSerializer (line 12) | class DocumentExtractNodeSerializer(serializers.Serializer):
class IDocumentExtractNode (line 16) | class IDocumentExtractNode(INode):
method get_node_params_serializer_class (line 21) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 24) | def _run(self):
method execute (line 29) | def execute(self, document, chat_id=None, **kwargs) -> NodeResult:
FILE: apps/application/flow/step_node/document_extract_node/impl/base_document_extract_node.py
class BaseDocumentExtractNode (line 16) | class BaseDocumentExtractNode(IDocumentExtractNode):
method save_context (line 17) | def save_context(self, details, workflow_manage):
method execute (line 21) | def execute(self, document, chat_id=None, **kwargs):
method get_details (line 77) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/document_split_node/i_document_split_node.py
class DocumentSplitNodeSerializer (line 12) | class DocumentSplitNodeSerializer(serializers.Serializer):
class IDocumentSplitNode (line 72) | class IDocumentSplitNode(INode):
method get_node_params_serializer_class (line 79) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 82) | def _run(self):
method execute (line 85) | def execute(self, document_list, knowledge_id, split_strategy, paragra...
FILE: apps/application/flow/step_node/document_split_node/impl/base_document_split_node.py
function bytes_to_uploaded_file (line 14) | def bytes_to_uploaded_file(file_bytes, file_name="file.txt"):
class BaseDocumentSplitNode (line 39) | class BaseDocumentSplitNode(IDocumentSplitNode):
method save_context (line 40) | def save_context(self, details, workflow_manage):
method get_reference_content (line 44) | def get_reference_content(self, fields: List[str]):
method execute (line 47) | def execute(self, document_list, knowledge_id, split_strategy, paragra...
method _save_image (line 100) | def _save_image(self, image_list):
method _process_split_result (line 103) | def _process_split_result(
method _generate_problem_list (line 132) | def _generate_problem_list(
method get_details (line 164) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/form_node/i_form_node.py
class FormNodeParamsSerializer (line 19) | class FormNodeParamsSerializer(serializers.Serializer):
class IFormNode (line 25) | class IFormNode(INode):
method get_node_params_serializer_class (line 30) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 33) | def _run(self):
method execute (line 36) | def execute(self, form_field_list, form_content_format, form_data, **k...
FILE: apps/application/flow/step_node/form_node/impl/base_form_node.py
function get_default_option (line 25) | def get_default_option(option_list, _type, value_field):
function write_context (line 43) | def write_context(step_variable: Dict, global_variable: Dict, node, work...
function generate_prompt (line 54) | def generate_prompt(workflow_manage, _value):
class BaseFormNode (line 61) | class BaseFormNode(IFormNode):
method save_context (line 62) | def save_context(self, details, workflow_manage):
method reset_field (line 78) | def reset_field(self, field):
method execute (line 109) | def execute(self, form_field_list, form_content_format, form_data, **k...
method get_answer_list (line 133) | def get_answer_list(self) -> List[Answer] | None:
method get_details (line 151) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/image_generate_step_node/i_image_generate_node.py
class ImageGenerateNodeSerializer (line 12) | class ImageGenerateNodeSerializer(serializers.Serializer):
class IImageGenerateNode (line 33) | class IImageGenerateNode(INode):
method get_node_params_serializer_class (line 38) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 41) | def _run(self):
method execute (line 50) | def execute(self, model_id, prompt, negative_prompt, dialogue_number, ...
FILE: apps/application/flow/step_node/image_generate_step_node/impl/base_image_generate_node.py
class BaseImageGenerateNode (line 17) | class BaseImageGenerateNode(IImageGenerateNode):
method save_context (line 18) | def save_context(self, details, workflow_manage):
method execute (line 25) | def execute(self, model_id, prompt, negative_prompt, dialogue_number, ...
method generate_history_ai_message (line 66) | def generate_history_ai_message(self, chat_record):
method get_history_message (line 77) | def get_history_message(self, history_chat_record, dialogue_number):
method generate_history_human_message (line 86) | def generate_history_human_message(self, chat_record):
method generate_prompt_question (line 96) | def generate_prompt_question(self, prompt):
method generate_message_list (line 99) | def generate_message_list(self, question: str, history_message):
method upload_file (line 105) | def upload_file(self, file):
method upload_knowledge_file (line 111) | def upload_knowledge_file(self, file):
method upload_application_file (line 125) | def upload_application_file(self, file):
method reset_message_list (line 142) | def reset_message_list(message_list: List[BaseMessage], answer_text):
method get_details (line 150) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/image_to_video_step_node/i_image_to_video_node.py
class ImageToVideoNodeSerializer (line 12) | class ImageToVideoNodeSerializer(serializers.Serializer):
class IImageToVideoNode (line 36) | class IImageToVideoNode(INode):
method get_node_params_serializer_class (line 41) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 44) | def _run(self):
method execute (line 68) | def execute(self, model_id, prompt, negative_prompt, dialogue_number, ...
FILE: apps/application/flow/step_node/image_to_video_step_node/impl/base_image_to_video_node.py
class BaseImageToVideoNode (line 20) | class BaseImageToVideoNode(IImageToVideoNode):
method save_context (line 21) | def save_context(self, details, workflow_manage):
method execute (line 28) | def execute(self, model_id, prompt, negative_prompt, dialogue_number, ...
method get_file_base64 (line 65) | def get_file_base64(self, image_url):
method upload_file (line 82) | def upload_file(self, file):
method upload_knowledge_file (line 88) | def upload_knowledge_file(self, file):
method upload_application_file (line 102) | def upload_application_file(self, file):
method generate_history_ai_message (line 118) | def generate_history_ai_message(self, chat_record):
method get_history_message (line 129) | def get_history_message(self, history_chat_record, dialogue_number):
method generate_history_human_message (line 138) | def generate_history_human_message(self, chat_record):
method generate_prompt_question (line 148) | def generate_prompt_question(self, prompt):
method generate_message_list (line 151) | def generate_message_list(self, question: str, history_message):
method reset_message_list (line 158) | def reset_message_list(message_list: List[BaseMessage], answer_text):
method get_details (line 166) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/image_understand_step_node/i_image_understand_node.py
class ImageUnderstandNodeSerializer (line 13) | class ImageUnderstandNodeSerializer(serializers.Serializer):
class IImageUnderstandNode (line 32) | class IImageUnderstandNode(INode):
method get_node_params_serializer_class (line 37) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 40) | def _run(self):
method execute (line 51) | def execute(self, model_id, system, prompt, dialogue_number, dialogue_...
FILE: apps/application/flow/step_node/image_understand_step_node/impl/base_image_understand_node.py
function _write_context (line 17) | def _write_context(node_variable: Dict, workflow_variable: Dict, node: I...
function write_context_stream (line 31) | def write_context_stream(node_variable: Dict, workflow_variable: Dict, n...
function write_context (line 54) | def write_context(node_variable: Dict, workflow_variable: Dict, node: IN...
function file_id_to_base64 (line 67) | def file_id_to_base64(file_id: str):
class BaseImageUnderstandNode (line 74) | class BaseImageUnderstandNode(IImageUnderstandNode):
method save_context (line 75) | def save_context(self, details, workflow_manage):
method execute (line 82) | def execute(self, model_id, system, prompt, dialogue_number, dialogue_...
method generate_context_image (line 113) | def generate_context_image(self, image):
method get_history_message_for_details (line 119) | def get_history_message_for_details(self, history_chat_record, dialogu...
method generate_history_ai_message (line 128) | def generate_history_ai_message(self, chat_record):
method generate_history_human_message_for_details (line 136) | def generate_history_human_message_for_details(self, chat_record):
method get_history_message (line 157) | def get_history_message(self, history_chat_record, dialogue_number):
method generate_history_human_message (line 166) | def generate_history_human_message(self, chat_record):
method generate_prompt_question (line 192) | def generate_prompt_question(self, prompt):
method _process_images (line 195) | def _process_images(self, image):
method generate_message_list (line 217) | def generate_message_list(self, image_model, system: str, prompt: str,...
method reset_message_list (line 239) | def reset_message_list(message_list: List[BaseMessage], answer_text):
method get_details (line 247) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/intent_node/i_intent_node.py
class IntentBranchSerializer (line 12) | class IntentBranchSerializer(serializers.Serializer):
class IntentNodeSerializer (line 18) | class IntentNodeSerializer(serializers.Serializer):
class IIntentNode (line 28) | class IIntentNode(INode):
method save_context (line 33) | def save_context(self, details, workflow_manage):
method get_node_params_serializer_class (line 36) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 39) | def _run(self):
method execute (line 54) | def execute(self, model_id, dialogue_number, history_chat_record, user...
FILE: apps/application/flow/step_node/intent_node/impl/base_intent_node.py
function get_default_model_params_setting (line 18) | def get_default_model_params_setting(model_id):
function _write_context (line 26) | def _write_context(node_variable: Dict, workflow_variable: Dict, node: I...
function write_context (line 42) | def write_context(node_variable: Dict, workflow_variable: Dict, node: IN...
class BaseIntentNode (line 48) | class BaseIntentNode(IIntentNode):
method save_context (line 50) | def save_context(self, details, workflow_manage):
method execute (line 55) | def execute(self, model_id, dialogue_number, history_chat_record, user...
method get_history_message (line 115) | def get_history_message(history_chat_record, dialogue_number):
method build_system_prompt (line 128) | def build_system_prompt(self) -> str:
method build_classification_prompt (line 132) | def build_classification_prompt(self, user_input: str, branch: List[Di...
method generate_message_list (line 159) | def generate_message_list(self, system: str, prompt: str, history_mess...
method parse_classification_result (line 167) | def parse_classification_result(self, result: str, branch: List[Dict])...
method parse_result_reason (line 205) | def parse_result_reason(self, result: str):
method find_other_branch (line 226) | def find_other_branch(self, branch: List[Dict]) -> Dict[str, Any] | None:
method get_details (line 233) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/knowledge_write_node/i_knowledge_write_node.py
class KnowledgeWriteNodeParamSerializer (line 18) | class KnowledgeWriteNodeParamSerializer(serializers.Serializer):
class IKnowledgeWriteNode (line 23) | class IKnowledgeWriteNode(INode):
method save_context (line 25) | def save_context(self, details, workflow_manage):
method get_node_params_serializer_class (line 28) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 31) | def _run(self):
method execute (line 39) | def execute(self, documents, **kwargs) -> NodeResult:
FILE: apps/application/flow/step_node/knowledge_write_node/impl/base_knowledge_write_node.py
class ParagraphInstanceSerializer (line 27) | class ParagraphInstanceSerializer(serializers.Serializer):
class TagInstanceSerializer (line 37) | class TagInstanceSerializer(serializers.Serializer):
class KnowledgeWriteParamSerializer (line 42) | class KnowledgeWriteParamSerializer(serializers.Serializer):
function convert_uuid_to_str (line 51) | def convert_uuid_to_str(obj):
function link_file (line 62) | def link_file(source_file_id, document_id):
function get_paragraph_problem_model (line 82) | def get_paragraph_problem_model(knowledge_id: str, document_id: str, ins...
function get_paragraph_model (line 103) | def get_paragraph_model(document_model, paragraph_list: List):
function get_document_paragraph_model (line 125) | def get_document_paragraph_model(knowledge_id: str, instance: Dict):
function save_knowledge_tags (line 150) | def save_knowledge_tags(knowledge_id: str, tags: List[Dict[str, Any]]):
function batch_add_document_tag (line 180) | def batch_add_document_tag(document_tag_map: Dict[str, List[str]]):
class BaseKnowledgeWriteNode (line 211) | class BaseKnowledgeWriteNode(IKnowledgeWriteNode):
method save_context (line 213) | def save_context(self, details, workflow_manage):
method save (line 216) | def save(self, document_list):
method post_embedding (line 297) | def post_embedding(document_model_list, knowledge_id, workspace_id):
method execute (line 305) | def execute(self, documents, **kwargs) -> NodeResult:
method get_details (line 320) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/loop_break_node/i_loop_break_node.py
class ConditionSerializer (line 19) | class ConditionSerializer(serializers.Serializer):
class LoopBreakNodeSerializer (line 25) | class LoopBreakNodeSerializer(serializers.Serializer):
class ILoopBreakNode (line 30) | class ILoopBreakNode(INode):
method get_node_params_serializer_class (line 34) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 37) | def _run(self):
method execute (line 40) | def execute(self, condition, condition_list, **kwargs) -> NodeResult:
FILE: apps/application/flow/step_node/loop_break_node/impl/base_loop_break_node.py
function _write_context (line 17) | def _write_context(step_variable: Dict, global_variable: Dict, node, wor...
class BaseLoopBreakNode (line 24) | class BaseLoopBreakNode(ILoopBreakNode):
method save_context (line 25) | def save_context(self, details, workflow_manage):
method execute (line 28) | def execute(self, condition, condition_list, **kwargs) -> NodeResult:
method assertion (line 39) | def assertion(self, field_list: List[str], compare: str, value):
method get_details (line 53) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/loop_continue_node/i_loop_continue_node.py
class ConditionSerializer (line 18) | class ConditionSerializer(serializers.Serializer):
class LoopContinueNodeSerializer (line 24) | class LoopContinueNodeSerializer(serializers.Serializer):
class ILoopContinueNode (line 29) | class ILoopContinueNode(INode):
method get_node_params_serializer_class (line 33) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 36) | def _run(self):
method execute (line 39) | def execute(self, condition, condition_list, **kwargs) -> NodeResult:
FILE: apps/application/flow/step_node/loop_continue_node/impl/base_loop_continue_node.py
class BaseLoopContinueNode (line 16) | class BaseLoopContinueNode(ILoopContinueNode):
method save_context (line 17) | def save_context(self, details, workflow_manage):
method execute (line 20) | def execute(self, condition, condition_list, **kwargs) -> NodeResult:
method assertion (line 29) | def assertion(self, field_list: List[str], compare: str, value):
method get_details (line 43) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/loop_node/i_loop_node.py
class ILoopNodeSerializer (line 19) | class ILoopNodeSerializer(serializers.Serializer):
method is_valid (line 27) | def is_valid(self, *, raise_exception=False):
class ILoopNode (line 42) | class ILoopNode(INode):
method get_node_params_serializer_class (line 46) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 49) | def _run(self):
method execute (line 57) | def execute(self, loop_type, array, number, loop_body, **kwargs) -> No...
FILE: apps/application/flow/step_node/loop_node/impl/base_loop_node.py
function _is_interrupt_exec (line 25) | def _is_interrupt_exec(node, node_variable: Dict, workflow_variable: Dict):
function _write_context (line 29) | def _write_context(node_variable: Dict, workflow_variable: Dict, node: I...
function write_context_stream (line 38) | def write_context_stream(node_variable: Dict, workflow_variable: Dict, n...
function write_context (line 62) | def write_context(node_variable: Dict, workflow_variable: Dict, node: IN...
function get_answer_list (line 85) | def get_answer_list(instance, child_node_node_dict, runtime_node_id):
function insert_or_replace (line 95) | def insert_or_replace(arr, index, value):
function generate_loop_number (line 105) | def generate_loop_number(number: int):
function generate_loop_array (line 112) | def generate_loop_array(array):
function generate_while_loop (line 119) | def generate_while_loop(current_index: int):
function loop (line 126) | def loop(workflow_manage_new_instance, node: INode, generate_loop):
function get_tokens (line 215) | def get_tokens(loop_node_data):
function get_write_context (line 226) | def get_write_context(loop_type, array, number, loop_body):
class LoopWorkFlowPostHandler (line 237) | class LoopWorkFlowPostHandler(WorkFlowPostHandler):
method handler (line 238) | def handler(self, workflow):
class BaseLoopNode (line 242) | class BaseLoopNode(ILoopNode):
method save_context (line 243) | def save_context(self, details, workflow_manage):
method get_answer_list (line 256) | def get_answer_list(self) -> List[Answer] | None:
method get_loop_context (line 265) | def get_loop_context(self):
method execute (line 268) | def execute(self, loop_type, array, number, loop_body, **kwargs) -> No...
method get_loop_context_data (line 302) | def get_loop_context_data(self):
method get_details (line 307) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/loop_start_node/i_loop_start_node.py
class ILoopStarNode (line 13) | class ILoopStarNode(INode):
method _run (line 17) | def _run(self):
method execute (line 20) | def execute(self, **kwargs) -> NodeResult:
FILE: apps/application/flow/step_node/loop_start_node/impl/base_start_node.py
class BaseLoopStartStepNode (line 18) | class BaseLoopStartStepNode(ILoopStarNode):
method save_context (line 19) | def save_context(self, details, workflow_manage):
method get_node_params_serializer_class (line 24) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method execute (line 27) | def execute(self, **kwargs) -> NodeResult:
method get_details (line 40) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/mcp_node/i_mcp_node.py
class McpNodeSerializer (line 12) | class McpNodeSerializer(serializers.Serializer):
class IMcpNode (line 21) | class IMcpNode(INode):
method get_node_params_serializer_class (line 26) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 29) | def _run(self):
method execute (line 32) | def execute(self, mcp_servers, mcp_server, mcp_tool, mcp_tool_id, mcp_...
FILE: apps/application/flow/step_node/mcp_node/impl/base_mcp_node.py
class BaseMcpNode (line 14) | class BaseMcpNode(IMcpNode):
method save_context (line 15) | def save_context(self, details, workflow_manage):
method execute (line 21) | def execute(self, mcp_servers, mcp_server, mcp_tool, mcp_tool_id, mcp_...
method handle_variables (line 49) | def handle_variables(self, tool_params):
method get_reference_content (line 60) | def get_reference_content(self, fields: List[str]):
method get_details (line 65) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/parameter_extraction_node/i_parameter_extraction_node.py
class VariableSplittingNodeParamsSerializer (line 12) | class VariableSplittingNodeParamsSerializer(serializers.Serializer):
class IParameterExtractionNode (line 25) | class IParameterExtractionNode(INode):
method get_node_params_serializer_class (line 30) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 33) | def _run(self):
method execute (line 41) | def execute(self, input_variable, variable_list, model_params_setting,...
FILE: apps/application/flow/step_node/parameter_extraction_node/impl/base_parameter_extraction_node.py
function get_default_model_params_setting (line 40) | def get_default_model_params_setting(model_id):
function generate_properties (line 48) | def generate_properties(variable_list):
function generate_example (line 54) | def generate_example(variable_list):
function generate_content (line 58) | def generate_content(input_variable, variable_list):
function json_loads (line 65) | def json_loads(response, expected_fields):
class BaseParameterExtractionNode (line 85) | class BaseParameterExtractionNode(IParameterExtractionNode):
method save_context (line 87) | def save_context(self, details, workflow_manage):
method execute (line 94) | def execute(self, input_variable, variable_list, model_params_setting,...
method get_details (line 107) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/question_node/i_question_node.py
class QuestionNodeSerializer (line 18) | class QuestionNodeSerializer(serializers.Serializer):
class IQuestionNode (line 33) | class IQuestionNode(INode):
method get_node_params_serializer_class (line 38) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 41) | def _run(self):
method execute (line 44) | def execute(self, model_id, system, prompt, dialogue_number, history_c...
FILE: apps/application/flow/step_node/question_node/impl/base_question_node.py
function _write_context (line 23) | def _write_context(node_variable: Dict, workflow_variable: Dict, node: I...
function write_context_stream (line 37) | def write_context_stream(node_variable: Dict, workflow_variable: Dict, n...
function write_context (line 53) | def write_context(node_variable: Dict, workflow_variable: Dict, node: IN...
function get_default_model_params_setting (line 66) | def get_default_model_params_setting(model_id):
class BaseQuestionNode (line 74) | class BaseQuestionNode(IQuestionNode):
method save_context (line 75) | def save_context(self, details, workflow_manage):
method execute (line 85) | def execute(self, model_id, system, prompt, dialogue_number, history_c...
method get_history_message (line 113) | def get_history_message(history_chat_record, dialogue_number):
method generate_prompt_question (line 124) | def generate_prompt_question(self, prompt):
method generate_message_list (line 127) | def generate_message_list(self, system: str, prompt: str, history_mess...
method reset_message_list (line 135) | def reset_message_list(message_list: List[BaseMessage], answer_text):
method get_details (line 143) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/reranker_node/i_reranker_node.py
class RerankerSettingSerializer (line 19) | class RerankerSettingSerializer(serializers.Serializer):
class RerankerStepNodeSerializer (line 30) | class RerankerStepNodeSerializer(serializers.Serializer):
method is_valid (line 39) | def is_valid(self, *, raise_exception=False):
class IRerankerNode (line 43) | class IRerankerNode(INode):
method get_node_params_serializer_class (line 47) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 50) | def _run(self):
method execute (line 62) | def execute(self, question, reranker_setting, reranker_list, reranker_...
FILE: apps/application/flow/step_node/reranker_node/impl/base_reranker_node.py
function merge_reranker_list (line 18) | def merge_reranker_list(reranker_list, result=None):
function filter_result (line 35) | def filter_result(document_list: List[Document], max_paragraph_char_numb...
function reset_result_list (line 49) | def reset_result_list(result_list: List[Document], document_list: List[D...
function get_none_result (line 64) | def get_none_result(question):
function reset_metadata (line 70) | def reset_metadata(metadata):
class BaseRerankerNode (line 78) | class BaseRerankerNode(IRerankerNode):
method save_context (line 79) | def save_context(self, details, workflow_manage):
method execute (line 87) | def execute(self, question, reranker_setting, reranker_list, reranker_...
method get_details (line 112) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/search_document_node/i_search_document_node.py
class SearchDocumentStepNodeSerializer (line 11) | class SearchDocumentStepNodeSerializer(serializers.Serializer):
method is_valid (line 40) | def is_valid(self, *, raise_exception=False):
class ISearchDocumentStepNode (line 44) | class ISearchDocumentStepNode(INode):
method get_node_params_serializer_class (line 48) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 51) | def _run(self):
method execute (line 54) | def execute(self, knowledge_id_list: List, search_mode: str, search_sc...
FILE: apps/application/flow/step_node/search_document_node/impl/base_search_document_node.py
class BaseSearchDocumentNode (line 16) | class BaseSearchDocumentNode(ISearchDocumentStepNode):
method save_context (line 17) | def save_context(self, details, workflow_manage):
method get_reference_content (line 26) | def get_reference_content(self, fields: List[str]):
method execute (line 29) | def execute(self, knowledge_id_list: List, search_mode: str, search_sc...
method handle_auto_tags (line 93) | def handle_auto_tags(self, document_id_list: list, question_reference:...
method handle_custom_tags (line 117) | def handle_custom_tags(self, document_id_list: List, search_condition_...
method get_details (line 198) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/search_knowledge_node/i_search_knowledge_node.py
class DatasetSettingSerializer (line 21) | class DatasetSettingSerializer(serializers.Serializer):
class SearchDatasetStepNodeSerializer (line 36) | class SearchDatasetStepNodeSerializer(serializers.Serializer):
method is_valid (line 58) | def is_valid(self, *, raise_exception=False):
function get_paragraph_list (line 62) | def get_paragraph_list(chat_record, node_id):
class ISearchKnowledgeStepNode (line 69) | class ISearchKnowledgeStepNode(INode):
method get_node_params_serializer_class (line 73) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 76) | def _run(self):
method execute (line 91) | def execute(self, dataset_id_list, dataset_setting, question, show_kno...
FILE: apps/application/flow/step_node/search_knowledge_node/impl/base_search_knowledge_node.py
function get_embedding_id (line 28) | def get_embedding_id(dataset_id_list):
function get_none_result (line 37) | def get_none_result(question):
function reset_title (line 43) | def reset_title(title):
function reset_meta (line 50) | def reset_meta(meta):
class BaseSearchKnowledgeNode (line 56) | class BaseSearchKnowledgeNode(ISearchKnowledgeStepNode):
method save_context (line 57) | def save_context(self, details, workflow_manage):
method get_reference_content (line 73) | def get_reference_content(self, fields: List[str]):
method execute (line 76) | def execute(self, knowledge_id_list, knowledge_setting, question, show...
method reset_paragraph (line 139) | def reset_paragraph(paragraph: Dict, embedding_list: List):
method list_paragraph (line 158) | def list_paragraph(embedding_list: List, vector):
method get_details (line 175) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/speech_to_text_step_node/i_speech_to_text_node.py
class SpeechToTextNodeSerializer (line 12) | class SpeechToTextNodeSerializer(serializers.Serializer):
class ISpeechToTextNode (line 24) | class ISpeechToTextNode(INode):
method get_node_params_serializer_class (line 29) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 32) | def _run(self):
method execute (line 42) | def execute(self, stt_model_id,
FILE: apps/application/flow/step_node/speech_to_text_step_node/impl/base_speech_to_text_node.py
class BaseSpeechToTextNode (line 15) | class BaseSpeechToTextNode(ISpeechToTextNode):
method save_context (line 17) | def save_context(self, details, workflow_manage):
method execute (line 24) | def execute(self, stt_model_id, audio, model_params_setting=None, **kw...
method get_details (line 62) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/start_node/i_start_node.py
class IStarNode (line 13) | class IStarNode(INode):
method _run (line 17) | def _run(self):
method execute (line 20) | def execute(self, question, **kwargs) -> NodeResult:
FILE: apps/application/flow/step_node/start_node/impl/base_start_node.py
function get_default_global_variable (line 19) | def get_default_global_variable(input_field_list: List):
function get_global_variable (line 27) | def get_global_variable(node):
class BaseStartStepNode (line 42) | class BaseStartStepNode(IStarNode):
method save_context (line 43) | def save_context(self, details, workflow_manage):
method get_node_params_serializer_class (line 64) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method execute (line 67) | def execute(self, question, **kwargs) -> NodeResult:
method get_details (line 87) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/text_to_speech_step_node/i_text_to_speech_node.py
class TextToSpeechNodeSerializer (line 13) | class TextToSpeechNodeSerializer(serializers.Serializer):
class ITextToSpeechNode (line 24) | class ITextToSpeechNode(INode):
method get_node_params_serializer_class (line 29) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 32) | def _run(self):
method execute (line 37) | def execute(self, tts_model_id,
FILE: apps/application/flow/step_node/text_to_speech_step_node/impl/base_text_to_speech_node.py
function bytes_to_uploaded_file (line 17) | def bytes_to_uploaded_file(file_bytes, file_name="generated_audio.mp3"):
class BaseTextToSpeechNode (line 39) | class BaseTextToSpeechNode(ITextToSpeechNode):
method save_context (line 40) | def save_context(self, details, workflow_manage):
method execute (line 47) | def execute(self, tts_model_id,
method upload_file (line 101) | def upload_file(self, file):
method upload_knowledge_file (line 107) | def upload_knowledge_file(self, file):
method upload_application_file (line 121) | def upload_application_file(self, file):
method get_details (line 137) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/text_to_video_step_node/i_text_to_video_node.py
class TextToVideoNodeSerializer (line 12) | class TextToVideoNodeSerializer(serializers.Serializer):
class ITextToVideoNode (line 33) | class ITextToVideoNode(INode):
method get_node_params_serializer_class (line 38) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 41) | def _run(self):
method execute (line 50) | def execute(self, model_id, prompt, negative_prompt, dialogue_number, ...
FILE: apps/application/flow/step_node/text_to_video_step_node/impl/base_text_to_video_node.py
class BaseTextToVideoNode (line 18) | class BaseTextToVideoNode(ITextToVideoNode):
method save_context (line 19) | def save_context(self, details, workflow_manage):
method execute (line 26) | def execute(self, model_id, prompt, negative_prompt, dialogue_number, ...
method upload_file (line 56) | def upload_file(self, file):
method upload_knowledge_file (line 62) | def upload_knowledge_file(self, file):
method upload_application_file (line 76) | def upload_application_file(self, file):
method generate_history_ai_message (line 92) | def generate_history_ai_message(self, chat_record):
method get_history_message (line 103) | def get_history_message(self, history_chat_record, dialogue_number):
method generate_history_human_message (line 112) | def generate_history_human_message(self, chat_record):
method generate_prompt_question (line 122) | def generate_prompt_question(self, prompt):
method generate_message_list (line 125) | def generate_message_list(self, question: str, history_message):
method reset_message_list (line 132) | def reset_message_list(message_list: List[BaseMessage], answer_text):
method get_details (line 140) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/tool_lib_node/i_tool_lib_node.py
class InputField (line 22) | class InputField(serializers.Serializer):
class FunctionLibNodeParamsSerializer (line 27) | class FunctionLibNodeParamsSerializer(serializers.Serializer):
method is_valid (line 33) | def is_valid(self, *, raise_exception=False):
class IToolLibNode (line 42) | class IToolLibNode(INode):
method get_node_params_serializer_class (line 47) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 50) | def _run(self):
method execute (line 53) | def execute(self, tool_lib_id, input_field_list, **kwargs) -> NodeResult:
FILE: apps/application/flow/step_node/tool_lib_node/impl/base_tool_lib_node.py
function write_context (line 38) | def write_context(step_variable: Dict, global_variable: Dict, node, work...
function get_field_value (line 49) | def get_field_value(debug_field_list, name, is_required):
function valid_reference_value (line 58) | def valid_reference_value(_type, value, name):
function convert_value (line 87) | def convert_value(name: str, value, _type, is_required, source, node):
function valid_function (line 133) | def valid_function(tool_lib, workspace_id):
function _filter_file_bytes (line 145) | def _filter_file_bytes(data):
function bytes_to_uploaded_file (line 155) | def bytes_to_uploaded_file(file_bytes, file_name="unknown"):
function _get_result_detail (line 177) | def _get_result_detail(result):
class BaseToolLibNodeNode (line 189) | class BaseToolLibNodeNode(IToolLibNode):
method save_context (line 190) | def save_context(self, details, workflow_manage):
method execute (line 196) | def execute(self, tool_lib_id, input_field_list, **kwargs) -> NodeResult:
method tool_exec_record (line 250) | def tool_exec_record(self, tool_lib, all_params):
method upload_knowledge_file (line 292) | def upload_knowledge_file(self, file):
method get_details (line 307) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/tool_node/i_tool_node.py
class InputField (line 23) | class InputField(serializers.Serializer):
method is_valid (line 36) | def is_valid(self, *, raise_exception=False):
class FunctionNodeParamsSerializer (line 44) | class FunctionNodeParamsSerializer(serializers.Serializer):
method is_valid (line 50) | def is_valid(self, *, raise_exception=False):
class IToolNode (line 54) | class IToolNode(INode):
method get_node_params_serializer_class (line 59) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 62) | def _run(self):
method execute (line 65) | def execute(self, input_field_list, code, **kwargs) -> NodeResult:
FILE: apps/application/flow/step_node/tool_node/impl/base_tool_node.py
function write_context (line 23) | def write_context(step_variable: Dict, global_variable: Dict, node, work...
function valid_reference_value (line 34) | def valid_reference_value(_type, value, name):
function convert_value (line 63) | def convert_value(name: str, value, _type, is_required, source, node):
class BaseToolNodeNode (line 109) | class BaseToolNodeNode(IToolNode):
method save_context (line 110) | def save_context(self, details, workflow_manage):
method execute (line 116) | def execute(self, input_field_list, code, **kwargs) -> NodeResult:
method get_details (line 124) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/tool_start_node/i_tool_start_node.py
class IToolStartNode (line 13) | class IToolStartNode(INode):
method _run (line 17) | def _run(self):
method execute (line 20) | def execute(self, **kwargs) -> NodeResult:
FILE: apps/application/flow/step_node/tool_start_node/impl/base_tool_start_node.py
class BaseToolStartStepNode (line 17) | class BaseToolStartStepNode(IToolStartNode):
method save_context (line 18) | def save_context(self, details, workflow_manage):
method get_node_params_serializer_class (line 29) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method execute (line 32) | def execute(self, **kwargs) -> NodeResult:
method get_details (line 46) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/tool_workflow_lib_node/i_tool_workflow_lib_node.py
class InputField (line 22) | class InputField(serializers.Serializer):
class FunctionLibNodeParamsSerializer (line 30) | class FunctionLibNodeParamsSerializer(serializers.Serializer):
method is_valid (line 36) | def is_valid(self, *, raise_exception=False):
class IToolWorkflowLibNode (line 45) | class IToolWorkflowLibNode(INode):
method get_node_params_serializer_class (line 50) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 53) | def _run(self):
method execute (line 56) | def execute(self, tool_lib_id, input_field_list, **kwargs) -> NodeResult:
FILE: apps/application/flow/step_node/tool_workflow_lib_node/impl/base_tool_workflow_lib_node.py
function _write_context (line 27) | def _write_context(node_variable: Dict, workflow_variable: Dict, node: I...
function get_answer_list (line 43) | def get_answer_list(instance, child_node_node_dict, runtime_node_id):
function write_context_stream (line 53) | def write_context_stream(node_variable: Dict, workflow_variable: Dict, n...
function _is_interrupt_exec (line 127) | def _is_interrupt_exec(node, node_variable: Dict, workflow_variable: Dict):
class BaseToolWorkflowLibNodeNode (line 131) | class BaseToolWorkflowLibNodeNode(IToolWorkflowLibNode):
method get_parameters (line 132) | def get_parameters(self, input_field_list):
method save_context (line 145) | def save_context(self, details, workflow_manage):
method to_chat_record (line 154) | def to_chat_record(record):
method execute (line 163) | def execute(self, tool_lib_id, input_field_list, **kwargs) -> NodeResult:
method get_details (line 202) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/variable_aggregation_node/i_variable_aggregation_node.py
class VariableListSerializer (line 12) | class VariableListSerializer(serializers.Serializer):
class VariableGroupSerializer (line 17) | class VariableGroupSerializer(serializers.Serializer):
class VariableAggregationNodeSerializer (line 24) | class VariableAggregationNodeSerializer(serializers.Serializer):
class IVariableAggregation (line 29) | class IVariableAggregation(INode):
method get_node_params_serializer_class (line 34) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 37) | def _run(self):
method execute (line 40) | def execute(self, strategy, group_list, **kwargs) -> NodeResult:
FILE: apps/application/flow/step_node/variable_aggregation_node/impl/base_variable_aggregation_node.py
function _filter_file_bytes (line 13) | def _filter_file_bytes(data):
class BaseVariableAggregationNode (line 23) | class BaseVariableAggregationNode(IVariableAggregation):
method save_context (line 25) | def save_context(self, details, workflow_manage):
method get_first_non_null (line 33) | def get_first_non_null(self, variable_list):
method set_variable_to_json (line 43) | def set_variable_to_json(self, variable_list):
method reset_variable (line 49) | def reset_variable(self, variable):
method reset_group_list (line 58) | def reset_group_list(self, group_list):
method execute (line 66) | def execute(self, strategy, group_list, **kwargs) -> NodeResult:
method get_details (line 76) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/variable_assign_node/i_variable_assign_node.py
class VariableAssignNodeParamsSerializer (line 12) | class VariableAssignNodeParamsSerializer(serializers.Serializer):
class IVariableAssignNode (line 17) | class IVariableAssignNode(INode):
method get_node_params_serializer_class (line 22) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 25) | def _run(self):
method execute (line 28) | def execute(self, variable_list, **kwargs) -> NodeResult:
FILE: apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py
class BaseVariableAssignNode (line 9) | class BaseVariableAssignNode(IVariableAssignNode):
method save_context (line 10) | def save_context(self, details, workflow_manage):
method global_evaluation (line 15) | def global_evaluation(self, variable, value):
method loop_evaluation (line 22) | def loop_evaluation(self, variable, value):
method chat_evaluation (line 27) | def chat_evaluation(self, variable, value):
method out_evaluation (line 34) | def out_evaluation(self, variable, value):
method handle (line 41) | def handle(self, variable, evaluation):
method execute (line 69) | def execute(self, variable_list, **kwargs) -> NodeResult:
method get_reference_content (line 98) | def get_reference_content(self, fields: List[str]):
method get_details (line 103) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/variable_splitting_node/i_variable_splitting_node.py
class VariableSplittingNodeParamsSerializer (line 12) | class VariableSplittingNodeParamsSerializer(serializers.Serializer):
class IVariableSplittingNode (line 20) | class IVariableSplittingNode(INode):
method get_node_params_serializer_class (line 25) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 28) | def _run(self):
method execute (line 34) | def execute(self, input_variable, variable_list, **kwargs) -> NodeResult:
FILE: apps/application/flow/step_node/variable_splitting_node/impl/base_variable_splitting_node.py
function smart_jsonpath_search (line 16) | def smart_jsonpath_search(data: dict, path: str):
class BaseVariableSplittingNode (line 35) | class BaseVariableSplittingNode(IVariableSplittingNode):
method save_context (line 36) | def save_context(self, details, workflow_manage):
method execute (line 43) | def execute(self, input_variable, variable_list, **kwargs) -> NodeResult:
method get_details (line 54) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/step_node/video_understand_step_node/i_video_understand_node.py
class VideoUnderstandNodeSerializer (line 12) | class VideoUnderstandNodeSerializer(serializers.Serializer):
class IVideoUnderstandNode (line 31) | class IVideoUnderstandNode(INode):
method get_node_params_serializer_class (line 36) | def get_node_params_serializer_class(self) -> Type[serializers.Seriali...
method _run (line 39) | def _run(self):
method execute (line 51) | def execute(self, model_id, system, prompt, dialogue_number, dialogue_...
FILE: apps/application/flow/step_node/video_understand_step_node/impl/base_video_understand_node.py
function _write_context (line 16) | def _write_context(node_variable: Dict, workflow_variable: Dict, node: I...
function write_context_stream (line 30) | def write_context_stream(node_variable: Dict, workflow_variable: Dict, n...
function write_context (line 46) | def write_context(node_variable: Dict, workflow_variable: Dict, node: IN...
function file_id_to_base64 (line 59) | def file_id_to_base64(file_id: str, video_model):
class BaseVideoUnderstandNode (line 66) | class BaseVideoUnderstandNode(IVideoUnderstandNode):
method save_context (line 67) | def save_context(self, details, workflow_manage):
method execute (line 74) | def execute(self, model_id, system, prompt, dialogue_number, dialogue_...
method generate_context_video (line 105) | def generate_context_video(self, video):
method get_history_message_for_details (line 111) | def get_history_message_for_details(self, history_chat_record, dialogu...
method generate_history_ai_message (line 120) | def generate_history_ai_message(self, chat_record):
method generate_history_human_message_for_details (line 128) | def generate_history_human_message_for_details(self, chat_record):
method get_history_message (line 149) | def get_history_message(self, history_chat_record, dialogue_number, vi...
method generate_history_human_message (line 158) | def generate_history_human_message(self, chat_record, video_model):
method generate_prompt_question (line 182) | def generate_prompt_question(self, prompt):
method _process_videos (line 185) | def _process_videos(self, image, video_model):
method generate_message_list (line 202) | def generate_message_list(self, video_model, system: str, prompt: str,...
method reset_message_list (line 224) | def reset_message_list(message_list: List[BaseMessage], answer_text):
method get_details (line 232) | def get_details(self, index: int, **kwargs):
FILE: apps/application/flow/tool_loop_workflow_manage.py
class ToolLoopWorkflowManage (line 13) | class ToolLoopWorkflowManage(LoopWorkflowManage):
method get_params_serializer_class (line 14) | def get_params_serializer_class(self):
method get_source_type (line 17) | def get_source_type(self):
method get_source_id (line 20) | def get_source_id(self):
FILE: apps/application/flow/tool_workflow_manage.py
class ToolWorkflowManage (line 23) | class ToolWorkflowManage(WorkflowManage):
method __init__ (line 24) | def __init__(self, flow: Workflow, params, work_flow_post_handler: Wor...
method get_params_serializer_class (line 32) | def get_params_serializer_class(self):
method stream (line 35) | def stream(self):
method get_start_node (line 41) | def get_start_node(self):
method get_base_node (line 44) | def get_base_node(self):
method get_source_type (line 51) | def get_source_type(self):
method get_source_id (line 54) | def get_source_id(self):
FILE: apps/application/flow/tools.py
function _merge_lists_normalize_empty_tool_chunk_ids (line 55) | def _merge_lists_normalize_empty_tool_chunk_ids(left, *others):
class Reasoning (line 79) | class Reasoning:
method __init__ (line 80) | def __init__(self, reasoning_content_start, reasoning_content_end):
method get_end_reasoning_content (line 96) | def get_end_reasoning_content(self):
method _normalize_content (line 107) | def _normalize_content(self, content):
method get_reasoning_content (line 122) | def get_reasoning_content(self, chunk):
function event_content (line 194) | def event_content(chat_id, chat_record_id, response, workflow,
function to_stream_response (line 224) | def to_stream_response(chat_id, chat_record_id, response: Iterator[BaseM...
function to_response (line 246) | def to_response(chat_id, chat_record_id, response: BaseMessage, workflow...
function to_response_simple (line 266) | def to_response_simple(chat_id, chat_record_id, response: BaseMessage, w...
function to_stream_response_simple (line 274) | def to_stream_response_simple(stream_event):
function generate_tool_message_complete (line 284) | def generate_tool_message_complete(icon, name, input_content, output_con...
function get_global_loop (line 310) | def get_global_loop():
function _extract_tool_id (line 329) | def _extract_tool_id(raw_id):
function _initialize_skills (line 354) | async def _initialize_skills(mcp_servers, temp_dir):
function _yield_mcp_response (line 403) | async def _yield_mcp_response(chat_model, message_list, mcp_servers, mcp...
function save_tool_record (line 721) | async def save_tool_record(tool_id, tool_info, tool_result, source_id, s...
function mcp_response_generator (line 736) | def mcp_response_generator(chat_model, message_list, mcp_servers, mcp_ou...
function anext_async (line 779) | async def anext_async(agen):
function get_node_handle_callback (line 808) | def get_node_handle_callback(source_type, source_id):
function get_workflow_resource (line 825) | def get_workflow_resource(workflow, node_handle):
function get_instance_resource (line 861) | def get_instance_resource(instance, source_type, source_id, instance_fie...
function save_workflow_mapping (line 874) | def save_workflow_mapping(workflow, source_type, source_id, other_resour...
function get_tool_id_list (line 890) | def get_tool_id_list(workflow):
FILE: apps/application/flow/workflow_manage.py
class NodeResultFuture (line 33) | class NodeResultFuture:
method __init__ (line 34) | def __init__(self, r, e, status=200):
method result (line 39) | def result(self):
function await_result (line 46) | def await_result(result, timeout=1):
class NodeChunkManage (line 54) | class NodeChunkManage:
method __init__ (line 56) | def __init__(self, work_flow):
method add_node_chunk (line 61) | def add_node_chunk(self, node_chunk):
method contains (line 64) | def contains(self, node_chunk):
method pop (line 67) | def pop(self):
class WorkflowManage (line 92) | class WorkflowManage:
method __init__ (line 93) | def __init__(self, flow: Workflow, params, work_flow_post_handler: Wor...
method init_fields (line 147) | def init_fields(self):
method append_answer (line 178) | def append_answer(self, content):
method answer_is_not_empty (line 182) | def answer_is_not_empty(self):
method load_node (line 185) | def load_node(self, chat_record, start_node_id, start_node_data):
method run (line 226) | def run(self):
method run_block (line 233) | def run_block(self, language='zh'):
method _cleanup (line 263) | def _cleanup(self):
method run_stream (line 295) | def run_stream(self, current_node, node_result_future, language='zh'):
method get_body (line 303) | def get_body(self):
method is_run (line 306) | def is_run(self, timeout=0.5):
method await_result (line 320) | def await_result(self, is_cleanup=True):
method run_chain_async (line 351) | def run_chain_async(self, current_node, node_result_future, language='...
method run_chain_manage (line 355) | def run_chain_manage(self, current_node, node_result_future, language=...
method run_chain (line 378) | def run_chain(self, current_node, node_result_future=None):
method hand_node_result (line 391) | def hand_node_result(self, current_node, node_result_future):
method append_node (line 407) | def append_node(self, current_node):
method hand_event_node_result (line 415) | def hand_event_node_result(self, current_node, node_result_future):
method run_node_async (line 523) | def run_node_async(self, node):
method run_node_future (line 527) | def run_node_future(self, node):
method run_node (line 535) | def run_node(self, node):
method is_result (line 539) | def is_result(self, current_node, current_node_result):
method get_chat_info (line 543) | def get_chat_info(self):
method get_chunk_content (line 546) | def get_chunk_content(self, chunk, is_end=False):
method _has_next_node (line 551) | def _has_next_node(self, current_node, node_result: NodeResult | None):
method has_next_node (line 564) | def has_next_node(self, node_result: NodeResult | None):
method get_runtime_details (line 571) | def get_runtime_details(self, get_details=lambda n, index: n.get_detai...
method get_record_answer_list (line 587) | def get_record_answer_list(self):
method get_answer_text_list (line 591) | def get_answer_text_list(self):
method dependent_node (line 617) | def dependent_node(edge, node):
method dependent_node_been_executed (line 633) | def dependent_node_been_executed(self, node_id):
method get_next_node_list (line 645) | def get_next_node_list(self, current_node, current_node_result):
method get_reference_field (line 705) | def get_reference_field(self, node_id: str, fields: List[str]):
method get_workflow_content (line 721) | def get_workflow_content(self):
method reset_prompt (line 731) | def reset_prompt(self, prompt: str):
method generate_prompt (line 749) | def generate_prompt(self, prompt: str):
method get_start_node (line 761) | def get_start_node(self):
method get_base_node (line 769) | def get_base_node(self):
method get_node_cls_by_id (line 777) | def get_node_cls_by_id(self, node_id, up_node_id_list=None,
method get_node_by_id (line 787) | def get_node_by_id(self, node_id):
method get_node_reference (line 793) | def get_node_reference(self, reference_address: Dict):
method get_params_serializer_class (line 797) | def get_params_serializer_class(self):
method get_source_type (line 800) | def get_source_type(self):
method get_source_id (line 803) | def get_source_id(self):
FILE: apps/application/migrations/0001_initial.py
function insert_default_data (line 14) | def insert_default_data(apps, schema_editor):
class Migration (line 20) | class Migration(migrations.Migration):
FILE: apps/application/migrations/0002_application_simple_mcp.py
class Migration (line 6) | class Migration(migrations.Migration):
FILE: apps/application/migrations/0003_application_stt_model_params_setting_and_more.py
class Migration (line 6) | class Migration(migrations.Migration):
FILE: apps/application/migrations/0004_application_application_enable_and_more.py
class Migration (line 6) | class Migration(migrations.Migration):
FILE: apps/application/migrations/0005_chatrecord_vote_other_content_chatrecord_vote_reason.py
class Migration (line 6) | class Migration(migrations.Migration):
FILE: apps/application/migrations/0006_application_file_clean_time.py
function insert_default_data (line 6) | def insert_default_data(apps, schema_editor):
class Migration (line 12) | class Migration(migrations.Migration):
FILE: apps/application/migrations/0007_applicationapikey_expire_time_and_more.py
class Migration (line 7) | class Migration(migrations.Migration):
FILE: apps/application/migrations/0008_chat_ip_address_chat_source_chatrecord_ip_address_and_more.py
class Migration (line 6) | class Migration(migrations.Migration):
FILE: apps/application/migrations/0009_clean_application_knowledge_mapping.py
class Migration (line 4) | class Migration(migrations.Migration):
FILE: apps/application/migrations/0010_chatsharelink.py
class Migration (line 9) | class Migration(migrations.Migration):
FILE: apps/application/migrations/0011_application_skill_tool_ids.py
class Migration (line 6) | class Migration(migrations.Migration):
FILE: apps/application/migrations/0012_remove_applicationapikey_user.py
class Migration (line 6) | class Migration(migrations.Migration):
FILE: apps/application/models/application.py
class ApplicationFolder (line 20) | class ApplicationFolder(MPTTModel, AppModelMixin):
class Meta (line 28) | class Meta:
class MPTTMeta (line 31) | class MPTTMeta:
class ApplicationTypeChoices (line 35) | class ApplicationTypeChoices(models.TextChoices):
function get_dataset_setting_dict (line 41) | def get_dataset_setting_dict():
function get_model_setting_dict (line 49) | def get_model_setting_dict():
class Application (line 59) | class Application(AppModelMixin):
method get_default_model_prompt (line 110) | def get_default_model_prompt():
class Meta (line 123) | class Meta:
class ApplicationKnowledgeMapping (line 127) | class ApplicationKnowledgeMapping(AppModelMixin):
class Meta (line 132) | class Meta:
class ApplicationVersion (line 136) | class ApplicationVersion(AppModelMixin):
class Meta (line 185) | class Meta:
FILE: apps/application/models/application_access_token.py
class ApplicationAccessToken (line 16) | class ApplicationAccessToken(AppModelMixin):
class Meta (line 35) | class Meta:
FILE: apps/application/models/application_api_key.py
class ApplicationApiKey (line 11) | class ApplicationApiKey(AppModelMixin):
class Meta (line 24) | class Meta:
FILE: apps/application/models/application_chat.py
class ChatUserType (line 21) | class ChatUserType(models.TextChoices):
function default_asker (line 29) | def default_asker():
class Chat (line 33) | class Chat(AppModelMixin):
class Meta (line 50) | class Meta:
class VoteChoices (line 54) | class VoteChoices(models.TextChoices):
class VoteReasonChoices (line 61) | class VoteReasonChoices(models.TextChoices):
class ShareLinkType (line 68) | class ShareLinkType(models.TextChoices):
class ChatSourceChoices (line 72) | class ChatSourceChoices(models.TextChoices):
class ChatRecord (line 84) | class ChatRecord(AppModelMixin):
method get_human_message (line 112) | def get_human_message(self):
method get_ai_message (line 117) | def get_ai_message(self):
method get_node_details_runtime_node_id (line 124) | def get_node_details_runtime_node_id(self, runtime_node_id):
class Meta (line 127) | class Meta:
class ApplicationChatUserStats (line 131) | class ApplicationChatUserStats(AppModelMixin):
class Meta (line 140) | class Meta:
class ChatShareLink (line 146) | class ChatShareLink(AppModelMixin):
class Meta (line 154) | class Meta:
FILE: apps/application/serializers/application.py
function get_base_node_work_flow (line 63) | def get_base_node_work_flow(work_flow):
function hand_node (line 71) | def hand_node(node, update_tool_map):
class MKInstance (line 96) | class MKInstance:
method __init__ (line 98) | def __init__(self, application: dict, function_lib_list: List[dict], v...
method get_tool_list (line 104) | def get_tool_list(self):
class ApplicationSerializerModel (line 108) | class ApplicationSerializerModel(serializers.ModelSerializer):
class Meta (line 109) | class Meta:
class NoReferencesChoices (line 114) | class NoReferencesChoices(models.TextChoices):
class NoReferencesSetting (line 120) | class NoReferencesSetting(serializers.Serializer):
class KnowledgeSettingSerializer (line 126) | class KnowledgeSettingSerializer(serializers.Serializer):
class ModelKnowledgeAssociation (line 142) | class ModelKnowledgeAssociation(serializers.Serializer):
method is_valid (line 151) | def is_valid(self, *, raise_exception=True):
class ModelSettingSerializer (line 166) | class ModelSettingSerializer(serializers.Serializer):
class ApplicationCreateSerializer (line 185) | class ApplicationCreateSerializer(serializers.Serializer):
class ApplicationResponse (line 186) | class ApplicationResponse(serializers.ModelSerializer):
class Meta (line 187) | class Meta:
class WorkflowRequest (line 191) | class WorkflowRequest(serializers.Serializer):
method to_application_model (line 203) | def to_application_model(user_id: str, workspace_id: str, applicatio...
class SimplateRequest (line 234) | class SimplateRequest(serializers.Serializer):
method is_valid (line 287) | def is_valid(self, *, user_id=None, raise_exception=False):
method to_application_model (line 293) | def to_application_model(user_id: str, workspace_id: str, applicatio...
class ApplicationQueryRequest (line 329) | class ApplicationQueryRequest(serializers.Serializer):
class ApplicationListResponse (line 339) | class ApplicationListResponse(serializers.Serializer):
class Query (line 352) | class Query(serializers.Serializer):
method get_query_set (line 356) | def get_query_set(self, instance: Dict, workspace_manage: bool, is_x_p...
method is_x_pack_ee (line 400) | def is_x_pack_ee():
method list (line 405) | def list(self, instance: Dict):
method page (line 419) | def page(self, current_page: int, page_size: int, instance: Dict):
class ApplicationImportRequest (line 437) | class ApplicationImportRequest(serializers.Serializer):
class ApplicationEditSerializer (line 442) | class ApplicationEditSerializer(serializers.Serializer):
class ApplicationSerializer (line 487) | class ApplicationSerializer(serializers.Serializer):
method insert (line 492) | def insert(self, instance: Dict):
method insert_template_workflow (line 510) | def insert_template_workflow(self, instance: Dict):
method insert_workflow (line 539) | def insert_workflow(self, instance: Dict):
method to_application_knowledge_mapping (line 553) | def to_application_knowledge_mapping(application_id: str, knowledge_id...
method insert_simple (line 558) | def insert_simple(self, instance: Dict):
method import_ (line 579) | def import_(self, instance: dict, is_import_tool, with_valid=True):
method to_tool (line 638) | def to_tool(tool, workspace_id, user_id):
method to_application (line 672) | def to_application(application, workspace_id, user_id, update_tool_map...
class StoreApplication (line 710) | class StoreApplication(serializers.Serializer):
method get_appstore_templates (line 714) | def get_appstore_templates(self):
class TextToSpeechRequest (line 760) | class TextToSpeechRequest(serializers.Serializer):
class SpeechToTextRequest (line 764) | class SpeechToTextRequest(serializers.Serializer):
class PlayDemoTextRequest (line 768) | class PlayDemoTextRequest(serializers.Serializer):
function get_mcp_tools (line 772) | async def get_mcp_tools(servers):
class McpServersSerializer (line 777) | class McpServersSerializer(serializers.Serializer):
class ApplicationOperateSerializer (line 781) | class ApplicationOperateSerializer(serializers.Serializer):
method is_valid (line 786) | def is_valid(self, *, raise_exception=False):
method get_mcp_servers (line 795) | def get_mcp_servers(self, instance, with_valid=True):
method delete (line 815) | def delete(self, with_valid=True):
method export (line 838) | def export(self, with_valid=True):
method reset_application_version (line 873) | def reset_application_version(application_version, application):
method publish (line 899) | def publish(self, instance, with_valid=True):
method update_work_flow_model (line 947) | def update_work_flow_model(instance):
method move (line 993) | def move(self, folder_id: str):
method edit (line 1002) | def edit(self, instance: Dict, with_valid=True):
method update_template_workflow (line 1072) | def update_template_workflow(self, instance: Dict, app: Application):
method to_tool (line 1134) | def to_tool(tool, workspace_id, user_id):
method one (line 1149) | def one(self, with_valid=True):
method get_search_node (line 1173) | def get_search_node(work_flow):
method update_knowledge_node (line 1188) | def update_knowledge_node(self, workflow, available_knowledge_dict):
method list_knowledge (line 1209) | def list_knowledge(self, with_valid=True):
method save_application_knowledge_mapping (line 1237) | def save_application_knowledge_mapping(application_knowledge_id_list, ...
method get_application_knowledge_mapping (line 1253) | def get_application_knowledge_mapping(application_knowledge_id_list, k...
method speech_to_text (line 1273) | def speech_to_text(self, instance, debug=True, with_valid=True):
method text_to_speech (line 1289) | def text_to_speech(self, instance, debug=True, with_valid=True):
method play_demo_text (line 1306) | def play_demo_text(self, instance, with_valid=True):
FILE: apps/application/serializers/application_access_token.py
class AccessTokenEditSerializer (line 23) | class AccessTokenEditSerializer(serializers.Serializer):
class AccessTokenSerializer (line 46) | class AccessTokenSerializer(serializers.Serializer):
method is_valid (line 50) | def is_valid(self, *, raise_exception=False):
method edit (line 59) | def edit(self, instance):
method one (line 94) | def one(self, with_valid=True):
FILE: apps/application/serializers/application_api_key.py
class ApplicationKeySerializerModel (line 16) | class ApplicationKeySerializerModel(serializers.ModelSerializer):
class Meta (line 17) | class Meta:
class EditApplicationKeySerializer (line 22) | class EditApplicationKeySerializer(serializers.Serializer):
class ApplicationKeySerializer (line 36) | class ApplicationKeySerializer(serializers.Serializer):
method is_valid (line 41) | def is_valid(self, *, raise_exception=False):
method generate (line 50) | def generate(self, with_valid=True):
method page (line 61) | def page(self, current_page: int, page_size: int, with_valid=True):
class Operate (line 73) | class Operate(serializers.Serializer):
method is_valid (line 78) | def is_valid(self, *, raise_exception=False):
method delete (line 87) | def delete(self, with_valid=True):
method edit (line 97) | def edit(self, instance, with_valid=True):
FILE: apps/application/serializers/application_chat.py
class ApplicationChatResponseSerializers (line 34) | class ApplicationChatResponseSerializers(serializers.Serializer):
class ApplicationChatRecordExportRequest (line 47) | class ApplicationChatRecordExportRequest(serializers.Serializer):
class ApplicationChatQuerySerializers (line 52) | class ApplicationChatQuerySerializers(serializers.Serializer):
method is_valid (line 68) | def is_valid(self, *, raise_exception=False):
method get_end_time (line 77) | def get_end_time(self):
method get_start_time (line 82) | def get_start_time(self):
method get_query_set (line 87) | def get_query_set(self, select_ids=None):
method list (line 136) | def list(self, with_valid=True):
method paragraph_list_to_string (line 146) | def paragraph_list_to_string(paragraph_list):
method to_row (line 152) | def to_row(row: Dict):
method reset_value (line 193) | def reset_value(value):
method export (line 202) | def export(self, data, with_valid=True):
method page (line 250) | def page(self, current_page: int, page_size: int, with_valid=True):
class ChatCountSerializer (line 260) | class ChatCountSerializer(serializers.Serializer):
method get_query_set (line 263) | def get_query_set(self):
method update_chat (line 266) | def update_chat(self):
function get_source_display (line 279) | def get_source_display(source):
FILE: apps/application/serializers/application_chat_link.py
class ShareChatRecordModelSerializer (line 17) | class ShareChatRecordModelSerializer(serializers.ModelSerializer):
class Meta (line 18) | class Meta:
class ChatRecordShareLinkRequestSerializer (line 22) | class ChatRecordShareLinkRequestSerializer(serializers.Serializer):
method validate (line 31) | def validate(self, attrs):
class ChatRecordShareLinkSerializer (line 36) | class ChatRecordShareLinkSerializer(serializers.Serializer):
method is_valid (line 41) | def is_valid(self, *, raise_exception=False):
method generate_link (line 50) | def generate_link(self, instance, with_valid=True):
class ChatShareLinkDetailSerializer (line 99) | class ChatShareLinkDetailSerializer(serializers.Serializer):
method is_valid (line 102) | def is_valid(self, *, raise_exception=False):
method get_record_list (line 116) | def get_record_list(self):
FILE: apps/application/serializers/application_chat_record.py
class ChatRecordSerializerModel (line 34) | class ChatRecordSerializerModel(serializers.ModelSerializer):
class Meta (line 35) | class Meta:
class ChatRecordOperateSerializer (line 43) | class ChatRecordOperateSerializer(serializers.Serializer):
method is_valid (line 49) | def is_valid(self, *, debug=False, raise_exception=False):
method get_chat_record (line 62) | def get_chat_record(self):
method one (line 73) | def one(self, debug):
class ApplicationChatRecordQuerySerializers (line 89) | class ApplicationChatRecordQuerySerializers(serializers.Serializer):
method is_valid (line 95) | def is_valid(self, *, raise_exception=False):
method list (line 104) | def list(self, with_valid=True):
method get_loop_workflow_node (line 114) | def get_loop_workflow_node(details):
method reset_chat_record (line 124) | def reset_chat_record(chat_record, show_source, show_exec):
method page (line 175) | def page(self, current_page: int, page_size: int, with_valid=True, sho...
class ParagraphModel (line 191) | class ParagraphModel(serializers.ModelSerializer):
class Meta (line 192) | class Meta:
class ChatRecordImproveSerializer (line 197) | class ChatRecordImproveSerializer(serializers.Serializer):
method is_valid (line 207) | def is_valid(self, *, raise_exception=False):
method get (line 216) | def get(self, with_valid=True):
class ApplicationChatRecordImproveInstanceSerializer (line 237) | class ApplicationChatRecordImproveInstanceSerializer(serializers.Seriali...
class ApplicationChatRecordAddKnowledgeSerializer (line 246) | class ApplicationChatRecordAddKnowledgeSerializer(serializers.Serializer):
method is_valid (line 254) | def is_valid(self, *, raise_exception=False):
method post_embedding_paragraph (line 266) | def post_embedding_paragraph(paragraph_ids, knowledge_id):
method post_improve (line 272) | def post_improve(self, instance: Dict, request=None, scope='WORKSPACE'...
method prepend_paragraphs (line 344) | def prepend_paragraphs(document_id, paragraphs):
class ApplicationChatRecordImproveSerializer (line 368) | class ApplicationChatRecordImproveSerializer(serializers.Serializer):
method is_valid (line 381) | def is_valid(self, *, raise_exception=False):
method post_embedding_paragraph (line 401) | def post_embedding_paragraph(chat_record, paragraph_id, knowledge_id):
method improve (line 409) | def improve(self, instance: Dict, request=None, scope='WORKSPACE', wit...
class Operate (line 467) | class Operate(serializers.Serializer):
method delete (line 481) | def delete(self, request=None, scope='WORKSPACE', with_valid=True):
FILE: apps/application/serializers/application_folder.py
class ApplicationFolderTreeSerializer (line 6) | class ApplicationFolderTreeSerializer(serializers.ModelSerializer):
class Meta (line 9) | class Meta:
method get_children (line 13) | def get_children(self, obj):
class ApplicationFolderFlatSerializer (line 17) | class ApplicationFolderFlatSerializer(serializers.ModelSerializer):
class Meta (line 18) | class Meta:
FILE: apps/application/serializers/application_stats.py
class ApplicationStatsSerializer (line 27) | class ApplicationStatsSerializer(serializers.Serializer):
class ApplicationStatisticsSerializer (line 37) | class ApplicationStatisticsSerializer(serializers.Serializer):
method is_valid (line 43) | def is_valid(self, *, raise_exception=False):
method get_end_time (line 52) | def get_end_time(self):
method get_start_time (line 57) | def get_start_time(self):
method get_customer_count_trend (line 62) | def get_customer_count_trend(self, with_valid=True):
method get_chat_record_aggregate_trend (line 75) | def get_chat_record_aggregate_trend(self, with_valid=True):
method merge_customer_chat_record (line 93) | def merge_customer_chat_record(self, chat_record_aggregate_trend: List...
method find (line 106) | def find(source_list, condition, default):
method get_days_between_dates (line 113) | def get_days_between_dates(start_date, end_date):
method get_token_usage_statistics (line 123) | def get_token_usage_statistics(self, with_valid=True):
method get_top_questions_statistics (line 142) | def get_top_questions_statistics(self, with_valid=True):
FILE: apps/application/serializers/application_version.py
class ApplicationVersionQuerySerializer (line 20) | class ApplicationVersionQuerySerializer(serializers.Serializer):
class ApplicationVersionModelSerializer (line 26) | class ApplicationVersionModelSerializer(serializers.ModelSerializer):
class Meta (line 27) | class Meta:
class ApplicationVersionEditSerializer (line 34) | class ApplicationVersionEditSerializer(serializers.Serializer):
class ApplicationVersionSerializer (line 39) | class ApplicationVersionSerializer(serializers.Serializer):
class Query (line 42) | class Query(serializers.Serializer):
method get_query_set (line 45) | def get_query_set(self, query):
method list (line 53) | def list(self, query, with_valid=True):
method page (line 60) | def page(self, query, current_page, page_size, with_valid=True):
class Operate (line 67) | class Operate(serializers.Serializer):
method is_valid (line 73) | def is_valid(self, *, raise_exception=False):
method one (line 82) | def one(self, with_valid=True):
method edit (line 93) | def edit(self, instance: Dict, with_valid=True):
FILE: apps/application/serializers/common.py
class ToolExecute (line 28) | class ToolExecute:
method __init__ (line 29) | def __init__(self, tool_id: str,
method get_record (line 42) | def get_record(self):
method to_record (line 51) | def to_record(self, tool_record_dict):
method to_dict (line 63) | def to_dict(self, tool_record):
method set_record (line 73) | def set_record(self, tool_record):
class ChatInfo (line 96) | class ChatInfo:
method __init__ (line 97) | def __init__(self,
method get_no_references_setting (line 132) | def get_no_references_setting(knowledge_setting, model_setting):
method get_application (line 142) | def get_application(self):
method get_chat_user (line 169) | def get_chat_user(self, asker=None):
method get_chat_user_group (line 193) | def get_chat_user_group(self, asker=None):
method to_base_pipeline_manage_params (line 209) | def to_base_pipeline_manage_params(self):
method to_pipeline_manage_params (line 260) | def to_pipeline_manage_params(self, problem_text: str, post_response_h...
method set_chat (line 271) | def set_chat(self, question):
method set_chat_variable (line 279) | def set_chat_variable(self, chat_context):
method get_chat_variable (line 290) | def get_chat_variable(self):
method append_chat_record (line 300) | def append_chat_record(self, chat_record: ChatRecord):
method to_dict (line 355) | def to_dict(self):
method chat_record_to_map (line 370) | def chat_record_to_map(self, chat_record):
method map_to_chat_record (line 388) | def map_to_chat_record(chat_record_dict):
method set_cache (line 405) | def set_cache(self):
method map_to_chat_info (line 411) | def map_to_chat_info(chat_info_dict):
method get_cache (line 423) | def get_cache(chat_id):
function update_resource_mapping_by_application (line 431) | def update_resource_mapping_by_application(application_id: str, other_re...
FILE: apps/application/views/application.py
function get_application_operation_object (line 29) | def get_application_operation_object(application_id):
class ApplicationAPI (line 38) | class ApplicationAPI(APIView):
method post (line 57) | def post(self, request: Request, workspace_id: str):
method get (line 73) | def get(self, request: Request, workspace_id: str):
class Page (line 77) | class Page(APIView):
method get (line 92) | def get(self, request: Request, workspace_id: str, current_page: int...
class Import (line 97) | class Import(APIView):
method post (line 115) | def post(self, request: Request, workspace_id: str, folder_id: str):
class Export (line 125) | class Export(APIView):
method get (line 147) | def get(self, request: Request, workspace_id: str, application_id: s...
class Operate (line 153) | class Operate(APIView):
method delete (line 175) | def delete(self, request: Request, workspace_id: str, application_id...
method put (line 200) | def put(self, request: Request, workspace_id: str, application_id: s...
method get (line 223) | def get(self, request: Request, workspace_id: str, application_id: s...
class Move (line 228) | class Move(APIView):
method put (line 249) | def put(self, request: Request, workspace_id: str, application_id: s...
class Publish (line 255) | class Publish(APIView):
method put (line 276) | def put(self, request: Request, workspace_id: str, application_id: s...
class StoreApplication (line 282) | class StoreApplication(APIView):
method get (line 293) | def get(self, request: Request):
class McpServers (line 300) | class McpServers(APIView):
method post (line 319) | def post(self, request: Request, workspace_id, application_id: str):
class SpeechToText (line 326) | class SpeechToText(APIView):
method post (line 345) | def post(self, request: Request, workspace_id: str, application_id: str):
class TextToSpeech (line 352) | class TextToSpeech(APIView):
method post (line 371) | def post(self, request: Request, workspace_id: str, application_id: str):
class PlayDemoText (line 379) | class PlayDemoText(APIView):
method post (line 400) | def post(self, request: Request, workspace_id: str, application_id: str):
FILE: apps/application/views/application_access_token.py
function get_application_operation_object (line 24) | def get_application_operation_object(application_id):
class AccessToken (line 33) | class AccessToken(APIView):
method put (line 54) | def put(self, request: Request, workspace_id: str, application_id: str):
method get (line 74) | def get(self, request: Request, workspace_id: str, application_id: str):
FILE: apps/application/views/application_api_key.py
function get_application_operation_object (line 17) | def get_application_operation_object(application_id):
class ApplicationKey (line 26) | class ApplicationKey(APIView):
method post (line 49) | def post(self, request: Request, workspace_id: str, application_id: str):
class Page (line 54) | class Page(APIView):
method get (line 72) | def get(self, request: Request, workspace_id: str, application_id: s...
class Operate (line 78) | class Operate(APIView):
method put (line 100) | def put(self, request: Request, workspace_id: str, application_id: s...
method delete (line 126) | def delete(self, request: Request, workspace_id: str, application_id...
FILE: apps/application/views/application_chat.py
function get_application_operation_object (line 31) | def get_application_operation_object(application_id):
class ApplicationChat (line 39) | class ApplicationChat(APIView):
method get (line 58) | def get(self, request: Request, workspace_id: str, application_id: str):
class Page (line 64) | class Page(APIView):
method get (line 83) | def get(self, request: Request, workspace_id: str, application_id: s...
class Export (line 90) | class Export(APIView):
method post (line 109) | def post(self, request: Request, workspace_id: str, application_id: ...
class OpenView (line 116) | class OpenView(APIView):
method get (line 134) | def get(self, request: Request, workspace_id: str, application_id: str):
class ChatView (line 141) | class ChatView(APIView):
method post (line 154) | def post(self, request: Request, chat_id: str):
class PromptGenerateView (line 157) | class PromptGenerateView(APIView):
method post (line 178) | def post(self, request: Request, workspace_id: str, model_id:str, appl...
FILE: apps/application/views/application_chat_link.py
class ChatRecordLinkView (line 19) | class ChatRecordLinkView(APIView):
method post (line 33) | def post(self, request: Request, application_id: str, chat_id: str):
class ChatRecordDetailView (line 41) | class ChatRecordDetailView(APIView):
method get (line 52) | def get(self, request, link: str):
FILE: apps/application/views/application_chat_record.py
class ApplicationChatRecord (line 26) | class ApplicationChatRecord(APIView):
method get (line 45) | def get(self, request: Request, workspace_id: str, application_id: str...
class Page (line 52) | class Page(APIView):
method get (line 71) | def get(self, request: Request, workspace_id: str, application_id: s...
class ApplicationChatRecordOperateAPI (line 81) | class ApplicationChatRecordOperateAPI(APIView):
method get (line 102) | def get(self, request: Request, workspace_id: str, application_id: str...
class ApplicationChatRecordAddKnowledge (line 111) | class ApplicationChatRecordAddKnowledge(APIView):
method post (line 130) | def post(self, request: Request, workspace_id: str, application_id: str):
class ApplicationChatRecordImprove (line 135) | class ApplicationChatRecordImprove(APIView):
method get (line 154) | def get(self, request: Request, workspace_id: str, application_id: str...
class ApplicationChatRecordImproveParagraph (line 160) | class ApplicationChatRecordImproveParagraph(APIView):
method put (line 179) | def put(self, request: Request,
class Operate (line 191) | class Operate(APIView):
method delete (line 210) | def delete(self, request: Request, workspace_id: str, application_id...
FILE: apps/application/views/application_stats.py
class ApplicationStats (line 23) | class ApplicationStats(APIView):
method get (line 41) | def get(self, request: Request, workspace_id: str, application_id: str):
class TokenUsageStatistics (line 50) | class TokenUsageStatistics(APIView):
method get (line 69) | def get(self, request: Request, workspace_id: str, application_id: s...
class TopQuestionsStatistics (line 78) | class TopQuestionsStatistics(APIView):
method get (line 96) | def get(self, request: Request, workspace_id: str, application_id: s...
FILE: apps/application/views/application_version.py
class ApplicationVersionView (line 25) | class ApplicationVersionView(APIView):
method get (line 43) | def get(self, request: Request, workspace_id, application_id: str):
class Page (line 49) | class Page(APIView):
method get (line 67) | def get(self, request: Request, workspace_id: str, application_id: s...
class Operate (line 74) | class Operate(APIView):
method get (line 92) | def get(self, request: Request, workspace_id: str, application_id: s...
method put (line 117) | def put(self, request: Request, workspace_id: str, application_id: s...
FILE: apps/chat/api/chat_api.py
class PromptGenerateAPI (line 19) | class PromptGenerateAPI(APIMixin):
method get_parameters (line 21) | def get_parameters():
method get_request (line 46) | def get_request():
class ChatAPI (line 50) | class ChatAPI(APIMixin):
method get_parameters (line 52) | def get_parameters():
method get_request (line 62) | def get_request():
class ApplicationCreateResponse (line 66) | class ApplicationCreateResponse(ResultSerializer):
method get_data (line 67) | def get_data(self):
class PageApplicationCreateResponse (line 71) | class PageApplicationCreateResponse(ResultPageSerializer):
method get_data (line 72) | def get_data(self):
class ApplicationRecordResponse (line 76) | class ApplicationRecordResponse(ResultSerializer):
method get_data (line 77) | def get_data(self):
class PageApplicationRecordResponse (line 81) | class PageApplicationRecordResponse(ResultPageSerializer):
method get_data (line 82) | def get_data(self):
class HistoricalConversationAPI (line 86) | class HistoricalConversationAPI(APIMixin):
method get_parameters (line 88) | def get_parameters():
method get_response (line 92) | def get_response():
class PageHistoricalConversationAPI (line 96) | class PageHistoricalConversationAPI(APIMixin):
method get_parameters (line 98) | def get_parameters():
method get_response (line 102) | def get_response():
class HistoricalConversationOperateAPI (line 106) | class HistoricalConversationOperateAPI(APIMixin):
method get_parameters (line 108) | def get_parameters():
method get_request (line 118) | def get_request():
method get_response (line 122) | def get_response():
class HistoricalConversationRecordAPI (line 126) | class HistoricalConversationRecordAPI(APIMixin):
method get_parameters (line 128) | def get_parameters():
method get_response (line 138) | def get_response():
class PageHistoricalConversationRecordAPI (line 142) | class PageHistoricalConversationRecordAPI(APIMixin):
method get_parameters (line 144) | def get_parameters():
method get_response (line 154) | def get_response():
FILE: apps/chat/api/chat_authentication_api.py
class OpenAIAPI (line 19) | class OpenAIAPI(APIMixin):
method get_request (line 21) | def get_request():
class ChatAuthenticationAPI (line 25) | class ChatAuthenticationAPI(APIMixin):
method get_request (line 27) | def get_request():
method get_parameters (line 31) | def get_parameters():
method get_response (line 35) | def get_response():
class ChatAuthenticationProfileAPI (line 39) | class ChatAuthenticationProfileAPI(APIMixin):
method get_parameters (line 42) | def get_parameters():
class ChatOpenAPI (line 52) | class ChatOpenAPI(APIMixin):
method get_parameters (line 54) | def get_parameters():
FILE: apps/chat/api/chat_embed_api.py
class ChatEmbedAPI (line 18) | class ChatEmbedAPI(APIMixin):
method get_parameters (line 20) | def get_parameters():
method get_response (line 46) | def get_response():
FILE: apps/chat/api/vote_api.py
class VoteAPI (line 18) | class VoteAPI(APIMixin):
method get_request (line 20) | def get_request():
method get_parameters (line 24) | def get_parameters():
method get_response (line 42) | def get_response():
FILE: apps/chat/apps.py
class ChatConfig (line 4) | class ChatConfig(AppConfig):
FILE: apps/chat/mcp/tools.py
class MCPToolHandler (line 10) | class MCPToolHandler:
method __init__ (line 11) | def __init__(self, auth_header):
method initialize (line 20) | def initialize(self):
method list_tools (line 32) | def list_tools(self):
method _get_chat_id (line 49) | def _get_chat_id(self):
method call_tool (line 65) | def call_tool(self, params):
FILE: apps/chat/serializers/chat.py
class ChatMessagesSerializers (line 48) | class ChatMessagesSerializers(serializers.Serializer):
class GeneratePromptSerializers (line 53) | class GeneratePromptSerializers(serializers.Serializer):
method is_valid (line 57) | def is_valid(self, *, raise_exception=False):
class ChatMessageSerializers (line 74) | class ChatMessageSerializers(serializers.Serializer):
function get_post_handler (line 100) | def get_post_handler(chat_info: ChatInfo):
class DebugChatSerializers (line 135) | class DebugChatSerializers(serializers.Serializer):
method chat (line 138) | def chat(self, instance: dict, base_to_response: BaseToResponse = Syst...
class PromptGenerateSerializer (line 154) | class PromptGenerateSerializer(serializers.Serializer):
method is_valid (line 159) | def is_valid(self, *, raise_exception=False):
method generate_prompt (line 170) | def generate_prompt(self, instance: dict):
class OpenAIMessage (line 205) | class OpenAIMessage(serializers.Serializer):
class OpenAIInstanceSerializer (line 210) | class OpenAIInstanceSerializer(serializers.Serializer):
class OpenAIChatSerializer (line 217) | class OpenAIChatSerializer(serializers.Serializer):
method get_message (line 225) | def get_message(instance):
method generate_chat (line 229) | def generate_chat(chat_id, application_id, message, chat_user_id, chat...
method chat (line 251) | def chat(self, instance: Dict, with_valid=True):
class ChatSerializers (line 285) | class ChatSerializers(serializers.Serializer):
method is_valid_application_workflow (line 295) | def is_valid_application_workflow(self, *, raise_exception=False):
method is_valid_chat_id (line 298) | def is_valid_chat_id(self, chat_info: ChatInfo):
method is_valid_intraday_access_num (line 303) | def is_valid_intraday_access_num(self):
method is_valid_application_simple (line 323) | def is_valid_application_simple(self, *, chat_info: ChatInfo, raise_ex...
method chat_simple (line 337) | def chat_simple(self, chat_info: ChatInfo, instance, base_to_response):
method get_chat_record (line 379) | def get_chat_record(chat_info, chat_record_id):
method chat_work_flow (line 392) | def chat_work_flow(self, chat_info: ChatInfo, instance: dict, base_to_...
method is_valid_chat_user (line 441) | def is_valid_chat_user(self):
method chat (line 454) | def chat(self, instance: dict, base_to_response: BaseToResponse = Syst...
method get_chat_info (line 469) | def get_chat_info(self):
method re_open_chat (line 478) | def re_open_chat(self, chat_id: str):
method re_open_chat_simple (line 494) | def re_open_chat_simple(self, chat_id, application):
method re_open_chat_work_flow (line 516) | def re_open_chat_work_flow(self, chat_id, application):
class OpenChatSerializers (line 528) | class OpenChatSerializers(serializers.Serializer):
method is_valid (line 537) | def is_valid(self, *, raise_exception=False):
method open (line 547) | def open(self):
method open_work_flow (line 563) | def open_work_flow(self, application):
method open_simple (line 577) | def open_simple(self, application):
class TextToSpeechSerializers (line 600) | class TextToSpeechSerializers(serializers.Serializer):
method text_to_speech (line 603) | def text_to_speech(self, instance):
class SpeechToTextSerializers (line 612) | class SpeechToTextSerializers(serializers.Serializer):
method speech_to_text (line 615) | def speech_to_text(self, instance):
FILE: apps/chat/serializers/chat_authentication.py
class AnonymousAuthenticationSerializer (line 26) | class AnonymousAuthenticationSerializer(serializers.Serializer):
method auth (line 29) | def auth(self, request, with_valid=True):
class AuthProfileSerializer (line 52) | class AuthProfileSerializer(serializers.Serializer):
method profile (line 55) | def profile(self):
class ApplicationProfileSerializer (line 92) | class ApplicationProfileSerializer(serializers.Serializer):
method reset_application (line 96) | def reset_application(application, application_version):
method profile (line 113) | def profile(self, with_valid=True):
FILE: apps/chat/serializers/chat_embed_serializers.py
class ChatEmbedSerializer (line 24) | class ChatEmbedSerializer(serializers.Serializer):
method get_embed (line 29) | def get_embed(self, with_valid=True, params=None):
method get_query_api_input (line 91) | def get_query_api_input(application, params):
FILE: apps/chat/serializers/chat_record.py
class VoteRequest (line 25) | class VoteRequest(serializers.Serializer):
class HistoryChatModel (line 34) | class HistoryChatModel(serializers.ModelSerializer):
class Meta (line 35) | class Meta:
class VoteSerializer (line 44) | class VoteSerializer(serializers.Serializer):
method vote (line 51) | def vote(self, instance: Dict, with_valid=True):
class HistoricalConversationSerializer (line 102) | class HistoricalConversationSerializer(serializers.Serializer):
method get_queryset (line 106) | def get_queryset(self):
method list (line 112) | def list(self):
method page (line 117) | def page(self, current_page, page_size):
class EditAbstractSerializer (line 122) | class EditAbstractSerializer(serializers.Serializer):
class HistoricalConversationOperateSerializer (line 126) | class HistoricalConversationOperateSerializer(serializers.Serializer):
method is_valid (line 131) | def is_valid(self, *, raise_exception=False):
method edit_abstract (line 138) | def edit_abstract(self, instance, with_valid=True):
method logic_delete (line 147) | def logic_delete(self, with_valid=True):
class Clear (line 154) | class Clear(serializers.Serializer):
method batch_logic_delete (line 158) | def batch_logic_delete(self, with_valid=True):
class HistoricalConversationRecordSerializer (line 166) | class HistoricalConversationRecordSerializer(serializers.Serializer):
method is_valid (line 171) | def is_valid(self, *, raise_exception=False):
method get_queryset (line 181) | def get_queryset(self):
method list (line 185) | def list(self):
method page (line 190) | def page(self, current_page, page_size):
FILE: apps/chat/template/embed.js
function initMaxkb (line 132) | function initMaxkb(){
function initMaxkbStyle (line 149) | function initMaxkbStyle(root, maxkbId){
function embedChatbot (line 319) | function embedChatbot() {
FILE: apps/chat/views/chat.py
function stream_image (line 36) | def stream_image(response):
class ResourceProxy (line 43) | class ResourceProxy(APIView):
method get (line 44) | def get(self, request: Request):
class OpenAIView (line 69) | class OpenAIView(APIView):
method post (line 81) | def post(self, request: Request, application_id: str):
class AnonymousAuthentication (line 92) | class AnonymousAuthentication(APIView):
method options (line 93) | def options(self, request, *args, **kwargs):
method post (line 108) | def post(self, request: Request):
class ApplicationProfile (line 118) | class ApplicationProfile(APIView):
method get (line 130) | def get(self, request: Request):
class AuthProfile (line 137) | class AuthProfile(APIView):
method get (line 147) | def get(self, request: Request):
class ChatView (line 152) | class ChatView(APIView):
method post (line 165) | def post(self, request: Request, chat_id: str):
class OpenView (line 179) | class OpenView(APIView):
method get (line 191) | def get(self, request: Request):
class CaptchaView (line 202) | class CaptchaView(APIView):
method get (line 209) | def get(self, request: Request):
class SpeechToText (line 215) | class SpeechToText(APIView):
method post (line 227) | def post(self, request: Request):
class TextToSpeech (line 234) | class TextToSpeech(APIView):
method post (line 246) | def post(self, request: Request):
class UploadFile (line 253) | class UploadFile(APIView):
method post (line 266) | def post(self, request: Request, chat_id: str):
FILE: apps/chat/views/chat_embed.py
class ChatEmbedView (line 18) | class ChatEmbedView(APIView):
method get (line 29) | def get(self, request: Request):
FILE: apps/chat/views/chat_record.py
class VoteView (line 24) | class VoteView(APIView):
method put (line 37) | def put(self, request: Request, chat_id: str, chat_record_id: str):
class HistoricalConversationView (line 44) | class HistoricalConversationView(APIView):
method get (line 56) | def get(self, request: Request):
class Operate (line 63) | class Operate(APIView):
method put (line 76) | def put(self, request: Request, chat_id: str):
method delete (line 94) | def delete(self, request: Request, chat_id: str):
class BatchDelete (line 102) | class BatchDelete(APIView):
method delete (line 114) | def delete(self, request: Request):
class PageView (line 120) | class PageView(APIView):
method get (line 132) | def get(self, request: Request, current_page: int, page_size: int):
class HistoricalConversationRecordView (line 140) | class HistoricalConversationRecordView(APIView):
method get (line 152) | def get(self, request: Request, chat_id: str):
class PageView (line 160) | class PageView(APIView):
method get (line 172) | def get(self, request: Request, chat_id: str, current_page: int, pag...
class ChatRecordView (line 181) | class ChatRecordView(APIView):
method get (line 193) | def get(self, request: Request, chat_id: str, chat_record_id: str):
FILE: apps/chat/views/mcp.py
function mcp_view (line 10) | def mcp_view(request):
FILE: apps/common/auth/authenticate.py
class AnonymousAuthentication (line 25) | class AnonymousAuthentication(TokenAuthentication):
method authenticate (line 26) | def authenticate(self, request):
class AnonymousAuthenticationScheme (line 30) | class AnonymousAuthenticationScheme(OpenApiAuthenticationExtension):
method get_security_definition (line 34) | def get_security_definition(self, auto_schema):
method get_security_requirement (line 39) | def get_security_requirement(self, auto_schema):
function new_instance_by_class_path (line 44) | def new_instance_by_class_path(class_path: str):
class TokenDetails (line 58) | class TokenDetails:
method __init__ (line 62) | def __init__(self, token: str):
method get_token_details (line 65) | def get_token_details(self):
class TokenAuth (line 74) | class TokenAuth(TokenAuthentication):
method authenticate (line 78) | def authenticate(self, request):
class ChatTokenAuth (line 100) | class ChatTokenAuth(TokenAuthentication):
method authenticate (line 104) | def authenticate(self, request):
class AllTokenAuth (line 126) | class AllTokenAuth(TokenAuthentication):
method authenticate (line 130) | def authenticate(self, request):
class WebhookAuth (line 152) | class WebhookAuth(TokenAuthentication):
method authenticate (line 156) | def authenticate(self, request):
FILE: apps/common/auth/authentication.py
function exist_permissions_by_permission_constants (line 18) | def exist_permissions_by_permission_constants(user_permission: List[Perm...
function exist_role_by_role_constants (line 29) | def exist_role_by_role_constants(user_role: List[RoleConstants],
function exist_permissions_by_view_permission (line 40) | def exist_permissions_by_view_permission(user_role: List[RoleConstants],
function exist_permissions (line 64) | def exist_permissions(user_role: List[RoleConstants], user_permission: L...
function exist (line 79) | def exist(user_role: List[RoleConstants], user_permission: List[Permissi...
function get_is_permissions (line 86) | def get_is_permissions(request, **kwargs):
function has_permissions (line 96) | def has_permissions(*permission, compare=CompareConstants.OR):
FILE: apps/common/auth/common.py
function _decrypt (line 22) | def _decrypt(authentication: str):
class ChatAuthentication (line 35) | class ChatAuthentication:
method __init__ (line 36) | def __init__(self, auth_type: str | None, **kwargs):
method to_dict (line 41) | def to_dict(self):
method to_string (line 44) | def to_string(self):
method new_instance (line 52) | def new_instance(authentication: str):
class ChatUserToken (line 57) | class ChatUserToken:
method __init__ (line 58) | def __init__(self, application_id, user_id, access_token, _type, chat_...
method to_dict (line 68) | def to_dict(self):
method to_token (line 79) | def to_token(self):
method new_instance (line 83) | def new_instance(token_dict):
FILE: apps/common/auth/handle/auth_base_handle.py
class AuthBaseHandle (line 12) | class AuthBaseHandle(ABC):
method support (line 14) | def support(self, request, token: str, get_token_details):
method handle (line 18) | def handle(self, request, token: str, get_token_details):
FILE: apps/common/auth/handle/impl/application_key.py
class ApplicationKey (line 19) | class ApplicationKey(AuthBaseHandle):
method handle (line 20) | def handle(self, request, token: str, get_token_details):
method support (line 44) | def support(self, request, token: str, get_token_details):
FILE: apps/common/auth/handle/impl/chat_anonymous_user_token.py
class ChatAnonymousUserToken (line 22) | class ChatAnonymousUserToken(AuthBaseHandle):
method support (line 23) | def support(self, request, token: str, get_token_details):
method handle (line 32) | def handle(self, request, token: str, get_token_details):
FILE: apps/common/auth/handle/impl/user_token.py
function get_permission (line 32) | def get_permission(permission_id):
function get_workspace_permission (line 43) | def get_workspace_permission(permission_id, workspace_id, role=None):
function get_role_permission (line 59) | def get_role_permission(role, workspace_id):
function get_workspace_permission_list (line 71) | def get_workspace_permission_list(role_permission_mapping_dict, workspac...
function get_workspace_resource_permission_list (line 87) | def get_workspace_resource_permission_list(
function get_workspace_resource_permission_list_by_workspace_user_permission (line 107) | def get_workspace_resource_permission_list_by_workspace_user_permission(
function get_permission_list (line 147) | def get_permission_list(user,
function reset_workspace_role (line 224) | def reset_workspace_role(role_id, workspace_id, role_dict):
function get_role_list (line 240) | def get_role_list(user,
function get_auth (line 278) | def get_auth(user):
class UserToken (line 291) | class UserToken(AuthBaseHandle):
method support (line 292) | def support(self, request, token: str, get_token_details):
method handle (line 298) | def handle(self, request, token: str, get_token_details):
FILE: apps/common/cache/mem_cache.py
class MemCache (line 13) | class MemCache(LocMemCache):
method __init__ (line 14) | def __init__(self, name, params):
method set (line 17) | def set(self, key, value, timeout=DEFAULT_TIMEOUT, version=None):
method get (line 23) | def get(self, key, default=None, version=None):
method clear_by_application_id (line 33) | def clear_by_application_id(self, application_id):
method clear_timeout_data (line 45) | def clear_timeout_data(self):
FILE: apps/common/cache_data/application_access_token_cache.py
function get_application_access_token (line 19) | def get_application_access_token(access_token, use_get_data):
function del_application_access_token (line 29) | def del_application_access_token(access_token):
FILE: apps/common/cache_data/application_api_key_cache.py
function get_application_api_key (line 20) | def get_application_api_key(secret_key, use_get_data):
function del_application_api_key (line 26) | def del_application_api_key(secret_key):
FILE: apps/common/chunk/__init__.py
function text_to_chunk (line 14) | def text_to_chunk(text: str, chunk_size: int = 256):
FILE: apps/common/chunk/i_chunk_handle.py
class IChunkHandle (line 13) | class IChunkHandle(ABC):
method handle (line 15) | def handle(self, chunk_list: List[str], chunk_size: int = 256):
FILE: apps/common/chunk/impl/mark_chunk_handle.py
class MarkChunkHandle (line 14) | class MarkChunkHandle(IChunkHandle):
method handle (line 15) | def handle(self, chunk_list: List[str], chunk_size: int = 256):
FILE: apps/common/config/embedding_config.py
class ModelManage (line 19) | class ModelManage:
method _get_lock (line 24) | def _get_lock(_id):
method get_model (line 36) | def get_model(_id, get_model):
method clear_timeout_cache (line 55) | def clear_timeout_cache():
method delete_key (line 61) | def delete_key(_id):
class VectorStore (line 66) | class VectorStore:
method get_embedding_vector (line 75) | def get_embedding_vector() -> BaseVectorStore:
FILE: apps/common/config/tokenizer_manage_config.py
class MKTokenizer (line 12) | class MKTokenizer:
method __init__ (line 13) | def __init__(self, tokenizer):
method encode (line 16) | def encode(self, text):
class TokenizerManage (line 20) | class TokenizerManage:
method get_tokenizer (line 24) | def get_tokenizer():
FILE: apps/common/constants/authentication_type.py
class AuthenticationType (line 12) | class AuthenticationType(Enum):
FILE: apps/common/constants/cache_version.py
class Cache_Version (line 12) | class Cache_Version(Enum):
method get_version (line 44) | def get_version(self):
method get_key_func (line 47) | def get_key_func(self):
method get_key (line 50) | def get_key(self, **kwargs):
FILE: apps/common/constants/exception_code_constants.py
class ExceptionCodeConstantsValue (line 15) | class ExceptionCodeConstantsValue:
method __init__ (line 16) | def __init__(self, code, message):
method get_message (line 20) | def get_message(self):
method get_code (line 23) | def get_code(self):
method to_app_api_exception (line 26) | def to_app_api_exception(self):
class ExceptionCodeConstants (line 30) | class ExceptionCodeConstants(Enum):
FILE: apps/common/constants/permission_constants.py
class Group (line 18) | class Group(Enum):
class SystemGroup (line 104) | class SystemGroup(Enum):
class WorkspaceGroup (line 126) | class WorkspaceGroup(Enum):
class UserGroup (line 137) | class UserGroup(Enum):
class Operate (line 145) | class Operate(Enum):
class RoleGroup (line 196) | class RoleGroup(Enum):
class ResourcePermissionRole (line 203) | class ResourcePermissionRole(models.TextChoices):
method __eq__ (line 209) | def __eq__(self, other):
class ResourcePermission (line 213) | class ResourcePermission(models.TextChoices):
method __eq__ (line 222) | def __eq__(self, other):
class Resource (line 226) | class Resource(models.TextChoices):
method __eq__ (line 235) | def __eq__(self, other):
class ResourcePermissionGroup (line 239) | class ResourcePermissionGroup:
method __init__ (line 240) | def __init__(self, resource: Resource, permission: ResourcePermission):
method __eq__ (line 244) | def __eq__(self, other):
class ResourcePermissionConst (line 248) | class ResourcePermissionConst:
class ResourceAuthType (line 265) | class ResourceAuthType(models.TextChoices):
class Role (line 276) | class Role:
method __init__ (line 277) | def __init__(self, name: str, decs: str, group: RoleGroup, resource_pa...
method __str__ (line 283) | def __str__(self):
method __eq__ (line 287) | def __eq__(self, other):
method get_workspace_role (line 290) | def get_workspace_role(self):
class RoleConstants (line 295) | class RoleConstants(Enum):
method get_workspace_role (line 306) | def get_workspace_role(self):
class Permission (line 432) | class Permission:
method __init__ (line 437) | def __init__(self, group: Group, operate: Operate, resource_path=None,...
method new_instance (line 455) | def new_instance(permission_str: str):
method __str__ (line 464) | def __str__(self):
method __eq__ (line 470) | def __eq__(self, other):
class PermissionConstants (line 474) | class PermissionConstants(Enum):
method get_workspace_application_permission (line 1846) | def get_workspace_application_permission(self):
method get_workspace_knowledge_permission (line 1851) | def get_workspace_knowledge_permission(self):
method get_workspace_model_permission (line 1856) | def get_workspace_model_permission(self):
method get_workspace_tool_permission (line 1861) | def get_workspace_tool_permission(self):
method get_workspace_permission (line 1866) | def get_workspace_permission(self):
method get_workspace_permission_workspace_manage_role (line 1871) | def get_workspace_permission_workspace_manage_role(self):
method __eq__ (line 1876) | def __eq__(self, other):
function get_default_permission_list_by_role (line 1883) | def get_default_permission_list_by_role(role: RoleConstants):
class RolePermissionMapping (line 1894) | class RolePermissionMapping:
method __init__ (line 1895) | def __init__(self, role_id, permission_id):
class WorkspaceUserRoleMapping (line 1900) | class WorkspaceUserRoleMapping:
method __init__ (line 1901) | def __init__(self, workspace_id, role_id, user_id):
function get_default_role_permission_mapping_list (line 1907) | def get_default_role_permission_mapping_list():
function get_default_workspace_user_role_mapping_list (line 1914) | def get_default_workspace_user_role_mapping_list(user_role_list: list):
function get_permission_list_by_resource_group (line 1919) | def get_permission_list_by_resource_group(resource_group: ResourcePermis...
class ChatAuth (line 1927) | class ChatAuth:
method __init__ (line 1928) | def __init__(self,
class Auth (line 1943) | class Auth:
method __init__ (line 1948) | def __init__(self,
class CompareConstants (line 1959) | class CompareConstants(Enum):
class ViewPermission (line 1966) | class ViewPermission:
method __init__ (line 1967) | def __init__(self, roleList: List[RoleConstants], permissionList: List...
FILE: apps/common/database_model_manage/database_model_manage.py
function new_instance_by_class_path (line 13) | def new_instance_by_class_path(class_path: str):
class DatabaseModelManage (line 25) | class DatabaseModelManage:
method get_model (line 32) | def get_model(model_name):
method init (line 39) | def init():
FILE: apps/common/database_model_manage/handle/base_handle.py
class IBaseModelHandle (line 12) | class IBaseModelHandle(ABC):
method get_model_dict (line 14) | def get_model_dict(self):
FILE: apps/common/database_model_manage/handle/impl/default_base_model_handle.py
class DefaultBaseModelHandle (line 12) | class DefaultBaseModelHandle(IBaseModelHandle):
method get_model_dict (line 13) | def get_model_dict(self):
FILE: apps/common/db/compiler.py
class AppSQLCompiler (line 16) | class AppSQLCompiler(SQLCompiler):
method __init__ (line 17) | def __init__(self, query, connection, using, elide_empty=True, field_r...
method get_query_str (line 23) | def get_query_str(self, with_limits=True, with_table_name=False, with_...
method as_sql (line 212) | def as_sql(self, with_limits=True, with_col_aliases=False, select_stri...
FILE: apps/common/db/search.py
function get_dynamics_model (line 23) | def get_dynamics_model(attr: dict, table_name='dynamics'):
function generate_sql_by_query_dict (line 54) | def generate_sql_by_query_dict(queryset_dict: Dict[str, QuerySet], selec...
function generate_sql_by_query (line 79) | def generate_sql_by_query(queryset: QuerySet, select_string: str,
function compiler_queryset (line 92) | def compiler_queryset(queryset: QuerySet, field_replace_dict: None | Dic...
function native_search (line 110) | def native_search(queryset: QuerySet | Dict[str, QuerySet], select_strin...
function native_update (line 132) | def native_update(queryset: QuerySet | Dict[str, QuerySet], select_strin...
function page_search (line 150) | def page_search(current_page: int, page_size: int, queryset: QuerySet, p...
function native_page_search (line 164) | def native_page_search(current_page: int, page_size: int, queryset: Quer...
function native_page_handler (line 193) | def native_page_handler(page_size: int,
function get_field_replace_dict (line 238) | def get_field_replace_dict(queryset: QuerySet):
function to_replace_field (line 252) | def to_replace_field(field: str):
FILE: apps/common/db/sql_execute.py
function sql_execute (line 14) | def sql_execute(sql: str, params):
function update_execute (line 30) | def update_execute(sql: str, params):
function select_list (line 44) | def select_list(sql: str, params: List):
function select_one (line 57) | def select_one(sql: str, params: List):
FILE: apps/common/encoder/encoder.py
class SystemEncoder (line 17) | class SystemEncoder(json.JSONEncoder):
method encode (line 18) | def encode(self, obj):
method default (line 25) | def default(self, obj):
FILE: apps/common/event/__init__.py
function run (line 25) | def run():
FILE: apps/common/event/common.py
function poxy (line 20) | def poxy(poxy_function):
function get_cache_key (line 27) | def get_cache_key(poxy_function, args):
function get_cache_poxy_function (line 31) | def get_cache_poxy_function(poxy_function, cache_key):
function embedding_poxy (line 41) | def embedding_poxy(poxy_function):
FILE: apps/common/event/listener_manage.py
class SyncWebKnowledgeArgs (line 36) | class SyncWebKnowledgeArgs:
method __init__ (line 37) | def __init__(self, lock_key: str, url: str, selector: str, handler):
class SyncWebDocumentArgs (line 44) | class SyncWebDocumentArgs:
method __init__ (line 45) | def __init__(self, source_url_list: List[str], selector: str, handler):
class UpdateProblemArgs (line 51) | class UpdateProblemArgs:
method __init__ (line 52) | def __init__(self, problem_id: str, problem_content: str, embedding_mo...
class UpdateEmbeddingKnowledgeIdArgs (line 58) | class UpdateEmbeddingKnowledgeIdArgs:
method __init__ (line 59) | def __init__(self, paragraph_id_list: List[str], target_knowledge_id: ...
class UpdateEmbeddingDocumentIdArgs (line 64) | class UpdateEmbeddingDocumentIdArgs:
method __init__ (line 65) | def __init__(self, paragraph_id_list: List[str], target_document_id: s...
class ListenerManagement (line 73) | class ListenerManagement:
method embedding_by_problem (line 76) | def embedding_by_problem(args, embedding_model: Embeddings):
method embedding_by_paragraph_list (line 80) | def embedding_by_paragraph_list(paragraph_id_list, embedding_model: Em...
method embedding_by_paragraph_data_list (line 95) | def embedding_by_paragraph_data_list(data_list, paragraph_id_list, emb...
method embedding_by_paragraph (line 124) | def embedding_by_paragraph(paragraph_id, embedding_model: Embeddings):
method embedding_by_data_list (line 163) | def embedding_by_data_list(data_list: List, embedding_model: Embeddings):
method get_embedding_paragraph_apply (line 168) | def get_embedding_paragraph_apply(embedding_model, is_the_task_interru...
method get_aggregation_document_status (line 179) | def get_aggregation_document_status(document_id):
method get_aggregation_document_status_by_knowledge_id (line 188) | def get_aggregation_document_status_by_knowledge_id(knowledge_id):
method get_aggregation_document_status_by_query_set (line 198) | def get_aggregation_document_status_by_query_set(queryset):
method post_update_document_status (line 207) | def post_update_document_status(document_id, task_type: TaskType):
method update_status (line 231) | def update_status(query_set: QuerySet, taskType: TaskType, state: State):
method embedding_by_document (line 254) | def embedding_by_document(document_id, embedding_model: Embeddings, st...
method embedding_by_knowledge (line 306) | def embedding_by_knowledge(knowledge_id, embedding_model: Embeddings):
method delete_embedding_by_document (line 327) | def delete_embedding_by_document(document_id):
method delete_embedding_by_document_list (line 331) | def delete_embedding_by_document_list(document_id_list: List[str]):
method delete_embedding_by_knowledge (line 335) | def delete_embedding_by_knowledge(knowledge_id):
method delete_embedding_by_paragraph (line 339) | def delete_embedding_by_paragraph(paragraph_id):
method delete_embedding_by_source (line 343) | def delete_embedding_by_source(source_id):
method disable_embedding_by_paragraph (line 347) | def disable_embedding_by_paragraph(paragraph_id):
method enable_embedding_by_paragraph (line 351) | def enable_embedding_by_paragraph(paragraph_id):
method update_problem (line 355) | def update_problem(args: UpdateProblemArgs):
method update_embedding_knowledge_id (line 362) | def update_embedding_knowledge_id(args: UpdateEmbeddingKnowledgeIdArgs):
method update_embedding_document_id (line 367) | def update_embedding_document_id(args: UpdateEmbeddingDocumentIdArgs):
method delete_embedding_by_source_ids (line 377) | def delete_embedding_by_source_ids(source_ids: List[str]):
method delete_embedding_by_paragraph_ids (line 381) | def delete_embedding_by_paragraph_ids(paragraph_ids: List[str]):
method delete_embedding_by_knowledge_id_list (line 385) | def delete_embedding_by_knowledge_id_list(source_ids: List[str]):
method hit_test (line 389) | def hit_test(query_text, knowledge_id: list[str], exclude_document_id_...
FILE: apps/common/exception/app_exception.py
class AppApiException (line 12) | class AppApiException(Exception):
method __init__ (line 18) | def __init__(self, code, message):
class NotFound404 (line 23) | class NotFound404(AppApiException):
method __init__ (line 29) | def __init__(self, code, message):
class AppAuthenticationFailed (line 34) | class AppAuthenticationFailed(AppApiException):
method __init__ (line 40) | def __init__(self, code, message):
class AppUnauthorizedFailed (line 45) | class AppUnauthorizedFailed(AppApiException):
method __init__ (line 51) | def __init__(self, code, message):
class AppEmbedIdentityFailed (line 56) | class AppEmbedIdentityFailed(AppApiException):
method __init__ (line 62) | def __init__(self, code, message):
class AppChatNumOutOfBoundsFailed (line 67) | class AppChatNumOutOfBoundsFailed(AppApiException):
method __init__ (line 73) | def __init__(self, code, message):
class ChatException (line 78) | class ChatException(AppApiException):
method __init__ (line 81) | def __init__(self, code, message):
FILE: apps/common/exception/handle_exception.py
function to_result (line 24) | def to_result(key, args, parent_key=None):
function validation_error_to_result (line 47) | def validation_error_to_result(exc: ValidationError):
function find_err_detail (line 62) | def find_err_detail(exc_detail):
function get_label (line 89) | def get_label(key, exc_detail):
function handle_exception (line 96) | def handle_exception(exc, context):
FILE: apps/common/field/common.py
class ObjectField (line 15) | class ObjectField(serializers.Field):
method __init__ (line 16) | def __init__(self, model_type_list, **kwargs):
method to_internal_value (line 20) | def to_internal_value(self, data):
method to_representation (line 26) | def to_representation(self, value):
class InstanceField (line 30) | class InstanceField(serializers.Field):
method __init__ (line 31) | def __init__(self, model_type, **kwargs):
method to_internal_value (line 35) | def to_internal_value(self, data):
method to_representation (line 40) | def to_representation(self, value):
class FunctionField (line 44) | class FunctionField(serializers.Field):
method to_internal_value (line 46) | def to_internal_value(self, data):
method to_representation (line 51) | def to_representation(self, value):
class UploadedImageField (line 55) | class UploadedImageField(serializers.ImageField):
method __init__ (line 56) | def __init__(self, **kwargs):
method to_representation (line 59) | def to_representation(self, value):
class UploadedFileField (line 62) | class UploadedFileField(serializers.FileField):
method __init__ (line 63) | def __init__(self, **kwargs):
method to_representation (line 66) | def to_representation(self, value):
FILE: apps/common/forms/array_object_card.py
class ArrayCard (line 14) | class ArrayCard(BaseExecField):
method __init__ (line 19) | def __init__(self,
FILE: apps/common/forms/base_field.py
class TriggerType (line 17) | class TriggerType(Enum):
class BaseField (line 24) | class BaseField:
method __init__ (line 25) | def __init__(self,
method is_valid (line 60) | def is_valid(self, value):
method to_dict (line 66) | def to_dict(self, **kwargs):
class BaseDefaultOptionField (line 81) | class BaseDefaultOptionField(BaseField):
method __init__ (line 82) | def __init__(self, input_type: str,
method to_dict (line 111) | def to_dict(self, **kwargs):
class BaseExecField (line 116) | class BaseExecField(BaseField):
method __init__ (line 117) | def __init__(self,
method to_dict (line 155) | def to_dict(self, **kwargs):
FILE: apps/common/forms/base_form.py
class BaseForm (line 14) | class BaseForm:
method to_form_list (line 15) | def to_form_list(self, **kwargs):
method valid_form (line 20) | def valid_form(self, form_data):
method get_default_form_data (line 26) | def get_default_form_data(self):
FILE: apps/common/forms/label/base_label.py
class BaseLabel (line 11) | class BaseLabel:
method __init__ (line 12) | def __init__(self,
method to_dict (line 22) | def to_dict(self, **kwargs):
FILE: apps/common/forms/label/tooltip_label.py
class TooltipLabel (line 12) | class TooltipLabel(BaseLabel):
method __init__ (line 13) | def __init__(self, label, tooltip):
FILE: apps/common/forms/multi_select.py
class MultiSelect (line 14) | class MultiSelect(BaseExecField):
method __init__ (line 19) | def __init__(self,
method to_dict (line 37) | def to_dict(self):
FILE: apps/common/forms/object_card.py
class ObjectCard (line 14) | class ObjectCard(BaseExecField):
method __init__ (line 19) | def __init__(self,
FILE: apps/common/forms/password_input.py
class PasswordInputField (line 14) | class PasswordInputField(BaseField):
method __init__ (line 19) | def __init__(self, label: str,
FILE: apps/common/forms/radio_button_field.py
class RadioButton (line 14) | class RadioButton(BaseExecField):
method __init__ (line 19) | def __init__(self,
method to_dict (line 37) | def to_dict(self):
FILE: apps/common/forms/radio_card_field.py
class RadioCard (line 14) | class RadioCard(BaseExecField):
method __init__ (line 19) | def __init__(self,
method to_dict (line 37) | def to_dict(self):
FILE: apps/common/forms/radio_field.py
class Radio (line 14) | class Radio(BaseExecField):
method __init__ (line 19) | def __init__(self,
method to_dict (line 37) | def to_dict(self):
FILE: apps/common/forms/single_select_field.py
class SingleSelect (line 15) | class SingleSelect(BaseExecField):
method __init__ (line 20) | def __init__(self,
method to_dict (line 38) | def to_dict(self):
FILE: apps/common/forms/slider_field.py
class SliderField (line 16) | class SliderField(BaseField):
method __init__ (line 21) | def __init__(self, label: str or BaseLabel,
method is_valid (line 50) | def is_valid(self, value):
FILE: apps/common/forms/switch_field.py
class SwitchField (line 12) | class SwitchField(BaseField):
method __init__ (line 17) | def __init__(self, label: str or BaseLabel,
FILE: apps/common/forms/tab_card.py
class TabCard (line 14) | class TabCard(BaseExecField):
method __init__ (line 19) | def __init__(self,
FILE: apps/common/forms/table_checkbox.py
class TableRadio (line 14) | class TableRadio(BaseExecField):
method __init__ (line 19) | def __init__(self,
FILE: apps/common/forms/table_radio.py
class TableRadio (line 14) | class TableRadio(BaseExecField):
method __init__ (line 19) | def __init__(self,
FILE: apps/common/forms/text_input_field.py
class TextInputField (line 15) | class TextInputField(BaseField):
method __init__ (line 20) | def __init__(self, label: str or BaseLabel,
FILE: apps/common/handle/base_parse_qa_handle.py
function get_row_value (line 12) | def get_row_value(row, title_row_index_dict, field):
function get_title_row_index_dict (line 21) | def get_title_row_index_dict(title_row_list):
class BaseParseQAHandle (line 45) | class BaseParseQAHandle(ABC):
method support (line 47) | def support(self, file, get_buffer):
method handle (line 51) | def handle(self, file, get_buffer, save_image):
FILE: apps/common/handle/base_parse_table_handle.py
class BaseParseTableHandle (line 12) | class BaseParseTableHandle(ABC):
method support (line 14) | def support(self, file, get_buffer):
method handle (line 18) | def handle(self, file, get_buffer,save_image):
method get_content (line 22) | def get_content(self, file, save_image):
FILE: apps/common/handle/base_split_handle.py
class BaseSplitHandle (line 13) | class BaseSplitHandle(ABC):
method support (line 15) | def support(self, file, get_buffer):
method handle (line 19) | def handle(self, file, pattern_list: List, with_filter: bool, limit: i...
method get_content (line 23) | def get_content(self, file, save_image):
FILE: apps/common/handle/base_to_response.py
class BaseToResponse (line 14) | class BaseToResponse(ABC):
method to_block_response (line 17) | def to_block_response(self, chat_id, chat_record_id, content, is_end, ...
method to_stream_chunk_response (line 23) | def to_stream_chunk_response(self, chat_id, chat_record_id, node_id, u...
method format_stream_chunk (line 29) | def format_stream_chunk(response_str):
FILE: apps/common/handle/handle_exception.py
function to_result (line 23) | def to_result(key, args, parent_key=None):
function validation_error_to_result (line 46) | def validation_error_to_result(exc: ValidationError):
function find_err_detail (line 61) | def find_err_detail(exc_detail):
function handle_exception (line 81) | def handle_exception(exc, context):
FILE: apps/common/handle/impl/common_handle.py
function parse_element (line 29) | def parse_element(element) -> {}:
function parse_element_sheet_xml (line 46) | def parse_element_sheet_xml(element) -> []:
function level_order_traversal (line 57) | def level_order_traversal(root, flag: str) -> []:
function handle_images (line 71) | def handle_images(deps, archive: ZipFile) -> []:
function xlsx_embed_cells_images (line 88) | def xlsx_embed_cells_images(buffer) -> {}:
FILE: apps/common/handle/impl/qa/csv_parse_qa_handle.py
function read_csv_standard (line 19) | def read_csv_standard(file_path):
class CsvParseQAHandle (line 28) | class CsvParseQAHandle(BaseParseQAHandle):
method support (line 29) | def support(self, file, get_buffer):
method handle (line 35) | def handle(self, file, get_buffer, save_image):
FILE: apps/common/handle/impl/qa/md_parse_qa_handle.py
class MarkdownParseQAHandle (line 19) | class MarkdownParseQAHandle(BaseParseQAHandle):
method support (line 20) | def support(self, file, get_buffer):
method parse_markdown_table (line 26) | def parse_markdown_table(self, content):
method _unescape_cell_content (line 63) | def _unescape_cell_content(self, cell) -> Any:
method handle (line 68) | def handle(self, file, get_buffer, save_image):
method split_by_sheets (line 121) | def split_by_sheets(self, content):
FILE: apps/common/handle/impl/qa/xls_parse_qa_handle.py
function handle_sheet (line 17) | def handle_sheet(file_name, sheet):
class XlsParseQAHandle (line 43) | class XlsParseQAHandle(BaseParseQAHandle):
method support (line 44) | def support(self, file, get_buffer):
method handle (line 51) | def handle(self, file, get_buffer, save_image):
FILE: apps/common/handle/impl/qa/xlsx_parse_qa_handle.py
function handle_sheet (line 19) | def handle_sheet(file_name, sheet, image_dict):
class XlsxParseQAHandle (line 49) | class XlsxParseQAHandle(BaseParseQAHandle):
method support (line 50) | def support(self, file, get_buffer):
method handle (line 56) | def handle(self, file, get_buffer, save_image):
FILE: apps/common/handle/impl/qa/zip_parse_qa_handle.py
class FileBufferHandle (line 27) | class FileBufferHandle:
method get_buffer (line 30) | def get_buffer(self, file):
function file_to_paragraph (line 43) | def file_to_paragraph(file, save_inner_image):
function is_valid_uuid (line 59) | def is_valid_uuid(uuid_str: str):
function get_image_list (line 72) | def get_image_list(result_list: list, zip_files: List[str]):
function filter_image_file (line 112) | def filter_image_file(result_list: list, image_list):
class ZipParseQAHandle (line 117) | class ZipParseQAHandle(BaseParseQAHandle):
method handle (line 119) | def handle(self, file, get_buffer, save_image):
method support (line 156) | def support(self, file, get_buffer):
FILE: apps/common/handle/impl/response/loop_to_response.py
class LoopToResponse (line 14) | class LoopToResponse(SystemToResponse):
method to_stream_chunk_response (line 16) | def to_stream_chunk_response(self, chat_id, chat_record_id, node_id, u...
FILE: apps/common/handle/impl/response/openai_to_response.py
class OpenaiToResponse (line 22) | class OpenaiToResponse(BaseToResponse):
method to_block_response (line 23) | def to_block_response(self, chat_id, chat_record_id, content, is_end, ...
method to_stream_chunk_response (line 39) | def to_stream_chunk_response(self, chat_id, chat_record_id, node_id, u...
FILE: apps/common/handle/impl/response/system_to_response.py
class SystemToResponse (line 17) | class SystemToResponse(BaseToResponse):
method to_block_response (line 18) | def to_block_response(self, chat_id, chat_record_id, content, is_end, ...
method to_stream_chunk_response (line 29) | def to_stream_chunk_response(self, chat_id, chat_record_id, node_id, u...
FILE: apps/common/handle/impl/table/csv_parse_table_handle.py
class CsvParseTableHandle (line 12) | class CsvParseTableHandle(BaseParseTableHandle):
method support (line 13) | def support(self, file, get_buffer):
method handle (line 19) | def handle(self, file, get_buffer, save_image):
method get_content (line 39) | def get_content(self, file, save_image):
FILE: apps/common/handle/impl/table/xls_parse_table_handle.py
class XlsParseTableHandle (line 11) | class XlsParseTableHandle(BaseParseTableHandle):
method support (line 12) | def support(self, file, get_buffer):
method handle (line 19) | def handle(self, file, get_buffer, save_image):
method get_content (line 63) | def get_content(self, file, save_image):
FILE: apps/common/handle/impl/table/xlsx_parse_table_handle.py
class XlsxParseTableHandle (line 13) | class XlsxParseTableHandle(BaseParseTableHandle):
method support (line 14) | def support(self, file, get_buffer):
method fill_merged_cells (line 20) | def fill_merged_cells(self, sheet, image_dict):
method handle (line 55) | def handle(self, file, get_buffer, save_image):
method get_content (line 82) | def get_content(self, file, save_image):
FILE: apps/common/handle/impl/text/csv_split_handle.py
function post_cell (line 21) | def post_cell(cell_value):
function row_to_md (line 25) | def row_to_md(row):
class CsvSplitHandle (line 30) | class CsvSplitHandle(BaseSplitHandle):
method handle (line 31) | def handle(self, file, pattern_list: List, with_filter: bool, limit: i...
method get_content (line 70) | def get_content(self, file, save_image):
method support (line 104) | def support(self, file, get_buffer):
FILE: apps/common/handle/impl/text/doc_split_handle.py
function image_to_mode (line 38) | def image_to_mode(image, doc: Document, images_list, get_image_id):
function get_paragraph_element_images (line 52) | def get_paragraph_element_images(paragraph_element, doc: Document, image...
function images_to_string (line 67) | def images_to_string(images, doc: Document, images_list, get_image_id):
function get_paragraph_element_txt (line 73) | def get_paragraph_element_txt(paragraph_element, doc: Document, images_l...
function get_paragraph_txt (line 86) | def get_paragraph_txt(paragraph: Paragraph, doc: Document, images_list, ...
function get_cell_text (line 93) | def get_cell_text(cell, doc: Document, images_list, get_image_id):
function get_image_id_func (line 102) | def get_image_id_func():
function get_title_level (line 125) | def get_title_level(paragraph: Paragraph):
class DocSplitHandle (line 144) | class DocSplitHandle(BaseSplitHandle):
method paragraph_to_md (line 146) | def paragraph_to_md(paragraph: Paragraph, doc: Document, images_list, ...
method table_to_md (line 166) | def table_to_md(table, doc: Document, images_list, get_image_id):
method to_md (line 178) | def to_md(self, doc, images_list, get_image_id):
method handle (line 199) | def handle(self, file, pattern_list: List, with_filter: bool, limit: i...
method support (line 227) | def support(self, file, get_buffer):
method get_content (line 234) | def get_content(self, file, save_image):
FILE: apps/common/handle/impl/text/html_split_handle.py
function get_encoding (line 29) | def get_encoding(buffer):
class HTMLSplitHandle (line 40) | class HTMLSplitHandle(BaseSplitHandle):
method support (line 41) | def support(self, file, get_buffer):
method handle (line 47) | def handle(self, file, pattern_list: List, with_filter: bool, limit: i...
method get_content (line 72) | def get_content(self, file, save_image):
FILE: apps/common/handle/impl/text/pdf_split_handle.py
function check_links_in_pdf (line 32) | def check_links_in_pdf(doc):
class PdfSplitHandle (line 43) | class PdfSplitHandle(BaseSplitHandle):
method handle (line 44) | def handle(self, file, pattern_list: List, with_filter: bool, limit: i...
method handle_pdf_content (line 92) | def handle_pdf_content(file, pdf_document):
method handle_toc (line 150) | def handle_toc(doc, limit):
method handle_links (line 212) | def handle_links(doc, pattern_list, with_filter, limit):
method handle_chapter_title (line 316) | def handle_chapter_title(title):
method support (line 321) | def support(self, file, get_buffer):
method get_content (line 327) | def get_content(self, file, save_image):
FILE: apps/common/handle/impl/text/text_split_handle.py
class TextSplitHandle (line 33) | class TextSplitHandle(BaseSplitHandle):
method support (line 34) | def support(self, file, get_buffer):
method handle (line 49) | def handle(self, file, pattern_list: List, with_filter: bool, limit: i...
method get_content (line 66) | def get_content(self, file, save_image):
FILE: apps/common/handle/impl/text/xls_split_handle.py
function post_cell (line 18) | def post_cell(cell_value):
function row_to_md (line 22) | def row_to_md(row):
function handle_sheet (line 27) | def handle_sheet(file_name, sheet, limit: int):
class XlsSplitHandle (line 59) | class XlsSplitHandle(BaseSplitHandle):
method handle (line 60) | def handle(self, file, pattern_list: List, with_filter: bool, limit: i...
method get_content (line 77) | def get_content(self, file, save_image):
method support (line 109) | def support(self, file, get_buffer):
FILE: apps/common/handle/impl/text/xlsx_split_handle.py
function post_cell (line 23) | def post_cell(image_dict, cell_value):
function row_to_md (line 30) | def row_to_md(row, image_dict):
function handle_sheet (line 36) | def handle_sheet(file_name, sheet, image_dict, limit: int):
class XlsxSplitHandle (line 68) | class XlsxSplitHandle(BaseSplitHandle):
method fill_merged_cells (line 69) | def fill_merged_cells(self, sheet, image_dict):
method handle (line 103) | def handle(self, file, pattern_list: List, with_filter: bool, limit: i...
method get_content (line 127) | def get_content(self, file, save_image):
method _escape_cell_content (line 166) | def _escape_cell_content(self, cell_value):
method support (line 185) | def support(self, file, get_buffer):
FILE: apps/common/handle/impl/text/zip_split_handle.py
class FileBufferHandle (line 32) | class FileBufferHandle:
method get_buffer (line 35) | def get_buffer(self, file):
function file_to_paragraph (line 53) | def file_to_paragraph(file, pattern_list: List, with_filter: bool, limit...
function is_valid_uuid (line 61) | def is_valid_uuid(uuid_str: str):
function get_image_list (line 69) | def get_image_list(result_list: list, zip_files: List[str]):
function get_image_list_by_content (line 104) | def get_image_list_by_content(name: str, content: str, zip_files: List[s...
function get_file_name (line 135) | def get_file_name(file_name):
function filter_image_file (line 144) | def filter_image_file(result_list: list, image_list):
class ZipSplitHandle (line 149) | class ZipSplitHandle(BaseSplitHandle):
method handle (line 150) | def handle(self, file, pattern_list: List, with_filter: bool, limit: i...
method support (line 192) | def support(self, file, get_buffer):
method get_content (line 198) | def get_content(self, file, save_image):
FILE: apps/common/init/init_doc.py
function init_app_doc (line 19) | def init_app_doc(system_urlpatterns):
class ChatSpectacularSwaggerView (line 28) | class ChatSpectacularSwaggerView(SpectacularSwaggerView):
method _swagger_ui_resource (line 30) | def _swagger_ui_resource(filename):
method _swagger_ui_favicon (line 34) | def _swagger_ui_favicon():
function init_chat_doc (line 38) | def init_chat_doc(system_urlpatterns, chat_urlpatterns):
function encrypt (line 52) | def encrypt(text):
function get_call (line 59) | def get_call(application_urlpatterns, patterns, params, func):
function init_doc (line 77) | def init_doc(system_urlpatterns, chat_patterns):
FILE: apps/common/init/init_template.py
function jinja2_formatter (line 15) | def jinja2_formatter(template: str, /, **kwargs: Any) -> str:
function run (line 53) | def run():
FILE: apps/common/job/__init__.py
function run (line 14) | def run():
FILE: apps/common/job/clean_chat_job.py
function clean_chat_log_job (line 16) | def clean_chat_log_job():
function clean_chat_log_job_lock (line 21) | def clean_chat_log_job_lock():
function clean_method (line 48) | def clean_method(query_conditions, clean_log=True):
function run (line 98) | def run():
FILE: apps/common/job/clean_debug_file_job.py
function clean_debug_file (line 13) | def clean_debug_file():
function clean_debug_file_lock (line 18) | def clean_debug_file_lock():
function run (line 33) | def run():
FILE: apps/common/job/client_access_num_job.py
function client_access_num_reset_job (line 18) | def client_access_num_reset_job():
function client_access_num_reset_job_lock (line 23) | def client_access_num_reset_job_lock():
function run (line 30) | def run():
FILE: apps/common/lock/base_lock.py
class BaseLock (line 13) | class BaseLock(ABC):
method try_lock (line 15) | def try_lock(self, key, timeout):
method un_lock (line 19) | def un_lock(self, key):
FILE: apps/common/log/log.py
function _get_ip_address (line 13) | def _get_ip_address(request):
function _get_user (line 27) | def _get_user(request):
function _get_details (line 51) | def _get_details(request):
function _get_workspace_id (line 62) | def _get_workspace_id(request, kwargs):
function log (line 66) | def log(menu: str, operate, get_user=_get_user, get_ip_address=_get_ip_a...
FILE: apps/common/management/commands/celery.py
class Command (line 17) | class Command(BaseCommand):
method add_arguments (line 20) | def add_arguments(self, parser):
method handle (line 25) | def handle(self, *args, **options):
FILE: apps/common/management/commands/restart.py
class Command (line 4) | class Command(BaseActionCommand):
FILE: apps/common/management/commands/services/command.py
class Services (line 10) | class Services(TextChoices):
method get_service_object_class (line 21) | def get_service_object_class(cls, name):
method web_services (line 31) | def web_services(cls):
method celery_services (line 35) | def celery_services(cls):
method task_services (line 39) | def task_services(cls):
method all_services (line 44) | def all_services(cls):
method export_services_values (line 48) | def export_services_values(cls):
method get_service_objects (line 52) | def get_service_objects(cls, service_names, **kwargs):
class Action (line 77) | class Action(TextChoices):
class BaseActionCommand (line 84) | class BaseActionCommand(BaseCommand):
method __init__ (line 90) | def __init__(self, *args, **kwargs):
method add_arguments (line 93) | def add_arguments(self, parser):
method initial_util (line 102) | def initial_util(self, *args, **options):
method handle (line 117) | def handle(self, *args, **options):
method _handle_start (line 123) | def _handle_start(self):
method _handle_stop (line 127) | def _handle_stop(self):
method _handle_restart (line 130) | def _handle_restart(self):
method _handle_status (line 133) | def _handle_status(self):
FILE: apps/common/management/commands/services/services/base.py
class BaseService (line 11) | class BaseService(object):
method __init__ (line 13) | def __init__(self, **kwargs):
method cmd (line 24) | def cmd(self):
method cwd (line 29) | def cwd(self):
method is_running (line 33) | def is_running(self):
method show_status (line 43) | def show_status(self):
method log_filename (line 57) | def log_filename(self):
method log_filepath (line 61) | def log_filepath(self):
method log_file (line 65) | def log_file(self):
method log_dir (line 69) | def log_dir(self):
method pid_filepath (line 75) | def pid_filepath(self):
method pid (line 79) | def pid(self):
method write_pid (line 89) | def write_pid(self):
method remove_pid (line 93) | def remove_pid(self):
method process (line 100) | def process(self):
method open_subprocess (line 111) | def open_subprocess(self):
method start (line 115) | def start(self):
method start_other (line 124) | def start_other(self):
method stop (line 127) | def stop(self, force=False):
method watch (line 155) | def watch(self):
method _check (line 161) | def _check(self):
method _restart (line 174) | def _restart(self):
method _rotate_log (line 183) | def _rotate_log(self):
FILE: apps/common/management/commands/services/services/celery_base.py
class CeleryBaseService (line 7) | class CeleryBaseService(BaseService):
method __init__ (line 9) | def __init__(self, queue, num=10, **kwargs):
method cmd (line 15) | def cmd(self):
method cwd (line 44) | def cwd(self):
FILE: apps/common/management/commands/services/services/celery_default.py
class CeleryDefaultService (line 10) | class CeleryDefaultService(CeleryBaseService):
method __init__ (line 12) | def __init__(self, **kwargs):
method open_subprocess (line 16) | def open_subprocess(self):
FILE: apps/common/management/commands/services/services/gunicorn.py
class GunicornService (line 9) | class GunicornService(BaseService):
method __init__ (line 11) | def __init__(self, **kwargs):
method cmd (line 16) | def cmd(self):
method cwd (line 41) | def cwd(self):
method open_subprocess (line 44) | def open_subprocess(self):
FILE: apps/common/management/commands/services/services/local_model.py
class GunicornLocalModelService (line 18) | class GunicornLocalModelService(BaseService):
method __init__ (line 20) | def __init__(self, **kwargs):
method cmd (line 25) | def cmd(self):
method cwd (line 50) | def cwd(self):
method open_subprocess (line 53) | def open_subprocess(self):
FILE: apps/common/management/commands/services/services/scheduler.py
class SchedulerService (line 9) | class SchedulerService(BaseService):
method __init__ (line 11) | def __init__(self, **kwargs):
method cmd (line 16) | def cmd(self):
method cwd (line 41) | def cwd(self):
method open_subprocess (line 44) | def open_subprocess(self):
FILE: apps/common/management/commands/services/utils.py
class ServicesUtil (line 11) | class ServicesUtil(object):
method __init__ (line 13) | def __init__(self, services, run_daemon=False, force_stop=False, stop_...
method restart (line 22) | def restart(self):
method start_and_watch (line 27) | def start_and_watch(self):
method start (line 38) | def start(self):
method stop (line 46) | def stop(self):
method watch (line 55) | def watch(self):
method _watch (line 67) | def _watch(self):
method clean_up (line 77) | def clean_up(self):
method show_status (line 82) | def show_status(self):
method _stop_daemon (line 88) | def _stop_daemon(self):
method remove_daemon_pid (line 93) | def remove_daemon_pid(self):
method daemon_pid (line 98) | def daemon_pid(self):
method daemon_is_running (line 109) | def daemon_is_running(self):
method daemon_pid_filepath (line 118) | def daemon_pid_filepath(self):
method daemon_log_filepath (line 122) | def daemon_log_filepath(self):
method daemon_context (line 126) | def daemon_context(self):
FILE: apps/common/management/commands/start.py
class Command (line 4) | class Command(BaseActionCommand):
FILE: apps/common/management/commands/status.py
class Command (line 4) | class Command(BaseActionCommand):
FILE: apps/common/management/commands/stop.py
class Command (line 4) | class Command(BaseActionCommand):
FILE: apps/common/middleware/chat_headers_middleware.py
class ChatHeadersMiddleware (line 15) | class ChatHeadersMiddleware(MiddlewareMixin):
method process_response (line 16) | def process_response(self, request, response):
FILE: apps/common/middleware/cross_domain_middleware.py
class CrossDomainMiddleware (line 15) | class CrossDomainMiddleware(MiddlewareMixin):
method process_request (line 17) | def process_request(self, request):
method process_response (line 25) | def process_response(self, request, response):
FILE: apps/common/middleware/doc_headers_middleware.py
class DocHeadersMiddleware (line 116) | class DocHeadersMiddleware(MiddlewareMixin):
method process_response (line 117) | def process_response(self, request, response):
FILE: apps/common/middleware/gzip.py
class GZipMiddleware (line 17) | class GZipMiddleware(MiddlewareMixin):
method process_response (line 26) | def process_response(self, request, response):
FILE: apps/common/mixins/api_mixin.py
class APIMixin (line 11) | class APIMixin:
method get_request (line 13) | def get_request():
method get_response (line 17) | def get_response():
method get_parameters (line 21) | def get_parameters():
FILE: apps/common/mixins/app_model_mixin.py
class AppModelMixin (line 12) | class AppModelMixin(models.Model):
class Meta (line 18) | class Meta:
FILE: apps/common/result/api.py
class DefaultResultSerializer (line 13) | class DefaultResultSerializer(serializers.Serializer):
class ResultSerializer (line 23) | class ResultSerializer(serializers.Serializer):
method get_data (line 31) | def get_data(self):
method __init__ (line 34) | def __init__(self, **kwargs):
class PageDataResponse (line 39) | class PageDataResponse(serializers.Serializer):
method __init__ (line 47) | def __init__(self, records, **kwargs):
class ResultPageSerializer (line 52) | class ResultPageSerializer(ResultSerializer):
method __init__ (line 54) | def __init__(self, **kwargs):
FILE: apps/common/result/result.py
class Page (line 16) | class Page(dict):
method __init__ (line 21) | def __init__(self, total: int, records: List, current_page: int, page_...
class Result (line 25) | class Result(JsonResponse):
method __init__ (line 31) | def __init__(self, code=200, message=_('Success'), data=None, response...
function success (line 36) | def success(data, **kwargs):
function error (line 45) | def error(message, **kwargs):
FILE: apps/common/utils/cache_util.py
function get_data_by_default_cache (line 12) | def get_data_by_default_cache(key: str, get_data, cache_instance=cache, ...
function set_data_by_default_cache (line 31) | def set_data_by_default_cache(key: str, get_data, cache_instance=cache, ...
function get_cache (line 37) | def get_cache(cache_key, use_get_data: any = True, cache_instance=cache,...
function del_cache (line 57) | def del_cache(cache_key, cache_instance=cache, version=None):
FILE: apps/common/utils/chat_link_code.py
class UUIDEncoder (line 13) | class UUIDEncoder:
method encode (line 19) | def encode(uuid_obj: Union[uuid.UUID, str] = None) -> str:
method decode (line 38) | def decode(encoded: str) -> uuid.UUID:
method decode_to_str (line 47) | def decode_to_str(encoded: str) -> str:
FILE: apps/common/utils/common.py
function password_encrypt (line 29) | def password_encrypt(row_password):
function group_by (line 41) | def group_by(list_source: List, key):
function get_random_chars (line 64) | def get_random_chars(number=4):
function encryption (line 70) | def encryption(message: str):
function _remove_empty_lines (line 92) | def _remove_empty_lines(text):
function markdown_to_plain_text (line 101) | def markdown_to_plain_text(md: str) -> str:
function get_file_content (line 134) | def get_file_content(path):
function sub_array (line 140) | def sub_array(array: List, item_num=10):
function bytes_to_uploaded_file (line 153) | def bytes_to_uploaded_file(file_bytes, file_name="file.txt"):
function any_to_amr (line 176) | def any_to_amr(any_path, amr_path):
function any_to_mp3 (line 191) | def any_to_mp3(any_path, mp3_path):
function sil_to_wav (line 206) | def sil_to_wav(silk_path, wav_path, rate: int = 24000):
function split_and_transcribe (line 219) | def split_and_transcribe(file_path, model, max_segment_length_ms=59000, ...
function query_params_to_single_dict (line 236) | def query_params_to_single_dict(query_params: Dict):
function valid_license (line 243) | def valid_license(model=None, count=None, message=None):
function post (line 263) | def post(post_function):
function parse_md_image (line 274) | def parse_md_image(content: str):
function bulk_create_in_batches (line 280) | def bulk_create_in_batches(model, data, batch_size=1000):
function get_sha256_hash (line 288) | def get_sha256_hash(_v: str | bytes):
class RestrictedUnpickler (line 306) | class RestrictedUnpickler(pickle.Unpickler):
method find_class (line 308) | def find_class(self, module, name):
function restricted_loads (line 315) | def restricted_loads(s):
function flat_map (line 320) | def flat_map(array: List[List]):
function parse_image (line 332) | def parse_image(content: str):
function generate_uuid (line 338) | def generate_uuid(tag: str):
function filter_workspace (line 342) | def filter_workspace(query_list):
function filter_special_character (line 346) | def filter_special_character(_str):
function is_valid_uuid (line 356) | def is_valid_uuid(uuid_string):
FILE: apps/common/utils/fork.py
class ChildLink (line 17) | class ChildLink:
method __init__ (line 18) | def __init__(self, url, tag):
class ForkManage (line 23) | class ForkManage:
method __init__ (line 24) | def __init__(self, base_url: str, selector_list: List[str]):
method fork (line 28) | def fork(self, level: int, exclude_link_url: Set[str], fork_handler):
method fork_child (line 32) | def fork_child(child_link: ChildLink, selector_list: List[str], level:...
function remove_fragment (line 49) | def remove_fragment(url: str) -> str:
class Fork (line 56) | class Fork:
class Response (line 57) | class Response:
method __init__ (line 58) | def __init__(self, content: str, child_link_list: List[ChildLink], s...
method success (line 65) | def success(html_content: str, child_link_list: List[ChildLink]):
method error (line 69) | def error(message: str):
method __init__ (line 72) | def __init__(self, base_fork_url: str, selector_list: List[str]):
method get_child_link_list (line 94) | def get_child_link_list(self, bf: BeautifulSoup):
method get_content_html (line 102) | def get_content_html(self, bf: BeautifulSoup):
method reset_url (line 114) | def reset_url(tag, field, base_fork_url):
method reset_beautiful_soup (line 127) | def reset_beautiful_soup(self, bf: BeautifulSoup):
method get_beautiful_soup (line 144) | def get_beautiful_soup(response):
method get_charset_list (line 161) | def get_charset_list(meta_list):
method fork (line 173) | def fork(self):
function handler (line 196) | def handler(base_url, response: Fork.Response):
FILE: apps/common/utils/lock.py
class RedisLock (line 17) | class RedisLock():
method __init__ (line 18) | def __init__(self):
method try_lock (line 21) | def try_lock(self, key: str, timeout=None):
method un_lock (line 35) | def un_lock(self, key: str):
function lock (line 52) | def lock(lock_key, timeout=None):
FILE: apps/common/utils/logger.py
class DailyTimedRotatingFileHandler (line 9) | class DailyTimedRotatingFileHandler(TimedRotatingFileHandler):
method rotator (line 10) | def rotator(self, source, dest):
method _get_rotate_dest_filename (line 18) | def _get_rotate_dest_filename(source):
FILE: apps/common/utils/page_utils.py
function page (line 12) | def page(query_set, page_size, handler, is_the_task_interrupted=lambda: ...
function page_desc (line 31) | def page_desc(query_set, page_size, handler, is_the_task_interrupted=lam...
FILE: apps/common/utils/rsa_util.py
function generate (line 28) | def generate():
function get_key_pair (line 42) | def get_key_pair():
function get_key_pair_by_sql (line 55) | def get_key_pair_by_sql():
function encrypt (line 65) | def encrypt(msg, public_key: str | None = None):
function decrypt (line 79) | def decrypt(msg, pri_key: str | None = None):
function _get_encrypt_cipher (line 95) | def _get_encrypt_cipher(public_key: str):
function rsa_long_encrypt (line 100) | def rsa_long_encrypt(message, public_key: str | None = None, length=200):
function _get_cipher (line 128) | def _get_cipher(pri_key: str):
function rsa_long_decrypt (line 133) | def rsa_long_decrypt(message, pri_key: str | None = None, length=256):
FILE: apps/common/utils/shared_resource_auth.py
function filter_authorized_ids (line 17) | def filter_authorized_ids(resource_type: str, ids: List[str], workspace_...
FILE: apps/common/utils/split_model.py
function get_level_block (line 16) | def get_level_block(text, level_content_list, level_content_index, cursor):
function to_tree_obj (line 33) | def to_tree_obj(content, state='title'):
function remove_special_symbol (line 43) | def remove_special_symbol(str_source: str):
function filter_special_symbol (line 52) | def filter_special_symbol(content: dict):
function flat (line 62) | def flat(tree_data_list: List[dict], parent_chain: List[dict], result: L...
function to_paragraph (line 84) | def to_paragraph(obj: dict):
function get_keyword (line 96) | def get_keyword(content: str):
function titles_to_paragraph (line 107) | def titles_to_paragraph(list_title: List[dict]):
function parse_group_key (line 126) | def parse_group_key(level_list: List[dict]):
function to_block_paragraph (line 140) | def to_block_paragraph(tree_data_list: List[dict]):
function parse_title_level (line 151) | def parse_title_level(text, content_level_pattern: List, index):
function parse_level (line 160) | def parse_level(text, pattern: str):
function re_findall (line 174) | def re_findall(pattern, text):
function to_flat_obj (line 193) | def to_flat_obj(parent_chain: List[dict], content: str, state: str):
function flat_map (line 204) | def flat_map(array: List[List]):
function group_by (line 216) | def group_by(list_source: List, key):
function result_tree_to_paragraph (line 232) | def result_tree_to_paragraph(result_tree: List[dict], result, parent_cha...
function post_handler_paragraph (line 252) | def post_handler_paragraph(content: str, limit: int):
function smart_split_paragraph (line 280) | def smart_split_paragraph(content: str, limit: int):
function filter_special_char (line 338) | def filter_special_char(content: str):
class SplitModel (line 350) | class SplitModel:
method __init__ (line 352) | def __init__(self, content_level_pattern, with_filter=True, limit=1000...
method parse_to_tree (line 363) | def parse_to_tree(self, text: str, index=0):
method parse (line 395) | def parse(self, text: str):
method post_reset_paragraph (line 413) | def post_reset_paragraph(self, paragraph: Dict, title_list: List[str]):
method sub_title (line 420) | def sub_title(paragraph: Dict):
method content_is_null (line 428) | def content_is_null(paragraph: Dict, title_list: List[str]):
method filter_title_special_characters (line 440) | def filter_title_special_characters(paragraph: Dict):
function get_split_model (line 461) | def get_split_model(filename: str, with_filter: bool = False, limit: int...
function to_title_tree_string (line 477) | def to_title_tree_string(result_tree: List):
function title_tostring (line 482) | def title_tostring(title_obj):
FILE: apps/common/utils/tool_code.py
class ToolExecutor (line 39) | class ToolExecutor:
method __init__ (line 41) | def __init__(self):
method init_sandbox_dir (line 45) | def init_sandbox_dir():
method exec_code (line 92) | def exec_code(self, code_str, keywords, function_name=None):
method _generate_mcp_server_code (line 140) | def _generate_mcp_server_code(self, _code, params, name=None, descript...
method generate_mcp_server_code (line 245) | def generate_mcp_server_code(self, code_str, params, name, description...
method get_tool_mcp_config (line 261) | def get_tool_mcp_config(self, tool, params):
method get_app_mcp_config (line 279) | def get_app_mcp_config(self, api_key):
method _exec (line 289) | def _exec(self, execute_file):
method validate_mcp_transport (line 310) | def validate_mcp_transport(self, code_str):
function execution_timer (line 318) | def execution_timer(id=""):
FILE: apps/common/utils/ts_vecto_util.py
function get_word_list (line 31) | def get_word_list(text: str):
function replace_word (line 47) | def replace_word(word_dict, text: str):
function get_word_key (line 54) | def get_word_key(text: str, use_word_list):
function to_word_dict (line 64) | def to_word_dict(word_list: List, text: s
Condensed preview — 1905 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (9,308K chars).
[
{
"path": ".dockerignore",
"chars": 24,
"preview": ".git*\n.idea*\n*.md\n.venv/"
},
{
"path": ".editorconfig",
"chars": 42,
"preview": "root = true\n\n[*.py]\nmax_line_length = 120\n"
},
{
"path": ".github/ISSUE_TEMPLATE/bug.yml",
"chars": 1600,
"preview": "name: 'Bug Report'\ndescription: 'Report an Bug'\ntitle: \"[Bug] \"\nassignees: zyyfit\nbody:\n - type: markdown\n attribute"
},
{
"path": ".github/ISSUE_TEMPLATE/feature.yml",
"chars": 928,
"preview": "name: 'Feature Request'\ndescription: 'Suggest an idea'\ntitle: '[Feature] '\nassignees: baixin513\nbody:\n - type: markdown"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 413,
"preview": "#### What this PR does / why we need it?\n\n#### Summary of your change\n\n#### Please indicate you've done the following:\n\n"
},
{
"path": ".github/dependabot.yml",
"chars": 182,
"preview": "version: 2\nupdates:\n - package-ecosystem: \"pip\"\n directory: \"/\"\n schedule:\n interval: \"weekly\"\n timezon"
},
{
"path": ".github/workflows/build-and-push-python-pg.yml",
"chars": 1779,
"preview": "name: build-and-push-python-pg\n\non:\n workflow_dispatch:\n inputs:\n architecture:\n description: 'Architect"
},
{
"path": ".github/workflows/build-and-push-vector-model.yml",
"chars": 1957,
"preview": "name: build-and-push-vector-model\n\non:\n workflow_dispatch:\n inputs:\n dockerImageTag:\n description: 'Dock"
},
{
"path": ".github/workflows/build-and-push.yml",
"chars": 5921,
"preview": "name: build-and-push\n\nrun-name: 构建镜像并推送仓库 ${{ github.event.inputs.dockerImageTag }} (${{ github.event.inputs.registry }}"
},
{
"path": ".github/workflows/create-pr-from-push.yml",
"chars": 318,
"preview": "on:\n push:\n branches: \n - 'pr@**'\n - 'repr@**'\n\nname: 针对特定分支名自动创建 PR\n\njobs:\n generic_handler:\n name"
},
{
"path": ".github/workflows/issue-translator.yml",
"chars": 323,
"preview": "name: Issue Translator\non: \n issue_comment: \n types: [created]\n issues: \n types: [opened]\njobs:\n build:\n run"
},
{
"path": ".github/workflows/llm-code-review.yml",
"chars": 964,
"preview": "name: LLM Code Review\n\npermissions:\n contents: read\n pull-requests: write\n\non:\n pull_request:\n types: [opened, reo"
},
{
"path": ".github/workflows/sync2gitee.yml",
"chars": 444,
"preview": "name: sync2gitee\non: [push]\n\njobs:\n repo-sync:\n runs-on: ubuntu-latest\n steps:\n - name: Mirror the Github or"
},
{
"path": ".github/workflows/typos_check.yml",
"chars": 685,
"preview": "name: Typos Check\non:\n workflow_dispatch:\n push:\n pull_request:\n types: [opened, synchronize, reopened]\n\njobs:\n r"
},
{
"path": ".gitignore",
"chars": 3530,
"preview": "# Mac\n.DS_Store\n*/.DS_Store\n\n# VS Code\n.vscode\n*.project\n*.factorypath\n\n# IntelliJ IDEA\n.idea/*\n!.idea/icon.png\n*.iws\n*."
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 5222,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participa"
},
{
"path": "CONTRIBUTING.md",
"chars": 2008,
"preview": "# Contributing\n\nAs a contributor, you should agree that:\n\n- The producer can adjust the open-source agreement to be more"
},
{
"path": "LICENSE",
"chars": 35148,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
},
{
"path": "README.md",
"chars": 4787,
"preview": "<p align=\"center\"><img src= \"https://github.com/1Panel-dev/maxkb/assets/52996290/c0694996-0eed-40d8-b369-322bf2a380bf\" a"
},
{
"path": "README_CN.md",
"chars": 5092,
"preview": "<p align=\"center\"><img src= \"https://github.com/1Panel-dev/maxkb/assets/52996290/c0694996-0eed-40d8-b369-322bf2a380bf\" a"
},
{
"path": "SECURITY.md",
"chars": 223,
"preview": "# 安全说明\n\n如果您发现安全问题,请直接联系我们:\n\n- support@fit2cloud.com\n- 400-052-0755\n\n感谢您的支持!\n\n# Security Policy\n\nAll security bugs should"
},
{
"path": "USE-CASES.md",
"chars": 3019,
"preview": "<h3 align=\"center\">MaxKB 应用案例,持续更新中...</h3>\n\n------------------------------\n\n- [MaxKB 应用案例:中国农业大学-小鹉哥](https://mp.weixin"
},
{
"path": "apps/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "apps/application/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "apps/application/admin.py",
"chars": 63,
"preview": "from django.contrib import admin\n\n# Register your models here.\n"
},
{
"path": "apps/application/api/application_access_token.py",
"chars": 926,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: application_access_token.py\n @date:2025/6/9 17:46\n "
},
{
"path": "apps/application/api/application_api.py",
"chars": 5849,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: application.py\n @date:2025/5/26 16:59\n @desc:\n\"\"\""
},
{
"path": "apps/application/api/application_api_key.py",
"chars": 1765,
"preview": "from drf_spectacular.types import OpenApiTypes\nfrom drf_spectacular.utils import OpenApiParameter\n\nfrom application.seri"
},
{
"path": "apps/application/api/application_chat.py",
"chars": 4095,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: application_chat.py\n @date:2025/6/10 13:54\n @desc"
},
{
"path": "apps/application/api/application_chat_link.py",
"chars": 1608,
"preview": "\"\"\"\n @project: MaxKB\n @Author: niu\n @file: application_chat_link.py\n @date: 2026/2/9 16:59\n @desc:\n\"\"\"\nfr"
},
{
"path": "apps/application/api/application_chat_record.py",
"chars": 5132,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: application_chat_record.py\n @date:2025/6/10 15:19\n "
},
{
"path": "apps/application/api/application_stats.py",
"chars": 1511,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: application_stats.py\n @date:2025/6/9 20:45\n @desc"
},
{
"path": "apps/application/api/application_version.py",
"chars": 2598,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: application_version.py\n @date:2025/6/4 17:33\n @de"
},
{
"path": "apps/application/apps.py",
"chars": 154,
"preview": "from django.apps import AppConfig\n\n\nclass ApplicationConfig(AppConfig):\n default_auto_field = 'django.db.models.BigAu"
},
{
"path": "apps/application/chat_pipeline/I_base_chat_pipeline.py",
"chars": 6928,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: I_base_chat_pipeline.py\n @date:2024/1/9 17:25\n @de"
},
{
"path": "apps/application/chat_pipeline/__init__.py",
"chars": 119,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py.py\n @date:2024/1/9 17:23\n @desc:\n\"\"\"\n"
},
{
"path": "apps/application/chat_pipeline/pipeline_manage.py",
"chars": 2298,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: pipeline_manage.py\n @date:2024/1/9 17:40\n @desc:\n\""
},
{
"path": "apps/application/chat_pipeline/step/__init__.py",
"chars": 119,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py.py\n @date:2024/1/9 18:23\n @desc:\n\"\"\"\n"
},
{
"path": "apps/application/chat_pipeline/step/chat_step/__init__.py",
"chars": 119,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py.py\n @date:2024/1/9 18:23\n @desc:\n\"\"\"\n"
},
{
"path": "apps/application/chat_pipeline/step/chat_step/i_chat_step.py",
"chars": 5509,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: i_chat_step.py\n @date:2024/1/9 18:17\n @desc: 对话\n\"\""
},
{
"path": "apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py",
"chars": 30096,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: base_chat_step.py\n @date:2024/1/9 18:25\n @desc: 对话"
},
{
"path": "apps/application/chat_pipeline/step/generate_human_message_step/__init__.py",
"chars": 119,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py.py\n @date:2024/1/9 18:23\n @desc:\n\"\"\"\n"
},
{
"path": "apps/application/chat_pipeline/step/generate_human_message_step/i_generate_human_message_step.py",
"chars": 3577,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: i_generate_human_message_step.py\n @date:2024/1/9 18:1"
},
{
"path": "apps/application/chat_pipeline/step/generate_human_message_step/impl/base_generate_human_message_step.py",
"chars": 3609,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: base_generate_human_message_step.py.py\n @date:2024/1/"
},
{
"path": "apps/application/chat_pipeline/step/reset_problem_step/__init__.py",
"chars": 119,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py.py\n @date:2024/1/9 18:23\n @desc:\n\"\"\"\n"
},
{
"path": "apps/application/chat_pipeline/step/reset_problem_step/i_reset_problem_step.py",
"chars": 2535,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: i_reset_problem_step.py\n @date:2024/1/9 18:12\n @de"
},
{
"path": "apps/application/chat_pipeline/step/reset_problem_step/impl/base_reset_problem_step.py",
"chars": 3406,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: base_reset_problem_step.py\n @date:2024/1/10 14:35\n "
},
{
"path": "apps/application/chat_pipeline/step/search_dataset_step/__init__.py",
"chars": 119,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py.py\n @date:2024/1/9 18:24\n @desc:\n\"\"\"\n"
},
{
"path": "apps/application/chat_pipeline/step/search_dataset_step/i_search_dataset_step.py",
"chars": 3729,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: i_search_dataset_step.py\n @date:2024/1/9 18:10\n @d"
},
{
"path": "apps/application/chat_pipeline/step/search_dataset_step/impl/base_search_dataset_step.py",
"chars": 7971,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: base_search_dataset_step.py\n @date:2024/1/10 10:33\n "
},
{
"path": "apps/application/flow/__init__.py",
"chars": 119,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py.py\n @date:2024/6/7 14:43\n @desc:\n\"\"\"\n"
},
{
"path": "apps/application/flow/backend/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "apps/application/flow/backend/sandbox_shell.py",
"chars": 2936,
"preview": "import getpass\nimport os\nimport re\n\nfrom deepagents.backends import LocalShellBackend\nfrom deepagents.backends.protocol "
},
{
"path": "apps/application/flow/common.py",
"chars": 10240,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎\n @file: common.py\n @date:2024/12/11 17:57\n @desc:\n\"\"\"\nfrom"
},
{
"path": "apps/application/flow/compare/__init__.py",
"chars": 1163,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py.py\n @date:2024/6/7 14:43\n @desc:\n\"\"\"\n\n"
},
{
"path": "apps/application/flow/compare/compare.py",
"chars": 402,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: compare.py\n @date:2024/6/7 14:37\n @desc:\n\"\"\"\nfrom "
},
{
"path": "apps/application/flow/compare/contain_compare.py",
"chars": 736,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: contain_compare.py\n @date:2024/6/11 10:02\n @desc:\n"
},
{
"path": "apps/application/flow/compare/end_with.py",
"chars": 529,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: start_with.py\n @date:2025/10/20 10:37\n @desc:\n\"\"\""
},
{
"path": "apps/application/flow/compare/equal_compare.py",
"chars": 478,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: equal_compare.py\n @date:2024/6/7 14:44\n @desc:\n\"\"\""
},
{
"path": "apps/application/flow/compare/ge_compare.py",
"chars": 690,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: lt_compare.py\n @date:2024/6/11 9:52\n @desc: 大于比较器\n"
},
{
"path": "apps/application/flow/compare/gt_compare.py",
"chars": 688,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: lt_compare.py\n @date:2024/6/11 9:52\n @desc: 大于比较器\n"
},
{
"path": "apps/application/flow/compare/is_not_null_compare.py",
"chars": 510,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: is_not_null_compare.py\n @date:2024/6/28 10:45\n @de"
},
{
"path": "apps/application/flow/compare/is_not_true.py",
"chars": 545,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎\n @file: is_not_true.py\n @date:2025/4/7 13:44\n @desc:\n\"\"\"\nf"
},
{
"path": "apps/application/flow/compare/is_null_compare.py",
"chars": 568,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: is_null_compare.py\n @date:2024/6/28 10:45\n @desc:\n"
},
{
"path": "apps/application/flow/compare/is_true.py",
"chars": 532,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎\n @file: IsTrue.py\n @date:2025/4/7 13:38\n @desc:\n\"\"\"\nfrom t"
},
{
"path": "apps/application/flow/compare/le_compare.py",
"chars": 690,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: lt_compare.py\n @date:2024/6/11 9:52\n @desc: 小于比较器\n"
},
{
"path": "apps/application/flow/compare/len_equal_compare.py",
"chars": 558,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: equal_compare.py\n @date:2024/6/7 14:44\n @desc:\n\"\"\""
},
{
"path": "apps/application/flow/compare/len_ge_compare.py",
"chars": 558,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: lt_compare.py\n @date:2024/6/11 9:52\n @desc: 大于比较器\n"
},
{
"path": "apps/application/flow/compare/len_gt_compare.py",
"chars": 557,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: lt_compare.py\n @date:2024/6/11 9:52\n @desc: 大于比较器\n"
},
{
"path": "apps/application/flow/compare/len_le_compare.py",
"chars": 558,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: lt_compare.py\n @date:2024/6/11 9:52\n @desc: 小于比较器\n"
},
{
"path": "apps/application/flow/compare/len_lt_compare.py",
"chars": 557,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: lt_compare.py\n @date:2024/6/11 9:52\n @desc: 小于比较器\n"
},
{
"path": "apps/application/flow/compare/lt_compare.py",
"chars": 688,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: lt_compare.py\n @date:2024/6/11 9:52\n @desc: 小于比较器\n"
},
{
"path": "apps/application/flow/compare/not_contain_compare.py",
"chars": 739,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: contain_compare.py\n @date:2024/6/11 10:02\n @desc:\n"
},
{
"path": "apps/application/flow/compare/not_equal_compare.py",
"chars": 503,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:wangliang181230\n @file: not_equal_compare.py\n @date:2026/3/17 9"
},
{
"path": "apps/application/flow/compare/start_with.py",
"chars": 535,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: start_with.py\n @date:2025/10/20 10:37\n @desc:\n\"\"\""
},
{
"path": "apps/application/flow/default_workflow.json",
"chars": 13806,
"preview": "{\n \"nodes\": [\n {\n \"id\": \"base-node\",\n \"type\": \"base-node\",\n \"x\": 360,\n "
},
{
"path": "apps/application/flow/default_workflow_en.json",
"chars": 14160,
"preview": "{\n \"nodes\": [\n {\n \"id\": \"base-node\",\n \"type\": \"base-node\",\n \"x\": 360,\n "
},
{
"path": "apps/application/flow/default_workflow_zh.json",
"chars": 13806,
"preview": "{\n \"nodes\": [\n {\n \"id\": \"base-node\",\n \"type\": \"base-node\",\n \"x\": 360,\n "
},
{
"path": "apps/application/flow/default_workflow_zh_Hant.json",
"chars": 13807,
"preview": "{\n \"nodes\": [\n {\n \"id\": \"base-node\",\n \"type\": \"base-node\",\n \"x\": 360,\n "
},
{
"path": "apps/application/flow/i_step_node.py",
"chars": 14601,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: i_step_node.py\n @date:2024/6/3 14:57\n @desc:\n\"\"\"\ni"
},
{
"path": "apps/application/flow/knowledge_loop_workflow_manage.py",
"chars": 544,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: workflow_manage.py\n @date:2024/1/9 17:40\n @desc:\n\""
},
{
"path": "apps/application/flow/knowledge_workflow_manage.py",
"chars": 5445,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: Knowledge_workflow_manage.py\n @date:2025/11/13 19:02"
},
{
"path": "apps/application/flow/loop_workflow_manage.py",
"chars": 7315,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: workflow_manage.py\n @date:2024/1/9 17:40\n @desc:\n\""
},
{
"path": "apps/application/flow/step_node/__init__.py",
"chars": 3039,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py.py\n @date:2024/6/7 14:43\n @desc:\n\"\"\"\nf"
},
{
"path": "apps/application/flow/step_node/ai_chat_step_node/__init__.py",
"chars": 137,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py\n @date:2024/6/11 15:29\n @desc:\n\"\"\"\nfro"
},
{
"path": "apps/application/flow/step_node/ai_chat_step_node/i_chat_node.py",
"chars": 4392,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: i_chat_node.py\n @date:2024/6/4 13:58\n @desc:\n\"\"\"\nf"
},
{
"path": "apps/application/flow/step_node/ai_chat_step_node/impl/__init__.py",
"chars": 158,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py\n @date:2024/6/11 15:34\n @desc:\n\"\"\"\nfro"
},
{
"path": "apps/application/flow/step_node/ai_chat_step_node/impl/base_chat_node.py",
"chars": 19822,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: base_question_node.py\n @date:2024/6/4 14:30\n @desc"
},
{
"path": "apps/application/flow/step_node/application_node/__init__.py",
"chars": 35,
"preview": "# coding=utf-8\nfrom .impl import *\n"
},
{
"path": "apps/application/flow/step_node/application_node/i_application_node.py",
"chars": 6029,
"preview": "# coding=utf-8\nfrom typing import Type\n\nfrom rest_framework import serializers\n\nfrom application.flow.common import Work"
},
{
"path": "apps/application/flow/step_node/application_node/impl/__init__.py",
"chars": 70,
"preview": "# coding=utf-8\nfrom .base_application_node import BaseApplicationNode\n"
},
{
"path": "apps/application/flow/step_node/application_node/impl/base_application_node.py",
"chars": 14434,
"preview": "# coding=utf-8\nimport json\nimport re\nimport time\nimport uuid\nfrom typing import Dict, List\nfrom django.utils.translation"
},
{
"path": "apps/application/flow/step_node/condition_node/__init__.py",
"chars": 139,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py.py\n @date:2024/6/7 14:43\n @desc:\n\"\"\"\nf"
},
{
"path": "apps/application/flow/step_node/condition_node/i_condition_node.py",
"chars": 1412,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: i_condition_node.py\n @date:2024/6/7 9:54\n @desc:\n\""
},
{
"path": "apps/application/flow/step_node/condition_node/impl/__init__.py",
"chars": 168,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py\n @date:2024/6/11 15:35\n @desc:\n\"\"\"\nfro"
},
{
"path": "apps/application/flow/step_node/condition_node/impl/base_condition_node.py",
"chars": 2527,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: base_condition_node.py\n @date:2024/6/7 11:29\n @des"
},
{
"path": "apps/application/flow/step_node/data_source_local_node/__init__.py",
"chars": 122,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: __init__.py.py\n @date:2025/11/11 10:06\n @desc:\n\"\""
},
{
"path": "apps/application/flow/step_node/data_source_local_node/i_data_source_local_node.py",
"chars": 1307,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: i_data_source_local_node.py\n @date:2025/11/11 10:06\n"
},
{
"path": "apps/application/flow/step_node/data_source_local_node/impl/__init__.py",
"chars": 122,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: __init__.py.py\n @date:2025/11/11 10:08\n @desc:\n\"\""
},
{
"path": "apps/application/flow/step_node/data_source_local_node/impl/base_data_source_local_node.py",
"chars": 1979,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: base_data_source_local_node.py\n @date:2025/11/11 10:"
},
{
"path": "apps/application/flow/step_node/data_source_web_node/__init__.py",
"chars": 123,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:niu\n @file: __init__.py.py\n @date:2025/11/12 13:43\n @desc:\n\""
},
{
"path": "apps/application/flow/step_node/data_source_web_node/i_data_source_web_node.py",
"chars": 609,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:niu\n @file: i_data_source_web_node.py\n @date:2025/11/12 13:47\n "
},
{
"path": "apps/application/flow/step_node/data_source_web_node/impl/__init__.py",
"chars": 120,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:niu\n @file: __init__.py\n @date:2025/11/12 13:44\n @desc:\n\"\"\"\n"
},
{
"path": "apps/application/flow/step_node/data_source_web_node/impl/base_data_source_web_node.py",
"chars": 3973,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:niu\n @file: base_data_source_web_node.py\n @date:2025/11/12 13:4"
},
{
"path": "apps/application/flow/step_node/direct_reply_node/__init__.py",
"chars": 136,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py\n @date:2024/6/11 17:50\n @desc:\n\"\"\"\nfro"
},
{
"path": "apps/application/flow/step_node/direct_reply_node/i_reply_node.py",
"chars": 2411,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: i_reply_node.py\n @date:2024/6/11 16:25\n @desc:\n\"\"\""
},
{
"path": "apps/application/flow/step_node/direct_reply_node/impl/__init__.py",
"chars": 147,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py\n @date:2024/6/11 17:49\n @desc:\n\"\"\"\nfro"
},
{
"path": "apps/application/flow/step_node/direct_reply_node/impl/base_reply_node.py",
"chars": 1648,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: base_reply_node.py\n @date:2024/6/11 17:25\n @desc:\n"
},
{
"path": "apps/application/flow/step_node/document_extract_node/__init__.py",
"chars": 19,
"preview": "from .impl import *"
},
{
"path": "apps/application/flow/step_node/document_extract_node/i_document_extract_node.py",
"chars": 1178,
"preview": "# coding=utf-8\n\nfrom typing import Type\n\nfrom django.utils.translation import gettext_lazy as _\nfrom rest_framework impo"
},
{
"path": "apps/application/flow/step_node/document_extract_node/impl/__init__.py",
"chars": 64,
"preview": "from .base_document_extract_node import BaseDocumentExtractNode\n"
},
{
"path": "apps/application/flow/step_node/document_extract_node/impl/base_document_extract_node.py",
"chars": 4029,
"preview": "# coding=utf-8\nimport ast\nimport io\n\nimport uuid_utils.compat as uuid\nfrom django.db.models import QuerySet\n\nfrom applic"
},
{
"path": "apps/application/flow/step_node/document_split_node/__init__.py",
"chars": 19,
"preview": "from .impl import *"
},
{
"path": "apps/application/flow/step_node/document_split_node/i_document_split_node.py",
"chars": 4397,
"preview": "# coding=utf-8\n\nfrom typing import Type\n\nfrom django.utils.translation import gettext_lazy as _\nfrom rest_framework impo"
},
{
"path": "apps/application/flow/step_node/document_split_node/impl/__init__.py",
"chars": 60,
"preview": "from .base_document_split_node import BaseDocumentSplitNode\n"
},
{
"path": "apps/application/flow/step_node/document_split_node/impl/base_document_split_node.py",
"chars": 8548,
"preview": "# coding=utf-8\nimport io\nimport mimetypes\nfrom typing import List\n\nfrom django.core.files.uploadedfile import InMemoryUp"
},
{
"path": "apps/application/flow/step_node/form_node/__init__.py",
"chars": 139,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎\n @file: __init__.py.py\n @date:2024/11/4 14:48\n @desc:\n\"\"\"\n"
},
{
"path": "apps/application/flow/step_node/form_node/i_form_node.py",
"chars": 1231,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎\n @file: i_form_node.py\n @date:2024/11/4 14:48\n @desc:\n\"\"\"\n"
},
{
"path": "apps/application/flow/step_node/form_node/impl/__init__.py",
"chars": 161,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎\n @file: __init__.py.py\n @date:2024/11/4 14:49\n @desc:\n\"\"\"\n"
},
{
"path": "apps/application/flow/step_node/form_node/impl/base_form_node.py",
"chars": 9240,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎\n @file: base_form_node.py\n @date:2024/11/4 14:52\n @desc:\n\""
},
{
"path": "apps/application/flow/step_node/image_generate_step_node/__init__.py",
"chars": 36,
"preview": "# coding=utf-8\n\nfrom .impl import *\n"
},
{
"path": "apps/application/flow/step_node/image_generate_step_node/i_image_generate_node.py",
"chars": 2442,
"preview": "# coding=utf-8\n\nfrom typing import Type\n\nfrom django.utils.translation import gettext_lazy as _\nfrom rest_framework impo"
},
{
"path": "apps/application/flow/step_node/image_generate_step_node/impl/__init__.py",
"chars": 76,
"preview": "# coding=utf-8\n\nfrom .base_image_generate_node import BaseImageGenerateNode\n"
},
{
"path": "apps/application/flow/step_node/image_generate_step_node/impl/base_image_generate_node.py",
"chars": 7988,
"preview": "# coding=utf-8\nfrom functools import reduce\nfrom typing import List\n\nimport requests\nfrom langchain_core.messages import"
},
{
"path": "apps/application/flow/step_node/image_to_video_step_node/__init__.py",
"chars": 36,
"preview": "# coding=utf-8\n\nfrom .impl import *\n"
},
{
"path": "apps/application/flow/step_node/image_to_video_step_node/i_image_to_video_node.py",
"chars": 3680,
"preview": "# coding=utf-8\n\nfrom typing import Type\n\nfrom django.utils.translation import gettext_lazy as _\nfrom rest_framework impo"
},
{
"path": "apps/application/flow/step_node/image_to_video_step_node/impl/__init__.py",
"chars": 75,
"preview": "# coding=utf-8\n\nfrom .base_image_to_video_node import BaseImageToVideoNode\n"
},
{
"path": "apps/application/flow/step_node/image_to_video_step_node/impl/base_image_to_video_node.py",
"chars": 9077,
"preview": "# coding=utf-8\nimport base64\nfrom functools import reduce\nfrom typing import List\n\nimport requests\nfrom django.db.models"
},
{
"path": "apps/application/flow/step_node/image_understand_step_node/__init__.py",
"chars": 36,
"preview": "# coding=utf-8\n\nfrom .impl import *\n"
},
{
"path": "apps/application/flow/step_node/image_understand_step_node/i_image_understand_node.py",
"chars": 2614,
"preview": "# coding=utf-8\n\nfrom typing import Type\n\nfrom rest_framework import serializers\n\nfrom application.flow.common import Wor"
},
{
"path": "apps/application/flow/step_node/image_understand_step_node/impl/__init__.py",
"chars": 80,
"preview": "# coding=utf-8\n\nfrom .base_image_understand_node import BaseImageUnderstandNode\n"
},
{
"path": "apps/application/flow/step_node/image_understand_step_node/impl/base_image_understand_node.py",
"chars": 12401,
"preview": "# coding=utf-8\nimport base64\nimport time\nfrom functools import reduce\nfrom imghdr import what\nfrom typing import List, D"
},
{
"path": "apps/application/flow/step_node/intent_node/__init__.py",
"chars": 38,
"preview": "# coding=utf-8\n\n\n\n\nfrom .impl import *"
},
{
"path": "apps/application/flow/step_node/intent_node/i_intent_node.py",
"chars": 2514,
"preview": "# coding=utf-8\n\nfrom typing import Type\n\nfrom django.utils.translation import gettext_lazy as _\nfrom rest_framework impo"
},
{
"path": "apps/application/flow/step_node/intent_node/impl/__init__.py",
"chars": 46,
"preview": "\n\nfrom .base_intent_node import BaseIntentNode"
},
{
"path": "apps/application/flow/step_node/intent_node/impl/base_intent_node.py",
"chars": 9860,
"preview": "# coding=utf-8\nimport json\nimport re\nimport time\nfrom typing import List, Dict, Any\nfrom functools import reduce\n\nfrom d"
},
{
"path": "apps/application/flow/step_node/intent_node/impl/prompt_template.py",
"chars": 1228,
"preview": "\n\n\n\nPROMPT_TEMPLATE = \"\"\"\n # Role\n You are an intention classification expert, good at being able to judge which c"
},
{
"path": "apps/application/flow/step_node/knowledge_write_node/__init__.py",
"chars": 122,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:niu\n @file: __init__.py.py\n @date:2025/11/13 11:17\n @desc:\n\""
},
{
"path": "apps/application/flow/step_node/knowledge_write_node/i_knowledge_write_node.py",
"chars": 1380,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:niu\n @file: i_knowledge_write_node.py\n @date:2025/11/13 11:19\n "
},
{
"path": "apps/application/flow/step_node/knowledge_write_node/impl/__init__.py",
"chars": 123,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:niu\n @file: __init__.py.py\n @date:2025/11/13 11:18\n @desc:\n\""
},
{
"path": "apps/application/flow/step_node/knowledge_write_node/impl/base_knowledge_write_node.py",
"chars": 12963,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:niu\n @file: base_knowledge_write_node.py\n @date:2025/11/13 11:1"
},
{
"path": "apps/application/flow/step_node/loop_break_node/__init__.py",
"chars": 141,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: __init__.py.py\n @date:2025/9/15 12:08\n @desc:\n\"\"\""
},
{
"path": "apps/application/flow/step_node/loop_break_node/i_loop_break_node.py",
"chars": 1336,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: i_loop_break_node.py\n @date:2025/9/15 12:14\n @des"
},
{
"path": "apps/application/flow/step_node/loop_break_node/impl/__init__.py",
"chars": 173,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: __init__.py.py\n @date:2025/9/15 12:16\n @desc:\n\"\"\""
},
{
"path": "apps/application/flow/step_node/loop_break_node/impl/base_loop_break_node.py",
"chars": 2376,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: base_loop_break_node.py\n @date:2025/9/15 12:17\n @"
},
{
"path": "apps/application/flow/step_node/loop_continue_node/__init__.py",
"chars": 140,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: __init__.py.py\n @date:2025/9/15 12:08\n @desc:\n\"\"\""
},
{
"path": "apps/application/flow/step_node/loop_continue_node/i_loop_continue_node.py",
"chars": 1275,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: i_loop_continue_node.py\n @date:2025/9/15 12:13\n @"
},
{
"path": "apps/application/flow/step_node/loop_continue_node/impl/__init__.py",
"chars": 178,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: __init__.py.py\n @date:2025/9/15 12:13\n @desc:\n\"\"\""
},
{
"path": "apps/application/flow/step_node/loop_continue_node/impl/base_loop_continue_node.py",
"chars": 2154,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: base_loop_continue_node.py\n @date:2025/9/15 12:13\n "
},
{
"path": "apps/application/flow/step_node/loop_node/__init__.py",
"chars": 137,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎\n @file: __init__.py\n @date:2025/3/11 18:24\n @desc:\n\"\"\"\nfro"
},
{
"path": "apps/application/flow/step_node/loop_node/i_loop_node.py",
"chars": 2231,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎\n @file: i_loop_node.py\n @date:2025/3/11 18:19\n @desc:\n\"\"\"\n"
},
{
"path": "apps/application/flow/step_node/loop_node/impl/__init__.py",
"chars": 161,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎\n @file: __init__.py.py\n @date:2025/3/11 18:24\n @desc:\n\"\"\"\n"
},
{
"path": "apps/application/flow/step_node/loop_node/impl/base_loop_node.py",
"chars": 14801,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎\n @file: base_loop_node.py\n @date:2025/3/11 18:24\n @desc:\n\""
},
{
"path": "apps/application/flow/step_node/loop_start_node/__init__.py",
"chars": 137,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py\n @date:2024/6/11 15:30\n @desc:\n\"\"\"\nfro"
},
{
"path": "apps/application/flow/step_node/loop_start_node/i_loop_start_node.py",
"chars": 532,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: i_start_node.py\n @date:2024/6/3 16:54\n @desc:\n\"\"\"\n"
},
{
"path": "apps/application/flow/step_node/loop_start_node/impl/__init__.py",
"chars": 168,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py\n @date:2024/6/11 15:36\n @desc:\n\"\"\"\nfro"
},
{
"path": "apps/application/flow/step_node/loop_start_node/impl/base_start_node.py",
"chars": 2148,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: base_start_node.py\n @date:2024/6/3 17:17\n @desc:\n\""
},
{
"path": "apps/application/flow/step_node/mcp_node/__init__.py",
"chars": 36,
"preview": "# coding=utf-8\n\nfrom .impl import *\n"
},
{
"path": "apps/application/flow/step_node/mcp_node/i_mcp_node.py",
"chars": 1431,
"preview": "# coding=utf-8\n\nfrom typing import Type\n\nfrom django.utils.translation import gettext_lazy as _\nfrom rest_framework impo"
},
{
"path": "apps/application/flow/step_node/mcp_node/impl/__init__.py",
"chars": 55,
"preview": "# coding=utf-8\n\nfrom .base_mcp_node import BaseMcpNode\n"
},
{
"path": "apps/application/flow/step_node/mcp_node/impl/base_mcp_node.py",
"chars": 3245,
"preview": "# coding=utf-8\nimport asyncio\nimport json\nfrom typing import List\n\nfrom django.db.models import QuerySet\nfrom langchain_"
},
{
"path": "apps/application/flow/step_node/parameter_extraction_node/__init__.py",
"chars": 142,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: __init__.py.py\n @date:2025/10/13 14:56\n @desc:\n\"\""
},
{
"path": "apps/application/flow/step_node/parameter_extraction_node/i_parameter_extraction_node.py",
"chars": 1804,
"preview": "# coding=utf-8\n\nfrom typing import Type\n\nfrom django.utils.translation import gettext_lazy as _\nfrom rest_framework impo"
},
{
"path": "apps/application/flow/step_node/parameter_extraction_node/impl/__init__.py",
"chars": 168,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: __init__.py.py\n @date:2025/10/13 15:01\n @desc:\n\"\""
},
{
"path": "apps/application/flow/step_node/parameter_extraction_node/impl/base_parameter_extraction_node.py",
"chars": 4395,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎虎\n @file: base_variable_splitting_node.py\n @date:2025/10/13 15"
},
{
"path": "apps/application/flow/step_node/question_node/__init__.py",
"chars": 137,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py\n @date:2024/6/11 15:30\n @desc:\n\"\"\"\nfro"
},
{
"path": "apps/application/flow/step_node/question_node/i_question_node.py",
"chars": 1809,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: i_chat_node.py\n @date:2024/6/4 13:58\n @desc:\n\"\"\"\nf"
},
{
"path": "apps/application/flow/step_node/question_node/impl/__init__.py",
"chars": 166,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py\n @date:2024/6/11 15:35\n @desc:\n\"\"\"\nfro"
},
{
"path": "apps/application/flow/step_node/question_node/impl/base_question_node.py",
"chars": 7452,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: base_question_node.py\n @date:2024/6/4 14:30\n @desc"
},
{
"path": "apps/application/flow/step_node/reranker_node/__init__.py",
"chars": 136,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎\n @file: __init__.py\n @date:2024/9/4 11:37\n @desc:\n\"\"\"\nfrom"
},
{
"path": "apps/application/flow/step_node/reranker_node/i_reranker_node.py",
"chars": 2604,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎\n @file: i_reranker_node.py\n @date:2024/9/4 10:40\n @desc:\n\""
},
{
"path": "apps/application/flow/step_node/reranker_node/impl/__init__.py",
"chars": 150,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎\n @file: __init__.py\n @date:2024/9/4 11:39\n @desc:\n\"\"\"\nfrom"
},
{
"path": "apps/application/flow/step_node/reranker_node/impl/base_reranker_node.py",
"chars": 5481,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎\n @file: base_reranker_node.py\n @date:2024/9/4 11:41\n @desc"
},
{
"path": "apps/application/flow/step_node/search_document_node/__init__.py",
"chars": 19,
"preview": "from .impl import *"
},
{
"path": "apps/application/flow/step_node/search_document_node/i_search_document_node.py",
"chars": 2389,
"preview": "# coding=utf-8\nfrom typing import Type, List\n\nfrom django.utils.translation import gettext_lazy as _\nfrom rest_framework"
},
{
"path": "apps/application/flow/step_node/search_document_node/impl/__init__.py",
"chars": 62,
"preview": "from .base_search_document_node import BaseSearchDocumentNode\n"
},
{
"path": "apps/application/flow/step_node/search_document_node/impl/base_search_document_node.py",
"chars": 9367,
"preview": "# coding=utf-8\nfrom typing import List\n\nimport jieba\nfrom django.db.models import Q\nfrom django.db.models import QuerySe"
},
{
"path": "apps/application/flow/step_node/search_knowledge_node/__init__.py",
"chars": 137,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py\n @date:2024/6/11 15:30\n @desc:\n\"\"\"\nfro"
},
{
"path": "apps/application/flow/step_node/search_knowledge_node/i_search_knowledge_node.py",
"chars": 4351,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: i_search_dataset_node.py\n @date:2024/6/3 17:52\n @d"
},
{
"path": "apps/application/flow/step_node/search_knowledge_node/impl/__init__.py",
"chars": 181,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py\n @date:2024/6/11 15:35\n @desc:\n\"\"\"\nfro"
},
{
"path": "apps/application/flow/step_node/search_knowledge_node/impl/base_search_knowledge_node.py",
"chars": 9565,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: base_search_dataset_node.py\n @date:2024/6/4 11:56\n "
},
{
"path": "apps/application/flow/step_node/speech_to_text_step_node/__init__.py",
"chars": 36,
"preview": "# coding=utf-8\n\nfrom .impl import *\n"
},
{
"path": "apps/application/flow/step_node/speech_to_text_step_node/i_speech_to_text_node.py",
"chars": 1881,
"preview": "# coding=utf-8\n\nfrom typing import Type\n\nfrom django.utils.translation import gettext_lazy as _\nfrom rest_framework impo"
},
{
"path": "apps/application/flow/step_node/speech_to_text_step_node/impl/__init__.py",
"chars": 75,
"preview": "# coding=utf-8\n\nfrom .base_speech_to_text_node import BaseSpeechToTextNode\n"
},
{
"path": "apps/application/flow/step_node/speech_to_text_step_node/impl/base_speech_to_text_node.py",
"chars": 3329,
"preview": "# coding=utf-8\nimport os\nimport tempfile\nfrom concurrent.futures import ThreadPoolExecutor\n\nfrom django.db.models import"
},
{
"path": "apps/application/flow/step_node/start_node/__init__.py",
"chars": 137,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py\n @date:2024/6/11 15:30\n @desc:\n\"\"\"\nfro"
},
{
"path": "apps/application/flow/step_node/start_node/i_start_node.py",
"chars": 475,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: i_start_node.py\n @date:2024/6/3 16:54\n @desc:\n\"\"\"\n"
},
{
"path": "apps/application/flow/step_node/start_node/impl/__init__.py",
"chars": 164,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: __init__.py\n @date:2024/6/11 15:36\n @desc:\n\"\"\"\nfro"
},
{
"path": "apps/application/flow/step_node/start_node/impl/base_start_node.py",
"chars": 5148,
"preview": "# coding=utf-8\n\"\"\"\n @project: maxkb\n @Author:虎\n @file: base_start_node.py\n @date:2024/6/3 17:17\n @desc:\n\""
},
{
"path": "apps/application/flow/step_node/text_to_speech_step_node/__init__.py",
"chars": 36,
"preview": "# coding=utf-8\n\nfrom .impl import *\n"
},
{
"path": "apps/application/flow/step_node/text_to_speech_step_node/i_text_to_speech_node.py",
"chars": 1639,
"preview": "# coding=utf-8\n\nfrom typing import Type\n\nfrom rest_framework import serializers\n\nfrom application.flow.common import Wor"
},
{
"path": "apps/application/flow/step_node/text_to_speech_step_node/impl/__init__.py",
"chars": 75,
"preview": "# coding=utf-8\n\nfrom .base_text_to_speech_node import BaseTextToSpeechNode\n"
},
{
"path": "apps/application/flow/step_node/text_to_speech_step_node/impl/base_text_to_speech_node.py",
"chars": 5336,
"preview": "# coding=utf-8\nimport io\nimport mimetypes\n\nfrom django.core.files.uploadedfile import InMemoryUploadedFile\n\nfrom applica"
},
{
"path": "apps/application/flow/step_node/text_to_video_step_node/__init__.py",
"chars": 36,
"preview": "# coding=utf-8\n\nfrom .impl import *\n"
},
{
"path": "apps/application/flow/step_node/text_to_video_step_node/i_text_to_video_node.py",
"chars": 2435,
"preview": "# coding=utf-8\n\nfrom typing import Type\n\nfrom django.utils.translation import gettext_lazy as _\nfrom rest_framework impo"
},
{
"path": "apps/application/flow/step_node/text_to_video_step_node/impl/__init__.py",
"chars": 73,
"preview": "# coding=utf-8\n\nfrom .base_text_to_video_node import BaseTextToVideoNode\n"
},
{
"path": "apps/application/flow/step_node/text_to_video_step_node/impl/base_text_to_video_node.py",
"chars": 7569,
"preview": "# coding=utf-8\nfrom functools import reduce\nfrom typing import List\n\nimport requests\nfrom langchain_core.messages import"
},
{
"path": "apps/application/flow/step_node/tool_lib_node/__init__.py",
"chars": 135,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎\n @file: __init__.py\n @date:2024/8/8 17:45\n @desc:\n\"\"\"\nfrom"
},
{
"path": "apps/application/flow/step_node/tool_lib_node/i_tool_lib_node.py",
"chars": 1950,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎\n @file: i_function_lib_node.py\n @date:2024/8/8 16:21\n @des"
},
{
"path": "apps/application/flow/step_node/tool_lib_node/impl/__init__.py",
"chars": 168,
"preview": "# coding=utf-8\n\"\"\"\n @project: MaxKB\n @Author:虎\n @file: __init__.py\n @date:2024/8/8 17:48\n @desc:\n\"\"\"\nfrom"
}
]
// ... and 1705 more files (download for full content)
About this extraction
This page contains the full source code of the 1Panel-dev/MaxKB GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1905 files (8.4 MB), approximately 2.3M tokens, and a symbol index with 6049 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.