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) {
6161
6262 public FunctionCallingOptionsBuilder withFunction (String function ) {
6363 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 );
6567 return this ;
6668 }
6769
@@ -131,7 +133,7 @@ public PortableFunctionCallingOptions build() {
131133 return this .options ;
132134 }
133135
134- public static class PortableFunctionCallingOptions implements FunctionCallingOptions , ChatOptions {
136+ public static class PortableFunctionCallingOptions implements FunctionCallingOptions {
135137
136138 private List <FunctionCallback > functionCallbacks = new ArrayList <>();
137139
You can’t perform that action at this time.
0 commit comments