Best way to handle attachments when streaming responses

Hi,

What is the best way to handle attachments when streaming a response.

The model will respond like this “…You can download the CSV file containing these projections from the link below: Download projected_revenue.csv…”, but this link doesn’t work.

Currently I am storing the file in the cloud by getting the file id and retrieving the data in the backend, then appending another link source at the end of the stream with a proper link (so doubling up the link).

What is the proper way to handle this?

Thanks a lot

1 Like