Linux
安装部署dify
:https://blog.csdn.net/YXWik/article/details/149833617
飞书创建群组



添加机器人
保存好 Webhook 地址
dify工作流
创建工作流

入参
cpp
product
商品

cpp
review
评价

问题分类器

问题分类器改名为 评价分类器
作用:根据评价review
进行分类是正面
还是负面
的
组装json数据
添加正面和负面评价的代码处理集
正面评价代码
python
import json
def main(profuct, review):
message = "收到客户对产品:{} 的正面反馈 :{}".format(profuct,review)
data = {
"msg_type":"text",
"content":{
"text":message
}
}
return {
"result": json.dumps(data,ensure_ascii=False)
}

负面评价代码
python
import json
def main(profuct, review):
message = "收到客户对产品:{} 的负面反馈 :{}".format(profuct,review)
data = {
"msg_type":"text",
"content":{
"text":message
}
}
return {
"result": json.dumps(data,ensure_ascii=False)
}
变量聚合器


发送http请求

请求改为post
请求 ,url 是前面的机器人的:Webhook 地址
请求头设置
cpp
content-type
application/json

参数选择rar
点击函数选择变量聚合输出的值
结束
