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
*[Azure OpenAI](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference) support via `AzureOpenAI` class
17
+
* Streaming support via `OpenAI#streamChatCompletion`
18
+
* Functions support, check out the [java examples](https://github.com/CJCrafter/ChatGPT-Java-API/blob/master/examples/src/main/java/chat/StreamChatCompletionFunction.java#L49) and [kotlin examples](https://github.com/CJCrafter/ChatGPT-Java-API/blob/master/examples/src/main/kotlin/chat/StreamChatCompletionFunction.kt#L37)
19
+
*[Azure OpenAI](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference) support via `AzureOpenAI` class
17
20
18
21
## Installation
19
22
For Kotlin DSL (`build.gradle.kts`), add this to your dependencies block:
20
23
```kotlin
21
24
dependencies {
22
-
implementation("com.cjcrafter:openai:1.3.1")
25
+
implementation("com.cjcrafter:openai:2.0.0")
23
26
}
24
27
```
25
28
For Maven projects, add this to your `pom.xml` file in the `<dependencies>` block:
26
29
```xml
27
30
<dependency>
28
31
<groupId>com.cjcrafter</groupId>
29
32
<artifactId>openai</artifactId>
30
-
<version>1.3.1</version>
33
+
<version>2.0.0</version>
31
34
</dependency>
32
35
```
33
-
See the [maven repository](https://central.sonatype.com/artifact/com.cjcrafter/openai/1.3.1) for gradle/ant/etc.
36
+
See the [maven repository](https://central.sonatype.com/artifact/com.cjcrafter/openai/2.0.0) for gradle/ant/etc.
34
37
35
38
36
39
## Working Example
37
-
This is a basic working example. To see more features in action (async calls, streaming)
38
-
see the [java examples](https://github.com/CJCrafter/ChatGPT-Java-API/wiki/Java)
39
-
and [kotlin examples](https://github.com/CJCrafter/ChatGPT-Java-API/wiki/Kotlin)
40
+
This is a simple working example of the ChatGPT API in Java:
0 commit comments