Ошибка: RetryError[<Future at 0x28e44f21cd0 state=finished raised TypeError>]

Everything was working, but then abruptly stopped working. There were no changes in the code during this period of time (10 minutes).

import openai # Open Ai
from keys import open_ai_key # Ключ Open ai
from openai import OpenAI
import time

from tenacity import (
	retry,
	stop_after_attempt,
	wait_random_exponential,
) 


client = OpenAI(api_key=f"{open_ai_key}")


@retry(wait=wait_random_exponential(min=1, max=3), stop=stop_after_attempt(6))
def open_ai(text, promt):

	thread = client.beta.threads.create()

	message = client.beta.threads.messages.create(
		thread_id=thread.id,
		role="user",
		content=f"{text}"
	)

	run = client.beta.threads.runs.create(
		thread_id=thread.id,
		assistant_id=' ',
	)


	time.sleep(30)

	run = client.beta.threads.runs.retrieve(
		thread_id=thread.id,
		run_id=run.id
	)

	messages = client.beta.threads.messages.list(
		thread_id=thread.id
	)

	answer_bot_in_user = ""
	
	for message in reversed(messages.data):
		answer_bot = message.content[0].text.value
		answer_bot_in_user += answer_bot


	return answer_bot