58
58
* @author Mariusz Bernacki
59
59
* @author Thomas Vitale
60
60
* @author David Frizelle
61
+ * @author Alexandros Pappas
61
62
*/
62
63
public class OpenAiApi {
63
64
@@ -913,7 +914,8 @@ public record ChatCompletionRequest(// @formatter:off
913
914
@ JsonProperty ("tools" ) List <FunctionTool > tools ,
914
915
@ JsonProperty ("tool_choice" ) Object toolChoice ,
915
916
@ JsonProperty ("parallel_tool_calls" ) Boolean parallelToolCalls ,
916
- @ JsonProperty ("user" ) String user ) {
917
+ @ JsonProperty ("user" ) String user ,
918
+ @ JsonProperty ("reasoning_effort" ) String reasoningEffort ) {
917
919
918
920
/**
919
921
* Shortcut constructor for a chat completion request with the given messages, model and temperature.
@@ -925,7 +927,7 @@ public record ChatCompletionRequest(// @formatter:off
925
927
public ChatCompletionRequest (List <ChatCompletionMessage > messages , String model , Double temperature ) {
926
928
this (messages , model , null , null , null , null , null , null , null , null , null , null , null , null , null ,
927
929
null , null , null , false , null , temperature , null ,
928
- null , null , null , null );
930
+ null , null , null , null , null );
929
931
}
930
932
931
933
/**
@@ -939,7 +941,7 @@ public ChatCompletionRequest(List<ChatCompletionMessage> messages, String model,
939
941
this (messages , model , null , null , null , null , null , null ,
940
942
null , null , null , List .of (OutputModality .AUDIO , OutputModality .TEXT ), audio , null , null ,
941
943
null , null , null , stream , null , null , null ,
942
- null , null , null , null );
944
+ null , null , null , null , null );
943
945
}
944
946
945
947
/**
@@ -954,7 +956,7 @@ public ChatCompletionRequest(List<ChatCompletionMessage> messages, String model,
954
956
public ChatCompletionRequest (List <ChatCompletionMessage > messages , String model , Double temperature , boolean stream ) {
955
957
this (messages , model , null , null , null , null , null , null , null , null , null ,
956
958
null , null , null , null , null , null , null , stream , null , temperature , null ,
957
- null , null , null , null );
959
+ null , null , null , null , null );
958
960
}
959
961
960
962
/**
@@ -970,7 +972,7 @@ public ChatCompletionRequest(List<ChatCompletionMessage> messages, String model,
970
972
List <FunctionTool > tools , Object toolChoice ) {
971
973
this (messages , model , null , null , null , null , null , null , null , null , null ,
972
974
null , null , null , null , null , null , null , false , null , 0.8 , null ,
973
- tools , toolChoice , null , null );
975
+ tools , toolChoice , null , null , null );
974
976
}
975
977
976
978
/**
@@ -983,7 +985,7 @@ public ChatCompletionRequest(List<ChatCompletionMessage> messages, String model,
983
985
public ChatCompletionRequest (List <ChatCompletionMessage > messages , Boolean stream ) {
984
986
this (messages , null , null , null , null , null , null , null , null , null , null ,
985
987
null , null , null , null , null , null , null , stream , null , null , null ,
986
- null , null , null , null );
988
+ null , null , null , null , null );
987
989
}
988
990
989
991
/**
@@ -996,7 +998,7 @@ public ChatCompletionRequest streamOptions(StreamOptions streamOptions) {
996
998
return new ChatCompletionRequest (this .messages , this .model , this .store , this .metadata , this .frequencyPenalty , this .logitBias , this .logprobs ,
997
999
this .topLogprobs , this .maxTokens , this .maxCompletionTokens , this .n , this .outputModalities , this .audioParameters , this .presencePenalty ,
998
1000
this .responseFormat , this .seed , this .serviceTier , this .stop , this .stream , streamOptions , this .temperature , this .topP ,
999
- this .tools , this .toolChoice , this .parallelToolCalls , this .user );
1001
+ this .tools , this .toolChoice , this .parallelToolCalls , this .user , this . reasoningEffort );
1000
1002
}
1001
1003
1002
1004
/**
0 commit comments