diff --git a/README.md b/README.md index 0345e632..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: 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: diff --git a/docs/src/frequently_asked_questions.md b/docs/src/frequently_asked_questions.md index 00ccf6d4..3b7a1acb 100644 --- a/docs/src/frequently_asked_questions.md +++ b/docs/src/frequently_asked_questions.md @@ -83,6 +83,13 @@ If you want to avoid this error, you have two options: end ``` +## Getting the error "429 Too Many Requests"? +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 OpenAI allows you to set spending limits directly on your account dashboard to prevent unexpected costs. @@ -407,4 +414,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). diff --git a/docs/src/getting_started.md b/docs/src/getting_started.md index c445ca7d..7f13da88 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. 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. 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.