I am trying to use the assistants API to analyze a file that is uploaded to my openAI account like below:
my_assistant = client.beta.assistants.create(
instructions=(
"You are an expert automotive tester. "
"Analyze the provided document (referenced by the file_id) and generate a new document "
"with the test requirements in INCOSE standard format. "
“Do not convert or extract the file content manually—use the file resource directly.”
),
name=“Automotive Tester”,
tools=[{“type”: “code_interpreter”}],
model=“gpt-4o-mini”,
tool_resources={‘code_interpreter’:{‘file_ids’: [file_id]}},
)
However, it always responds with the “rate-limit-exceeded” error. For more context, the file size is 8kb and the no. of tokens = ~881 (as checked with the openAI tokenizer tool)
print(run_details.last_error)
LastError(code=‘rate_limit_exceeded’, message=‘Rate limit reached for gpt-4o-mini in organization org-2RQnDPzb2UiP1DHtpLfoGlhS on tokens per min (TPM): Limit 100000, Used 91022, Requested 16606. Please try again in 54h55m17.76s. Visit https://platform.openai.com/account/rate-limits to learn more. You can increase your rate limit by adding a payment method to your account at https://platform.openai.com/account/billing.’).
I tried waiting for the time mentioned before, but when I try again, I get the same error.
How do I resolve this?