OpenAI CUA (运营商)

操作员是为计算机使用代理 (CUA) 量身定制的专业代理模型。我们现在支持通过 Azure OpenAI API (AOAI) 调用。以下部分提供了关于如何使用 UFO 设置和使用 AOAI API 的全面指南。请注意,目前 AOAI 只支持 响应 API 来调用模型。

第一步

要使用 Azure OpenAI API,您需要在 Azure OpenAI 网站上创建一个帐户。创建帐户后,您可以部署 AOAI API 并获取 API 密钥。

第二步

获取 API 密钥后,您可以配置 config.yaml 文件(将 config_template.yaml 文件重命名为 config.yaml)中的 OPERATOR 以使用 Azure OpenAI API。以下是 Azure OpenAI API 的配置示例:

OPERATOR: {
  SCALER: [1024, 768], # The scaler for the visual input in a list format, [width, height]
  API_TYPE: "azure_ad" , # The API type, "openai" for the OpenAI API, "aoai" for the AOAI API, 'azure_ad' for the ad authority of the AOAI API.  
  API_MODEL: "computer-use-preview-20250311",  #"gpt-4o-mini-20240718", #"gpt-4o-20240513",  # The only OpenAI model by now that accepts visual input
  API_VERSION: "2025-03-01-preview", # "2024-02-15-preview" by default
  API_BASE: "<YOUR_ENDPOINT>", # The the OpenAI API endpoint, "https://api.openai.com/v1/chat/completions" for the OpenAI API. As for the AAD, it should be your endpoints.
}

如果您想使用 AAD 进行身份验证,您还应该设置以下配置:

    AAD_TENANT_ID: "YOUR_TENANT_ID", # Set the value to your tenant id for the llm model
    AAD_API_SCOPE: "YOUR_SCOPE", # Set the value to your scope for the llm model
    AAD_API_SCOPE_BASE: "YOUR_SCOPE_BASE" # Set the value to your scope base for the llm model, whose format is API://YOUR_SCOPE_BASE, and the only need is the YOUR_SCOPE_BASE

第三步

目前 UFO 只支持将 Operator 作为单个代理运行,或者作为可由 HostAgent 调用的单独 AppAgent 运行。有关如何在 UFO 中运行 Operator,请参阅文档

注意

操作员是一个仅视觉模型,其工作流程与其他模型不同。目前,它不支持重用 AppAgent 工作流程。有关如何在 UFO 中运行操作员,请参阅文档。