1 Send Request**: When you send a request to the OpenAI API, store the necessary information to track it (e.g., request ID).
2 Disconnect**: After sending the request, disconnect or close the connection. This ensures you aren’t maintaining unnecessary open connections.
3 Polling**: Set up a polling system to periodically check the status of your request. You can check every 30 seconds, 1 minute, etc., depending on your needs. The poller can call a backend service to see if the OpenAI API has returned a response yet.
4 Retrieve Results**: Once the request is complete, retrieve the results and send them back to the client.
yes. all of it. you can check the assistants api.