mirror of
https://github.com/openai/codex.git
synced 2026-05-02 20:32:04 +03:00
Return image URL from view_image tool (#15072)
Cleanup image semantics in code mode.
`view_image` now returns `{image_url:string, details?: string}`
`image()` now allows both string parameter and `{image_url:string,
details?: string}`
This commit is contained in:
@@ -980,7 +980,21 @@ fn create_view_image_tool(can_request_original_image_detail: bool) -> ToolSpec {
|
||||
required: Some(vec!["path".to_string()]),
|
||||
additional_properties: Some(false.into()),
|
||||
},
|
||||
output_schema: None,
|
||||
output_schema: Some(serde_json::json!({
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"image_url": {
|
||||
"type": "string",
|
||||
"description": "Data URL for the loaded image."
|
||||
},
|
||||
"detail": {
|
||||
"type": ["string", "null"],
|
||||
"description": "Image detail hint returned by view_image. Returns `original` when original resolution is preserved, otherwise `null`."
|
||||
}
|
||||
},
|
||||
"required": ["image_url", "detail"],
|
||||
"additionalProperties": false
|
||||
})),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user