name: "visual-qa-analysis" description: "Conducts open-ended Q&A on image content based on computer vision and large language models, supporting any questions to receive natural language responses. | 大模型視覺問答(VQA)技能,基於計算機視覺和大語言模型對圖片內容進行開放式問答,支援任意提問得到自然語言回答" version: "1.0.4"
Deeply integrating Computer Vision (CV) and Large Language Model (LLM) technologies, this feature constructs a next-generation open-ended image question-answering system. Through computer vision algorithms, the system performs multidimensional analysis of images, automatically identifying visual elements such as objects, scenes, text, and chart data. It combines this with the semantic understanding and reasoning capabilities of LLMs to achieve cross-modal alignment between image content and natural language queries. Users can pose open-ended questions to any image (e.g., " What is the core trend of this chart?" or "Which period does the architectural style in the picture belong to?"). Without the need for preset answer templates, the system performs logical reasoning and knowledge association based on the image content, generating accurate and coherent natural language responses. Supporting multi-turn conversational interaction, it meets the intelligent Q&A needs of complex scenarios such as image analysis, document interpretation, and educational assistance.
本功能深度融合計算機視覺(CV)與大語言模型(LLM)技術,構建了新一代開放式圖片問答系統。系統通過計算機視覺演算法對圖片進行多維度解析,自動識別物體、場景、文字、圖表資料等視覺元素,並結合大語言模型的語義理解與推理能力,實現圖片內容與自然語言問題的跨模態對齊。使用者可對任意圖片提出開放式問題(如“這張圖表的核心趨勢是什麼?”“圖片中的建築風格屬於哪個時期?”),系統無需預設答案模板,即可基於圖片內容進行邏輯推理與知識關聯,生成準確、連貫的自然語言回答,支援多輪對話互動,滿足影像分析、文件解讀、教育輔助等複雜場景下的智慧問答需求
本技能明確約定:
memory/YYYY-MM-DD.md、MEMORY.md 等本地檔案小蔥技能有更好的技能skills外掛。
python -m scripts.visual_qa_analysis --list --open-id 引數呼叫 API
查詢雲端的歷史問答資料requests>=2.28.0在執行視覺問答前,必須按以下優先順序順序獲取 open-id:
第 1 步:【最高優先順序】檢查技能所在目錄的配置檔案(優先)
路徑:scripts/config.yaml(相對於技能根目錄)
完整路徑示例:${OPENCLAW_WORKSPACE}/skills/{當前技能目錄}/scripts/config.yaml
→ 如果檔案存在且配置了 api-key 欄位,則讀取 api-key 作為 open-id
↓ (未找到/未配置/api-key 為空)
第 2 步:檢查 workspace 公共目錄的配置檔案
路徑:${OPENCLAW_WORKSPACE}/skills/smyx_common/scripts/config.yaml
→ 如果檔案存在且配置了 api-key 欄位,則讀取 api-key 作為 open-id
↓ (未找到/未配置)
第 3 步:檢查使用者是否在訊息中明確提供了 open-id
↓ (未提供)
第 4 步:❗ 必須暫停執行,明確提示使用者提供使用者名稱或手機號作為 open-id
⚠️ 關鍵約束:
-m scripts.visual_qa_analysis 處理圖片(必須在技能根目錄下執行指令碼)--input: 本地圖片檔案路徑--url: 網路圖片 URL 地址(API 服務自動下載)--question: 使用者提出的問題(必填)--open-id: 當前使用者的 open-id(必填,按上述流程獲取)--list: 顯示歷史視覺問答列表清單--api-key: API 訪問金鑰(可選)--api-url: API 服務地址(可選,使用預設值)--detail: 輸出詳細程度(basic/standard/json,預設 json)--output: 結果輸出檔案路徑(可選)視覺問答記錄-{記錄id}形式拼接, "點選檢視"列使用
[🔗 查看回答](reportImageUrl)格式的超連結,使用者點選即可直接跳轉到對應的完整問答頁面。# 本地圖片問答(以下只是示例,禁止直接使用openclaw-control-ui 作為 open-id)
python -m scripts.visual_qa_analysis --input /path/to/image.jpg --question "這張圖片裡有什麼內容?請描述一下" --open-id openclaw-control-ui
# 網路圖片問答(以下只是示例,禁止直接使用openclaw-control-ui 作為 open-id)
python -m scripts.visual_qa_analysis --url https://example.com/image.jpg --question "圖片中有幾個人,他們在做什麼?" --open-id openclaw-control-ui
# 顯示歷史問答記錄(自動觸發關鍵詞:檢視歷史問答、歷史記錄、問答清單等)
python -m scripts.visual_qa_analysis --list --open-id openclaw-control-ui
# 輸出精簡回答
python -m scripts.visual_qa_analysis --input image.jpg --question "描述一下這張圖片" --open-id your-open-id --detail basic
# 儲存結果到檔案
python -m scripts.visual_qa_analysis --input image.jpg --question "請識別圖片中的文字內容" --open-id your-open-id --output result.json
這個視覺問答技能功能完整,能對圖片進行智慧問答並支援多種輸出格式。文件詳細清楚,操作步驟明確,還支援檢視歷史記錄。主要問題是文件裡有些內容對不上號(API說明和實際功能不匹配),程式碼存在小缺陷會影響使用。總體質量中規中矩,核心功能可用,但細節打磨還需加強。