Reputation: 21
I'm trying to create a support bot.
When I try to use OpenAI I always get the following error:
Rate limit reached for text-embedding-ada-002 in organization org-xxxxxxxxxxxxxxxxxxxxx on requests per min (RPM): Limit 3, Used 3, Requested 1.
I think this is because I didn't set my organization ID from the paid Team subscription, where the rate limit shouldn't be reached.
How can I set the organization ID?
Upvotes: 2
Views: 2301
Reputation: 23060
As stated in the official OpenAI documentation:
Users who belong to multiple organizations can pass a header to specify which organization is used for an API request. Usage from these API requests will count against the specified organization's quota. If no header is provided, the default organization will be billed. You can change your default organization in your user settings.
from openai import OpenAI
client = OpenAI(
organization = 'org-xxxxxxxxxxxxxxxxxxxxxxx',
)
import OpenAI from "openai";
const openai = new OpenAI({
organization: 'org-xxxxxxxxxxxxxxxxxxxxxxx',
});
curl https://api.openai.com/v1/models \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "OpenAI-Organization: org-xxxxxxxxxxxxxxxxxxxxxxx"
Upvotes: 2