Files
tw/tests/test_wechat_alert.py
ZuoWei a6c42d505a feat: 完整功能部署 v1.0
新增功能:
- 天网协作系统 (HTTP API 端口 6060)
- 三种工作流 (查找图片/处理图片/转人工派单)
- 图片任务数据库 (支持客户后续增加需求)
- 图绘派单系统集成 (API: 8005)
- 文字检测与加价 (60-80 元高价值订单)
- 风险评估与接单判断
- 作图失败自动转人工

新增文档:
- 项目功能汇总.md
- 三种工作流功能说明.md
- 文字加价功能说明.md
- 风险评估功能说明.md
- 图片任务数据库功能说明.md
- 图绘派单系统集成说明.md
- 作图失败转接人工说明.md
- DEPLOYMENT.md
- TIANWANG_INTEGRATION.md

核心修改:
- core/pydantic_ai_agent.py
- core/workflow.py
- core/websocket_client.py
- image/image_analyzer.py
- services/service_tuhui_dispatch.py
- db/image_tasks_db.py

版本:v1.0
日期:2026-02-28
2026-02-28 11:20:40 +08:00

38 lines
1.0 KiB
Python
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- coding: utf-8 -*-
"""测试企微「谁在线啊」消息发送"""
import asyncio
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
async def main():
from config.config import WECHAT_WEBHOOK
import httpx
if not WECHAT_WEBHOOK:
print("未配置 WECHAT_WEBHOOK无法测试")
return
print(f"发送测试消息到企微...")
async with httpx.AsyncClient(timeout=10) as client:
resp = await client.post(WECHAT_WEBHOOK, json={
"msgtype": "text",
"text": {"content": "谁在线啊"}
})
print(f"状态码: {resp.status_code}")
print(f"响应: {resp.text}")
if resp.status_code == 200:
data = resp.json()
if data.get("errcode") == 0:
print("发送成功,请检查企微群是否收到")
else:
print(f"企微返回错误: {data}")
else:
print("发送失败")
if __name__ == "__main__":
asyncio.run(main())