app:
  description: 是一位热情的牙科医院客服，专门负责解答与牙科相关的问题。
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: advanced-chat
  name: 工作流模板
  use_icon_as_answer_icon: true
kind: app
version: 0.1.5
workflow:
  conversation_variables:
  - description: ''
    id: bdb88ece-c7dc-42ca-9607-83e094e85338
    name: feishu_table_id
    selector:
    - conversation
    - feishu_table_id
    value: ''
    value_type: string
  - description: ''
    id: 7f0a135d-236f-45d1-859c-f801ddf9d02c
    name: feishu_app_token
    selector:
    - conversation
    - feishu_app_token
    value: ''
    value_type: string
  - description: ''
    id: 653aea94-48cc-49f4-98ac-ac8753ae748f
    name: feishu_app_sec
    selector:
    - conversation
    - feishu_app_sec
    value: ''
    value_type: string
  - description: ''
    id: bf5ccb3f-cdb6-4438-b456-221178a87401
    name: feishu_app_id
    selector:
    - conversation
    - feishu_app_id
    value: ''
    value_type: string
  - description: ''
    id: c26aafd8-362c-46cd-b478-05aeba0aadbd
    name: ask_Contact
    selector:
    - conversation
    - ask_Contact
    value: \n可以提供一下您的手机号吗？我们会安排资深专家致电，解决您的疑惑
    value_type: string
  - description: ''
    id: 0d3ed711-356c-462c-b0b7-72474e5d86d5
    name: Chat_History
    selector:
    - conversation
    - Chat_History
    value: ''
    value_type: string
  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: 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: 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: question-classifier
        targetType: parameter-extractor
      id: 1736611069092-1736768787621-1736769462167-target
      selected: false
      source: '1736611069092'
      sourceHandle: '1736768787621'
      target: '1736769462167'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: question-classifier
        targetType: answer
      id: 1736611069092-1736769034885-17367697353070-target
      selected: false
      source: '1736611069092'
      sourceHandle: '1736769034885'
      target: '17367697353070'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: answer
        targetType: tool
      id: answer-source-1736770692443-target
      selected: false
      source: answer
      sourceHandle: source
      target: '1736770692443'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: tool
        targetType: template-transform
      id: 1736770692443-source-1736770801641-target
      selected: false
      source: '1736770692443'
      sourceHandle: source
      target: '1736770801641'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: template-transform
        targetType: if-else
      id: 1736770801641-source-1736770829040-target
      selected: false
      source: '1736770801641'
      sourceHandle: source
      target: '1736770829040'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: http-request
      id: 1736609673768-source-1736772348830-target
      selected: false
      source: '1736609673768'
      sourceHandle: source
      target: '1736772348830'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: http-request
        targetType: tool
      id: 1736772348830-source-1736773978582-target
      source: '1736772348830'
      sourceHandle: source
      target: '1736773978582'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: tool
        targetType: question-classifier
      id: 1736773978582-source-1736611069092-target
      source: '1736773978582'
      sourceHandle: source
      target: '1736611069092'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: code
        targetType: http-request
      id: 1736778869865-source-1736770874112-target
      source: '1736778869865'
      sourceHandle: source
      target: '1736770874112'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: code
        targetType: http-request
      id: 17367833700340-source-17367761654040-target
      source: '17367833700340'
      sourceHandle: source
      target: '17367761654040'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: http-request
        targetType: assigner
      id: 1736770874112-source-1736783708992-target
      source: '1736770874112'
      sourceHandle: source
      target: '1736783708992'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: http-request
        targetType: assigner
      id: 17367761654040-source-17367837681090-target
      source: '17367761654040'
      sourceHandle: source
      target: '17367837681090'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: template-transform
      id: 1736770829040-false-1736785769996-target
      source: '1736770829040'
      sourceHandle: 'false'
      target: '1736785769996'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: template-transform
        targetType: code
      id: 1736785769996-source-17367833700340-target
      source: '1736785769996'
      sourceHandle: source
      target: '17367833700340'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: code
      id: 1736770829040-true-1736778869865-target
      source: '1736770829040'
      sourceHandle: 'true'
      target: '1736778869865'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: answer
      id: 1736610816332-source-answer-target
      source: '1736610816332'
      sourceHandle: source
      target: answer
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: parameter-extractor
        targetType: tool
      id: 1736769462167-source-17371293807370-target
      selected: false
      source: '1736769462167'
      sourceHandle: source
      target: '17371293807370'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: tool
        targetType: template-transform
      id: 17371293807370-source-17371294257880-target
      selected: false
      source: '17371293807370'
      sourceHandle: source
      target: '17371294257880'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: code
      id: 1737129628495-source-17371295259140-target
      selected: false
      source: '1737129628495'
      sourceHandle: source
      target: '17371295259140'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: code
        targetType: http-request
      id: 17371295259140-source-17371297967510-target
      selected: false
      source: '17371295259140'
      sourceHandle: source
      target: '17371297967510'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: template-transform
        targetType: llm
      id: 17371294257880-source-1737129628495-target
      selected: false
      source: '17371294257880'
      sourceHandle: source
      target: '1737129628495'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: http-request
        targetType: answer
      id: 17371297967510-source-1737130084266-target
      selected: false
      source: '17371297967510'
      sourceHandle: source
      target: '1737130084266'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: question-classifier
        targetType: question-classifier
      id: 1736611069092-1737126693541-1737130678571-target
      source: '1736611069092'
      sourceHandle: '1737126693541'
      target: '1737130678571'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: answer
      id: 1737131163010-source-17371314701300-target
      selected: false
      source: '1737131163010'
      sourceHandle: source
      target: '17371314701300'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: answer
        targetType: tool
      id: 17371314701300-source-17371315575590-target
      source: '17371314701300'
      sourceHandle: source
      target: '17371315575590'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: code
        targetType: http-request
      id: 17371316228350-source-17371315575604-target
      source: '17371316228350'
      sourceHandle: source
      target: '17371315575604'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: tool
        targetType: template-transform
      id: 17371315575590-source-17371316940490-target
      source: '17371315575590'
      sourceHandle: source
      target: '17371316940490'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: template-transform
        targetType: code
      id: 17371316940490-source-17371316228350-target
      source: '17371316940490'
      sourceHandle: source
      target: '17371316228350'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: question-classifier
        targetType: llm
      id: 1737130678571-1-1737131163010-target
      source: '1737130678571'
      sourceHandle: '1'
      target: '1737131163010'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: question-classifier
        targetType: answer
      id: 1737130678571-2-17371309267030-target
      source: '1737130678571'
      sourceHandle: '2'
      target: '17371309267030'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: http-request
        targetType: assigner
      id: 17371315575604-source-17372002851440-target
      source: '17371315575604'
      sourceHandle: source
      target: '17372002851440'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: question-classifier
        targetType: knowledge-retrieval
      id: 1736611069092-1-1737268582576-target
      source: '1736611069092'
      sourceHandle: '1'
      target: '1737268582576'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: knowledge-retrieval
        targetType: llm
      id: 1737268582576-source-1736610816332-target
      source: '1737268582576'
      sourceHandle: source
      target: '1736610816332'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: 开始
        type: start
        variables: []
      height: 54
      id: '1736609673768'
      position:
        x: 30
        y: 332
      positionAbsolute:
        x: 30
        y: 332
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: '{{#1736610816332.text#}}'
        desc: ''
        selected: false
        title: 直接回复
        type: answer
        variables: []
      height: 103
      id: answer
      position:
        x: 2158
        y: 332
      positionAbsolute:
        x: 2158
        y: 332
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: true
          variable_selector:
          - '1737268582576'
          - result
        desc: ''
        memory:
          query_prompt_template: '{{#sys.query#}}'
          role_prefix:
            assistant: ''
            user: ''
          window:
            enabled: true
            size: 50
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: Doubao-pro-32k
          provider: volcengine_maas
        prompt_template:
        - id: 15383676-a389-492c-a856-353b36ad1365
          role: system
          text: '# 角色

            你是一位热情的牙科医院客服，专门负责解答与牙科相关的问题。


            ## 技能

            ### 技能 1: 解答牙科问题

            1. 当用户提出关于牙科的问题时，仔细分析问题，调用搜索工具查找相关知识。

            2. 用通俗易懂的语言回答用户的问题，确保回答准确、全面。

            ===回复示例===

            好的收到，请问您可以描述一下是什么样子的疼痛吗？是持续性的还是间歇性的？疼痛是钝痛、尖锐痛还是刺痛？

            ===示例结束===


            ## 客户的问题可能在以下内容包含：

            {{{#context#}}

            }

            ，如果匹配，请优先采纳：


            ## 限制:

            - 只回答与牙科相关的问题，拒绝处理与牙科无关的请求。

            - 回复问题尽量简洁直接，在50字以内完成回复。

            - 回答问题时保持礼貌，让用户感受到良好的服务态度并尽可能的放松'
        - edition_type: basic
          id: ca337648-c833-4f8d-808f-4a24f60acef5
          role: user
          text: '{{#sys.query#}}/'
        selected: false
        title: 售前咨询LLM回复
        type: llm
        variables: []
        vision:
          enabled: false
      height: 98
      id: '1736610816332'
      position:
        x: 1854
        y: 332
      positionAbsolute:
        x: 1854
        y: 332
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        classes:
        - id: '1'
          name: 牙齿疼痛问题、牙科治疗方式、价格咨询
        - id: '1736768787621'
          name: 聊天中包含手机号、姓名等联系方式
        - id: '1736769034885'
          name: 打招呼以及其他问题
        - id: '1737126693541'
          name: 话题与预约有关
        desc: ''
        instruction: '如果是咨询牙疼的情况、治疗方式以及价格方面，则属于分类1；


          如果聊天中包含手机号或者其他联系方式，则属于分类2：


          如果聊天为你好或其他打招呼开头，则属于分类3


          如果综合上下文判定病人同意了来医院的邀约，或者聊天内容与日期有关，则属于分类4：只有客户明确对预约的时间表示同意的情况下才成立，同意预约的情况下不算；'
        instructions: ''
        memory:
          query_prompt_template: '{{#sys.query#}}'
          window:
            enabled: true
            size: 50
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: Doubao-pro-32k
          provider: volcengine_maas
        query_variable_selector:
        - sys
        - query
        selected: false
        title: 判断咨询的类型
        topics: []
        type: question-classifier
        vision:
          enabled: false
      height: 264
      id: '1736611069092'
      position:
        x: 942
        y: 332
      positionAbsolute:
        x: 942
        y: 332
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        instruction: 从聊天信息中提取手机号或者其他联系方式，只输出聊天信息中的联系方式（数字格式），不要有其他多余的文字。
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: Doubao-pro-32k
          provider: volcengine_maas
        parameters:
        - description: 手机号或其他联系方式
          name: contact_number
          required: true
          type: number
        query:
        - sys
        - query
        reasoning_mode: prompt
        selected: false
        title: 提取聊天中的联系方式
        type: parameter-extractor
        variables: []
        vision:
          enabled: false
      height: 98
      id: '1736769462167'
      position:
        x: 1246
        y: 484
      positionAbsolute:
        x: 1246
        y: 484
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: 很高兴为您服务！请您尽量详细描述您的问题，我们会努力帮助您解决问题
        desc: ''
        selected: false
        title: 直接回复 (2)
        type: answer
        variables: []
      height: 116
      id: '17367697353070'
      position:
        x: 1246
        y: 622
      positionAbsolute:
        x: 1246
        y: 622
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        provider_id: feishu_base
        provider_name: feishu_base
        provider_type: builtin
        selected: false
        title: 查询记录
        tool_configurations:
          automatic_fields: null
          page_size: 20
          user_id_type: open_id
        tool_label: 查询记录
        tool_name: search_records
        tool_parameters:
          app_token:
            type: mixed
            value: '{{#conversation.feishu_table_id#}}'
          filter:
            type: mixed
            value: "{\n    \"conjunction\": \"or\",\n    \"conditions\": [\n     \
              \ {\n        \"field_name\": \"微信昵称\",\n        \"operator\": \"is\"\
              ,\n        \"value\": [\n          \"{{#sys.user_id#}}\"\n        ]\n\
              \      }\n    ]\n  }"
          table_id:
            type: mixed
            value: '{{#conversation.feishu_table_id#}}'
        type: tool
      height: 142
      id: '1736770692443'
      position:
        x: 2462
        y: 332
      positionAbsolute:
        x: 2462
        y: 332
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        selected: false
        template: '{{ arg1[0].total }}'
        title: 提取查询的沟通记录数量
        type: template-transform
        variables:
        - value_selector:
          - '1736770692443'
          - json
          variable: arg1
      height: 54
      id: '1736770801641'
      position:
        x: 2766
        y: 332
      positionAbsolute:
        x: 2766
        y: 332
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        cases:
        - case_id: 'true'
          conditions:
          - comparison_operator: is
            id: 623e599d-fcd6-4291-9c72-0c9dd30eeb0f
            value: '0'
            varType: string
            variable_selector:
            - '1736770801641'
            - output
          id: 'true'
          logical_operator: and
        desc: ''
        selected: false
        title: 条件分支
        type: if-else
      height: 126
      id: '1736770829040'
      position:
        x: 3070
        y: 332
      positionAbsolute:
        x: 3070
        y: 332
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        authorization:
          config:
            api_key: '{{#1736772505046.output#}}'
            type: bearer
          type: no-auth
        body:
          data:
          - id: key-value-69
            key: ''
            type: text
            value: "{\n  \"records\": [\n    {\n      \"fields\": {\n        \"沟通内容\"\
              : \"{{#1736778869865.result#}}\",\n        \"微信昵称\": \"{{#sys.user_id#}}\"\
              \n      }\n    }\n  ]\n}"
          type: json
        desc: ''
        headers: 'Content-Type:application/json

          Authorization:Bearer {{#1736773978582.text#}}'
        method: post
        params: ''
        retry_config:
          max_retries: 3
          retry_enabled: true
          retry_interval: 100
        selected: false
        timeout:
          max_connect_timeout: 0
          max_read_timeout: 0
          max_write_timeout: 0
        title: 工单新增沟通记录
        type: http-request
        url: https://open.feishu.cn/open-apis/bitable/v1/apps/{{#conversation.feishu_app_token#}}/tables/{{#conversation.feishu_table_id#}}/records/batch_create
        variables: []
      height: 188
      id: '1736770874112'
      position:
        x: 3678
        y: 809.5
      positionAbsolute:
        x: 3678
        y: 809.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        authorization:
          config: null
          type: no-auth
        body:
          data:
          - type: text
            value: "{\n\t\"app_id\": \"cli_a7c79cc71c24900e\",\n\t\"app_secret\":\
              \ \"AaNGNKbCw7rLOTJF0G6ZnfuJpVea3igo\"\n}"
          type: raw-text
        desc: ''
        headers: Content-Type:application/json
        method: POST
        params: ''
        retry_config:
          max_retries: 3
          retry_enabled: true
          retry_interval: 100
        selected: false
        timeout:
          max_connect_timeout: 0
          max_read_timeout: 0
          max_write_timeout: 0
        title: 获取飞书Accesstoken
        type: http-request
        url: https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal
        variables: []
      height: 151
      id: '1736772348830'
      position:
        x: 332.66932283003246
        y: 332
      positionAbsolute:
        x: 332.66932283003246
        y: 332
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        provider_id: json_process
        provider_name: json_process
        provider_type: builtin
        selected: false
        title: 提取飞书AccessToken
        tool_configurations:
          ensure_ascii: 1
        tool_label: JSON 解析
        tool_name: parse
        tool_parameters:
          content:
            type: mixed
            value: '{{#1736772348830.body#}}'
          json_filter:
            type: mixed
            value: tenant_access_token
        type: tool
      height: 90
      id: '1736773978582'
      position:
        x: 638
        y: 332
      positionAbsolute:
        x: 638
        y: 332
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        authorization:
          config:
            api_key: '{{#1736772505046.output#}}'
            type: bearer
          type: no-auth
        body:
          data:
          - id: key-value-1
            key: ''
            type: text
            value: "{\n  \"fields\": {\n    \"沟通内容\": \"{{#17367833700340.result#}}\"\
              \n  }\n}"
          type: json
        desc: ''
        headers: 'Content-Type:application/json

          Authorization:Bearer {{#1736773978582.text#}}'
        method: PUT
        params: ''
        retry_config:
          max_retries: 3
          retry_enabled: true
          retry_interval: 100
        selected: false
        timeout:
          max_connect_timeout: 0
          max_read_timeout: 0
          max_write_timeout: 0
        title: 工单更新沟通记录
        type: http-request
        url: https://open.feishu.cn/open-apis/bitable/v1/apps/{{#conversation.feishu_app_token#}}/tables/{{#conversation.feishu_table_id#}}/records/{{#1736785769996.output#}}
        variables: []
      height: 191
      id: '17367761654040'
      position:
        x: 3982
        y: 332
      positionAbsolute:
        x: 3982
        y: 332
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        selected: false
        template: '{{ arg1[0][''items''][0][''record_id''] }}'
        title: 提取需要更新的记录ID
        type: template-transform
        variables:
        - value_selector:
          - '1736770692443'
          - json
          variable: arg1
      height: 54
      id: '1736785769996'
      position:
        x: 3374
        y: 332
      positionAbsolute:
        x: 3374
        y: 332
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        code: "function main({arg1, arg2, arg3}) {\n    const formattedDate = new\
          \ Date().toISOString().slice(0, 19).replace('T', ' ');\n    return {\n \
          \       result: formattedDate + '\\n\\n' + arg3 + \"：\" + arg1 + '\\n\\\
          n' + \"客服：\" + arg2 + '\\n'\n    };\n}"
        code_language: javascript
        desc: ''
        outputs:
          result:
            children: null
            type: string
        selected: false
        title: 新建记录-组合聊天记录
        type: code
        variables:
        - value_selector:
          - sys
          - query
          variable: arg1
        - value_selector:
          - '1736610816332'
          - text
          variable: arg2
        - value_selector:
          - sys
          - user_id
          variable: arg3
      height: 54
      id: '1736778869865'
      position:
        x: 3374
        y: 874
      positionAbsolute:
        x: 3374
        y: 874
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        code: "function main({arg1, arg2, arg3, history}) {\n    const formattedDate\
          \ = new Date().toISOString().slice(0, 19).replace('T', ' ');\n    return\
          \ {\n        result: history + \"\\n\\n\" + formattedDate + '\\n\\n' + arg3\
          \ + \"：\" + arg1 + '\\n\\n' + \"客服：\" + arg2 + '\\n\\n'\n    };\n}"
        code_language: javascript
        desc: ''
        outputs:
          result:
            children: null
            type: string
        selected: false
        title: 更新记录-组合聊天记录
        type: code
        variables:
        - value_selector:
          - sys
          - query
          variable: arg1
        - value_selector:
          - '1736610816332'
          - text
          variable: arg2
        - value_selector:
          - sys
          - user_id
          variable: arg3
        - value_selector:
          - conversation
          - Chat_History
          variable: history
      height: 54
      id: '17367833700340'
      position:
        x: 3678
        y: 332
      positionAbsolute:
        x: 3678
        y: 332
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        items:
        - input_type: variable
          operation: over-write
          value:
          - '1736778869865'
          - result
          variable_selector:
          - conversation
          - Chat_History
          write_mode: over-write
        selected: false
        title: 更新聊天记录变量
        type: assigner
        version: '2'
      height: 88
      id: '1736783708992'
      position:
        x: 3982
        y: 931
      positionAbsolute:
        x: 3982
        y: 931
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        items:
        - input_type: variable
          operation: over-write
          value:
          - '17367833700340'
          - result
          variable_selector:
          - conversation
          - Chat_History
          write_mode: over-write
        selected: false
        title: 更新聊天记录变量 (1)
        type: assigner
        version: '2'
      height: 88
      id: '17367837681090'
      position:
        x: 4286
        y: 332
      positionAbsolute:
        x: 4286
        y: 332
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        provider_id: feishu_base
        provider_name: feishu_base
        provider_type: builtin
        selected: false
        title: 查询记录 (1)
        tool_configurations:
          automatic_fields: null
          page_size: 20
          user_id_type: open_id
        tool_label: 查询记录
        tool_name: search_records
        tool_parameters:
          app_token:
            type: mixed
            value: XPmHbwsyqaJ3HAs4BOFcgVERn6d
          filter:
            type: mixed
            value: "{\n    \"conjunction\": \"or\",\n    \"conditions\": [\n     \
              \ {\n        \"field_name\": \"微信昵称\",\n        \"operator\": \"is\"\
              ,\n        \"value\": [\n          \"{{#sys.user_id#}}\"\n        ]\n\
              \      }\n    ]\n  }"
          table_id:
            type: mixed
            value: tblo4hCRHWYu9set
        type: tool
      height: 142
      id: '17371293807370'
      position:
        x: 1550
        y: 464
      positionAbsolute:
        x: 1550
        y: 464
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        selected: false
        template: '{{ arg1[0][''items''][0][''record_id''] }}'
        title: 提取需要更新的记录ID (1)
        type: template-transform
        variables:
        - value_selector:
          - '17371293807370'
          - json
          variable: arg1
      height: 54
      id: '17371294257880'
      position:
        x: 1854
        y: 511
      positionAbsolute:
        x: 1854
        y: 511
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        code: "function main({arg1, arg2, arg3, history}) {\n    const formattedDate\
          \ = new Date().toISOString().slice(0, 19).replace('T', ' ');\n    return\
          \ {\n        result: history + \"\\n\\n\" + formattedDate + '\\n\\n' + arg3\
          \ + \"：\" + arg1 + '\\n\\n' + \"客服：\" + arg2 + '\\n\\n'\n    };\n}"
        code_language: javascript
        desc: ''
        outputs:
          result:
            children: null
            type: string
        selected: false
        title: 收到手机号-组合聊天记录
        type: code
        variables:
        - value_selector:
          - sys
          - query
          variable: arg1
        - value_selector:
          - '1737129628495'
          - text
          variable: arg2
        - value_selector:
          - sys
          - user_id
          variable: arg3
        - value_selector:
          - conversation
          - Chat_History
          variable: history
      height: 54
      id: '17371295259140'
      position:
        x: 2462
        y: 533
      positionAbsolute:
        x: 2462
        y: 533
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        memory:
          query_prompt_template: '{{#sys.query#}}'
          role_prefix:
            assistant: ''
            user: ''
          window:
            enabled: true
            size: 50
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: Doubao-pro-32k
          provider: volcengine_maas
        prompt_template:
        - id: 61979416-9866-44d0-a001-6a2f43da5cb3
          role: system
          text: '对客户的信任表示感谢，并继续讲述尽快就医的必要性，引导预约

            字数不要超过40字'
        selected: false
        title: 对发送联系方式进行感谢
        type: llm
        variables: []
        vision:
          enabled: false
      height: 98
      id: '1737129628495'
      position:
        x: 2158
        y: 491.5
      positionAbsolute:
        x: 2158
        y: 491.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        authorization:
          config:
            api_key: '{{#1736772505046.output#}}'
            type: bearer
          type: no-auth
        body:
          data:
          - id: key-value-1
            key: ''
            type: text
            value: "{\n  \"fields\": {\n    \"沟通内容\": \"{{#17371295259140.result#}}\"\
              ,\n    \"联系方式\": \"{{#1736769462167.contact_number#}}\"\n  }\n}"
          type: json
        desc: ''
        headers: 'Content-Type:application/json

          Authorization:Bearer {{#1736773978582.text#}}'
        method: PUT
        params: ''
        retry_config:
          max_retries: 3
          retry_enabled: true
          retry_interval: 100
        selected: false
        timeout:
          max_connect_timeout: 0
          max_read_timeout: 0
          max_write_timeout: 0
        title: 收到手机号-更新沟通记录
        type: http-request
        url: https://open.feishu.cn/open-apis/bitable/v1/apps/{{#conversation.feishu_app_token#}}/tables/{{#conversation.feishu_table_id#}}/records/{{#17371294257880.output#}}
        variables: []
      height: 191
      id: '17371297967510'
      position:
        x: 2766
        y: 427.5
      positionAbsolute:
        x: 2766
        y: 427.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: '{{#1737129628495.text#}}'
        desc: ''
        selected: false
        title: 直接回复 3
        type: answer
        variables: []
      height: 103
      id: '1737130084266'
      position:
        x: 3070
        y: 500.5
      positionAbsolute:
        x: 3070
        y: 500.5
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        classes:
        - id: '1'
          name: 未预约成功
        - id: '2'
          name: 已经预约成功
        desc: ''
        instruction: '结合上下文，判断客户是否已经预约成功“

          预约成功的几个判断方式：

          1. 已经沟通了预约的时间，客户对时间表示同意，并提供了姓名和联系方式；

          2. 客户主动提出明确的时间段进行预约

          满足以上条件，为分类2“已经预约成功”；

          如果不满足，为分类1“未预约成功”'
        instructions: ''
        memory:
          query_prompt_template: '{{#sys.query#}}'
          window:
            enabled: true
            size: 50
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: Doubao-pro-32k
          provider: volcengine_maas
        query_variable_selector:
        - conversation
        - Chat_History
        selected: false
        title: 判断是否预约成功
        topics: []
        type: question-classifier
        vision:
          enabled: false
      height: 176
      id: '1737130678571'
      position:
        x: 1246
        y: 778
      positionAbsolute:
        x: 1246
        y: 778
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: '非常感谢您的信任，我们静等您的大驾光临！

          如果预约时间之前您有紧急情况，可以拨打我们的专家电话：0531-xxxxxxx！祝您生活愉快！'
        desc: ''
        selected: false
        title: 直接回复 (3)
        type: answer
        variables: []
      height: 148
      id: '17371309267030'
      position:
        x: 1550
        y: 794
      positionAbsolute:
        x: 1550
        y: 794
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        memory:
          query_prompt_template: '{{#sys.query#}}'
          role_prefix:
            assistant: ''
            user: ''
          window:
            enabled: true
            size: 50
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: Doubao-pro-32k
          provider: volcengine_maas
        prompt_template:
        - id: d1894fdf-bc51-4721-bd58-0b3f92b4d256
          role: system
          text: '像客户发起主动预约，沟通检查时间，并主动给出选项：比如明天下午或下午；

            同时要求用户现在提供手机号、姓名，用于预约登记。'
        selected: false
        title: 沟通预约信息
        type: llm
        variables: []
        vision:
          enabled: false
      height: 98
      id: '1737131163010'
      position:
        x: 1550
        y: 982
      positionAbsolute:
        x: 1550
        y: 982
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: '{{#1737131163010.text#}}'
        desc: ''
        selected: false
        title: 直接回复 (4)
        type: answer
        variables: []
      height: 103
      id: '17371314701300'
      position:
        x: 1854
        y: 982.5
      positionAbsolute:
        x: 1854
        y: 982.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        provider_id: feishu_base
        provider_name: feishu_base
        provider_type: builtin
        selected: false
        title: 查询记录 (2)
        tool_configurations:
          automatic_fields: null
          page_size: 20
          user_id_type: open_id
        tool_label: 查询记录
        tool_name: search_records
        tool_parameters:
          app_token:
            type: mixed
            value: XPmHbwsyqaJ3HAs4BOFcgVERn6d
          filter:
            type: mixed
            value: "{\n    \"conjunction\": \"or\",\n    \"conditions\": [\n     \
              \ {\n        \"field_name\": \"微信昵称\",\n        \"operator\": \"is\"\
              ,\n        \"value\": [\n          \"{{#sys.user_id#}}\"\n        ]\n\
              \      }\n    ]\n  }"
          table_id:
            type: mixed
            value: tblo4hCRHWYu9set
        type: tool
      height: 142
      id: '17371315575590'
      position:
        x: 2158
        y: 965.5
      positionAbsolute:
        x: 2158
        y: 965.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        authorization:
          config:
            api_key: '{{#1736772505046.output#}}'
            type: bearer
          type: no-auth
        body:
          data:
          - id: key-value-1
            key: ''
            type: text
            value: "{\n  \"fields\": {\n    \"沟通内容\": \"{{#17371316228350.result#}}\"\
              \n  }\n}"
          type: json
        desc: ''
        headers: 'Content-Type:application/json

          Authorization:Bearer {{#1736773978582.text#}}'
        method: PUT
        params: ''
        retry_config:
          max_retries: 3
          retry_enabled: true
          retry_interval: 100
        selected: false
        timeout:
          max_connect_timeout: 0
          max_read_timeout: 0
          max_write_timeout: 0
        title: 预约邀请-更新沟通记录
        type: http-request
        url: https://open.feishu.cn/open-apis/bitable/v1/apps/{{#conversation.feishu_table_id#}}/tables/{{#conversation.feishu_table_id#}}/records/{{#17371316940490.output#}}
        variables: []
      height: 191
      id: '17371315575604'
      position:
        x: 3070
        y: 947
      positionAbsolute:
        x: 3070
        y: 947
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        code: "function main({arg1, arg2, arg3, history}) {\n    const formattedDate\
          \ = new Date().toISOString().slice(0, 19).replace('T', ' ');\n    return\
          \ {\n        result: history + \"\\n\\n\" + formattedDate + '\\n\\n' + arg3\
          \ + \"：\" + arg1 + '\\n\\n' + \"客服：\" + arg2 + '\\n\\n'\n    };\n}"
        code_language: javascript
        desc: ''
        outputs:
          result:
            children: null
            type: string
        selected: false
        title: 更新记录-组合聊天记录 (1)
        type: code
        variables:
        - value_selector:
          - sys
          - query
          variable: arg1
        - value_selector:
          - '1737131163010'
          - text
          variable: arg2
        - value_selector:
          - sys
          - user_id
          variable: arg3
        - value_selector:
          - conversation
          - Chat_History
          variable: history
      height: 54
      id: '17371316228350'
      position:
        x: 2766
        y: 985
      positionAbsolute:
        x: 2766
        y: 985
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        selected: false
        template: '{{ arg1[0][''items''][0][''record_id''] }}'
        title: 提取需要更新的记录ID (1)
        type: template-transform
        variables:
        - value_selector:
          - '17371315575590'
          - json
          variable: arg1
      height: 54
      id: '17371316940490'
      position:
        x: 2462
        y: 1029
      positionAbsolute:
        x: 2462
        y: 1029
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        items:
        - input_type: variable
          operation: over-write
          value:
          - '17371316228350'
          - result
          variable_selector:
          - conversation
          - Chat_History
          write_mode: over-write
        selected: false
        title: 更新聊天记录变量 (2)
        type: assigner
        version: '2'
      height: 88
      id: '17372002851440'
      position:
        x: 3374
        y: 968
      positionAbsolute:
        x: 3374
        y: 968
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        dataset_ids:
        - 294af5f0-bce7-40d6-8c46-681d6e1d5e9f
        desc: ''
        multiple_retrieval_config:
          reranking_enable: true
          reranking_mode: reranking_model
          reranking_model:
            model: bce-reranker-base_v1
            provider: xinference
          top_k: 4
        query_variable_selector:
        - '1736609673768'
        - sys.query
        retrieval_mode: multiple
        selected: false
        title: 知识检索
        type: knowledge-retrieval
      height: 92
      id: '1737268582576'
      position:
        x: 1218.8571428571427
        y: 297.2857142857142
      positionAbsolute:
        x: 1218.8571428571427
        y: 297.2857142857142
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    viewport:
      x: -494.2337715731692
      y: -106.01503913960153
      zoom: 0.7514970742486182
