Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

stevelaracasts's avatar

openai api threads, how are you handling getting back the responses?

I'm just wonder what methods you are using to get long (time wise reponses) from openai's api.

I've created and assistant with instructions to extract data from an uploaded file!

I'm sending my data to my assistant via a cron job and have tried using streaming to get the response back, but I'm concerned about delays and error handling.

What I was thinking was creating the thread, then exiting and having another cron job check for completed jobs and return the responses from completed jobs!

Is this a good option or is there a better way?

0 likes
0 replies

Please or to participate in this conversation.