收起左侧

飞牛 NAS 部署 wallbag稍后读-0 代码实现企业微信机器人剪藏网页

0
回复
214
查看
[ 复制链接 ]

2

主题

1

回帖

0

牛值

江湖小虾

2025-7-4 11:34:34 显示全部楼层 阅读模式

前言

竹瓜使用了一个多星期的readeck发现好多网页剪藏不了或者剪藏格式有问题。竹瓜就还是把稍后读转回了wallabag,另GitHub网页剪藏不了经过排查是调整了家庭网络分流没做好(GitHub主页剪藏不了就剪藏readme)

上篇文章有网友留言能不能使用微信机器人剪藏网页,竹瓜组合了手头上已部署的工具发现无需代码就能轻松实现

使用体验

平时和机器人能正常AI对话,ai识别到这是个链接就自动剪藏到wallabag
PixPin_2025-05-31_08-38-11.png

在wallabag上能看到剪藏成功
PixPin_2025-05-31_08-39-42.png

个人号也可以,但是直接转发的消息在astrbot里面显示的是未实现的引用消息,还是得复制链接出来手动发送
PixPin_2025-05-31_08-42-34.png

部署

实现上面的效果需要用到3个容器wallabag和astrbot和fastgpt。wallabag用于剪藏网页,astrbot用于回调微信消息,fastgpt用来对接AI和调用wallabag的API

对应的GitHub项目链接如下:

wallabag
https://github.com/wallabag/wallabag

astrbot
https://github.com/AstrBotDevs/AstrBot

fastgpt
https://github.com/labring/FastGPT

wallabag

在飞牛文件管理docker文件夹中新增wallabag文件夹,在到docker应用compose--新增项目路径选择刚新建的文件夹并粘贴入一下代码勾选项目立即启动

标黄的compose代码的第6行是如果需要公网访问的话做完反向代理把第5,6行注释的#号去掉并把网址改为你反向代理的公网地址并重新构建容器
PixPin_2025-05-31_09-19-13.png

version: '3.9'
services:
    wallabag:
        image: 'wallabag/wallabag:latest'
        #environment:
           # - 'SYMFONY__ENV__DOMAIN_NAME=https://abc.com'
        volumes:
            - './data:/var/www/wallabag/data'
            - './images:/var/www/wallabag/web/assets/images'
        ports:
            - '8999:80'
        container_name: wallabag
        restart: unless-stopped

等待构建完成后浏览器打开http://你的飞牛ip:8999就能进入注册界面了
注册登录完成后在右上角我的账户--配置更改语音为中文

PixPin_2025-05-31_09-26-01.png

在我的账户--内部设置--杂项中把在本都缓存图片的值改为1 并应用
PixPin_2025-05-31_09-36-00.png

再点击右上角我的账户--API客户端管理--创建一个客户端
PixPin_2025-05-31_09-27-58.png

点击查看API完整文档,一起简单读一下后面fastgpt要用到
PixPin_2025-05-31_09-29-50.png
大致的流程是需要发起两次请求第一次带上用户名密码和客户端id和客户端密钥生成一个access token
第二次请求携带第一次请求返回的access token和需要剪藏的url就能请求成功了

FastGPT

fastgpt的安装往期公众号文章写过这里就不重复了,直接来工作台--新建--工作流
PixPin_2025-05-31_09-43-13.png
总览一下,一共需要一个问题分类模块,两个http请求模块,两个ai对话模块,最后会附上一键导入到json代码。先一起看看如何实现
PixPin_2025-05-31_09-43-34.png

在最左侧的加号这里新增对应的模块
PixPin_2025-05-31_09-45-45.png

问题分类,选择一个ai模型使用默认的用户问题作为输入,填入分类的内容。到这一步是让AI进行问题分类如果用户输入是URL链接就走问题分类1上门这路连线,如果不是链接就走下路直接进入AI对话
PixPin_2025-05-31_09-47-10.png

一起看一下问题分类1,AI判断是一个链接,参考wallabag的API文档

第一个http请求使用post方法,地址填入http://你的飞牛ip:8999/oauth/v2/token

在请求参数中填入变量和对应的值grant_type固定为password,client_id填入客户端id,client_secret填入客户端密钥,username和password填入wallabag的用户名密码

在下面的输出字段提取中新增一个字段access_token数据类型为string

PixPin_2025-05-31_09-52-31.png

第二个http请求也使用post方法,地址填入http://你的飞牛ip:8999/api/entries.json

在请求参数中的headers中新增参数Authorization参数值为Bearer+空格+/选择上一部返回的access_token值,最好声明一下content-type为application/x-www-form-urlencoded

在请求体body中新增参数url参数值选择流程开始>用户问题

输出字段提取可用可不用,不提取的话直接把完整响应让ai直接分析就行
PixPin_2025-05-31_10-03-34.png

最后一个模块AI对话,选择一个AI模型,提示词可以参考我的,聊天记录选择1或者0
在用户问题中选择第二次http请求的原始响应

PixPin_2025-05-31_10-13-15.png

回到问题分类2,直接接入一个对话模块选一个模型就完成了
PixPin_2025-05-31_10-15-25.png

可以试试fastgpt的调试在流程开始输入一个链接看看分类,请求,ai响应是否符合预期

在文章最后附上一键导入的json代码,在工作台新增导入json就可以了,
PixPin_2025-05-31_10-20-16.png

在右上角点击保存并发布,在发布渠道--api访问新增一个密钥并记录
PixPin_2025-05-31_10-31-20.png

PixPin_2025-05-31_10-32-59.png
也可以用fastgpt官方接口直接接入到微信公众号

astrbot

在飞牛文件管理docker目录下新增astrbot文件夹,回到docker应用compose--新增项目路径选择刚新建的文件夹并粘贴入一下代码勾选项目立即启动

version: '3.8'
services:
  astrbot:
    image: soulter/astrbot:latest
    container_name: astrbot
    ports: 
      - "6185-6186:6185-6186"
      - "11451:11451"
      - "6195:6195"
    volumes:
      - ./data:/AstrBot/data

等待构建完成后浏览器打开http://你的飞牛ip:6185就能进入界面了默认用户名和密码是 astrbot 和 astrbot

在左侧服务提供商中先把fastgpt接进去,注意apikey这里输完要按回车,api base url这里最后要加/v1
PixPin_2025-05-31_12-25-00.png

再到左侧消息平台上新增企业微信wecom
PixPin_2025-05-31_12-30-23.png

可以参考右侧弹出的详细文档,这里只说注意点注册企业微信不用认证个人就可以不影响机器人的使用,新注册的企业要等上半小时以上企业id才会生效。企业微信需要配置可信ip,有vps可以自己部署微信代理,可多人共用可以找好兄弟白嫖。代理地址填入api_base_url
https://hub.docker.com/r/ddsderek/wxchat

PixPin_2025-05-31_12-32-13.png
接入成功后就可以和你的企业微信应用机器人聊天了,使用ai和剪藏网页两不耽误

最后

个人号接入很简单docker部署wechatpadpro然后扫码登录就可以了,竹瓜这里不推荐大伙自行尝试一下

竹瓜也是机器人老玩家了,前年就开始接入ai了,从itchat凉了在换到gewechat再换到wechatpadpro,风控政策越收越紧使用个人号要做好被封的准备。而且直接转发消息目前还不能直接保存wallabag,还是要复制链接 粘贴发送方便程度和企业应用的聊天机器人是一样的

以下是fastgpt工作流json,注意微信公众号文件直接查看复制可能会有格式错误建议compose和json都把文章通过浏览器打开再复制

祝大伙玩得开心,下期见!

{
  "nodes": [
    {
      "nodeId": "userGuide",
      "name": "common:core.module.template.system_config",
      "intro": "common:core.module.template.system_config_info",
      "avatar": "core/workflow/template/systemConfig",
      "flowNodeType": "userGuide",
      "position": {
        "x": 105.2233674046409,
        "y": -3415.3320999943735
      },
      "version": "481",
      "inputs": [
        {
          "key": "welcomeText",
          "renderTypeList": [
            "hidden"
          ],
          "valueType": "string",
          "label": "core.app.Welcome Text",
          "value": ""
        },
        {
          "key": "variables",
          "renderTypeList": [
            "hidden"
          ],
          "valueType": "any",
          "label": "core.app.Chat Variable",
          "value": []
        },
        {
          "key": "questionGuide",
          "valueType": "any",
          "renderTypeList": [
            "hidden"
          ],
          "label": "core.app.Question Guide",
          "value": {
            "open": false
          }
        },
        {
          "key": "tts",
          "renderTypeList": [
            "hidden"
          ],
          "valueType": "any",
          "label": "",
          "value": {
            "type": "web"
          }
        },
        {
          "key": "whisper",
          "renderTypeList": [
            "hidden"
          ],
          "valueType": "any",
          "label": "",
          "value": {
            "open": false,
            "autoSend": false,
            "autoTTSResponse": false
          }
        },
        {
          "key": "scheduleTrigger",
          "renderTypeList": [
            "hidden"
          ],
          "valueType": "any",
          "label": "",
          "value": null
        }
      ],
      "outputs": []
    },
    {
      "nodeId": "448745",
      "name": "common:core.module.template.work_start",
      "intro": "",
      "avatar": "core/workflow/template/workflowStart",
      "flowNodeType": "workflowStart",
      "position": {
        "x": -309.92410940358485,
        "y": -441.95977456396804
      },
      "version": "481",
      "inputs": [
        {
          "key": "userChatInput",
          "renderTypeList": [
            "reference",
            "textarea"
          ],
          "valueType": "string",
          "label": "common:core.module.input.label.user question",
          "required": true,
          "toolDescription": "用户问题",
          "debugLabel": ""
        }
      ],
      "outputs": [
        {
          "id": "userChatInput",
          "key": "userChatInput",
          "label": "common:core.module.input.label.user question",
          "type": "static",
          "valueType": "string",
          "description": ""
        }
      ]
    },
    {
      "nodeId": "fMdSF1Uimm6mGAAH",
      "name": "HTTP 请求",
      "intro": "可以发出一个 HTTP 请求,实现更为复杂的操作(联网搜索、数据库查询等)",
      "avatar": "core/workflow/template/httpRequest",
      "flowNodeType": "httpRequest468",
      "showStatus": true,
      "position": {
        "x": 1109.6722283036654,
        "y": -510.08521301275357
      },
      "version": "481",
      "inputs": [
        {
          "key": "system_addInputParam",
          "renderTypeList": [
            "addInputParam"
          ],
          "valueType": "dynamic",
          "label": "",
          "required": false,
          "description": "common:core.module.input.description.HTTP Dynamic Input",
          "customInputConfig": {
            "selectValueTypeList": [
              "string",
              "number",
              "boolean",
              "object",
              "arrayString",
              "arrayNumber",
              "arrayBoolean",
              "arrayObject",
              "arrayAny",
              "any",
              "chatHistory",
              "datasetQuote",
              "dynamic",
              "selectDataset",
              "selectApp"
            ],
            "showDescription": false,
            "showDefaultValue": true
          },
          "valueDesc": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "system_httpMethod",
          "renderTypeList": [
            "custom"
          ],
          "valueType": "string",
          "label": "",
          "value": "POST",
          "required": true,
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "system_httpTimeout",
          "renderTypeList": [
            "custom"
          ],
          "valueType": "number",
          "label": "",
          "value": 30,
          "min": 5,
          "max": 600,
          "required": true,
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "system_httpReqUrl",
          "renderTypeList": [
            "hidden"
          ],
          "valueType": "string",
          "label": "",
          "description": "common:core.module.input.description.Http Request Url",
          "placeholder": "https://api.ai.com/getInventory",
          "required": false,
          "value": "http://192.168.0.117:8999/oauth/v2/token",
          "valueDesc": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "system_httpHeader",
          "renderTypeList": [
            "custom"
          ],
          "valueType": "any",
          "value": [],
          "label": "",
          "description": "common:core.module.input.description.Http Request Header",
          "placeholder": "common:core.module.input.description.Http Request Header",
          "required": false,
          "valueDesc": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "system_httpParams",
          "renderTypeList": [
            "hidden"
          ],
          "valueType": "any",
          "value": [],
          "label": "",
          "required": false,
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "system_httpJsonBody",
          "renderTypeList": [
            "hidden"
          ],
          "valueType": "any",
          "label": "",
          "required": false,
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": "",
          "value": ""
        },
        {
          "key": "system_httpFormBody",
          "renderTypeList": [
            "hidden"
          ],
          "valueType": "any",
          "value": [
            {
              "key": "grant_type",
              "type": "string",
              "value": "password"
            },
            {
              "key": "client_id",
              "type": "string",
              "value": "4_10wdhj6jz9sgcgkgg8c4c4cccs00wkgwgowk4ssgko4ok80s8"
            },
            {
              "key": "client_secret",
              "type": "string",
              "value": "42v7z08nin8kwowo0gcccw8wwkgwc0k4ok0o0ogwkc8kcwkgk"
            },
            {
              "key": "username",
              "type": "string",
              "value": "wallabag"
            },
            {
              "key": "password",
              "type": "string",
              "value": "youpassword"
            }
          ],
          "label": "",
          "required": false,
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "system_httpContentType",
          "renderTypeList": [
            "hidden"
          ],
          "valueType": "string",
          "value": "x-www-form-urlencoded",
          "label": "",
          "required": false,
          "debugLabel": "",
          "toolDescription": ""
        }
      ],
      "outputs": [
        {
          "id": "error",
          "key": "error",
          "label": "workflow:request_error",
          "description": "HTTP请求错误信息,成功时返回空",
          "valueType": "object",
          "type": "static"
        },
        {
          "id": "httpRawResponse",
          "key": "httpRawResponse",
          "required": true,
          "label": "workflow:raw_response",
          "description": "HTTP请求的原始响应。只能接受字符串或JSON类型响应数据。",
          "valueType": "any",
          "type": "static"
        },
        {
          "id": "system_addOutputParam",
          "key": "system_addOutputParam",
          "type": "dynamic",
          "valueType": "dynamic",
          "label": "输出字段提取",
          "customFieldConfig": {
            "selectValueTypeList": [
              "string",
              "number",
              "boolean",
              "object",
              "arrayString",
              "arrayNumber",
              "arrayBoolean",
              "arrayObject",
              "arrayAny",
              "any",
              "chatHistory",
              "datasetQuote",
              "dynamic",
              "selectDataset",
              "selectApp"
            ],
            "showDescription": false,
            "showDefaultValue": false
          },
          "description": "可以通过 JSONPath 语法来提取响应值中的指定字段",
          "valueDesc": ""
        },
        {
          "id": "iUNI1Sn6ptYEqQOa",
          "valueType": "string",
          "type": "dynamic",
          "key": "access_token",
          "label": "access_token"
        }
      ]
    },
    {
      "nodeId": "xdtSmCftezFxXAo8",
      "name": "HTTP 请求#2",
      "intro": "可以发出一个 HTTP 请求,实现更为复杂的操作(联网搜索、数据库查询等)",
      "avatar": "core/workflow/template/httpRequest",
      "flowNodeType": "httpRequest468",
      "showStatus": true,
      "position": {
        "x": 1861.000872974756,
        "y": -478.464444979483
      },
      "version": "481",
      "inputs": [
        {
          "key": "system_addInputParam",
          "renderTypeList": [
            "addInputParam"
          ],
          "valueType": "dynamic",
          "label": "",
          "required": false,
          "description": "common:core.module.input.description.HTTP Dynamic Input",
          "customInputConfig": {
            "selectValueTypeList": [
              "string",
              "number",
              "boolean",
              "object",
              "arrayString",
              "arrayNumber",
              "arrayBoolean",
              "arrayObject",
              "arrayAny",
              "any",
              "chatHistory",
              "datasetQuote",
              "dynamic",
              "selectDataset",
              "selectApp"
            ],
            "showDescription": false,
            "showDefaultValue": true
          },
          "valueDesc": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "system_httpMethod",
          "renderTypeList": [
            "custom"
          ],
          "valueType": "string",
          "label": "",
          "value": "POST",
          "required": true,
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "system_httpTimeout",
          "renderTypeList": [
            "custom"
          ],
          "valueType": "number",
          "label": "",
          "value": 30,
          "min": 5,
          "max": 600,
          "required": true,
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "system_httpReqUrl",
          "renderTypeList": [
            "hidden"
          ],
          "valueType": "string",
          "label": "",
          "description": "common:core.module.input.description.Http Request Url",
          "placeholder": "https://api.ai.com/getInventory",
          "required": false,
          "value": "http://192.168.0.117:8999/api/entries.json",
          "valueDesc": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "system_httpHeader",
          "renderTypeList": [
            "custom"
          ],
          "valueType": "any",
          "value": [
            {
              "key": "Authorization",
              "type": "string",
              "value": "Bearer {{$fMdSF1Uimm6mGAAH.iUNI1Sn6ptYEqQOa$}}"
            },
            {
              "key": "Content-Type",
              "type": "string",
              "value": "application/x-www-form-urlencoded"
            }
          ],
          "label": "",
          "description": "common:core.module.input.description.Http Request Header",
          "placeholder": "common:core.module.input.description.Http Request Header",
          "required": false,
          "valueDesc": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "system_httpParams",
          "renderTypeList": [
            "hidden"
          ],
          "valueType": "any",
          "value": [],
          "label": "",
          "required": false,
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "system_httpJsonBody",
          "renderTypeList": [
            "hidden"
          ],
          "valueType": "any",
          "label": "",
          "required": false,
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": "",
          "value": ""
        },
        {
          "key": "system_httpFormBody",
          "renderTypeList": [
            "hidden"
          ],
          "valueType": "any",
          "value": [
            {
              "key": "url",
              "type": "string",
              "value": "{{$448745.userChatInput$}}"
            }
          ],
          "label": "",
          "required": false,
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "system_httpContentType",
          "renderTypeList": [
            "hidden"
          ],
          "valueType": "string",
          "value": "x-www-form-urlencoded",
          "label": "",
          "required": false,
          "debugLabel": "",
          "toolDescription": ""
        }
      ],
      "outputs": [
        {
          "id": "error",
          "key": "error",
          "label": "workflow:request_error",
          "description": "HTTP请求错误信息,成功时返回空",
          "valueType": "object",
          "type": "static"
        },
        {
          "id": "httpRawResponse",
          "key": "httpRawResponse",
          "required": true,
          "label": "workflow:raw_response",
          "description": "HTTP请求的原始响应。只能接受字符串或JSON类型响应数据。",
          "valueType": "any",
          "type": "static"
        },
        {
          "id": "system_addOutputParam",
          "key": "system_addOutputParam",
          "type": "dynamic",
          "valueType": "dynamic",
          "label": "输出字段提取",
          "customFieldConfig": {
            "selectValueTypeList": [
              "string",
              "number",
              "boolean",
              "object",
              "arrayString",
              "arrayNumber",
              "arrayBoolean",
              "arrayObject",
              "arrayAny",
              "any",
              "chatHistory",
              "datasetQuote",
              "dynamic",
              "selectDataset",
              "selectApp"
            ],
            "showDescription": false,
            "showDefaultValue": false
          },
          "description": "可以通过 JSONPath 语法来提取响应值中的指定字段",
          "valueDesc": ""
        },
        {
          "id": "sCRGJfl4henx",
          "valueType": "string",
          "type": "dynamic",
          "key": "http_status",
          "label": "http_status"
        }
      ]
    },
    {
      "nodeId": "kLT6q6iO1Hx5",
      "name": "问题分类",
      "intro": "根据用户的历史记录和当前问题判断该次提问的类型。可以添加多组问题类型,下面是一个模板例子:\n类型1: 打招呼\n类型2: 关于商品“使用”问题\n类型3: 关于商品“购买”问题\n类型4: 其他问题",
      "avatar": "core/workflow/template/questionClassify",
      "flowNodeType": "classifyQuestion",
      "showStatus": true,
      "position": {
        "x": 184.4143800412387,
        "y": -576.2302419105604
      },
      "version": "481",
      "inputs": [
        {
          "key": "model",
          "renderTypeList": [
            "selectLLMModel",
            "reference"
          ],
          "label": "AI 模型",
          "required": true,
          "valueType": "string",
          "llmModelType": "classify",
          "value": "glm-4-flashx",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "systemPrompt",
          "renderTypeList": [
            "textarea",
            "reference"
          ],
          "max": 3000,
          "valueType": "string",
          "label": "背景知识",
          "description": "core.module.input.description.Background",
          "placeholder": "core.module.input.placeholder.Classify background",
          "valueDesc": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "history",
          "renderTypeList": [
            "numberInput",
            "reference"
          ],
          "valueType": "chatHistory",
          "label": "聊天记录",
          "description": "workflow:max_dialog_rounds",
          "required": true,
          "min": 0,
          "max": 50,
          "value": 6,
          "valueDesc": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "userChatInput",
          "renderTypeList": [
            "reference",
            "textarea"
          ],
          "valueType": "string",
          "label": "用户问题",
          "toolDescription": "用户输入的问题(问题需要完善)",
          "required": true,
          "value": [
            "448745",
            "userChatInput"
          ],
          "valueDesc": "",
          "description": "",
          "debugLabel": ""
        },
        {
          "renderTypeList": [
            "custom"
          ],
          "valueType": "any",
          "label": "",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": "",
          "key": "agents",
          "value": [
            {
              "value": "输入是一个有效的 URL 网址链接(例如以 http:// 或 https:// 开头,或为常见域名格式)",
              "key": "wqre"
            },
            {
              "value": "输入不是 URL,而是文本、问题、命令或其他形式的内容",
              "key": "sdfa"
            }
          ]
        }
      ],
      "outputs": [
        {
          "id": "cqResult",
          "key": "cqResult",
          "required": true,
          "label": "workflow:classification_result",
          "valueType": "string",
          "type": "static",
          "description": ""
        }
      ]
    },
    {
      "nodeId": "wo6zqZtbTrxS",
      "name": "AI 对话",
      "intro": "AI 大模型对话",
      "avatar": "core/workflow/template/aiChat",
      "flowNodeType": "chatNode",
      "showStatus": true,
      "position": {
        "x": 1167.0364957431977,
        "y": 454.96821455176996
      },
      "version": "490",
      "inputs": [
        {
          "key": "model",
          "renderTypeList": [
            "settingLLMModel",
            "reference"
          ],
          "label": "AI 模型",
          "valueType": "string",
          "value": "glm-4-flashx",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "temperature",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "number",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "maxToken",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "number",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "isResponseAnswerText",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "value": true,
          "valueType": "boolean",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "aiChatQuoteRole",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "string",
          "value": "system",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "quoteTemplate",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "string",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "quotePrompt",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "string",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "aiChatVision",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "boolean",
          "value": true,
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "aiChatReasoning",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "boolean",
          "value": true,
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "aiChatTopP",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "number",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "aiChatStopSign",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "string",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "aiChatResponseFormat",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "string",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "aiChatJsonSchema",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "string",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "systemPrompt",
          "renderTypeList": [
            "textarea",
            "reference"
          ],
          "max": 3000,
          "valueType": "string",
          "label": "提示词",
          "description": "core.app.tip.systemPromptTip",
          "placeholder": "core.app.tip.chatNodeSystemPromptTip",
          "valueDesc": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "history",
          "renderTypeList": [
            "numberInput",
            "reference"
          ],
          "valueType": "chatHistory",
          "label": "聊天记录",
          "description": "workflow:max_dialog_rounds",
          "required": true,
          "min": 0,
          "max": 50,
          "value": 0,
          "valueDesc": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "quoteQA",
          "renderTypeList": [
            "settingDatasetQuotePrompt"
          ],
          "label": "",
          "debugLabel": "知识库引用",
          "description": "",
          "valueType": "datasetQuote",
          "valueDesc": "",
          "toolDescription": ""
        },
        {
          "key": "fileUrlList",
          "renderTypeList": [
            "reference",
            "input"
          ],
          "label": "文件链接",
          "debugLabel": "文件链接",
          "valueType": "arrayString",
          "value": [
            [
              "448745",
              "userFiles"
            ]
          ],
          "valueDesc": "",
          "description": "",
          "toolDescription": ""
        },
        {
          "key": "userChatInput",
          "renderTypeList": [
            "reference",
            "textarea"
          ],
          "valueType": "string",
          "label": "用户问题",
          "toolDescription": "用户问题",
          "required": true,
          "value": [
            "448745",
            "userChatInput"
          ],
          "valueDesc": "",
          "description": "",
          "debugLabel": ""
        }
      ],
      "outputs": [
        {
          "id": "history",
          "key": "history",
          "required": true,
          "label": "common:core.module.output.label.New context",
          "description": "将本次回复内容拼接上历史记录,作为新的上下文返回",
          "valueType": "chatHistory",
          "valueDesc": "{\n  obj: System | Human | AI;\n  value: string;\n}[]",
          "type": "static"
        },
        {
          "id": "answerText",
          "key": "answerText",
          "required": true,
          "label": "common:core.module.output.label.Ai response content",
          "description": "将在 stream 回复完毕后触发",
          "valueType": "string",
          "type": "static"
        },
        {
          "id": "reasoningText",
          "key": "reasoningText",
          "required": false,
          "label": "workflow:reasoning_text",
          "valueType": "string",
          "type": "static",
          "invalid": true,
          "description": ""
        }
      ]
    },
    {
      "nodeId": "dUgeSXN3qdyj",
      "name": "AI 对话#2",
      "intro": "AI 大模型对话",
      "avatar": "core/workflow/template/aiChat",
      "flowNodeType": "chatNode",
      "showStatus": true,
      "position": {
        "x": 2683.785068527197,
        "y": -415.0864542357822
      },
      "version": "490",
      "inputs": [
        {
          "key": "model",
          "renderTypeList": [
            "settingLLMModel",
            "reference"
          ],
          "label": "AI 模型",
          "valueType": "string",
          "value": "glm-4-flashx",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "temperature",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "number",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "maxToken",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "number",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "isResponseAnswerText",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "value": true,
          "valueType": "boolean",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "aiChatQuoteRole",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "string",
          "value": "system",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "quoteTemplate",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "string",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "quotePrompt",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "string",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "aiChatVision",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "boolean",
          "value": true,
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "aiChatReasoning",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "boolean",
          "value": true,
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "aiChatTopP",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "number",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "aiChatStopSign",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "string",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "aiChatResponseFormat",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "string",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "aiChatJsonSchema",
          "renderTypeList": [
            "hidden"
          ],
          "label": "",
          "valueType": "string",
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "systemPrompt",
          "renderTypeList": [
            "textarea",
            "reference"
          ],
          "max": 3000,
          "valueType": "string",
          "label": "提示词",
          "description": "core.app.tip.systemPromptTip",
          "placeholder": "core.app.tip.chatNodeSystemPromptTip",
          "value": "你是一个 响应分析助手。请根据提供的http_status状态码,判断该请求是否成功完成,如果成功完成返回“网页剪藏成功”;如果失败返回“网页剪藏失败”,请不要返回多余的分析仅仅返回网页剪藏成功或网页剪藏失败",
          "valueDesc": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "history",
          "renderTypeList": [
            "numberInput",
            "reference"
          ],
          "valueType": "chatHistory",
          "label": "聊天记录",
          "description": "workflow:max_dialog_rounds",
          "required": true,
          "min": 0,
          "max": 50,
          "value": 1,
          "valueDesc": "",
          "debugLabel": "",
          "toolDescription": ""
        },
        {
          "key": "quoteQA",
          "renderTypeList": [
            "settingDatasetQuotePrompt"
          ],
          "label": "",
          "debugLabel": "知识库引用",
          "description": "",
          "valueType": "datasetQuote",
          "valueDesc": "",
          "toolDescription": ""
        },
        {
          "key": "fileUrlList",
          "renderTypeList": [
            "reference",
            "input"
          ],
          "label": "文件链接",
          "debugLabel": "文件链接",
          "valueType": "arrayString",
          "value": [
            [
              "448745",
              "userFiles"
            ]
          ],
          "valueDesc": "",
          "description": "",
          "toolDescription": ""
        },
        {
          "key": "userChatInput",
          "renderTypeList": [
            "reference",
            "textarea"
          ],
          "valueType": "string",
          "label": "用户问题",
          "toolDescription": "用户问题",
          "required": true,
          "value": [
            "xdtSmCftezFxXAo8",
            "httpRawResponse"
          ],
          "valueDesc": "",
          "description": "",
          "debugLabel": "",
          "selectedTypeIndex": 0
        }
      ],
      "outputs": [
        {
          "id": "history",
          "key": "history",
          "required": true,
          "label": "common:core.module.output.label.New context",
          "description": "将本次回复内容拼接上历史记录,作为新的上下文返回",
          "valueType": "chatHistory",
          "valueDesc": "{\n  obj: System | Human | AI;\n  value: string;\n}[]",
          "type": "static"
        },
        {
          "id": "answerText",
          "key": "answerText",
          "required": true,
          "label": "common:core.module.output.label.Ai response content",
          "description": "将在 stream 回复完毕后触发",
          "valueType": "string",
          "type": "static"
        },
        {
          "id": "reasoningText",
          "key": "reasoningText",
          "required": false,
          "label": "workflow:reasoning_text",
          "valueType": "string",
          "type": "static",
          "invalid": true,
          "description": ""
        }
      ]
    }
  ],
  "edges": [
    {
      "source": "fMdSF1Uimm6mGAAH",
      "target": "xdtSmCftezFxXAo8",
      "sourceHandle": "fMdSF1Uimm6mGAAH-source-right",
      "targetHandle": "xdtSmCftezFxXAo8-target-left"
    },
    {
      "source": "448745",
      "target": "kLT6q6iO1Hx5",
      "sourceHandle": "448745-source-right",
      "targetHandle": "kLT6q6iO1Hx5-target-left"
    },
    {
      "source": "kLT6q6iO1Hx5",
      "target": "fMdSF1Uimm6mGAAH",
      "sourceHandle": "kLT6q6iO1Hx5-source-wqre",
      "targetHandle": "fMdSF1Uimm6mGAAH-target-left"
    },
    {
      "source": "kLT6q6iO1Hx5",
      "target": "wo6zqZtbTrxS",
      "sourceHandle": "kLT6q6iO1Hx5-source-sdfa",
      "targetHandle": "wo6zqZtbTrxS-target-left"
    },
    {
      "source": "xdtSmCftezFxXAo8",
      "target": "dUgeSXN3qdyj",
      "sourceHandle": "xdtSmCftezFxXAo8-source-right",
      "targetHandle": "dUgeSXN3qdyj-target-left"
    }
  ],
  "chatConfig": {
    "variables": [],
    "scheduledTriggerConfig": {
      "cronString": "",
      "timezone": "Asia/Shanghai",
      "defaultPrompt": ""
    },
    "_id": "6826faf9dd089a5e37b424ce"
  }
}

收藏
送赞
分享
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则