Try to experiment open AI

Hey All,

I’m novice to open AI and excited to learn through a journey. I’m following the below git hub page to explore AI with java, Spring boot. Open-AI … After implementing I didn’t succeed at least with a single request to openAI. Now I’m getting “OpenAiApi$OpenAiApiClientErrorException: 429 - ResponseError[error=Error[message=You exceeded your current quota, please check your plan and billing details.”

I read further on the payments and free tier layer to know more about. I would like to know since I’m in the experimental phase should I make payment at this stage but I didn’t make any successful request to the API. Can someone add more clarity to my question please? How to check is my monthly or daily over? May I get some resources to read about why we need to make rest request to the openAI for building llm apps? Does the openAI builds the data model and provide instruction the application on how to respond to the user queries?

Any clarity or questions on my understanding is much appreciated …

1 Like

The above error indicates that your API account is unfunded. There are neither free trial credits available (which expire 3 months after OpenAI account creation), nor is their a prepaid credit balance to draw from.

You can check out the pricing page to see what you’ll be paying per call and per data consumption when you interact with different AI models.

Then you’ll need to make the initial purchase of credits after adding a payment method. It may take a little while for the source of funding to go through after purchase, and then the API will either have new errors to debug - or you’ll have an AI that talks to you.

1 Like

Ok Thanks for responding. Could you explain what request will the developer has to make with openAI frequently? Is the open AI generated ideas and provide the app requesting? What interaction will happen between the user app and openAI?

1 Like

You send a question or a task for the AI to perform.

The AI answers with its ability to write novel compositions and answer from its pretrained knowledge.

For example, I “program” the AI with a system message that tells it to be a helpful expert on OpenAI, and tell it a bit more of the new credit system than it can know about.

Then I send your user questions as the second message within the request:

Welcome to OpenAI! I’m glad to hear about your enthusiasm for learning and experimenting with AI.

To answer your first question, the error code 429 you’re seeing means that you’ve exceeded your current quota. This quota is based on the number of tokens (units of text) that your API calls consume. Even if your requests were unsuccessful, they still consume tokens and count towards your quota. As a new user, you must purchase credits to pay for your use of the API.

To check your usage, you can refer to the OpenAI Dashboard. It provides detailed information about your token usage and quota.

As for why you need to make REST requests to OpenAI for building Language Learning Model (LLM) apps, it’s because OpenAI’s models are hosted on their servers. When you make a request, you’re asking OpenAI’s model to perform a task, like generating text. The model doesn’t reside on your local machine, so you need to communicate with it via REST requests.

Regarding your second question, the type of requests a developer makes to OpenAI depends on the specific use case. Commonly, developers make requests to generate text, complete prompts, or translate text. The interaction between a user’s app and OpenAI typically involves the app sending a prompt to OpenAI, OpenAI’s model generating a response based on that prompt, and then the app displaying that response to the user.

For example, if you’re building a chatbot, your app might send a user’s message as a prompt to OpenAI. OpenAI’s model would then generate a response, which your app would display to the user.

I hope this clarifies your questions. If you have any more, feel free to ask!