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 3
3
import com .azure .ai .openai .models .ChatCompletionsToolDefinition ;
4
4
import com .azure .ai .openai .models .ChatCompletionsToolSelection ;
5
5
import com .microsoft .semantickernel .functionchoice .FunctionChoiceBehaviorOptions ;
6
+ import edu .umd .cs .findbugs .annotations .SuppressFBWarnings ;
6
7
7
8
import javax .annotation .Nullable ;
9
+ import java .util .Collections ;
8
10
import java .util .List ;
9
11
10
12
public class OpenAIToolCallConfig {
@@ -21,6 +23,7 @@ public class OpenAIToolCallConfig {
21
23
* @param autoInvoke Indicates whether to automatically invoke the tool.
22
24
* @param options Additional options for function choice behavior.
23
25
*/
26
+ @ SuppressFBWarnings ("EI_EXPOSE_REP2" )
24
27
public OpenAIToolCallConfig (
25
28
List <ChatCompletionsToolDefinition > tools ,
26
29
ChatCompletionsToolSelection toolChoice ,
@@ -38,7 +41,7 @@ public OpenAIToolCallConfig(
38
41
* @return The list of tools.
39
42
*/
40
43
public List <ChatCompletionsToolDefinition > getTools () {
41
- return tools ;
44
+ return Collections . unmodifiableList ( tools ) ;
42
45
}
43
46
44
47
/**
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public abstract class FunctionChoiceBehavior {
19
19
protected final List <KernelFunction <?>> functions ;
20
20
protected final FunctionChoiceBehaviorOptions options ;
21
21
22
- protected FunctionChoiceBehavior (List <KernelFunction <?>> functions ,
22
+ protected FunctionChoiceBehavior (@ Nullable List <KernelFunction <?>> functions ,
23
23
@ Nullable FunctionChoiceBehaviorOptions options ) {
24
24
this .functions = functions != null ? Collections .unmodifiableList (functions ) : null ;
25
25
this .fullFunctionNames = new HashSet <>();
You can’t perform that action at this time.
0 commit comments