File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
spring-ai-core/src/main/java/org/springframework/ai/model/function Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,9 @@ public FunctionCallingOptionsBuilder withFunctions(Set<String> functions) {
61
61
62
62
public FunctionCallingOptionsBuilder withFunction (String function ) {
63
63
Assert .notNull (function , "Function must not be null" );
64
- this .options .getFunctions ().add (function );
64
+ var set = new HashSet <>(this .options .getFunctions ());
65
+ set .add (function );
66
+ this .options .setFunctions (set );
65
67
return this ;
66
68
}
67
69
@@ -131,7 +133,7 @@ public PortableFunctionCallingOptions build() {
131
133
return this .options ;
132
134
}
133
135
134
- public static class PortableFunctionCallingOptions implements FunctionCallingOptions , ChatOptions {
136
+ public static class PortableFunctionCallingOptions implements FunctionCallingOptions {
135
137
136
138
private List <FunctionCallback > functionCallbacks = new ArrayList <>();
137
139
You can’t perform that action at this time.
0 commit comments