|
1 | 1 | <div align="center"> |
2 | 2 |
|
3 | 3 | # ChatGPT Java API |
4 | | - [](https://central.sonatype.com/namespace/com.cjcrafter) |
| 4 | + [](https://central.sonatype.com/artifact/com.cjcrafter/openai) |
5 | 5 | [](https://openai.cjcrafter.com/) |
6 | 6 | [](https://github.com/CJCrafter/ChatGPT-Java-API/tree/master/examples/src/main) |
7 | 7 | [](https://github.com/CJCrafter/ChatGPT-Java-API/discussions) |
8 | 8 | [](https://github.com/CJCrafter/ChatGPT-Java-API/blob/master/LICENSE) |
9 | 9 |
|
10 | | -An unofficial, easy-to-use Java/Kotlin OpenAI API for ChatGPT, Text Completions, and more! |
| 10 | +An unofficial, easy-to-use Java/Kotlin OpenAI API for ChatGPT, Assistants, and more! |
11 | 11 | </div> |
12 | 12 |
|
13 | 13 | ## Features |
14 | | -* [Completions](https://platform.openai.com/docs/api-reference/completions) |
| 14 | +* [Completions](https://github.com/CJCrafter/ChatGPT-Java-API/blob/master/src/main/kotlin/com/cjcrafter/openai/OpenAI.kt#L44-L57) |
15 | 15 | * Streaming support via `OpenAI#streamCompletion` |
16 | | -* [Chat Completions](https://platform.openai.com/docs/api-reference/chat) |
| 16 | +* [Chat Completions](https://github.com/CJCrafter/ChatGPT-Java-API/blob/master/src/main/kotlin/com/cjcrafter/openai/OpenAI.kt#L84-L92) |
17 | 17 | * Streaming support via `OpenAI#streamChatCompletion` |
18 | 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 |
20 | | -* [Embeddings](https://platform.openai.com/docs/api-reference/embeddings) (New!) |
21 | | -* [Files](https://platform.openai.com/docs/api-reference/files) (New!) |
| 19 | + * [Azure Support](https://github.com/CJCrafter/ChatGPT-Java-API/blob/master/src/main/kotlin/com/cjcrafter/openai/OpenAI.kt#L271-L276) |
| 20 | +* [Embeddings](https://github.com/CJCrafter/ChatGPT-Java-API/blob/master/src/main/kotlin/com/cjcrafter/openai/OpenAI.kt#L113-L123) (New!) |
| 21 | +* [Files](https://github.com/CJCrafter/ChatGPT-Java-API/blob/master/src/main/kotlin/com/cjcrafter/openai/files/FileHandler.kt) (New!) |
| 22 | +* [Assistants](https://github.com/CJCrafter/ChatGPT-Java-API/blob/master/src/main/kotlin/com/cjcrafter/openai/assistants/AssistantHandler.kt) (New!) |
| 23 | + * Which includes [Threads](), [Runs](), and everything else you'll need to run your assistants! |
22 | 24 |
|
23 | 25 | ## Installation |
24 | 26 | For Kotlin DSL (`build.gradle.kts`), add this to your dependencies block: |
25 | 27 | ```kotlin |
26 | 28 | dependencies { |
27 | | - implementation("com.cjcrafter:openai:2.0.2") |
| 29 | + implementation("com.cjcrafter:openai:2.1.0") |
28 | 30 | } |
29 | 31 | ``` |
30 | 32 | For Maven projects, add this to your `pom.xml` file in the `<dependencies>` block: |
31 | 33 | ```xml |
32 | 34 | <dependency> |
33 | 35 | <groupId>com.cjcrafter</groupId> |
34 | 36 | <artifactId>openai</artifactId> |
35 | | - <version>2.0.2</version> |
| 37 | + <version>2.1.0</version> |
36 | 38 | </dependency> |
37 | 39 | ``` |
38 | | -See the [maven repository](https://central.sonatype.com/artifact/com.cjcrafter/openai/2.0.2) for gradle/ant/etc. |
| 40 | +See the [maven repository](https://central.sonatype.com/artifact/com.cjcrafter/openai/2.1.0) for gradle/ant/etc. |
39 | 41 |
|
40 | 42 |
|
41 | 43 | ## Working Example |
@@ -131,4 +133,4 @@ If I have saved you time, please consider [sponsoring me](https://github.com/spo |
131 | 133 |
|
132 | 134 | ## License |
133 | 135 | ChatGPT-Java-API is an open-sourced software licensed under the [MIT License](https://github.com/CJCrafter/ChatGPT-Java-API/blob/master/LICENSE). |
134 | | -**This is an unofficial library, and is not affiliated with OpenAI**. |
| 136 | +**This is an unofficial library, and is not affiliated with OpenAI**. |
0 commit comments