Search the web using DashScope Qwen API. Supports both text-only and image search modes.
Scripts are in the scripts/ subdirectory of this skill's directory.
You MUST decide which mode to use based on the user's request:
Use this for most queries — news, facts, weather, research, etc. No image pipeline needed.
python3 {{SKILL_DIR}}/scripts/web_search.py [OPTIONS] "query"
Use this ONLY when the user explicitly requests images, pictures, photos, or visual content (e.g., "搜图片", "找几张图", "show me images of", "图文介绍").
python3 {{SKILL_DIR}}/scripts/web_search.py --images "query" | python3 {{SKILL_DIR}}/scripts/feishu_image.py --send --chat-id CHAT_ID
Replace CHAT_ID with the current Feishu chat ID.
| User says | Mode | Why |
|---|---|---|
| ----------- | ------ | ----- |
| "搜一下最新新闻" | A (text) | No images requested |
| "今天天气怎么样" | A (text) | Factual query |
| "帮我查一下 React vs Vue" | A (text) | Research, no images needed |
| "搜一下可爱猫咪的图片" | B (image) | Explicitly asks for images |
| "图文介绍一下杭州西湖" | B (image) | "图文" = text + images |
| "找几张产品截图" | B (image) | "找几张图" = wants images |
When in doubt, use Mode A (text-only). Only use Mode B when the user clearly wants images.
| Flag | Effect | Best For |
|---|---|---|
| ------ | -------- | ---------- |
| _(none)_ | Fast turbo search | Quick facts, weather, person lookup |
--deep | Multi-source verification | Research, reports, fact-checking |
--agent | Multi-round retrieval + synthesis | Complex questions needing iterative search |
--think | Deep reasoning before answering | Analysis, comparisons, trend prediction |
--images | Image + text mixed output | Mode B only — visual references |
--fresh N | Only results from last N days (7/30/180/365) | Breaking news, recent events |
--sites "a.com,b.com" | Restrict to specific domains | Domain-specific research |
# Mode A: text-only searches
python3 {{SKILL_DIR}}/scripts/web_search.py "latest AI news"
python3 {{SKILL_DIR}}/scripts/web_search.py --deep --think "compare React vs Vue"
python3 {{SKILL_DIR}}/scripts/web_search.py --fresh 7 "breaking news today"
# Mode B: image searches (pipe through feishu_image.py)
python3 {{SKILL_DIR}}/scripts/web_search.py --images "cute cats" | python3 {{SKILL_DIR}}/scripts/feishu_image.py --send --chat-id CHAT_ID
python3 {{SKILL_DIR}}/scripts/web_search.py --images --deep "杭州西湖风景" | python3 {{SKILL_DIR}}/scripts/feishu_image.py --send --chat-id CHAT_ID
--deep when turbo results are incomplete or conflicting--agent for questions that need multiple search angles--think when the user needs analysis, not just raw facts--images ONLY when the user explicitly wants visual content--think mode prepends ... with reasoning chain!alt — strip the ![...]() markdown from your reply since images are already sent separately| Flag | Effect |
|---|---|
| ------ | -------- |
--send | Send each image as a Feishu image message |
--chat-id ID | Feishu receiver ID (required with --send) |
--id-type TYPE | Receiver ID type: chat_id (default), open_id, user_id |
If the script fails:
DASHSCOPE_API_KEY is setFEISHU_APP_ID and FEISHU_APP_SECRET are setpython3 -c "import openai; print(openai.__version__)"curl -s https://dashscope.aliyuncs.com > /dev/null && echo OK共 1 个版本