Upload file, process (by completion) and download

Hi. Is there a way to send back modified file in separated messages?

I’m working on tool for automated folder/files processing, that there is an easy way make a prompt for ChatGPT to add extra tags for filename before code block to parse it and retrieve several files as completion result (works almost perfect in 3.5-turbo, but not bullet proof :frowning: - maybe GPT4 will be better).

Example: Summary in response[‘choices’][0], first processed file content in response[‘choices’][1], …

BTW, I have noticed there is no API for file upload except ‘fine-tune’ purpose, but don’t expect completion can use that file content based in id (I admit I didn’t check). Is there working way for doing this using OpenAI?

2 Likes

There’s no uploading to an API model. Especially not putting raw files into the AI context. You send prompt language. They’ve not been trained on binaries.

“Choices” is for multiple generations with the same input. You only get variation in the choices when you use default (high) temperature.

Here’s an example of the best you can expect gpt-3.5-turbo to do, for both file contents and your idea of “adding tags”, at the limit where that new model then starts to ignore your system instructions.

3 Likes