mgtaskiran
mgtaskiran2mo ago

mgtaskiran - I'm still encountering the same is...

I'm still encountering the same issue with the OpenAI API error message. Despite canceling all the running threads, the error persists in the console. Does anyone have insights on how to resolve this?
No description
13 Replies
Gaurav Chadha
Gaurav Chadha2mo ago
@mgtaskiran Could you try by creating a new AssistantID?
mgtaskiran
mgtaskiranOP2mo ago
@Gaurav Chadha thanks for reaching out, I will try it and see if it works.. looks like this is very common problem.. ai assistant gets stuck as soon as given nodes cant figure it out for the requested information.. I also found temp way to solve the problem by deleting the theardID in the database so that I can keep working on other tasks..
robertics2
robertics22mo ago
If this is related to using the OpenAI API, a 400 error could indicate a malformed request, such as sending data in an incorrect format or to a wrong endpoint.
mgtaskiran
mgtaskiranOP2mo ago
I tried creating a new one, but it didn't work. This issue arises when attempting to send multiple tasks to OpenAI, especially when using various tools or node functions for complex tasks.
mgtaskiran
mgtaskiranOP2mo ago
Yes, that's correct. I'm using the default OpenAI assistant node built into Buildship. I didn’t modify the logic, but it seems that active runs need to be canceled before starting another one under the same threadID. I checked online, and it looks like others are facing this issue as well. I tried modifying the OpenAI logic to implement cancel runs within the pollForUpdate, but I encountered errors during the process.
No description
mgtaskiran
mgtaskiranOP2mo ago
OpenAI Developer Forum
Error 400: already has an active run
Hi, I am getting an Error 400 when using the Assistants API: Error code: 400 - {‘error’: {‘message’: ‘Thread thread_daOMx7ESOdqQBP12345678910 already has an active run run_Md123456789F8oA206vDAgi5.’, ‘type’: ‘invalid_request_error’, ‘param’: None, ‘code’: None}} The error occurs after the creation of the thread, just executing the run. threa...
OpenAI Developer Forum
How to delete a pending run in Assistants?
Should a run be waiting for tool_output, it takes 10 minutes before to expire. In that time it is not possible to fire another run in that thread. It would be very usefull to delete pending run in a thread expecially when debugging threads with assistants using functions tool. Is there a way to kill the pending run (without delete a thread)?
robertics2
robertics22mo ago
You can solve that by using async/await functions. You will be run the next task after previous one has finished.
mgtaskiran
mgtaskiranOP2mo ago
do you have code example, I can implement it? @robertics2 i was working on it, could not figure it out.. much apricate it if you can provide the sample.. @Gaurav Chadha shouldn't that be default for AI assistant node? what do you think?
robertics2
robertics22mo ago
could you share your code related those parts?
mgtaskiran
mgtaskiranOP2mo ago
I am using default ai assistant node built-in
robertics2
robertics22mo ago
I think the problem seems to be in the wrong use of Promise.all function. it waits for all the promises to be finished but not sure each promise is executed after previous one has finished. you should have to execute one after one has finished. It is not difficult for you, I think. I hope this help you.
mgtaskiran
mgtaskiranOP2mo ago
I made changes the way you suggested, but still having the same issue.. @robertics2

Did you find this page helpful?