Skip to content

Commit

Permalink
Merge pull request #240 from Grt1228/1.1.5
Browse files Browse the repository at this point in the history
feature 1.1.5 Bug Fix
  • Loading branch information
Grt1228 authored Dec 5, 2023
2 parents fa7b33b + 4e0704e commit a105435
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ WebSocket参考:[OpenAIWebSocketEventSourceListener](https://github.com/Grt122
- 支持全部OpenAI的Api

# 📑 更新日志
- [x] 1.1.4 Bug Fix
- [x] 1.1.5 Bug Fix
- [x] 1.1.3 支持Assistant、Run、Thread、Message Api。测试案例[OpenAiClientTest](https://github.com/Grt1228/chatgpt-java/blob/develop/src/test/java/com/unfbx/chatgpt/v1_1_3/OpenAiClientTest.java)
- [x] 1.1.2-beta0 支持附加图片的ChatCompletion、指定返回数据格式、Tool Call、Dall-e-3生成图片、FineTuneJob、文本转语音TTS。官方文档示例:[chatgpt-java.unfbx.com](https://chatgpt-java.unfbx.com/docs/category/-%E6%A0%B8%E5%BF%83%E5%8A%9F%E8%83%BD) 。测试案例[OpenAiClientTest](https://github.com/Grt1228/chatgpt-java/blob/develop/src/test/java/com/unfbx/chatgpt/v1_1_2/OpenAiClientTest.java)
- [x] 1.1.1-beta0 function call改成GPT插件模式调用更加简单的调用方式.参考实现[PluginTest](https://github.com/Grt1228/chatgpt-java/blob/develop/src/test/java/com/unfbx/chatgpt/PluginTest.java)
Expand Down
2 changes: 1 addition & 1 deletion README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ WebSocket Reference:[OpenAIWebSocketEventSourceListener](https://github.com/Gr
- Supports all OpenAI APIs.

# 📑 Update Log
- [x] 1.1.4 Bug Fix
- [x] 1.1.5 Bug Fix
- [x] 1.1.3 Upgrade to support Assistant、Run、Thread、Message Api. eg: [OpenAiClientTest](https://github.com/Grt1228/chatgpt-java/blob/develop/src/test/java/com/unfbx/chatgpt/v1_1_3/OpenAiClientTest.java)
- [x] 1.1.2-beta0 Upgrade to support chat completion with picture GPT-4V、return JSON model、Tool Call、Dall-e-3、Fine Tune Job、TTS.
- [x] 1.1.1-beta0 function call update to GPT plugin model, so easy use the plugin api. eg: [PluginTest](https://github.com/Grt1228/chatgpt-java/blob/develop/src/test/java/com/unfbx/chatgpt/PluginTest.java)
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.unfbx</groupId>
<artifactId>chatgpt-java</artifactId>
<version>1.1.4</version>
<version>1.1.5</version>
<name>chatgpt-java</name>
<description>OpenAI Java SDK, OpenAI Api for Java. ChatGPT Java SDK .</description>
<url>https://chatgpt-java.unfbx.com</url>
Expand Down Expand Up @@ -116,7 +116,7 @@
<dependency>
<groupId>com.knuddels</groupId>
<artifactId>jtokkit</artifactId>
<version>0.5.0</version>
<version>0.6.1</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/unfbx/chatgpt/OpenAiApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Single<ImageResponse> variationsImages(@Part() MultipartBody.Part image,
*
* @return Single OpenAiResponse File
*/
@GET("/v1/files")
@GET("v1/files")
Single<OpenAiResponse<File>> files();

/**
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/unfbx/chatgpt/utils/TikTokensUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ public class TikTokensUtil {
modelMap.put(ChatCompletion.Model.GPT_3_5_TURBO_0613.getName(), registry.getEncodingForModel(ModelType.GPT_3_5_TURBO));
modelMap.put(ChatCompletion.Model.GPT_3_5_TURBO_16K.getName(), registry.getEncodingForModel(ModelType.GPT_3_5_TURBO));
modelMap.put(ChatCompletion.Model.GPT_3_5_TURBO_16K_0613.getName(), registry.getEncodingForModel(ModelType.GPT_3_5_TURBO));
modelMap.put(ChatCompletion.Model.GPT_3_5_TURBO_1106.getName(), registry.getEncodingForModel(ModelType.GPT_3_5_TURBO));
modelMap.put(ChatCompletion.Model.GPT_4_32K.getName(), registry.getEncodingForModel(ModelType.GPT_4));
modelMap.put(ChatCompletion.Model.GPT_4_32K_0314.getName(), registry.getEncodingForModel(ModelType.GPT_4));
modelMap.put(ChatCompletion.Model.GPT_4_0314.getName(), registry.getEncodingForModel(ModelType.GPT_4));
modelMap.put(ChatCompletion.Model.GPT_4_0613.getName(), registry.getEncodingForModel(ModelType.GPT_4));
modelMap.put(ChatCompletion.Model.GPT_4_32K_0613.getName(), registry.getEncodingForModel(ModelType.GPT_4));
modelMap.put(ChatCompletion.Model.GPT_4_1106_PREVIEW.getName(), registry.getEncodingForModel(ModelType.GPT_4));
modelMap.put(ChatCompletion.Model.GPT_4_VISION_PREVIEW.getName(), registry.getEncodingForModel(ModelType.GPT_4));
}

/**
Expand Down

0 comments on commit a105435

Please sign in to comment.