瀏覽代碼

调整关键词

develop
H Vs 14 小時之前
父節點
當前提交
498cdc65c7
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. +2
    -1
      app/endpoints/pipeline_endpoint.py

+ 2
- 1
app/endpoints/pipeline_endpoint.py 查看文件

@@ -400,7 +400,8 @@ async def handle_text_async(request: Request,token_id,app_id, wxid,msg_data,from
callback_to_user=msg_data["FromUserName"]["string"]

# 判断哪些关键词存在于 msg_content 中
keywords = ["预约", "报价", "购买", "价钱","价格", "多少钱", "下单"]
#keywords = ["预约", "报价", "购买", "价钱","价格", "多少钱", "下单"]
keywords =["报价","预约","买","价钱","价格","多少钱","下单","优惠","打折","折扣","几钱","便宜","贵","最低","续费","试用","体验","免费","费用","开票","开通","注册"]
found_keywords = [keyword for keyword in keywords if keyword in msg_content]
if found_keywords:
await request.app.state.gewe_service.set_human_handle_msg_with_contact_wxid_key_word_async(wxid,callback_to_user,60*30)


Loading…
取消
儲存