Computer 提供方
面向负责配置此服务的管理员。请使用具有下述权限的账户。
添加 Computer 提供方
Section titled “添加 Computer 提供方”Computer 提供方是你在一个运行沙箱的服务上的账户。
curl -H "Authorization: Bearer $OPENBOT_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name":"Sandboxes","credentials":{"kind":"e2b","apiKey":"e2b_..."}}' \ https://api.example.com/v1/computer-providers| 类型 | 字段 | 它是什么 |
|---|---|---|
e2b |
apiKey、apiUrl、sandboxDomain |
任何使用 E2B API 的服务:E2B、PPIO、阿里云 Bot Sandbox,或你自己的 E2B。对 E2B 以外的服务,请设置 apiUrl 和 sandboxDomain。 |
daytona |
apiKey、apiUrl、target |
Daytona,托管的或你自己的。target 是区域,例如 us 或 eu。 |
OpenBot 在保存密钥之前,会先向提供方检查它。密钥永远不会再被取出。API 只显示它的最后几个字符。发送
"shared": true 可以创建组织共享的提供方。
GET /v1/computer-providers 列出你的提供方和共享的提供方。GET、PATCH 和
DELETE /v1/computer-providers/:providerId
读取、修改和删除一个提供方。还有 Computer 在使用某个提供方时,你不能删除它。
文件调用中的路径不存在时,会返回
404 ComputerPathNotFound。其他提供商故障仍返回
502 ComputerProviderFailed。删除仍有 Computer 的提供商时,会返回
409 ComputerProviderInUse。连接器使用协议版本 3。失败响应中,路径不存在使用
reason: "NotFound",其他失败使用 reason: "Failed"。