File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
aiservices/openai/src/main/java/com/microsoft/semantickernel/aiservices/openai/chatcompletion
semantickernel-api/src/main/java/com/microsoft/semantickernel/functionchoice Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 33import com .azure .ai .openai .models .ChatCompletionsToolDefinition ;
44import com .azure .ai .openai .models .ChatCompletionsToolSelection ;
55import com .microsoft .semantickernel .functionchoice .FunctionChoiceBehaviorOptions ;
6+ import edu .umd .cs .findbugs .annotations .SuppressFBWarnings ;
67
78import javax .annotation .Nullable ;
9+ import java .util .Collections ;
810import java .util .List ;
911
1012public class OpenAIToolCallConfig {
@@ -21,6 +23,7 @@ public class OpenAIToolCallConfig {
2123 * @param autoInvoke Indicates whether to automatically invoke the tool.
2224 * @param options Additional options for function choice behavior.
2325 */
26+ @ SuppressFBWarnings ("EI_EXPOSE_REP2" )
2427 public OpenAIToolCallConfig (
2528 List <ChatCompletionsToolDefinition > tools ,
2629 ChatCompletionsToolSelection toolChoice ,
@@ -38,7 +41,7 @@ public OpenAIToolCallConfig(
3841 * @return The list of tools.
3942 */
4043 public List <ChatCompletionsToolDefinition > getTools () {
41- return tools ;
44+ return Collections . unmodifiableList ( tools ) ;
4245 }
4346
4447 /**
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public abstract class FunctionChoiceBehavior {
1919 protected final List <KernelFunction <?>> functions ;
2020 protected final FunctionChoiceBehaviorOptions options ;
2121
22- protected FunctionChoiceBehavior (List <KernelFunction <?>> functions ,
22+ protected FunctionChoiceBehavior (@ Nullable List <KernelFunction <?>> functions ,
2323 @ Nullable FunctionChoiceBehaviorOptions options ) {
2424 this .functions = functions != null ? Collections .unmodifiableList (functions ) : null ;
2525 this .fullFunctionNames = new HashSet <>();
You can’t perform that action at this time.
0 commit comments