phaseo:apply_patch。Phaseo 会校验该操作并返回给客户端,但不会修改文件系统或代码库。
phaseo:apply_patch is available on /v1/responses.请求
操作结构
模型调用该工具时,会发送一个操作对象:工具结果
Phaseo 会将验证后的操作返回模型循环:用量与定价
Phaseo 会记录:server_tool_apply_patch_requests 计量项对此计费。
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
让 Responses 模型返回经过验证的补丁操作。
phaseo:apply_patch。Phaseo 会校验该操作并返回给客户端,但不会修改文件系统或代码库。
phaseo:apply_patch is available on /v1/responses.curl https://api.phaseo.app/v1/responses \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5-nano",
"input": "Create a small README patch for this project.",
"tools": [
{ "type": "phaseo:apply_patch" }
]
}'
{
"operation": {
"type": "update_file",
"path": "/README.md",
"diff": "@@ ...\n-Old text\n+New text\n"
}
}
| 类型 | 必填字段 |
|---|---|
create_file | path, diff |
update_file | path, diff |
delete_file | path |
{
"status": "completed",
"operation": {
"type": "update_file",
"path": "/README.md",
"diff": "@@ ...\n-Old text\n+New text\n"
},
"message": "Patch operation validated. The client must apply or reject this patch and report the result."
}
{
"usage": {
"server_tool_use": {
"apply_patch_requests": 1
}
}
}
server_tool_apply_patch_requests 计量项对此计费。