// Use Playwright functions on the page object
const page = stagehand.page;
await page.goto("https://github.com/browserbase");
// Use act() to execute individual actions
await page.act("click on the stagehand repo");
// Use Computer Use agents for larger actions
const agent = stagehand.agent({
provider: "openai",
model: "computer-use-preview",
});
await agent.execute("Get to the latest PR");
// Use extract() to read data from the page
const { author, title } = await page.extract({
instruction: "extract the author and title of the PR",
schema: z.object({
author: z.string().describe("The username of the PR author"),
title: z.string().describe("The title of the PR"),
}),
});
V2 支援搭配 OmniTool,形成一個即插即用的環境,可控制 Windows 11 VM 並搭配各家大型語言模型,如 OpenAI (4o, o1, o3-mini)、DeepSeek R1、Qwen 2.5VL 甚至 Anthropic,使建構 GUI Agent 更簡單。
5. 擴大使用場景與穩定性
除了支援 PC 與手機螢幕截圖外,V2 的架構更穩定、更泛用,適合建構可解讀 GUI 的多種應用。
V1 vs V2 功能比較表
特性
OmniParser V1
OmniParser V2
訓練資料集
標準 icon caption+grounding 少量
更大、更乾淨的訓練資料集
推理速度
較慢
快了約 60%,平均延遲 0.6s–0.8s
Grounding 準確度
基準低,難以處理小 UI 元素
搭配 GPT-4o 平均達 39.6% 準確率
操作流程整合性
需手動整合模型與 LLM
支援 OmniTool,快速與多款 LLM 串接
適用場景廣度
較狹窄
更廣泛,包含各種 GUI 互動與截圖輸入
下載新的模型
for f in icon_detect/{train_args.yaml,model.pt,model.yaml} icon_caption/{config.json,generation_config.json,model.safetensors}; do huggingface-cli download microsoft/OmniParser-v2.0 "$f" --local-dir weights; done
mv weights/icon_caption weights/icon_caption_florence
如果你是 Windows 可以去 Hugginface 下載模型後,並且在目錄下建立 weights\icon_caption_florence ,把下載來的模型放在目錄中即可
python weights/convert_safetensor_to_pt.py
For v1.5:
download 'model_v1_5.pt' from https://huggingface.co/microsoft/OmniParser/tree/main/icon_detect_v1_5, make a new dir: weights/icon_detect_v1_5, and put it inside the folder. No weight conversion is needed.
reader = easyocr.Reader(['en'])
paddle_ocr = PaddleOCR(
# lang='en', # other lang also available
lang='ch', # other lang also available
use_angle_cls=False,
use_gpu=False, # using cuda will conflict with pytorch in the same process
show_log=False,
max_batch_size=1024,
use_dilation=True, # improves accuracy
det_db_score_mode='slow', # improves accuracy
rec_batch_num=1024)
Dify AI 是一個開放靈活的生成式 AI 應用開發框架,提供了一個全方面的解決方案,讓開發者能夠輕鬆構建和運營生成式 AI的 原生應用。平台的核心技術包括 AI 工作流程編排、RAG 檢索、模型管理等功能。Dify AI 支持從 Agent 建立到工作流程編排的完整開發過程,讓使用者可以專注於創造應用的核心價值,此外,它提供的工具包括 Prompt IDE、Enterprise LLMOps 和 BaaS 等解決方案,可以大幅度的提升開發效率並優化應用性能,可以先去Dify的GitHUB看看。
特色介紹
公司內部私有化的知識庫和AI助理:
Dify AI 允許企業將內部知識庫整合到平台中,並創建專屬的AI助理,來高效地管理和利用企業知識。
公司內部可以控管的紀錄:
企業可以通過Dify AI平台對所有操作和數據進行詳細記錄和管控,確保數據安全和合規性。
AI工作流自動化:
Dify AI 提供連結公司內部資訊系統的能力,幫助企業自動化處理各種業務流程,提升運營效率。
零代碼創建 AI Agent:
平台支持用戶在無需編寫代碼的情況下,創建和部署個性化的 AI Agent,滿足各類業務需求。
支持多種大語言模型:
Dify AI 支持全球各種主流的大語言模型(LLM),為企業提供靈活的選擇,以滿足不同場景的應用需求。
開發以及運營的支持
利用 Docker 安裝
先把專案抓下來
git clone https://github.com/langgenius/dify.git
然後可以用下面的指令安裝
cd docker
cp .env.example .env
docker compose up -d
近期留言