You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-3Lines changed: 16 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@
4
4
> ⚠️OpenAI has deprecated all Engine-based APIs. See [Deprecated Endpoints](https://github.com/TheoKanning/openai-java#deprecated-endpoints) below for more info.
5
5
6
6
# OpenAI-Java
7
-
Java libraries for using OpenAI's GPT-3 api.
7
+
Java libraries for using OpenAI's GPT apis. Supports GPT-3, ChatGPT, and GPT-4.
8
8
9
9
Includes the following artifacts:
10
-
-`api` : request/response POJOs for the GPT-3 APIs.
11
-
-`client` : a basic retrofit client for the GPT-3 endpoints, includes the `api` module
10
+
-`api` : request/response POJOs for the GPT APIs.
11
+
-`client` : a basic retrofit client for the GPT endpoints, includes the `api` module
12
12
-`service` : A basic service class that creates and calls the client. This is the easiest way to get started.
Yes! GPT-4 uses the ChatCompletion Api, and you can see the latest model options [here](https://platform.openai.com/docs/models/gpt-4).
112
+
GPT-4 is currently in a limited beta (as of 4/1/23), so make sure you have access before trying to use it.
113
+
114
+
### Why am I getting connection timeouts?
115
+
Make sure that OpenAI is available in your country.
116
+
117
+
### Why doesn't OpenAiService support x configuration option?
118
+
Many projects use OpenAiService, and in order to support them best I've kept it extremely simple.
119
+
You can create your own OpenAiApi instance to customize headers, timeouts, base urls etc.
120
+
If you want features like retry logic and async calls, you'll have to make an `OpenAiApi` instance and call it directly instead of using `OpenAiService`
121
+
109
122
## Deprecated Endpoints
110
123
OpenAI has deprecated engine-based endpoints in favor of model-based endpoints.
111
124
For example, instead of using `v1/engines/{engine_id}/completions`, switch to `v1/completions` and specify the model in the `CompletionRequest`.
0 commit comments