mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-28 08:28:00 -05:00
fix(blocks): use for_external_api when base_64=True in FileStoreBlock
for_block_output can return workspace:// in CoPilot, violating the "Produce Base64 Output" promise. for_external_api guarantees data URI. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -50,10 +50,10 @@ class FileStoreBlock(Block):
|
||||
**kwargs,
|
||||
) -> BlockOutput:
|
||||
# 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 "file_out", await store_media_file(
|
||||
|
||||
Reference in New Issue
Block a user