app:
  description: 其他部門用連結一次倒入多張單據，自動辨識成入帳明細表＋可貼進 Excel 的 CSV，供會計人工審查後入帳。
  icon: 🧾
  icon_background: '#DCFCE7'
  icon_type: emoji
  mode: workflow
  name: 收據發票批次辨識入帳
  use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
  type: marketplace
  value:
    marketplace_plugin_unique_identifier: langgenius/anthropic:0.3.24@c5e50da8c13c7ac75348df5ac75b9418c79736eb506064669dd7ca06cbd83537
    version: null
kind: app
version: 0.6.0
workflow:
  conversation_variables: []
  environment_variables: []
  features:
    file_upload:
      allowed_file_extensions:
      - .JPG
      - .JPEG
      - .PNG
      - .WEBP
      allowed_file_types:
      - image
      allowed_file_upload_methods:
      - local_file
      - remote_url
      enabled: false
      fileUploadConfig:
        attachment_image_file_size_limit: 2
        audio_file_size_limit: 50
        batch_count_limit: 5
        file_size_limit: 15
        file_upload_limit: 20
        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: 20
        transfer_methods:
        - local_file
        - remote_url
      number_limits: 20
    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: llm
      id: s-l
      source: s
      sourceHandle: source
      target: l
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: llm
        targetType: end
      id: l-e
      source: l
      sourceHandle: source
      target: e
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        selected: false
        title: 開始
        type: start
        variables:
        - allowed_file_types:
          - image
          allowed_file_upload_methods:
          - local_file
          - remote_url
          label: 單據照片（可一次多張）
          max_length: 20
          options: []
          required: true
          type: file-list
          variable: receipts
        - default: ''
          label: 申請部門/申請人（選填）
          max_length: 60
          options: []
          required: false
          type: text-input
          variable: dept
      height: 135
      id: s
      position:
        x: 40
        y: 300
      positionAbsolute:
        x: 40
        y: 300
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        context:
          enabled: false
          variable_selector: []
        model:
          completion_params:
            temperature: 0.1
          mode: chat
          name: claude-sonnet-5
          provider: langgenius/anthropic/anthropic
        prompt_template:
        - id: sy
          role: system
          text: '你是公司會計的入帳助理。使用者會一次上傳多張『收據／發票』照片。請逐張辨識，彙整成一份第一線與會計都看得懂的結果，一律使用繁體中文。


            請依序輸出下面三個區塊：


            ## 一、入帳明細表

            用 Markdown 表格列出每一張單據一列，欄位固定為：

            | # | 日期 | 店家/廠商 | 統一編號 | 品項摘要 | 未稅金額 | 稅額 | 總金額 | 建議會計科目 |

            辨識不到的欄位填「—」，不要捏造。金額只放數字。


            ## 二、合計與檢查

            - 單據張數、總金額合計

            - 需人工確認的項目（例如模糊看不清、統編不完整、可能重複、金額與稅額不符）逐條列出


            ## 三、CSV（可直接貼進 Excel / Google 試算表）

            用程式碼區塊輸出 CSV，第一列為欄位標題，與上表欄位一致（用半形逗號分隔）。

            '
        - id: us
          role: user
          text: '申請部門/申請人：{{#s.dept#}}

            請辨識我上傳的所有單據並依格式輸出。'
        selected: true
        title: 辨識與彙整
        type: llm
        vision:
          configs:
            detail: high
            variable_selector:
            - s
            - receipts
          enabled: true
      height: 88
      id: l
      position:
        x: 360
        y: 300
      positionAbsolute:
        x: 360
        y: 300
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        outputs:
        - value_selector:
          - l
          - text
          value_type: string
          variable: result
        selected: false
        title: 輸出
        type: end
      height: 88
      id: e
      position:
        x: 680
        y: 300
      positionAbsolute:
        x: 680
        y: 300
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    viewport:
      x: 40
      y: 40
      zoom: 0.9
  rag_pipeline_variables: []
