app:
  description: Hologres ChatBI Demo
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: advanced-chat
  name: Hologres ChatBI with Holo Plugin
  use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
  type: marketplace
  value:
    marketplace_plugin_unique_identifier: langgenius/tongyi:0.0.18@ca40ec06ff35ca611fa5fdf99a15eeb007a9fe3bd725c9ff6d0436469ab0edc9
- current_identifier: null
  type: marketplace
  value:
    marketplace_plugin_unique_identifier: hologres_dev/hologres_text2data:0.1.0@07dbe36e9493e1ae4eb968c9bece259dfbabc198bb662be08b3e7e00fe62337c
kind: app
version: 0.1.5
workflow:
  conversation_variables: []
  environment_variables: []
  features:
    file_upload:
      allowed_file_extensions: []
      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: 1
    opening_statement: "您好 \U0001F60A 我是基于TPC-H构建的智能分析助手Hologres ChatBI \U0001F4C8\
      \  \n\n支持对核心业务实体（客户/订单/供应商）的多维分析 \U0001F50D 例如\U0001F447\n\n1️⃣ 精准定位：\"客户订单分布数量查询\"\
      \n2️⃣ 关联分析：\"统计客户的订单金额与供应商的相关性\"\n3️⃣ 趋势分析：\"按季度分析客户的订单金额变化规律\"\n\n⚠️描述越具体，系统生成的SQL和图表越精准哦❕"
    retriever_resource:
      enabled: true
    sensitive_word_avoidance:
      enabled: false
    speech_to_text:
      enabled: false
    suggested_questions:
    - 客户订单分布数量查询
    - 统计客户的订单金额与供应商的相关性
    - 按季度分析客户的订单金额变化规律
    suggested_questions_after_answer:
      enabled: true
    text_to_speech:
      enabled: false
      language: ''
      voice: ''
  graph:
    edges:
    - data:
        isInLoop: false
        sourceType: llm
        targetType: answer
      id: 1743658155926-source-1743065600747-target
      source: '1743658155926'
      sourceHandle: source
      target: '1743065600747'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: template-transform
        targetType: llm
      id: 1744018871487-source-1743658155926-target
      source: '1744018871487'
      sourceHandle: source
      target: '1743658155926'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: tool
        targetType: tool
      id: 1745320633328-source-1745320638403-target
      source: '1745320633328'
      sourceHandle: source
      target: '1745320638403'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: tool
        targetType: template-transform
      id: 1745320638403-source-1744018871487-target
      source: '1745320638403'
      sourceHandle: source
      target: '1744018871487'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: start
        targetType: tool
      id: 1743064693668-source-1745320633328-target
      source: '1743064693668'
      sourceHandle: source
      target: '1745320633328'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: Input
        type: start
        variables: []
      height: 54
      id: '1743064693668'
      position:
        x: 30
        y: 362
      positionAbsolute:
        x: 30
        y: 362
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: '{{#1743658155926.text#}}'
        desc: ''
        selected: false
        title: Result
        type: answer
        variables: []
      height: 105
      id: '1743065600747'
      position:
        x: 1550
        y: 362
      positionAbsolute:
        x: 1550
        y: 362
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: true
          variable_selector:
          - '1744018871487'
          - output
        desc: 根据查询结果生成报告
        model:
          completion_params: {}
          mode: chat
          name: qwen-max-latest
          provider: langgenius/tongyi/tongyi
        prompt_template:
        - id: 47a367e8-0eec-49e2-a623-1626d15b414b
          role: system
          text: "# Hologres ChatBI数据分析专家工作指南\n\n\n## 角色定位\n专业的SQL数据分析专家，负责解析Hologres数据库的查询结果\n\
            \n\n## 核心规则\n1. 直接分析已提供数据，默认数据已满足查询条件。\n2. 接受数据原貌，不质疑数据有效性。\n3. 无需二次筛选或验证数据范围。\n\
            4. JSON结果中没内容则为空数据集，统一回复\"没有查询到相关数据\"。\n5. 避免使用提示性语言。\n6. 分析结果以Markdown格式输出。\n\
            7. 整理SQL查询结果：\n   - 以Markdown表格格式输出，放置在输出开头。\n   - 以ECharts图表配置项格式输出，放置在最后。图表配置应尽量简洁，避免过多冗余配置项。\n\
            \n**Echarts输出格式严格按照如下格式输出，一定要写```echarts，不要写```json：**\n\n```echarts\n\
            {\n  \"title\": {\n    \"text\": \"示例图表\"\n  },\n  \"tooltip\": {\n  \
            \  \"trigger\": \"item\",\n    \"formatter\": \"{a} <br/>{b}: {c} ({d}%)\"\
            \n  },\n  \"legend\": {\n    \"orient\": \"vertical\",\n    \"left\":\
            \ \"left\",\n    \"data\": [\"A\", \"B\", \"C\", \"D\"]\n  },\n  \"series\"\
            : [\n    {\n      \"name\": \"示例数据\",\n      \"type\": \"pie\",\n    \
            \  \"radius\": \"50%\",\n      \"data\": [\n        { \"value\": 335,\
            \ \"name\": \"A\" },\n        { \"value\": 310, \"name\": \"B\" },\n \
            \       { \"value\": 234, \"name\": \"C\" },\n        { \"value\": 135,\
            \ \"name\": \"D\" }\n      ],\n      \"emphasis\": {\n        \"itemStyle\"\
            : {\n          \"shadowBlur\": 10,\n          \"shadowOffsetX\": 0,\n\
            \          \"shadowColor\": \"rgba(0, 0, 0, 0.5)\"\n        }\n      }\n\
            \    }\n  ]\n}\n    \"yAxis\": {\n      \"type\": \"value\"\n    },\n\
            \    \"series\": [\n      {\n        \"name\": \"订单量\",\n        \"type\"\
            : \"bar\",\n        \"data\": [46, 44, 44, 43, 43, 42, 42, 42, 42, 41]\n\
            \      }\n    ]\n  }\n}\n```\n\n\n### 数据处理原则\n1.严格基于JSON数据集{#context#}。\n\
            2.数据已预筛选，直接进行统计分析。\n3.不进行数据条件的二次确认。\n\n\n### 报告结构要求\n1.数据概览\n2.详细分析\n\
            3.结论部分\n\n\n### 背景说明\n这是一个经典的TPC-H 决策支持基准（Decision Support Benchmark），包含以下核心表：\n\
            - lineitem：订单明细表\n- orders：订单表\n- partsupp：零部件供应表\n- part： 零部件表\n- customer：客户表\n\
            - supplier：供应商表\n- nation：国家表\n- region：区域表\n\n\n### 数据处理流程\n1.接收JSON格式查询结果\n\
            2.验证数据完整性\n3.进行统计分析\n4.生成分析报告\n\n\n### 报告输出要求\n1.使用准确的数据描述\n2.提供详细的统计分析\n\
            3.标注重要发现\n4.保持客观性\n\n\n### 特殊情况处理\n- 空数据集：直接返回\"没有查询到相关数据\"\n- 异常值：如实报告，不作主观判断\n\
            - 数据缺失：说明缺失情况，不补充假设数据\n\n\n### 常见分析维度\n1.订单分析\n- 订单数量\n- 订单分布\n- 订单趋势\n\
            \n\n2.客户分布\n- 下单数量\n- 地区分布\n- 消费分布\n\n\n## 输出格式\n如果上游数据库查询没有结果，则直接结合ECharts返回\
            \ 一个空白图，图中告知：没有查询到相关数据；\n如果有数据则结合ECharts，将数据用适合的图形进行可视化展示"
        selected: false
        title: Gen Report
        type: llm
        variables: []
        vision:
          enabled: false
      height: 118
      id: '1743658155926'
      position:
        x: 1246
        y: 362
      positionAbsolute:
        x: 1246
        y: 362
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: 格式转换，用于LLM生成报告
        selected: false
        template: '{{ result }}'
        title: JSON Format
        type: template-transform
        variables:
        - value_selector:
          - '1745320638403'
          - json
          variable: result
      height: 82
      id: '1744018871487'
      position:
        x: 942
        y: 362
      positionAbsolute:
        x: 942
        y: 362
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        is_team_authorization: true
        output_schema: null
        paramSchemas:
        - auto_generate: null
          default: hologres
          form: form
          human_description:
            en_US: Database type
            ja_JP: Database type
            pt_BR: Database type
            zh_Hans: 数据库类型
          label:
            en_US: Database type
            ja_JP: Database type
            pt_BR: Database type
            zh_Hans: 数据库类型
          llm_description: Database type
          max: null
          min: null
          name: db_type
          options:
          - label:
              en_US: Hologres
              ja_JP: Hologres
              pt_BR: Hologres
              zh_Hans: Hologres
            value: hologres
          placeholder: null
          precision: null
          required: true
          scope: null
          template: null
          type: select
        - auto_generate: null
          default: 100
          form: form
          human_description:
            en_US: limit, default 100
            ja_JP: limit, default 100
            pt_BR: limit, default 100
            zh_Hans: SQL返回数据量限制，默认100行
          label:
            en_US: limit, default 100
            ja_JP: limit, default 100
            pt_BR: limit,default 100
            zh_Hans: SQL返回数据量限制，默认100行
          llm_description: limit
          max: 1000
          min: 1
          name: limit
          options: []
          placeholder: null
          precision: null
          required: false
          scope: null
          template: null
          type: number
        - auto_generate: null
          default: text
          form: form
          human_description:
            en_US: result_format
            ja_JP: result_format
            pt_BR: result_format
            zh_Hans: 返回数据格式
          label:
            en_US: result_format
            ja_JP: result_format
            pt_BR: result_format
            zh_Hans: 返回数据格式
          llm_description: result_format
          max: null
          min: null
          name: result_format
          options:
          - label:
              en_US: JSON
              ja_JP: JSON
              pt_BR: JSON
              zh_Hans: JSON
            value: json
          - label:
              en_US: TEXT
              ja_JP: TEXT
              pt_BR: TEXT
              zh_Hans: TEXT
            value: text
          placeholder: null
          precision: null
          required: false
          scope: null
          template: null
          type: select
        - auto_generate: null
          default: null
          form: form
          human_description:
            en_US: Database ip/host
            ja_JP: Database ip/host
            pt_BR: Database ip/host
            zh_Hans: 数据库IP/域名
          label:
            en_US: Database ip/host
            ja_JP: Database ip/host
            pt_BR: Database ip/host
            zh_Hans: 数据库IP/域名
          llm_description: Database ip/host
          max: null
          min: null
          name: host
          options: []
          placeholder: null
          precision: null
          required: true
          scope: null
          template: null
          type: string
        - auto_generate: null
          default: null
          form: form
          human_description:
            en_US: Database port
            ja_JP: Database port
            pt_BR: Database port
            zh_Hans: 数据库端口
          label:
            en_US: Database port
            ja_JP: Database port
            pt_BR: Database port
            zh_Hans: 数据库端口
          llm_description: Database port
          max: 65535
          min: 1
          name: port
          options: []
          placeholder: null
          precision: null
          required: true
          scope: null
          template: null
          type: number
        - auto_generate: null
          default: null
          form: form
          human_description:
            en_US: Database name
            ja_JP: Database name
            pt_BR: Database name
            zh_Hans: 数据库名称
          label:
            en_US: Database name
            ja_JP: Database name
            pt_BR: Database name
            zh_Hans: 数据库名称
          llm_description: Database name
          max: null
          min: null
          name: db_name
          options: []
          placeholder: null
          precision: null
          required: true
          scope: null
          template: null
          type: string
        - auto_generate: null
          default: null
          form: llm
          human_description:
            en_US: table_names
            ja_JP: table_names
            pt_BR: table_names
            zh_Hans: 数据表名称
          label:
            en_US: table_names
            ja_JP: table_names
            pt_BR: table_names
            zh_Hans: 数据表名称
          llm_description: table_names
          max: null
          min: null
          name: table_names
          options: []
          placeholder: null
          precision: null
          required: false
          scope: null
          template: null
          type: string
        - auto_generate: null
          default: null
          form: form
          human_description:
            en_US: Username
            ja_JP: Username
            pt_BR: Username
            zh_Hans: 用户名
          label:
            en_US: Username
            ja_JP: Username
            pt_BR: Username
            zh_Hans: 用户名
          llm_description: Username
          max: null
          min: null
          name: username
          options: []
          placeholder: null
          precision: null
          required: true
          scope: null
          template: null
          type: string
        - auto_generate: null
          default: null
          form: form
          human_description:
            en_US: Password
            ja_JP: Password
            pt_BR: Password
            zh_Hans: 密码
          label:
            en_US: Password
            ja_JP: Password
            pt_BR: Password
            zh_Hans: 密码
          llm_description: Password
          max: null
          min: null
          name: password
          options: []
          placeholder: null
          precision: null
          required: true
          scope: null
          template: null
          type: secret-input
        - auto_generate: null
          default: null
          form: form
          human_description:
            en_US: LLM model for text2data.
            ja_JP: LLM model for text2data.
            pt_BR: LLM model for text2data.
            zh_Hans: LLM model for text2data.
          label:
            en_US: Model
            ja_JP: Model
            pt_BR: Model
            zh_Hans: 模型
          llm_description: LLM model for text2data.
          max: null
          min: null
          name: model
          options: []
          placeholder: null
          precision: null
          required: true
          scope: llm
          template: null
          type: model-selector
        - auto_generate: null
          default: null
          form: llm
          human_description:
            en_US: Fetching data from the database using natural language.
            ja_JP: Fetching data from the database using natural language.
            pt_BR: Fetching data from the database using natural language.
            zh_Hans: Fetching data from the database using natural language.
          label:
            en_US: Query string
            ja_JP: Query string
            pt_BR: Query string
            zh_Hans: 查询语句
          llm_description: Fetching data from the database using natural language.
          max: null
          min: null
          name: query
          options: []
          placeholder: null
          precision: null
          required: true
          scope: null
          template: null
          type: string
        - auto_generate: null
          default: null
          form: llm
          human_description:
            en_US: custom_prompt
            ja_JP: custom_prompt
            pt_BR: custom_prompt
            zh_Hans: 自定义提示
          label:
            en_US: custom_prompt
            ja_JP: custom_prompt
            pt_BR: custom_prompt
            zh_Hans: 自定义提示
          llm_description: custom_prompt
          max: null
          min: null
          name: custom_prompt
          options: []
          placeholder: null
          precision: null
          required: false
          scope: null
          template: null
          type: string
        - auto_generate: null
          default: 0
          form: form
          human_description:
            en_US: with_comment
            ja_JP: with_comment
            pt_BR: with_comment
            zh_Hans: 是否包含注释
          label:
            en_US: with_comment
            ja_JP: with_comment
            pt_BR: with_comment
            zh_Hans: 是否包含注释
          llm_description: with_comment
          max: null
          min: null
          name: with_comment
          options: []
          placeholder: null
          precision: null
          required: false
          scope: null
          template: null
          type: boolean
        params:
          custom_prompt: ''
          db_name: ''
          db_type: ''
          host: ''
          limit: ''
          model: ''
          password: ''
          port: ''
          query: ''
          result_format: ''
          table_names: ''
          username: ''
          with_comment: ''
        provider_id: hologres_dev/hologres_text2data/hologres_text2data
        provider_name: hologres_dev/hologres_text2data/hologres_text2data
        provider_type: builtin
        selected: true
        title: hologres_text2data
        tool_configurations:
          db_name: database_name
          db_type: hologres
          host: hologres_endpoint_host
          limit: 100
          model:
            completion_params: {}
            mode: chat
            model: qwen-max-latest
            model_type: llm
            provider: langgenius/tongyi/tongyi
            type: model-selector
          password: user_password
          port: 80
          result_format: text
          username: user_name
          with_comment: 0
        tool_label: hologres_text2data
        tool_name: hologres_text2data
        tool_parameters:
          query:
            type: mixed
            value: '{{#sys.query#}}'
        type: tool
      height: 324
      id: '1745320633328'
      position:
        x: 334
        y: 362
      positionAbsolute:
        x: 334
        y: 362
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        is_team_authorization: true
        output_schema: null
        paramSchemas:
        - auto_generate: null
          default: hologres
          form: form
          human_description:
            en_US: Database type
            ja_JP: Database type
            pt_BR: Database type
            zh_Hans: 数据库类型
          label:
            en_US: Database type
            ja_JP: Database type
            pt_BR: Database type
            zh_Hans: 数据库类型
          llm_description: Database type
          max: null
          min: null
          name: db_type
          options:
          - label:
              en_US: Hologres
              ja_JP: Hologres
              pt_BR: Hologres
              zh_Hans: Hologres
            value: hologres
          placeholder: null
          precision: null
          required: true
          scope: null
          template: null
          type: select
        - auto_generate: null
          default: null
          form: form
          human_description:
            en_US: Database ip/host
            ja_JP: Database ip/host
            pt_BR: Database ip/host
            zh_Hans: 数据库IP/域名
          label:
            en_US: Database ip/host
            ja_JP: Database ip/host
            pt_BR: Database ip/host
            zh_Hans: 数据库IP/域名
          llm_description: Database ip/host
          max: null
          min: null
          name: host
          options: []
          placeholder: null
          precision: null
          required: true
          scope: null
          template: null
          type: string
        - auto_generate: null
          default: null
          form: form
          human_description:
            en_US: Database port
            ja_JP: Database port
            pt_BR: Database port
            zh_Hans: 数据库端口
          label:
            en_US: Database port
            ja_JP: Database port
            pt_BR: Database port
            zh_Hans: 数据库端口
          llm_description: Database port
          max: 65535
          min: 1
          name: port
          options: []
          placeholder: null
          precision: null
          required: true
          scope: null
          template: null
          type: number
        - auto_generate: null
          default: null
          form: form
          human_description:
            en_US: Database name
            ja_JP: Database name
            pt_BR: Database name
            zh_Hans: 数据库名称
          label:
            en_US: Database name
            ja_JP: Database name
            pt_BR: Database name
            zh_Hans: 数据库名称
          llm_description: Database name
          max: null
          min: null
          name: db_name
          options: []
          placeholder: null
          precision: null
          required: true
          scope: null
          template: null
          type: string
        - auto_generate: null
          default: null
          form: form
          human_description:
            en_US: Username
            ja_JP: Username
            pt_BR: Username
            zh_Hans: 用户名
          label:
            en_US: Username
            ja_JP: Username
            pt_BR: Username
            zh_Hans: 用户名
          llm_description: Username
          max: null
          min: null
          name: username
          options: []
          placeholder: null
          precision: null
          required: true
          scope: null
          template: null
          type: string
        - auto_generate: null
          default: null
          form: form
          human_description:
            en_US: Password
            ja_JP: Password
            pt_BR: Password
            zh_Hans: 密码
          label:
            en_US: Password
            ja_JP: Password
            pt_BR: Password
            zh_Hans: 密码
          llm_description: Password
          max: null
          min: null
          name: password
          options: []
          placeholder: null
          precision: null
          required: true
          scope: null
          template: null
          type: secret-input
        - auto_generate: null
          default: null
          form: llm
          human_description:
            en_US: Fetching data from the database using natural language.
            ja_JP: Fetching data from the database using natural language.
            pt_BR: Fetching data from the database using natural language.
            zh_Hans: Fetching data from the database using natural language.
          label:
            en_US: SQL string
            ja_JP: SQL string
            pt_BR: SQL string
            zh_Hans: 待执行的 SQL 语句
          llm_description: Fetching data from the database using natural language.
          max: null
          min: null
          name: sql
          options: []
          placeholder: null
          precision: null
          required: true
          scope: null
          template: null
          type: string
        - auto_generate: null
          default: json
          form: form
          human_description:
            en_US: result_format
            ja_JP: result_format
            pt_BR: result_format
            zh_Hans: 返回数据格式
          label:
            en_US: result_format
            ja_JP: result_format
            pt_BR: result_format
            zh_Hans: 返回数据格式
          llm_description: result_format
          max: null
          min: null
          name: result_format
          options:
          - label:
              en_US: JSON
              ja_JP: JSON
              pt_BR: JSON
              zh_Hans: JSON
            value: json
          - label:
              en_US: TEXT
              ja_JP: TEXT
              pt_BR: TEXT
              zh_Hans: TEXT
            value: text
          - label:
              en_US: CSV
              ja_JP: CSV
              pt_BR: CSV
              zh_Hans: CSV
            value: csv
          placeholder: null
          precision: null
          required: false
          scope: null
          template: null
          type: select
        params:
          db_name: ''
          db_type: ''
          host: ''
          password: ''
          port: ''
          result_format: ''
          sql: ''
          username: ''
        provider_id: hologres_dev/hologres_text2data/hologres_text2data
        provider_name: hologres_dev/hologres_text2data/hologres_text2data
        provider_type: builtin
        selected: false
        title: hologres_excute_sql
        tool_configurations:
          db_name: database_name
          db_type: hologres
          host: hologres_endpoint_host
          password: user_password
          port: 80
          result_format: json
          username: user_name
        tool_label: hologres_excute_sql
        tool_name: hologres_excute_sql
        tool_parameters:
          sql:
            type: mixed
            value: '{{#1745320633328.text#}}'
        type: tool
      height: 246
      id: '1745320638403'
      position:
        x: 639.4285714285714
        y: 362
      positionAbsolute:
        x: 639.4285714285714
        y: 362
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    viewport:
      x: -198.39999999999998
      y: 340.85
      zoom: 0.7
