How to get the API to read a csv?

I need to get the API to read a .csv of products and then generate output based on them.

This is possible with the chat interface. How do I do it within the API?

Thanks

You need to programmatically extract the content from the csv and then add the file content as context to your (user) prompt.

Ah OK thanks for the reply anyway.

Thats interesting. So there’s still some things the interface can do a lot better.

For a huge CSV I’d imagine it could get pricey. No problem and thanks again.

Convert CSV to JSON then use OpenAI Assistant API’s to do retrieval-augmented generation, mean retrieve content from the files. Example video on OpenAI Assistant API v2. Documentation on Assistant API