app: description: '' icon: 🤖 icon_background: '#FFEAD5' mode: advanced-chat name: 思政小帮手 use_icon_as_answer_icon: false dependencies: - current_identifier: null type: marketplace value: marketplace_plugin_unique_identifier: anspire/anspire_search:0.0.9@a59824e9507c05c81d582cc5d8384197215d91bf5c787150d8aad723eb5d1a69 version: null - current_identifier: null type: marketplace value: marketplace_plugin_unique_identifier: langgenius/ollama:0.1.0@7c18c74b94a855de83aa66f376939d47b96a49b6dbb6904b46b267cb0213396e version: null kind: app version: 0.5.0 workflow: conversation_variables: - description: '' id: 71e3f805-8445-46b1-bd43-8af398234527 name: dataset_apikey selector: - conversation - dataset_apikey value: '' value_type: string - description: '' id: e18aacca-16a2-4d93-80c4-5a85ead53ae4 name: datasets selector: - conversation - datasets value: '' value_type: string environment_variables: [] features: file_upload: allowed_file_extensions: - .JPG - .JPEG - .PNG - .GIF - .WEBP - .SVG allowed_file_types: - image - document allowed_file_upload_methods: - remote_url - local_file enabled: true fileUploadConfig: audio_file_size_limit: 50 batch_count_limit: 5 file_size_limit: 15 image_file_size_limit: 10 video_file_size_limit: 100 workflow_file_upload_limit: 10 image: enabled: false number_limits: 3 transfer_methods: - local_file - remote_url number_limits: 3 opening_statement: '' retriever_resource: enabled: true sensitive_word_avoidance: enabled: false speech_to_text: enabled: false suggested_questions: [] suggested_questions_after_answer: enabled: false text_to_speech: enabled: false language: '' voice: '' graph: edges: - data: sourceType: llm targetType: answer id: llm-answer selected: false source: llm sourceHandle: source target: answer targetHandle: target type: custom - data: isInIteration: true isInLoop: false iteration_id: '1762339969303' sourceType: iteration-start targetType: document-extractor id: 1762339969303start-source-1762339981310-target selected: false source: 1762339969303start sourceHandle: source target: '1762339981310' targetHandle: target type: custom zIndex: 1002 - data: isInLoop: false sourceType: iteration targetType: llm id: 1762339969303-source-llm-target selected: false source: '1762339969303' sourceHandle: source target: llm targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: if-else targetType: tool id: 1762396405192-true-1762396707530-target selected: false source: '1762396405192' sourceHandle: 'true' target: '1762396707530' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: variable-aggregator targetType: llm id: 1762396843604-source-llm-target selected: false source: '1762396843604' sourceHandle: source target: llm targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: tool targetType: iteration id: 1762396707530-source-1762397735029-target selected: false source: '1762396707530' sourceHandle: source target: '1762397735029' targetHandle: target type: custom zIndex: 0 - data: isInIteration: true isInLoop: false iteration_id: '1762397735029' sourceType: iteration-start targetType: template-transform id: 1762397735029start-source-1762397750136-target selected: false source: 1762397735029start sourceHandle: source target: '1762397750136' targetHandle: target type: custom zIndex: 1002 - data: isInIteration: false isInLoop: false sourceType: iteration targetType: code id: 1762397735029-source-1762397785764-target selected: false source: '1762397735029' sourceHandle: source target: '1762397785764' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: code targetType: variable-aggregator id: 1762397785764-source-1762396843604-target selected: false source: '1762397785764' sourceHandle: source target: '1762396843604' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: start targetType: if-else id: 1762339910800-source-1762396405192-target selected: false source: '1762339910800' sourceHandle: source target: '1762396405192' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: if-else targetType: code id: 1762396405192-false-1762412240747-target selected: false source: '1762396405192' sourceHandle: 'false' target: '1762412240747' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: code targetType: variable-aggregator id: 1762412240747-source-1762396843604-target selected: false source: '1762412240747' sourceHandle: source target: '1762396843604' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: if-else targetType: assigner id: 1762421892949-false-1762509024795-target selected: false source: '1762421892949' sourceHandle: 'false' target: '1762509024795' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: code targetType: iteration id: 1762510470105-source-1762339969303-target selected: false source: '1762510470105' sourceHandle: source target: '1762339969303' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: if-else targetType: tool id: 1762421892949-true-1764314675268-target selected: false source: '1762421892949' sourceHandle: 'true' target: '1764314675268' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: tool targetType: code id: 1764314675268-source-1762510470105-target selected: false source: '1764314675268' sourceHandle: source target: '1762510470105' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: assigner targetType: tool id: 1762509024795-source-1764314675268-target selected: false source: '1762509024795' sourceHandle: source target: '1764314675268' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: start targetType: if-else id: 1762339910800-source-1764314703864-target selected: false source: '1762339910800' sourceHandle: source target: '1764314703864' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false isInLoop: false sourceType: if-else targetType: assigner id: 1764314703864-false-1764314714879-target selected: false source: '1764314703864' sourceHandle: 'false' target: '1764314714879' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: assigner targetType: if-else id: 1764314714879-source-1762421892949-target selected: false source: '1764314714879' sourceHandle: source target: '1762421892949' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: if-else targetType: if-else id: 1764314703864-true-1762421892949-target selected: false source: '1764314703864' sourceHandle: 'true' target: '1762421892949' targetHandle: target type: custom zIndex: 0 nodes: - data: selected: false title: 开始 type: start variables: - default: '0' hint: '' label: 联网 max_length: 48 options: [] placeholder: '' required: true type: number variable: connectInternet - default: '' hint: '' label: datasets max_length: 256 options: [] placeholder: '' required: true type: text-input variable: datasets - default: '' hint: '' label: dataset_apikey max_length: 100 options: [] placeholder: '' required: true type: text-input variable: dataset_apikey - default: '' hint: '' label: promt max_length: 2000 options: [] placeholder: '' required: true type: paragraph variable: promt height: 187 id: '1762339910800' position: x: -1704.106555788423 y: 174.193204867626 positionAbsolute: x: -1704.106555788423 y: 174.193204867626 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: context: enabled: true variable_selector: - '1762510470105' - result memory: query_prompt_template: '{{#sys.query#}} {{#sys.files#}}' role_prefix: assistant: '' user: '' window: enabled: false size: 10 model: completion_params: {} mode: chat name: qwen-14b provider: langgenius/ollama/ollama prompt_config: jinja2_variables: - value_selector: - '1762396843604' - output variable: searchData - value_selector: - '1762339969303' - output variable: fileData - value_selector: - '1762510470105' - result variable: result - value_selector: - '1762339910800' - promt variable: promt prompt_template: - edition_type: jinja2 id: 5d50499d-b81d-43aa-a891-38fd349bd754 jinja2_text: "{{ promt }}\r\n\r\n请基于提供的知识库内容{{ result }},为用户提供准确、简洁的回答。\r\ \n\r\n{% if searchData %}\r\n结合 {{ searchData }} 回答用户\r\n{% endif %}\r\ \n{% if fileData %}\r\n结合文件内容 {{ fileData }} 回答用户\r\n{% endif %}\r\n" role: system text: '你是一个专业的思政学习助手,致力于帮助用户学习思想政治理论知识。请基于提供的知识库内容,为用户提供准确、简洁的回答。 {% if {{#1762396843604.output#}} %} 结合联网内容{{#1762396843604.output#}} {% endif %} {% if {{#1762339969303.output#}} %} 如果{{#1762339969303.output#}}不为空,根据里面的内容回答用户问题 {% endif %}' - id: 23264213-e421-4449-b666-a55a0e39e561 role: user text: '' selected: true title: LLM type: llm vision: enabled: false height: 88 id: llm position: x: 2674.6343495125943 y: 75.75635633814841 positionAbsolute: x: 2674.6343495125943 y: 75.75635633814841 selected: true sourcePosition: right targetPosition: left type: custom width: 242 - data: answer: '{{#llm.text#}}' selected: false title: 直接回复 type: answer variables: [] height: 103 id: answer position: x: 3018 y: 69 positionAbsolute: x: 3018 y: 69 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: error_handle_mode: terminated height: 212 is_parallel: false iterator_input_type: array[file] iterator_selector: - sys - files output_selector: - '1762339981310' - text output_type: array[string] parallel_nums: 10 selected: false start_node_id: 1762339969303start title: 迭代 type: iteration width: 486 height: 212 id: '1762339969303' position: x: 648.8720188000339 y: -65.6399059998305 positionAbsolute: x: 648.8720188000339 y: -65.6399059998305 selected: false sourcePosition: right targetPosition: left type: custom width: 486 zIndex: 1 - data: desc: '' isInIteration: true selected: false title: '' type: iteration-start draggable: false height: 48 id: 1762339969303start parentId: '1762339969303' position: x: 60 y: 82 positionAbsolute: x: 708.8720188000339 y: 16.360094000169497 selectable: false sourcePosition: right targetPosition: left type: custom-iteration-start width: 44 zIndex: 1002 - data: isInIteration: true isInLoop: false is_array_file: false iteration_id: '1762339969303' selected: false title: 文档提取器 type: document-extractor variable_selector: - '1762339969303' - item height: 104 id: '1762339981310' parentId: '1762339969303' position: x: 184 y: 60 positionAbsolute: x: 832.8720188000339 y: -5.6399059998305034 selected: false sourcePosition: right targetPosition: left type: custom width: 242 zIndex: 1002 - data: cases: - case_id: 'true' conditions: - comparison_operator: '=' id: aa1dcc3b-e7dc-42a6-83bc-1e7642061291 value: '1' varType: number variable_selector: - '1762339910800' - connectInternet id: 'true' logical_operator: and selected: false title: 条件分支 type: if-else height: 124 id: '1762396405192' position: x: 362 y: 244 positionAbsolute: x: 362 y: 244 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: is_team_authorization: true paramSchemas: - auto_generate: null default: null form: llm human_description: en_US: Search content ja_JP: Search content pt_BR: Search content zh_Hans: 检索内容 label: en_US: Search content ja_JP: Search content pt_BR: Search content zh_Hans: 检索内容 llm_description: Search content max: null min: null name: query options: [] placeholder: null precision: null required: true scope: null template: null type: string - auto_generate: null default: 10 form: llm human_description: en_US: Result number control ja_JP: Result number control pt_BR: Result number control zh_Hans: 结果条数控制(示例值:10/20/30/40/50) label: en_US: Response number ja_JP: Response number pt_BR: Response number zh_Hans: 结果条数控制 llm_description: Result number control max: 50 min: 10 name: top_k options: [] placeholder: null precision: null required: false scope: null template: null type: number - auto_generate: null default: null form: llm human_description: en_US: Search the specified website ja_JP: Search the specified website pt_BR: Search the specified website zh_Hans: 指定网站搜索 label: en_US: Search the specified website ja_JP: Search the specified website pt_BR: Search the specified website zh_Hans: 指定网站搜索 llm_description: Search the specified website max: null min: null name: Insite options: [] placeholder: null precision: null required: false scope: null template: null type: string - auto_generate: null default: null form: llm human_description: en_US: Start time(eg:2025-01-01 00:00:00) ja_JP: Start time(eg:2025-01-01 00:00:00) pt_BR: Start time zh_Hans: 起始时间(示例值:2025-01-01 00:00:00) label: en_US: Start time(eg:2025-01-01 00:00:00) ja_JP: Start time(eg:2025-01-01 00:00:00) pt_BR: Start time zh_Hans: 起始时间(示例值:2025-01-01 00:00:00) llm_description: Start time max: null min: null name: FromTime options: [] placeholder: null precision: null required: false scope: null template: null type: string - auto_generate: null default: null form: llm human_description: en_US: End time(eg:2025-01-01 00:00:00) ja_JP: End time(eg:2025-01-01 00:00:00) pt_BR: End time zh_Hans: 结束时间(示例值:2025-01-01 00:00:00) label: en_US: End time(eg:2025-01-01 00:00:00) ja_JP: End time(eg:2025-01-01 00:00:00) pt_BR: End time zh_Hans: 结束时间(示例值:2025-01-01 00:00:00) llm_description: End time max: null min: null name: ToTime options: [] placeholder: null precision: null required: false scope: null template: null type: string params: FromTime: '' Insite: '' ToTime: '' query: '' top_k: '' provider_id: anspire/anspire_search/anspire_search provider_name: anspire/anspire_search/anspire_search provider_type: builtin selected: false title: 安思派联网搜索 tool_configurations: {} tool_description: 安思派联网搜索插件面向AI的下一代实时智能搜索引擎,为您的应用提供格式友好的多渠道全网内容。 tool_label: 安思派联网搜索 tool_name: anspire_search tool_node_version: '2' tool_parameters: FromTime: type: mixed value: null Insite: type: mixed value: null ToTime: type: mixed value: null query: type: mixed value: '{{#sys.query#}}' top_k: type: constant value: 10 type: tool height: 52 id: '1762396707530' position: x: 712.5714285714286 y: 282 positionAbsolute: x: 712.5714285714286 y: 282 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: advanced_settings: group_enabled: false groups: - groupId: e4025d1c-dcac-4e35-98e6-b6f8a590d8f7 group_name: Group1 output_type: string variables: - - '1762397785764' - result output_type: string selected: false title: 搜索结果 type: variable-aggregator variables: - - '1762397785764' - result - - '1762412240747' - result height: 134 id: '1762396843604' position: x: 2014 y: 282 positionAbsolute: x: 2014 y: 282 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: error_handle_mode: terminated height: 172 is_parallel: false iterator_input_type: array[object] iterator_selector: - '1762396707530' - json output_selector: - '1762397750136' - output output_type: array[string] parallel_nums: 10 selected: false start_node_id: 1762397735029start title: 搜索结果处理 type: iteration width: 486 height: 172 id: '1762397735029' position: x: 1057.795011750021 y: 141.745129250233 positionAbsolute: x: 1057.795011750021 y: 141.745129250233 selected: false sourcePosition: right targetPosition: left type: custom width: 486 zIndex: 1 - data: desc: '' isInIteration: true selected: false title: '' type: iteration-start draggable: false height: 48 id: 1762397735029start parentId: '1762397735029' position: x: 60 y: 62 positionAbsolute: x: 1117.795011750021 y: 203.745129250233 selectable: false sourcePosition: right targetPosition: left type: custom-iteration-start width: 44 zIndex: 1002 - data: isInIteration: true isInLoop: false iteration_id: '1762397735029' selected: false template: '联网搜索对象如下:title:{{ item.title }}, date: {{item.date}}, content: {{item.content}}, url: {{item.url}}' title: 模板转换 type: template-transform variables: - value_selector: - '1762397735029' - item value_type: object variable: item height: 52 id: '1762397750136' parentId: '1762397735029' position: x: 184 y: 60 positionAbsolute: x: 1241.795011750021 y: 201.745129250233 selected: false sourcePosition: right targetPosition: left type: custom width: 242 zIndex: 1002 - data: code: "\ndef main(arg1: list[str]):\n return {\n \"result\": \"\ \ \\n \".join(arg1),\n }\n" code_language: python3 outputs: result: children: null type: string selected: false title: 搜索结果拼接字符串 type: code variables: - value_selector: - '1762397735029' - output value_type: array[string] variable: arg1 height: 52 id: '1762397785764' position: x: 1654.857142857143 y: 232 positionAbsolute: x: 1654.857142857143 y: 232 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: code: "\ndef main():\n return {\n \"result\": '',\n }\n" code_language: python3 outputs: result: children: null type: string selected: false title: 代码执行 2 type: code variables: [] height: 52 id: '1762412240747' position: x: 1203.2297259201623 y: 455.04988249978817 positionAbsolute: x: 1203.2297259201623 y: 455.04988249978817 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: cases: - case_id: 'true' conditions: - comparison_operator: not empty id: db262070-ee0c-48c5-bbe7-413aba217fe3 value: '' varType: array[object] variable_selector: - conversation - datasets id: 'true' logical_operator: and selected: false title: 条件分支 2 type: if-else height: 124 id: '1762421892949' position: x: -574.0020544748936 y: -119.81865777003897 positionAbsolute: x: -574.0020544748936 y: -119.81865777003897 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: items: - input_type: variable operation: over-write value: - '1762339910800' - datasets variable_selector: - conversation - datasets write_mode: over-write selected: false title: 变量赋值 type: assigner version: '2' height: 84 id: '1762509024795' position: x: -264.17080706957324 y: -12.151733105069425 positionAbsolute: x: -264.17080706957324 y: -12.151733105069425 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: code: "\nimport json\ndef main(text: str):\n segments = json.loads(json.loads(text)[\"\ output\"])\n \n# 如果为空,返回空字符串\n if not segments or len(segments) ==\ \ 0:\n return {\n \"result\": \"\"\n }\n \n\ \ # 提取每个记录的content字段(实际文本内容)\n contents = []\n for record in segments:\n\ \ # 检索结果中的segment字段包含实际内容\n if isinstance(record, dict):\n\ \ # 尝试获取segment.content\n if 'segment' in record and\ \ 'content' in record['segment']:\n contents.append(record['segment']['content'])\n\ \ # 或者直接content字段\n elif 'content' in record:\n \ \ contents.append(record['content'])\n \n # 将所有内容合并为一个字符串,用换行符分隔\n\ \ result_text = \"\\n\\n---\\n\\n\".join(contents)\n\n return {\n\ \ \"result\": result_text,\n }\n" code_language: python3 outputs: result: children: null type: string selected: false title: 知识库结果处理 type: code variables: - value_selector: - '1764314675268' - text value_type: string variable: text height: 52 id: '1762510470105' position: x: 160.3708886896208 y: -129.73029023737095 positionAbsolute: x: 160.3708886896208 y: -129.73029023737095 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: is_team_authorization: true paramSchemas: - auto_generate: null default: null form: llm human_description: en_US: '' ja_JP: '' pt_BR: '' zh_Hans: '' label: en_US: 知识库集(多个Id使用英文逗号隔开) ja_JP: 知识库集(多个Id使用英文逗号隔开) pt_BR: 知识库集(多个Id使用英文逗号隔开) zh_Hans: 知识库集(多个Id使用英文逗号隔开) llm_description: '' max: null min: null name: dataset_ids options: [] placeholder: en_US: '' ja_JP: '' pt_BR: '' zh_Hans: '' precision: null required: true scope: null template: null type: string - auto_generate: null default: null form: llm human_description: en_US: '' ja_JP: '' pt_BR: '' zh_Hans: '' label: en_US: 用户问题 ja_JP: 用户问题 pt_BR: 用户问题 zh_Hans: 用户问题 llm_description: '' max: null min: null name: query options: [] placeholder: en_US: '' ja_JP: '' pt_BR: '' zh_Hans: '' precision: null required: true scope: null template: null type: string - auto_generate: null default: '' form: llm human_description: en_US: '' ja_JP: '' pt_BR: '' zh_Hans: '' label: en_US: dataset_apikey ja_JP: dataset_apikey pt_BR: dataset_apikey zh_Hans: dataset_apikey llm_description: '' max: null min: null name: dataset_apikey options: [] placeholder: en_US: '' ja_JP: '' pt_BR: '' zh_Hans: '' precision: null required: true scope: null template: null type: string params: dataset_apikey: '' dataset_ids: '' query: '' plugin_id: null plugin_unique_identifier: null provider_icon: background: '#FFEAD5' content: 🤖 provider_id: e7e4453f-0667-47fe-be4c-62accfbc7cc6 provider_name: 动态知识库检索 provider_type: workflow selected: false title: 动态知识库检索 tool_configurations: {} tool_description: 根据用户指定的知识库进行检索,返回相似片段结构化数据。 tool_label: 动态知识库检索 tool_name: dynamic_dataset tool_node_version: '2' tool_parameters: dataset_apikey: type: mixed value: '{{#conversation.dataset_apikey#}}' dataset_ids: type: mixed value: '{{#conversation.datasets#}}' query: type: mixed value: '{{#sys.query#}}' type: tool height: 52 id: '1764314675268' position: x: -165.1249185156642 y: -247.5444668446392 positionAbsolute: x: -165.1249185156642 y: -247.5444668446392 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: cases: - case_id: 'true' conditions: - comparison_operator: not empty id: 3123b598-113d-453f-b3fc-d04b6e83a35e value: '' varType: string variable_selector: - conversation - dataset_apikey id: 'true' logical_operator: and selected: false title: 条件分支 3 type: if-else height: 124 id: '1764314703864' position: x: -1295.7675522246373 y: -98.76989654474232 positionAbsolute: x: -1295.7675522246373 y: -98.76989654474232 selected: false sourcePosition: right targetPosition: left type: custom width: 242 - data: items: - input_type: variable operation: over-write value: - '1762339910800' - dataset_apikey variable_selector: - conversation - dataset_apikey write_mode: over-write selected: false title: 变量赋值 2 type: assigner version: '2' height: 84 id: '1764314714879' position: x: -988.84455927465 y: -5.23303049498395 positionAbsolute: x: -988.84455927465 y: -5.23303049498395 selected: false sourcePosition: right targetPosition: left type: custom width: 242 viewport: x: -1068.6187404167313 y: 347.5222255720734 zoom: 0.6093853943072881 rag_pipeline_variables: []