I’m running the API and I’m getting the following errors:
HTTP Code: 500 Result: Error: 400 Can't add messages to thread_xxxxxxxxxx while a run run_xxxxxxxxxx is active.
How can I get around this? I tried retries, timeouts, but nothing helps run seems to “stick” for a while. Is there any way to save thread_id but try in another run? Tell me how do you solve this? I have been suffering for a few days now. Thanks!
Can you please tell me if my thread thread_id will be saved when cancel run? I know that for me the option is to send a message to a new thread, but then I will lose the history of the message with the user.
You continue to add to a thread by attaching it to an assistant run and then running based on a user input.
You can also pull down the thread with “list messages” and see what’s in it. I expect that if failed, a user/assistant pair would not have been added. It should just have the user message that you previously added. You can correct what combination of documents, functions, code interpreter was causing it to wait for more input or iterating for hundreds of steps, and submit the user input again.
Or return back to chatcompletion and write your own code that is not out of control…
Fortunately for those that don’t program, assistants have about 30 different methods to all choreograph in concert with code.
It’s a Rube Goldberg machine of silliness.
When you have to whip up some new script for the fail or edge cases, that doesn’t bode well for making a user interface for it - as well as having no idea what the bill would be.
Whereas chat completion, you can stuff it with just 10 past conversation turns (now that hitting a context limit would be very hard, but assistants tries to hit that limit anyway), inject your own embeddings database that is just what is relevant, and start getting tokens displayed in two seconds.
If you need an AI to act as an independent agent to make dozens of calls to functions, or to be loaded up with thousands of words of documentation, to check back later and get an answer, it might be a solution for an AI that can be a number-crunching code-interpreting crumb-nuncher that finally gives a better answer than the 0-shot AI alone, but it is neither a “less code easy solution” nor a product you could offer as an API developer that is cost-conscious, or to satisfy someone that just wants to chat with a robot.
That is, if I do an undo RUN, the dialog will only remember 10 subsequent conversations and then stop remembering the context (conversation history). Right?
At first I was really very happy for the Assistants API then just when I was about to implement and remove the Completion codebase I had set up. There just popped a lot of unanswered questions that don’t have their answers in the docs or anywhere. I came across a Community post that seems to highlight all those major questions. It seems by leaving the chat completion where we have full control to Assistants API we acknowledge that OpenAI should just come up with their own version of input and output tokens: Why is it that I can’t set the max token I need used up for a call?
Initially these questions didn’t come to mind, just popped yesterday when I wanted to set up for the Assistants API and leave the Chat Completion. I don’t have any problem with hooking their endpoint to delete older message so at any point a thread only has a total of number of conversion arrays I need it to have. I don’t have issues with that or the Retrieval tool, the problem I have is OpenAI not providing the control over token usage. Having chosen GPT-4 Turbo 128K doesn’t mean I want threads to consume upto that amount without me setting the tokens from my end like I would do with Chat Completion.
Maybe this will be addressed in the future updates to the beta Assistants API but for now it’s just not worth it pushing to production.
But I can’t work on the API at all Tell me do you work on the API? Are you having any problems?
Now I’m getting another error How do I get around this? Are there any options available? I created a bot that can’t communicate because of errors and I’m losing money
At first I was getting the error “run is active”. Now I get another error