File processing in Chat API

Hello, does Chat API support file processing or it’s only available in the Assistant API? For example, instead of creating Assistants / Threads, is there a way to upload let’s say Excel or PowerPoint and then reference it in the chat message? Or even better, include it with the template somehow (perhaps base-64 encoded)?

Thank you in advance!

I don’t think so. And interpreting/extracting data from a powerpoint probably requires a Code Interpreter session which will soon be $0.03 per session.

Maybe if the file can be exported locally as plaintext JSON or CSV, that text could be passed along to ChatAPI as part of the context, without needing Code Interpreter.

Thank you for taking a look, SomeUser2022! Yeah, looks like it will get costly pretty soon. It also looks like file endpoints are not accepting Excel files currently - blow up with

	"error": {
		"message": "Invalid file format. Supported formats: ['c', 'cpp', 'csv', 'docx', 'html', 'java', 'json', 'md', 'pdf', 'php', 'pptx', 'py', 'rb', 'tex', 'txt', 'css', 'jpeg', 'jpg', 'js', 'gif', 'png', 'tar', 'ts', 'xlsx', 'xml', 'zip']",
		"type": "invalid_request_error",
		"param": null,
		"code": null

I am pretty sure I saw something about powerpoint in the third party tool I am using for the WebApi. Also there is this.

This is great, thank you @talldaniel !

The .xlsx extension is Excel, right? ugh let me post, openai

That’s correct, .xlsx extension… Turns out related to the complexity of the Excel file - simple Excel files are loaded just fine (e.g. sample form Microsoft, but larger (~25 pages) with formulas and sheet cross-references are producing that error. Perhaps that is by-design, though strange that a cutting edge tool as ChatGPT with a heavy presence of Microsoft is blowing up on an Excel file…

1 Like