GUI-Plus

复制成功!
加入对比
视觉理解

概述

视觉理解

GUI系列图形界面交互基础模型,针对手机端与电脑端图形界面理解与交互任务,性能优于开源版同类GUI模型。全面升级跨平台界面理解与多步任务规划,支持跨应用复杂任务;具备精细化动作执行与多角色多智能体协作能力,胜任真实复杂交互场景。

输入

文本图像

输出

文本

功能

前缀补全

您可在调用通义千问 API 时启用 Partial Mode,确保模型严格基于您的起始文本进行生成。查看文档

函数调用

您可以使用 函数调用 功能,通过引入外部工具,使得大模型可以与外部世界进行交互。查看文档

缓存

Context Cache 技术会缓存长上下文请求的公共前缀,减少推理时的重复计算,提升响应速度同时降低您的使用成本。查看文档

结构化输出

开启结构化输出功能可以确保大模型输出标准格式的 JSON 字符串。查看文档

批量任务

联网搜索

启用联网检索功能后,模型将基于实时检索数据进行回复。查看文档

微调

定价

  • 输入
    ¥1.5/M tokens
  • 输出
    ¥4.5/M tokens

速率限制与上下文

  • 最大输入
    254.97K
  • 最大输出
    32.76K
  • RPM每分钟请求数
    80
  • TPM每分钟 Token 数
    540K
  • 上下文
    256K

API 参考

获取 API Key
复制成功!
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
import os
import dashscope
dashscope.base_http_api_url = "https://dashscope.aliyuncs.com/api/v1/"
system_prompt = '''
# Tools

You may call one or more functions to assist with the user query.

You are provided with function signatures within <tools></tools> XML tags:
<tools>
{"type": "function", "function": {"name": "computer_use", "description": "Use a mouse and keyboard to interact with a computer, and take screenshots.\n* This is an interface to a desktop GUI. You do not have access to a terminal or applications menu. You must click on desktop icons to start applications.\n* Some applications may take time to start or process actions, so you may need to wait and take successive screenshots to see the results of your actions. E.g. if you click on Firefox and a window doesn't open, try wait and taking another screenshot.\n* The screen's resolution is 1000x1000.\n* Make sure to click any buttons, links, icons, etc with the cursor tip in the center of the element. Don't click boxes on their edges unless asked.", "parameters": {"properties": {"action": {"description": "The action to perform. The available actions are:\n* `key`: Performs key down presses on the arguments passed in order, then performs key releases in reverse order.\n* `type`: Type a string of text on the keyboard.\n* `mouse_move`: Move the cursor to a specified (x, y) pixel coordinate on the screen.\n* `left_click`: Click the left mouse button at a specified (x, y) pixel coordinate on the screen.\n* `left_click_drag`: Click and drag the cursor to a specified (x, y) pixel coordinate on the screen.\n* `right_click`: Click the right mouse button at a specified (x, y) pixel coordinate on the screen.\n* `middle_click`: Click the middle mouse button at a specified (x, y) pixel coordinate on the screen.\n* `double_click`: Double-click the left mouse button at a specified (x, y) pixel coordinate on the screen.\n* `triple_click`: Triple-click the left mouse button at a specified (x, y) pixel coordinate on the screen (simulated as double-click since it's the closest action).\n* `scroll`: Performs a scroll of the mouse scroll wheel.\n* `hscroll`: Performs a horizontal scroll (mapped to regular scroll).\n* `wait`: Wait specified seconds for the change to happen.\n* `terminate`: Terminate the current task and report its completion status.\n* `answer`: Answer a question.\n* `interact`: Resolve the blocking window by interacting with the user.", "enum": ["key", "type", "mouse_move", "left_click", "left_click_drag", "right_click", "middle_click", "double_click", "triple_click", "scroll", "hscroll", "wait", "terminate", "answer", "interact"], "type": "string"}, "keys": {"description": "Required only by `action=key`.", "type": "array"}, "text": {"description": "Required only by `action=type`, `action=answer` and `action=interact`.", "type": "string"}, "coordinate": {"description": "(x, y): The x (pixels from the left edge) and y (pixels from the top edge) coordinates to move the mouse to. Required only by `action=mouse_move` and `action=left_click_drag`.", "type": "array"}, "pixels": {"description": "The amount of scrolling to perform. Positive values scroll up, negative values scroll down. Required only by `action=scroll` and `action=hscroll`.", "type": "number"}, "time": {"description": "The seconds to wait. Required only by `action=wait`.", "type": "number"}, "status": {"description": "The status of the task. Required only by `action=terminate`.", "type": "string", "enum": ["success", "failure"]}}, "required": ["action"], "type": "object"}}}
</tools>

For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
<tool_call>
{"name": <function-name>, "arguments": <args-json-object>}
</tool_call>

# Response format

Response format for every step:
1) Action: a short imperative describing what to do in the UI.
2) A single <tool_call>...</tool_call> block containing only the JSON: {"name": <function-name>, "arguments": <args-json-object>}.

Rules:
- Output exactly in the order: Action, <tool_call>.
- Be brief: one for Action.
- Do not output anything else outside those two parts.
- If finishing, use action=terminate in the tool call.
'''

messages = [{
        "role": "system",
        "content": system_prompt
            },
     {
        "role": "user",
        "content": [
            {"image": "https://img.alicdn.com/imgextra/i2/O1CN016iJ8ob1C3xP1s2M6z_!!6000000000026-2-tps-3008-1758.png"},
            {"text": "帮我打开浏览器。"}]
}]

response = dashscope.MultiModalConversation.call(
    api_key = os.getenv('DASHSCOPE_API_KEY'),
    model = 'gui-plus',
    messages = messages
)
print(response.output.choices[0].message.content[0]["text"])