File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
src/main/java/com/plexpt/chatgpt/entity/chat Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public class ChatCompletion implements Serializable {
3131
3232 @ NonNull
3333 @ Builder .Default
34- private String model = Model .GPT_3_5_TURBO .getName ();
34+ private String model = Model .GPT_3_5_TURBO_0613 .getName ();
3535
3636 @ NonNull
3737 private List <Message > messages ;
Original file line number Diff line number Diff line change 11package com .plexpt .chatgpt .entity .chat ;
22
33import com .fasterxml .jackson .annotation .JsonInclude ;
4+ import com .fasterxml .jackson .annotation .JsonProperty ;
5+
46import lombok .AllArgsConstructor ;
57import lombok .Builder ;
68import lombok .Data ;
@@ -23,6 +25,9 @@ public class Message {
2325 private String content ;
2426 private String name ;
2527
28+ @ JsonProperty ("function_call" )
29+ private String functionCall ;
30+
2631 public Message (String role , String content ) {
2732 this .role = role ;
2833 this .content = content ;
@@ -42,14 +47,21 @@ public static Message ofAssistant(String content) {
4247
4348 return new Message (Role .ASSISTANT .getValue (), content );
4449 }
45-
50+
51+ public static Message ofFunction (String function ) {
52+
53+ return new Message (Role .FUNCTION .getValue (), function );
54+ }
55+
4656 @ Getter
4757 @ AllArgsConstructor
4858 public enum Role {
4959
5060 SYSTEM ("system" ),
5161 USER ("user" ),
5262 ASSISTANT ("assistant" ),
63+
64+ FUNCTION ("function" ),
5365 ;
5466 private String value ;
5567 }
You can’t perform that action at this time.
0 commit comments