If you decide to go with the Chat Completion architecture, this is a flowchart for ONE way to do it:
And, if you’re still interested, a video tutorial: https://www.youtube.com/watch?v=Ix9WIZpArm0&ab_channel=Chatwithdata
But, as mentioned before, this is NOT the Assistants API. It is the ChatCompletion API.
It is my understanding that you can also do what you want to do with the Assistants API.