Files
tw/legacy/websocket_image_entry_flow.py

12 lines
445 B
Python
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.
async def handle_image_message_flow(client, data: dict):
"""
处理图片消息。
先回复"我找找"然后把图片URL作为消息内容交给 Agent后台执行
"""
await client.send_reply(data, "我找找")
image_data = dict(data)
image_data["msg"] = f"[客户发来图片] {data.get('msg', '')}"
image_data["msg_type"] = 0
client._fire_and_forget(client._agent_reply_serialized(image_data))