openai.BadRequestError: Error code: 400 - {‘error’: {‘message’: “Can’t add messages to thread_Dm7GT6iJ6Bu1dI7E140IBj7m while a run run_AGu3weUdD0v9IkPjInPl9UvA is active.”, ‘type’: ‘invalid_request_error’, ‘param’: None, ‘code’: None}}
You can’t creat a new run or add messages to a thread that’s currently running (active). It’s stated in the DOC. Just find ways of ensuring you don’t create a run to a thread whose run hasn’t yet completed
but it shows all list that is completed or cancelled. how we keep track that any run is active or not because if any run is active for a track it generate an error all time