Hi,
I’m trying to get a result from an Assistant API via PHP using CURL
I’ve manged to add a message and create a run. The last response from a run command has ’ [status] => completed’ in it but the response is not appended to the end of it.
The end of the response is has [first_id] => run_ktDR3igEM42KeoxPZCqo1jCM [last_id] => run_ktDR3igEM42KeoxPZCqo1jCM [has_more] => ) at the end.
How do I get the result back from the API?
I’ve tried:
$apiResponseURL = ‘https://api.openai.com/v1/threads/{$threadId}/messages’;
$apiResponse = makeCurlRequest($pollUrl, ‘GET’, , $apiKey);
But again I only get up to [has_more] => , no results.
Hi,
Yes all is good.
Plenty python examples but PHP seems much more rare. There is a GitHub repository to help but I like knowing how the nuts and bolts work. Your CURL function was very similar to mine so didn’t need much adjusting.
Thanks again.
AI has already been used extensively in the creative arts side to create text/marketing but now I can ask my database to create more customer, product and order information and statistics than was ever possible unless you live and breath SQL.
Sales guys can now ask for anything to help locate an order, product or customer.
Our E-commerce site is all PHP as are most i would have thought.
I can now ask for individual product sales data with respect to customer location, date etc.
I’m an old assembler and C++ programmer but even I got out my pit to learn ‘new’ tech like API calls and JSON formatting.
I’m so old I still own an ZX80- and can read morse code at 30 words a minute but even I can see the impending revolution AI is about to create…
ChatGPT not too reliable for code suggestions on the assistants api yet it seems as the tech is all so new.