Unable to continue thread for Follow Ups

I have been consistently facing issue using Assistans Api in run-api. When execute run-api for the first time i got no issues but when i get back to it for follow up , some internal error occurs 90-95% .
Why is it doing so.
attaching reference

1 Like

What’s happening is the AI is writing code that won’t work right, over and over, on your dime. Costing you not just what you see, but all the previous conversation and previous code the AI wrote.

You can tell AI in instructions that if a single python call results in error, it must halt the attempts and performing the task, and instead go to a mode where it solely diagnoses the failure, creating extended logging and verbose error collection into files to be read, listing all its library modules with versions to ensure they support the methods that were written etc, test other file type creation in the mount point using reliable methods, etc, and deliver a full diagnostic report with discovery of the issue so that it can be avoided in future instructions.

I got your point here about " halting the attempts ". I just tried multiple run-api one after other just to see the response that it might get back with some real answer.
But why assistant is unable to continue the thread, whats the point of like technical error most of the time after first successful run .
if first time it runs successfully and output me a file then what’s happening later if i wanted corrections and continue a thread,

If the AI was, for example assuming all the time, that some excelmagic module was available in the API when it wasn’t, or if it is writing methods to use an excel document creator that were three years out of date from the module in the python sandbox, then you could discover what the AI is doing wrong, and add corrections to future instructions.
“You aren’t pretrained to know the modules available in python, you must list them all first”.
or “don’t use the show() or display() method for images, the user must be given a download link”
The goal while you are creating your assistant is to create a reliable one.