mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-28 16:38:17 -05:00
fix(blocks): use for_external_api when base_64=True in AgentFileInputBlock
Same fix as FileStoreBlock - for_block_output can return workspace:// in CoPilot, for_external_api guarantees data URI. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -470,10 +470,10 @@ class AgentFileInputBlock(AgentInputBlock):
|
||||
return
|
||||
|
||||
# Determine return format based on user preference
|
||||
# for_block_output: returns workspace:// if available, else data URI
|
||||
# for_external_api: always returns data URI (base64) - honors "Produce Base64 Output"
|
||||
# for_local_processing: returns local file path
|
||||
return_format = (
|
||||
"for_block_output" if input_data.base_64 else "for_local_processing"
|
||||
"for_external_api" if input_data.base_64 else "for_local_processing"
|
||||
)
|
||||
|
||||
yield "result", await store_media_file(
|
||||
|
||||
Reference in New Issue
Block a user