Replies: 2 comments 9 replies
-
|
The "Invalid context structure" error usually means the file input passed to the Gemini OCR node doesn't match the strict format Dify expects. For Gemini and other multimodal models, Dify requires the file variable to be set as an Common fixes are: make sure your file input variable is configured as an array of files ( If your workflow already uses To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
I have always set the upload file of the starting node to Array[File], but it still gives an error. Is there any other reason for the error? I just used cloudflare to create a temporary link, but it still gives an error:Run failed: Invalid context structure: dify_model_identity='dify__file' id=None tenant_id='f621c54e-93e7-433d-a5e0-f7b4617b7c08' type=<FileType.DOCUMENT: 'document'> transfer_method=<FileTransferMethod.LOCAL_FILE: 'local_file'> remote_url='https://updates-alan-peripherals-thursday.trycloudflare.com/files/6a3b1523-2a8e-4764-99c2-ef74d59e69b9/file-preview?timestamp=1761575233&nonce=957e0063d75cacf52932fdb0e3e98f1e&sign=NiOBnO-2zJxV1GZBqhUl7kG6J2Gjs5pWEnt2TjoCmpc%3D' related_id='6a3b1523-2a8e-4764-99c2-ef74d59e69b9' filename='01-10.pdf' extension='.pdf' mime_type='application/pdf' size=8221329 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
My workflow is to upload a PDF file at the start node and then let Google Gemini's API do the OCR recognition. However, during the actual runtime, an error message is displayed:
Run failed: Invalid context structure: dify_model_identity='dify__file' id=None tenant_id='f621c54e-93e7-433d-a5e0-f7b4617b7c08' type=<FileType.DOCUMENT: 'document'> transfer_method=<FileTransferMethod.LOCAL_FILE: 'local_file'> remote_url='/files/7f9bbf11-15f2-4578-8794-6e8cf23a8e17/file-preview?timestamp=1761548582&nonce=b399870dbb11543f51c74781ca5aa92b&sign=xOVIGIwquACbZCcYRRMxcmh_hr06X14QkyT7eMrNmO4%3D' related_id='7f9bbf11-15f2-4578-8794-6e8cf23a8e17' filename='01-10.pdf' extension='.pdf' mime_type='application/pdf' size=8221329
2. Additional context or comments
The model's APIs have been correctly configured.





The configuration of the start node and gemini node is as follows.
Beta Was this translation helpful? Give feedback.
All reactions