diff --git a/app/endpoints/pipeline_endpoint.py b/app/endpoints/pipeline_endpoint.py index d5f1f2c..da386c6 100644 --- a/app/endpoints/pipeline_endpoint.py +++ b/app/endpoints/pipeline_endpoint.py @@ -48,8 +48,8 @@ async def get_messages(request: Request, body: Dict[str, Any]): config=await request.app.state.redis_service.get_hash(f"__AI_OPS_WX__:WXCHAT_CONFIG") wxids = list(config.keys()) meged_backlist_wxids=wxids+WX_BACKLIST - # 公众号ID已gh_开头 - if (from_wxid in meged_backlist_wxids and from_wxid != wxid) or 'gh_' in from_wxid: + # 公众号ID已gh_开头,屏蔽元宝 + if (from_wxid in meged_backlist_wxids and from_wxid != wxid) or 'gh_' in from_wxid or 'wxid_wi_' in from_wxid: logger.warning(f'来自微信ID {from_wxid} 在黑名单,发送给 {wxid} ,不处理') return {"message": "收到微信回调消息"} @@ -633,6 +633,9 @@ async def ai_chat_text_async(request: Request,token_id, app_id, wxid, msg_data, execution_time = end_time - start_time # 计算执行时间 logger.info(f"AI回答任务完成,耗时 {execution_time:.2f} 秒") +async def ai_text_split_post_async(request: Request,token_id,app_id, wxid,msg_data,from_wxid, to_wxid): + pass + async def handle_text_group_async(request: Request,token_id,app_id, wxid,msg_data,from_wxid, to_wxid): ''' 群聊文本消息