Custom GPTs: Retrieve remote files (csv, xlsx, pdf etc)

Has anyone managed to make Custom GPTs retrieve remote files to be used for the code interpreter? E.g. retrieve a fresh csv from an endpoint declared in the Openapi.json schema for function calls?

  • code interpreter has blocked remote requests
  • function calls return responses as strings that it can use in the code interpreter (very inefficient!)

Thankful for any pointers that can help me build my use-case :slight_smile:

4 Likes

The problem when retrieving a remote file is that it’s processed as a text response and not ‘saved’ as a file in the chat storage. (First image below)

When using the code interpreter, it needs to recall the ‘text’ response and plug in the data ‘manually’ (Second image below)

Ideally I’d like the Custom GPT function call to retrieve the file and store it as a file that it can access from the code interpreter. Any thoughts or examples of achieving this?

2 Likes

Saving files to disk within an OpenAI custom action can be a bit complex, as these actions typically operate within a constrained environment where direct filesystem access (like writing a file to disk) may not be supported or could be limited. The capabilities for file handling in an OpenAI custom action depend on the specific environment and permissions set by OpenAI.

It looks like you can’t save files to disk yet.