app:
  description: ''
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: workflow
  name: 会话总结
  use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
  type: marketplace
  value:
    marketplace_plugin_unique_identifier: langgenius/siliconflow:0.0.38@4795747d4fca05fee9daf34b1bcc110ffbbfcd9112f5f9e914f90b8b5dd549e5
    version: null
kind: app
version: 0.5.0
workflow:
  conversation_variables: []
  environment_variables: []
  features:
    file_upload:
      allowed_file_extensions:
      - .JPG
      - .JPEG
      - .PNG
      - .GIF
      - .WEBP
      - .SVG
      allowed_file_types:
      - image
      allowed_file_upload_methods:
      - local_file
      - remote_url
      enabled: false
      fileUploadConfig:
        audio_file_size_limit: 50
        batch_count_limit: 5
        file_size_limit: 500
        image_file_batch_limit: 10
        image_file_size_limit: 10
        single_chunk_attachment_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:
        isInIteration: false
        isInLoop: false
        sourceType: start
        targetType: code
      id: 1767170626348-source-1767170986690-target
      source: '1767170626348'
      sourceHandle: source
      target: '1767170986690'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: code
        targetType: llm
      id: 1767170986690-source-1767170825066-target
      source: '1767170986690'
      sourceHandle: source
      target: '1767170825066'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: llm
        targetType: end
      id: 1767170825066-source-1767173247791-target
      source: '1767170825066'
      sourceHandle: source
      target: '1767173247791'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        selected: false
        title: 用户输入
        type: start
        variables:
        - default: ''
          hint: ''
          label: 聊天室对话数据
          max_length: 99999
          options: []
          placeholder: ''
          required: true
          type: paragraph
          variable: chatMessages
      height: 109
      id: '1767170626348'
      position:
        x: -40
        y: 267
      positionAbsolute:
        x: -40
        y: 267
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        context:
          enabled: true
          variable_selector:
          - '1767170986690'
          - result
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: Qwen/Qwen2.5-VL-72B-Instruct
          provider: langgenius/siliconflow/siliconflow
        prompt_template:
        - id: fd7bffa7-97b7-4a7e-a47f-04dfbd15eca6
          role: system
          text: '# 角色定义

            你是一个专业的聊天室总结助手，严格按照要求输出指定格式的JSON内容，不输出任何多余文字、注释、换行。

            聊天室角色说明：guest=用户、ai=智能助手、agent=人工客服，聊天消息已按send_time时间正序排列。


            # 输出规则（必须严格遵守，违反则任务失败）

            1. 必须输出标准JSON字符串，仅包含 {"question":"","needs":[""],"answer":""} 三个字段，无其他字段、无多余内容；

            2. question：提炼用户(guest)的核心问题，无业务问题则填"用户无明确业务问题，仅进行友好问候"；

            3. needs：提取用户的核心诉求，格式为数组，无诉求则填空数组[]，仅保留业务相关诉求，过滤问候语；

            4. answer：整理有效解答（优先ai/agent回复），无有效解答则填"暂无有效解答，需用户补充更具体的问题或背景信息"；

            5. JSON中禁止出现换行、多余空格，content中的特殊字符/引号自动转义，确保JSON语法合规。


            # 输出格式（唯一合法格式，必须原样输出）

            {"question":"用户提出的问题描述", "needs":["客户诉求1","客户诉求2"],"answer":"解决方案"}


            # 聊天上下文（完整带角色，已排序）

            {{#context#}}'
        selected: false
        structured_output:
          schema:
            additionalProperties: false
            properties:
              answer:
                type: string
              needs:
                items:
                  type: string
                type: array
              question:
                type: string
            required:
            - question
            - needs
            - answer
            type: object
        structured_output_enabled: false
        title: LLM
        type: llm
        vision:
          enabled: false
      height: 88
      id: '1767170825066'
      position:
        x: 886
        y: 294
      positionAbsolute:
        x: 886
        y: 294
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        code: "import json\n\ndef main(chatMessages: str):\n    # 核心：JSON字符串 转 Python对象/对象数组\n\
          \    obj_array = json.loads(chatMessages)\n    # 返回转换后的对象数组，key自定义为你后续要用的名称（示例用result）\n\
          \    # {\"senderType\":\"ai\\guest\\staff\",\"content\":\"xxx\",\"send_time\"\
          :\"xxx\"}\n    obj_array_sorted = sorted(obj_array, key=lambda x: x[\"send_time\"\
          ])\n    return {\n        \"result\": obj_array_sorted\n    }"
        code_language: python3
        outputs:
          result:
            children: null
            type: array[object]
        selected: false
        title: jsonstring转对象数组
        type: code
        variables:
        - value_selector:
          - '1767170626348'
          - chatMessages
          value_type: string
          variable: chatMessages
      height: 52
      id: '1767170986690'
      position:
        x: 301
        y: 308
      positionAbsolute:
        x: 301
        y: 308
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        outputs:
        - value_selector:
          - '1767170825066'
          - text
          value_type: string
          variable: text
        selected: false
        title: 输出
        type: end
      height: 88
      id: '1767173247791'
      position:
        x: 1192
        y: 294
      positionAbsolute:
        x: 1192
        y: 294
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    viewport:
      x: -661
      y: 93.5
      zoom: 1
  rag_pipeline_variables: []
