upload_file
method uploads a file to Narada cloud, making it available for use as an attachment in subsequent agent
requests. This is particularly useful for document analysis, data extraction, and any task where the agent needs to process file content.
Uploaded files are temporarily stored and expire after 24 hours. Files can only be accessed by the user who uploaded them.
Method Signature
Parameters
A file object opened in binary read mode. The file can be any format supported by the agent (PDF, images, documents, etc.).
Return Value
Returns aFile
object that can be passed to the agent
method’s attachment
parameter.
Example
For a complete example showing file attachments with structured data extraction, see the File Attachments example in the
agent
documentation.