Skip to content

Commit c91dca7

Browse files
committed
0613
1 parent 7dcc0b4 commit c91dca7

File tree

4 files changed

+68
-14
lines changed

4 files changed

+68
-14
lines changed

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,20 @@ OpenAI ChatGPT 的SDK。觉得不错请右上角Star
3030

3131
# 功能特性
3232

33-
| 功能 | 特性 |
34-
| :---------: | :------: |
33+
| 功能 | 特性 |
34+
|:-----------:| :------: |
3535
| GPT 3.5 | 支持 |
3636
| GPT 4.0 | 支持 |
37+
| GPT 3.5-16k | 支持 |
3738
| GPT 4.0-32k | 支持 |
38-
| 流式对话 | 支持 |
39-
| 阻塞式对话 | 支持 |
40-
| 前端 ||
41-
| 上下文 | 支持 |
42-
| 计算Token | [用jtokkit](https://github.com/knuddelsgmbh/jtokkit) |
43-
| 多KEY轮询 | 支持 |
44-
| 代理 | 支持 |
45-
| 反向代理 | 支持 |
39+
| 流式对话 | 支持 |
40+
| 阻塞式对话 | 支持 |
41+
| 前端 ||
42+
| 上下文 | 支持 |
43+
| 计算Token | [用jtokkit](https://github.com/knuddelsgmbh/jtokkit) |
44+
| 多KEY轮询 | 支持 |
45+
| 代理 | 支持 |
46+
| 反向代理 | 支持 |
4647

4748

4849

@@ -65,13 +66,13 @@ maven
6566
<dependency>
6667
<groupId>com.github.plexpt</groupId>
6768
<artifactId>chatgpt</artifactId>
68-
<version>4.0.8</version>
69+
<version>4.1.0</version>
6970
</dependency>
7071
```
7172

7273
gradle
7374
```
74-
implementation group: 'com.github.plexpt', name: 'chatgpt', version: '4.0.8'
75+
implementation group: 'com.github.plexpt', name: 'chatgpt', version: '4.1.0'
7576
```
7677

7778

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.github.plexpt</groupId>
77
<artifactId>chatgpt</artifactId>
8-
<version>4.0.8</version>
8+
<version>4.1.0</version>
99
<name>chatgpt</name>
1010
<description>ChatGPT4.0、 ChatGPT Java SDK.</description>
1111
<url>https://chat.plexpt.com</url>

src/main/java/com/plexpt/chatgpt/entity/chat/ChatCompletion.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.fasterxml.jackson.annotation.JsonInclude;
44
import com.fasterxml.jackson.annotation.JsonProperty;
5+
import com.plexpt.chatgpt.util.TokensUtil;
56

67
import java.io.Serializable;
78
import java.util.List;
@@ -14,7 +15,6 @@
1415
import lombok.NoArgsConstructor;
1516
import lombok.NonNull;
1617
import lombok.extern.slf4j.Slf4j;
17-
import com.plexpt.chatgpt.util.TokensUtil;
1818

1919
/**
2020
* chat
@@ -53,6 +53,11 @@ public class ChatCompletion implements Serializable {
5353
private double topP = 0.9;
5454

5555

56+
@Builder.Default
57+
String function_call = "auto";
58+
59+
List<ChatFunction> functions;
60+
5661
/**
5762
* 结果数。
5863
*/
@@ -102,6 +107,8 @@ public enum Model {
102107
* gpt-3.5-turbo
103108
*/
104109
GPT_3_5_TURBO("gpt-3.5-turbo"),
110+
GPT_3_5_TURBO_0613("gpt-3.5-turbo-0613"),
111+
GPT_3_5_TURBO_16K("gpt-3.5-turbo-16k"),
105112
/**
106113
* 临时模型,不建议使用
107114
*/
@@ -114,10 +121,18 @@ public enum Model {
114121
* 临时模型,不建议使用
115122
*/
116123
GPT_4_0314("gpt-4-0314"),
124+
/**
125+
* 支持函数
126+
*/
127+
GPT_4_0613("gpt-4-0613"),
117128
/**
118129
* GPT4.0 超长上下文
119130
*/
120131
GPT_4_32K("gpt-4-32k"),
132+
/**
133+
* GPT4.0 超长上下文
134+
*/
135+
GPT_4_32K_0613("gpt-4-32k-0613"),
121136
/**
122137
* 临时模型,不建议使用
123138
*/
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package com.plexpt.chatgpt.entity.chat;
2+
3+
4+
import com.fasterxml.jackson.annotation.JsonInclude;
5+
6+
import java.util.List;
7+
8+
import lombok.AllArgsConstructor;
9+
import lombok.Builder;
10+
import lombok.Data;
11+
import lombok.NoArgsConstructor;
12+
13+
@Data
14+
@AllArgsConstructor
15+
@NoArgsConstructor
16+
@Builder
17+
@JsonInclude(JsonInclude.Include.NON_NULL)
18+
public class ChatFunction {
19+
20+
String name;
21+
String description;
22+
23+
ChatParameter parameters;
24+
25+
26+
@Data
27+
@AllArgsConstructor
28+
@NoArgsConstructor
29+
@Builder
30+
@JsonInclude(JsonInclude.Include.NON_NULL)
31+
public static class ChatParameter {
32+
33+
String type;
34+
List<String> required;
35+
Object properties;
36+
}
37+
38+
}

0 commit comments

Comments
 (0)