🤖

发票提取小工具整合版-变量聚合器

本工作流主要是通过多模态发票模型实现多种增值税发票判断OCR提取,作者:wwwzhouhui

⬡ 14 节点 ↓ 11 下载 ⚙ advanced-chat ⭐ 95/100 2026-05-28

工作流图谱

YAML 源码

app:
  description: 本工作流主要是通过多模态发票模型实现多种增值税发票判断OCR提取,作者:wwwzhouhui
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: advanced-chat
  name: 发票提取小工具整合版-变量聚合器
  use_icon_as_answer_icon: false
kind: app
version: 0.1.2
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
      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
        sourceType: start
        targetType: document-extractor
      id: 1729851066338-source-1729851603790-target
      selected: false
      source: '1729851066338'
      sourceHandle: source
      target: '1729851603790'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: document-extractor
        targetType: llm
      id: 1729851603790-source-llm-target
      selected: false
      source: '1729851603790'
      sourceHandle: source
      target: llm
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: if-else
      id: llm-source-1730191858003-target
      selected: false
      source: llm
      sourceHandle: source
      target: '1730191858003'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: llm
      id: 1730191858003-true-1730191979948-target
      selected: false
      source: '1730191858003'
      sourceHandle: 'true'
      target: '1730191979948'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: llm
      id: 1730191858003-98657baa-79e3-4af1-9b19-3daa149c0fab-17301921619230-target
      selected: false
      source: '1730191858003'
      sourceHandle: 98657baa-79e3-4af1-9b19-3daa149c0fab
      target: '17301921619230'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: llm
      id: 1730191858003-dafa44fc-1c33-4060-a68a-38c5850bda96-17301923168610-target
      selected: false
      source: '1730191858003'
      sourceHandle: dafa44fc-1c33-4060-a68a-38c5850bda96
      target: '17301923168610'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: llm
      id: 1730191858003-2d44a634-2764-4287-84a7-964fae566d5d-17301924021390-target
      selected: false
      source: '1730191858003'
      sourceHandle: 2d44a634-2764-4287-84a7-964fae566d5d
      target: '17301924021390'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: llm
      id: 1730191858003-e0a31ca5-21fa-4ec3-8c89-734c40116f8f-17301924991430-target
      selected: false
      source: '1730191858003'
      sourceHandle: e0a31ca5-21fa-4ec3-8c89-734c40116f8f
      target: '17301924991430'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: llm
      id: 1730191858003-fa4e8d8d-b178-415a-8c86-2d211b380df7-17301925812850-target
      selected: false
      source: '1730191858003'
      sourceHandle: fa4e8d8d-b178-415a-8c86-2d211b380df7
      target: '17301925812850'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: variable-aggregator
      id: 1730191979948-source-1730214844929-target
      source: '1730191979948'
      sourceHandle: source
      target: '1730214844929'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: variable-aggregator
      id: 17301921619230-source-1730214844929-target
      source: '17301921619230'
      sourceHandle: source
      target: '1730214844929'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: variable-aggregator
      id: 17301923168610-source-1730214844929-target
      source: '17301923168610'
      sourceHandle: source
      target: '1730214844929'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: variable-aggregator
      id: 17301924021390-source-1730214844929-target
      source: '17301924021390'
      sourceHandle: source
      target: '1730214844929'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: variable-aggregator
      id: 17301924991430-source-1730214844929-target
      source: '17301924991430'
      sourceHandle: source
      target: '1730214844929'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: variable-aggregator
      id: 17301925812850-source-1730214844929-target
      source: '17301925812850'
      sourceHandle: source
      target: '1730214844929'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: variable-aggregator
        targetType: answer
      id: 1730214844929-source-1730214939964-target
      source: '1730214844929'
      sourceHandle: source
      target: '1730214939964'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: variable-aggregator
      id: 17306982748800-source-1730214844929-target
      source: '17306982748800'
      sourceHandle: source
      target: '1730214844929'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: llm
      id: 1730191858003-3b6366ec-ad8e-476f-8918-bdd100359698-17306982748800-target
      selected: false
      source: '1730191858003'
      sourceHandle: 3b6366ec-ad8e-476f-8918-bdd100359698
      target: '17306982748800'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: answer
      id: 1730191858003-false-1730192759530-target
      source: '1730191858003'
      sourceHandle: 'false'
      target: '1730192759530'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: 开始
        type: start
        variables:
        - allowed_file_extensions: []
          allowed_file_types:
          - image
          allowed_file_upload_methods:
          - local_file
          - remote_url
          label: file
          max_length: 48
          options: []
          required: true
          type: file
          variable: file
      height: 90
      id: '1729851066338'
      position:
        x: -126.67275943419787
        y: 283
      positionAbsolute:
        x: -126.67275943419787
        y: 283
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: true
          variable_selector:
          - '1729851066338'
          - file
        desc: 发票识别判断模型
        memory:
          query_prompt_template: ''
          role_prefix:
            assistant: ''
            user: ''
          window:
            enabled: false
            size: 10
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: Qwen/Qwen2-VL-72B-Instruct
          provider: openai_api_compatible
        prompt_template:
        - id: 994d57b8-32bc-45cd-b30a-4a1481553627
          role: system
          text: '# Role: 发票识别专家


            ## Profile

            - 专长: 发票类型识别、图像分析、文字识别

            - 经验: 多年处理各类发票和票据的经验

            - 技能: 精准识别不同类型发票的特征


            ## Goals

            - 根据用户上传的发票图像准确识别发票类型

            - 返回对应的发票类型代码


            ## Rules

            - 仔细分析发票上的所有视觉和文字信息

            - 只返回指定的发票类型代码,不做其他解释

            - 如果无法确定发票类型,返回 "无法识别"


            ## Workflows

            1. 接收用户上传的发票图像

            2. 分析图像中的关键信息和特征

            3. 对比不同类型发票的特征

            4. 确定发票类型

            5. 返回对应的类型代码


            ## Output Format

            发票类型代码:

            - 0: 增值税电子发票

            - 1: 电子发票(全电发票)

            - 2: 增值税普通发票-卷票

            - 3: 火车票

            - 4: 新版火车票-铁路电子客票

            - 5: 定额发票

            - 6: 出租车发票


            ## Examples

            用户: [上传增值税电子普通发票图像]

            特征: 电子版式,有"增值税电子普通发票"字样,含二维码,有密码区,有 "税局监制"字样

            AI: 0


            用户: [上传电子发票(普通发票)或电子发票(增值税专用发票)图像]

            特征: 电子版式,有"电子发票"字样,发票号码长度有20位

            AI: 1


            用户: [上传增值税普通发票发票联图像]

            特征: 纸质卷式,较窄,有"增值税普通发票"字样,通常为红色或蓝色

            AI: 2


            用户: [上传火车票图像]

            特征: 磁性票,较小,包含乘车日期、车次、座位等信息

            AI: 3


            用户: [上传新版火车票-铁路电子客票图像]

            特征: 电子版式,有"电子发票(铁路电子客票)"标志,包含乘车日期、车次、座位等信息,有发票号码,发票号码长度20位

            AI: 4


          ...(过长已截断)