From 9f16cb00d88d6de234008556976f9d8117da5122 Mon Sep 17 00:00:00 2001 From: Amethyst C <37189157+AlphaSerpentis@users.noreply.github.com> Date: Sun, 2 Jul 2023 16:30:50 -0500 Subject: [PATCH 1/2] Added Audio to the API list in the README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0fab095b..1824b5e5 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ as well as an example project using the service. - [Chat Completions](https://platform.openai.com/docs/api-reference/chat/create) - [Edits](https://platform.openai.com/docs/api-reference/edits) - [Embeddings](https://platform.openai.com/docs/api-reference/embeddings) +- [Audio](https://platform.openai.com/docs/api-reference/audio) - [Files](https://platform.openai.com/docs/api-reference/files) - [Fine-tunes](https://platform.openai.com/docs/api-reference/fine-tunes) - [Images](https://platform.openai.com/docs/api-reference/images) From de086d10e08eaaf8cc47d6114603b9032592d8ba Mon Sep 17 00:00:00 2001 From: Amethyst C <37189157+AlphaSerpentis@users.noreply.github.com> Date: Wed, 20 Sep 2023 10:42:18 -0500 Subject: [PATCH 2/2] README cleanup Updated info on GPT-4 and did some cleanup --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 20a5dcb8..4a8478e6 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,14 @@ > ⚠️OpenAI has deprecated all Engine-based APIs. See [Deprecated Endpoints](https://github.com/TheoKanning/openai-java#deprecated-endpoints) below for more info. # OpenAI-Java -Java libraries for using OpenAI's GPT apis. Supports GPT-3, ChatGPT, and GPT-4. +Java libraries for using OpenAI's APIs. Supports GPT-3.5, GPT-4, and more. Includes the following artifacts: - `api` : request/response POJOs for the GPT APIs. -- `client` : a basic retrofit client for the GPT endpoints, includes the `api` module -- `service` : A basic service class that creates and calls the client. This is the easiest way to get started. +- `client` : a basic Retrofit client for the GPT endpoints, includes the `api` module +- `service` : a basic service class that creates and calls the client. This is the easiest way to get started. -as well as an example project using the service. +As well as an example project using the service. ## Supported APIs - [Models](https://platform.openai.com/docs/api-reference/models) @@ -49,7 +49,7 @@ If you want to make your own client, just import the POJOs from the `api` module Your client will need to use snake case to work with the OpenAI API. ### Retrofit client -If you're using retrofit, you can import the `client` module and use the [OpenAiApi](client/src/main/java/com/theokanning/openai/OpenAiApi.java). +If you're using Retrofit, you can import the `client` module and use the [OpenAiApi](client/src/main/java/com/theokanning/openai/OpenAiApi.java). You'll have to add your auth token as a header (see [AuthenticationInterceptor](client/src/main/java/com/theokanning/openai/AuthenticationInterceptor.java)) and set your converter factory to use snake case and only include non-null fields. @@ -166,7 +166,7 @@ If you want to shut down your process immediately after streaming responses, cal This is not necessary for non-streaming calls. ## Running the example project -All the [example](example/src/main/java/example/OpenAiApiExample.java) project requires is your OpenAI api token +All the [example](example/src/main/java/example/OpenAiApiExample.java) project requires is your OpenAI API token ```bash export OPENAI_TOKEN="sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ``` @@ -185,8 +185,8 @@ Or functions with 'stream' mode enabled: ## FAQ ### Does this support GPT-4? -Yes! GPT-4 uses the ChatCompletion Api, and you can see the latest model options [here](https://platform.openai.com/docs/models/gpt-4). -GPT-4 is currently in a limited beta (as of 4/1/23), so make sure you have access before trying to use it. +Yes! GPT-4 uses the ChatCompletion API, and you can see the latest model options [here](https://platform.openai.com/docs/models/gpt-4). +As of September 20th, 2023, GPT-4 access is granted to all API users who have made a successful payment of $1 or more. ### Does this support functions? Absolutely! It is very easy to use your own functions without worrying about doing the dirty work.