identity:
  name: hologres_text2data
  author: hologres_dev
  label:
    en_US: hologres_text2data
    zh_Hans: hologres_text2data
    pt_BR: hologres_text2data
description:
  human:
    en_US: Fetching data from the database using natural language.
    zh_Hans: 使用自然语言获取 Hologres 数据库数据.
    pt_BR: Fetching data from the database using natural language.
  llm: Fetching data from the database using natural language.
parameters:
  - name: db_type
    type: select
    required: true
    form: form
    label:
      en_US: Database type
      zh_Hans: 数据库类型
      pt_BR: Database type
    human_description:
      en_US: Database type
      zh_Hans: 数据库类型
      pt_BR: Database type
    llm_description: Database type
    default: hologres
    options:
      - label:
          en_US: Hologres
        value: hologres
  - name: limit
    type: number
    required: false
    min: 1
    max: 1000
    default: 100
    label:
      en_US: limit, default 100
      zh_Hans: SQL返回数据量限制，默认100行
      pt_BR: limit,default 100
    human_description:
      en_US: limit, default 100
      zh_Hans: SQL返回数据量限制，默认100行
      pt_BR: limit, default 100
    llm_description: limit
    form: form
  - name: result_format
    type: select
    required: false
    label:
      en_US: result_format
      zh_Hans: 返回数据格式
      pt_BR: result_format
    human_description:
      en_US: result_format
      zh_Hans: 返回数据格式
      pt_BR: result_format
    llm_description: result_format
    form: form
    default: text
    options:
      - label:
          en_US: JSON
          zh_Hans: JSON
        value: json
      - label:
          en_US: TEXT
          zh_Hans: TEXT
        value: text
  - name: host
    type: string
    required: true
    form: form
    label:
      en_US: Database ip/host
      zh_Hans: 数据库IP/域名
      pt_BR: Database ip/host
    human_description:
      en_US: Database ip/host
      zh_Hans: 数据库IP/域名
      pt_BR: Database ip/host
    llm_description: Database ip/host
  - name: port
    type: number
    required: true
    form: form
    min: 1
    max: 65535
    label:
      en_US: Database port
      zh_Hans: 数据库端口
      pt_BR: Database port
    human_description:
      en_US: Database port
      zh_Hans: 数据库端口
      pt_BR: Database port
    llm_description: Database port
  - name: db_name
    type: string
    required: true
    form: form
    label:
      en_US: Database name
      zh_Hans: 数据库名称
      pt_BR: Database name
    human_description:
      en_US: Database name
      zh_Hans: 数据库名称
      pt_BR: Database name
    llm_description: Database name
  - name: table_names
    type: string
    required: false
    form: llm
    label:
      en_US: table_names
      zh_Hans: 数据表名称
      pt_BR: table_names
    human_description:
      en_US: table_names
      zh_Hans: 数据表名称
      pt_BR: table_names
    llm_description: table_names
  - name: username
    type: string
    required: true
    form: form
    label:
      en_US: Username
      zh_Hans: 用户名
      pt_BR: Username
    human_description:
      en_US: Username
      zh_Hans: 用户名
      pt_BR: Username
    llm_description: Username
  - name: password
    type: secret-input
    required: true
    form: form
    label:
      en_US: Password
      zh_Hans: 密码
      pt_BR: Password
    human_description:
      en_US: Password
      zh_Hans: 密码
      pt_BR: Password
    llm_description: Password
  - name: model # the name of the model parameter
    type: model-selector # model-type
    scope: llm # the scope of the parameter
    form: form
    required: true
    label:
      en_US: Model
      zh_Hans: 模型
      pt_BR: Model
    human_description:
      en_US: LLM model for text2data.
      zh_Hans: LLM model for text2data.
      pt_BR: LLM model for text2data.
    llm_description: LLM model for text2data.
  - name: query
    type: string
    required: true
    label:
      en_US: Query string
      zh_Hans: 查询语句
      pt_BR: Query string
    human_description:
      en_US: Fetching data from the database using natural language.
      zh_Hans: Fetching data from the database using natural language.
      pt_BR: Fetching data from the database using natural language.
    llm_description: Fetching data from the database using natural language.
    form: llm
  - name: custom_prompt
    type: string
    required: false
    label:
      en_US: custom_prompt
      zh_Hans: 自定义提示
      pt_BR: custom_prompt
    human_description:
      en_US: custom_prompt
      zh_Hans: 自定义提示
      pt_BR: custom_prompt
    llm_description: custom_prompt
    form: llm
  - name: with_comment
    type: boolean
    required: false
    default: false
    label:
      en_US: with_comment
      zh_Hans: 是否包含注释
      pt_BR: with_comment
    human_description:
      en_US: with_comment
      zh_Hans: 是否包含注释
      pt_BR: with_comment
    llm_description: with_comment
    form: form
extra:
  python:
    source: tools/hologres_text2data.py