From de64acd095f80da53ba53b604d89c2c6b3988af6 Mon Sep 17 00:00:00 2001 From: KronosTheLate <61620837+KronosTheLate@users.noreply.github.com> Date: Wed, 17 Apr 2024 16:23:06 +0200 Subject: [PATCH 1/6] Mention that you have to pay in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0345e632..5d09d669 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ PromptingTools.jl is not meant for building large-scale systems. It's meant to b Getting started with PromptingTools.jl is as easy as importing the package and using the `@ai_str` macro for your questions. -Note: You will need to set your OpenAI API key as an environment variable before using PromptingTools.jl (see the [Creating OpenAI API Key](#creating-openai-api-key) section below). +Note: You will need to set your OpenAI API key as an environment variable before using PromptingTools.jl (see the [Creating OpenAI API Key](#creating-openai-api-key) section below). Note also that your OpenAI account has to be funded to access the OpenAI API. For a quick start, simply set it via `ENV["OPENAI_API_KEY"] = "your-api-key"` Install PromptingTools: From 93181c33d4285372dcd9c70053a42c1aaf749539 Mon Sep 17 00:00:00 2001 From: KronosTheLate <61620837+KronosTheLate@users.noreply.github.com> Date: Wed, 17 Apr 2024 16:25:35 +0200 Subject: [PATCH 2/6] Mention that the account required fundin in docs --- docs/src/getting_started.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/src/getting_started.md b/docs/src/getting_started.md index c445ca7d..d63defbd 100644 --- a/docs/src/getting_started.md +++ b/docs/src/getting_started.md @@ -11,8 +11,9 @@ CurrentModule = PromptingTools You will need to register with OpenAI and generate an API key: 1. Create an account with [OpenAI](https://platform.openai.com/signup) -2. Go to [API Key page](https://platform.openai.com/account/api-keys) -3. Click on “Create new secret key” +2. Fund your account. If not, requests you send will recieve an error +3. Go to [API Key page](https://platform.openai.com/account/api-keys) +4. Click on “Create new secret key” !!! Do not share it with anyone and do NOT save it to any files that get synced online. Resources: @@ -97,4 +98,4 @@ Pro tip: Use `asyncmap` to run multiple AI-powered tasks concurrently. Pro tip: If you use slow models (like GPT-4), you can use the asynchronous version of `@ai_str` -> `@aai_str` to avoid blocking the REPL, eg, `aai"Say hi but slowly!"gpt4` (similarly `@ai!_str` -> `@aai!_str` for multi-turn conversations). -For more practical examples, see the [Various Examples](@ref) section. \ No newline at end of file +For more practical examples, see the [Various Examples](@ref) section. From ad511fabddb648a2e16abf675561512e9d49c47c Mon Sep 17 00:00:00 2001 From: KronosTheLate <61620837+KronosTheLate@users.noreply.github.com> Date: Fri, 19 Apr 2024 08:34:33 +0200 Subject: [PATCH 3/6] More detail in setp-by-step Co-authored-by: J S <49557684+svilupp@users.noreply.github.com> --- docs/src/getting_started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/getting_started.md b/docs/src/getting_started.md index d63defbd..7f13da88 100644 --- a/docs/src/getting_started.md +++ b/docs/src/getting_started.md @@ -11,7 +11,7 @@ CurrentModule = PromptingTools You will need to register with OpenAI and generate an API key: 1. Create an account with [OpenAI](https://platform.openai.com/signup) -2. Fund your account. If not, requests you send will recieve an error +2. Go to [Account Billing](https://platform.openai.com/account/billing) and buy some credits (prepayment, minimum $5). Your account must have credits for the API access to work. 3. Go to [API Key page](https://platform.openai.com/account/api-keys) 4. Click on “Create new secret key” !!! Do not share it with anyone and do NOT save it to any files that get synced online. From 8ccfa181ba99c8e736d91c8e1cd0df2e0c64cb5e Mon Sep 17 00:00:00 2001 From: KronosTheLate <61620837+KronosTheLate@users.noreply.github.com> Date: Fri, 19 Apr 2024 09:03:14 +0200 Subject: [PATCH 4/6] Add reference to error in the FAQ section --- docs/src/frequently_asked_questions.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/src/frequently_asked_questions.md b/docs/src/frequently_asked_questions.md index 00ccf6d4..c65786d1 100644 --- a/docs/src/frequently_asked_questions.md +++ b/docs/src/frequently_asked_questions.md @@ -83,6 +83,9 @@ If you want to avoid this error, you have two options: end ``` +## Getting the error "429 Too Many Requests"? +This error has been reported, along with the message "You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors". It was concluded that this was because the account in question was not funded, which meant that the "current quota" was zero. Unlike using [ChatGPT online](chat.openai.com/), it is not free to access ChatGPT via the OpenAI API. Note however that each request is cheap, and that it might make sense to pay a few cents or dollars for the online service. + ## Setting OpenAI Spending Limits OpenAI allows you to set spending limits directly on your account dashboard to prevent unexpected costs. @@ -407,4 +410,4 @@ Fine-tuning is a powerful technique to adapt a model to your specific use case ( 2. Once the finetuning time comes, create a bundle of ShareGPT-formatted conversations (common finetuning format) in a single `.jsonl` file. Use `PT.save_conversations("dataset.jsonl", [conversation1, conversation2, ...])` (notice that plural "conversationS" in the function name). -For an example of an end-to-end finetuning process, check out our sister project [JuliaLLMLeaderboard Finetuning experiment](https://github.com/svilupp/Julia-LLM-Leaderboard/blob/main/experiments/cheater-7b-finetune/README.md). It shows the process of finetuning for half a dollar with [JarvisLabs.ai](https://jarvislabs.ai/templates/axolotl) and [Axolotl](https://github.com/OpenAccess-AI-Collective/axolotl). \ No newline at end of file +For an example of an end-to-end finetuning process, check out our sister project [JuliaLLMLeaderboard Finetuning experiment](https://github.com/svilupp/Julia-LLM-Leaderboard/blob/main/experiments/cheater-7b-finetune/README.md). It shows the process of finetuning for half a dollar with [JarvisLabs.ai](https://jarvislabs.ai/templates/axolotl) and [Axolotl](https://github.com/OpenAccess-AI-Collective/axolotl). From 229485eeeff31b0d0928d1f6262c8cedb82ace90 Mon Sep 17 00:00:00 2001 From: KronosTheLate <61620837+KronosTheLate@users.noreply.github.com> Date: Fri, 19 Apr 2024 09:05:07 +0200 Subject: [PATCH 5/6] Update README.md Co-authored-by: J S <49557684+svilupp@users.noreply.github.com> --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d09d669..8c9893b8 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,9 @@ PromptingTools.jl is not meant for building large-scale systems. It's meant to b Getting started with PromptingTools.jl is as easy as importing the package and using the `@ai_str` macro for your questions. -Note: You will need to set your OpenAI API key as an environment variable before using PromptingTools.jl (see the [Creating OpenAI API Key](#creating-openai-api-key) section below). Note also that your OpenAI account has to be funded to access the OpenAI API. +Note: You will need to set your OpenAI API key as an environment variable before using PromptingTools.jl (see the [Creating OpenAI API Key](#creating-openai-api-key) section below). + +Following the introduction of [Prepaid Billing](https://help.openai.com/en/articles/8264644-what-is-prepaid-billing), you'll need to buy some credits to get started ($5 minimum). For a quick start, simply set it via `ENV["OPENAI_API_KEY"] = "your-api-key"` Install PromptingTools: From 79a1994fbd55b8e7cca9ba2a0c0eac43d6d492fd Mon Sep 17 00:00:00 2001 From: J S <49557684+svilupp@users.noreply.github.com> Date: Sat, 20 Apr 2024 11:37:40 +0100 Subject: [PATCH 6/6] Update docs/src/frequently_asked_questions.md --- docs/src/frequently_asked_questions.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/src/frequently_asked_questions.md b/docs/src/frequently_asked_questions.md index c65786d1..3b7a1acb 100644 --- a/docs/src/frequently_asked_questions.md +++ b/docs/src/frequently_asked_questions.md @@ -84,7 +84,11 @@ If you want to avoid this error, you have two options: ``` ## Getting the error "429 Too Many Requests"? -This error has been reported, along with the message "You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors". It was concluded that this was because the account in question was not funded, which meant that the "current quota" was zero. Unlike using [ChatGPT online](chat.openai.com/), it is not free to access ChatGPT via the OpenAI API. Note however that each request is cheap, and that it might make sense to pay a few cents or dollars for the online service. +Assuming you have not just sent hundreds of requests, this error might be related to insufficient "credits" in your account balance. + +See the error message. If it says "You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors", you'll need to re-charge your account balance. Visit [Billing overview](https://platform.openai.com/settings/organization/billing/overview). + +Please note that, unlike ChatGPT, OpenAI API is NOT free. However, individual requests are extremely cheap (eg, tenth of a cent), so if you charge $5, it might last you up to hundreds of requests (depending on the models and prompts). ## Setting OpenAI Spending Limits