|
|
@@ -60,7 +60,26 @@ Requirements:
|
|
|
|
|
|
### Step 4: Return Results
|
|
|
|
|
|
-On success, return the generated local image paths and a concise summary of what was generated.
|
|
|
+On success, the JSON output contains both `images` (local paths) and `raw_response.output_images` (public OSS URLs).
|
|
|
+
|
|
|
+**Sending the image — channel-aware logic:**
|
|
|
+
|
|
|
+Check the current channel from inbound metadata (`channel` field).
|
|
|
+
|
|
|
+**Feishu / 飞书:**
|
|
|
+- Send the local file path directly: `message(media=images[0])`
|
|
|
+- No compression needed, Feishu supports large files.
|
|
|
+
|
|
|
+**WeChat (openclaw-weixin) / 微信:**
|
|
|
+- Must compress first to under 130KB, then send local file:
|
|
|
+ ```bash
|
|
|
+ python3.11 ~/.openclaw/workspace/skills/qwen-image-skill/scripts/compress_image.py <input> <input>.compressed.jpg --max-kb 130
|
|
|
+ ```
|
|
|
+ Then: `message(media=<compressed_path>)`
|
|
|
+
|
|
|
+**Other channels (Telegram, Discord, etc.):**
|
|
|
+- Try sending OSS URL first: `message(media=raw_response.output_images[0])`
|
|
|
+- If that fails, fall back to local file path.
|
|
|
|
|
|
On failure:
|
|
|
|