44import com .microsoft .semantickernel .builders .SemanticKernelBuilder ;
55import com .microsoft .semantickernel .orchestration .InvocationContext ;
66import com .microsoft .semantickernel .semanticfunctions .KernelArguments ;
7+ import edu .umd .cs .findbugs .annotations .SuppressFBWarnings ;
78
89import javax .annotation .Nullable ;
910
1213 */
1314public class AgentInvokeOptions {
1415
15- private final KernelArguments KernelArguments ;
16+ private final KernelArguments kernelArguments ;
1617 private final Kernel kernel ;
1718 private final String additionalInstructions ;
1819 private final InvocationContext invocationContext ;
@@ -27,33 +28,53 @@ public AgentInvokeOptions() {
2728 /**
2829 * Constructor for AgentInvokeOptions.
2930 *
30- * @param KernelArguments The arguments for the kernel function.
31+ * @param kernelArguments The arguments for the kernel function.
3132 * @param kernel The kernel to use.
3233 * @param additionalInstructions Additional instructions for the agent.
3334 * @param invocationContext The invocation context.
3435 */
35- public AgentInvokeOptions (@ Nullable KernelArguments KernelArguments ,
36+ public AgentInvokeOptions (@ Nullable KernelArguments kernelArguments ,
3637 @ Nullable Kernel kernel ,
3738 @ Nullable String additionalInstructions ,
3839 @ Nullable InvocationContext invocationContext ) {
39- this .KernelArguments = KernelArguments ;
40+ this .kernelArguments = kernelArguments != null ? kernelArguments . copy () : null ;
4041 this .kernel = kernel ;
4142 this .additionalInstructions = additionalInstructions ;
4243 this .invocationContext = invocationContext ;
4344 }
4445
46+ /**
47+ * Get the kernel arguments.
48+ *
49+ * @return The kernel arguments.
50+ */
4551 public KernelArguments getKernelArguments () {
46- return KernelArguments ;
52+ return kernelArguments ;
4753 }
4854
55+ /**
56+ * Get the kernel.
57+ *
58+ * @return The kernel.
59+ */
4960 public Kernel getKernel () {
5061 return kernel ;
5162 }
5263
64+ /**
65+ * Get additional instructions.
66+ *
67+ * @return The additional instructions.
68+ */
5369 public String getAdditionalInstructions () {
5470 return additionalInstructions ;
5571 }
5672
73+ /**
74+ * Get the invocation context.
75+ *
76+ * @return The invocation context.
77+ */
5778 public InvocationContext getInvocationContext () {
5879 return invocationContext ;
5980 }
@@ -80,6 +101,7 @@ public static class Builder implements SemanticKernelBuilder<AgentInvokeOptions>
80101 * @param kernelArguments The kernel arguments.
81102 * @return The builder.
82103 */
104+ @ SuppressFBWarnings ("EI_EXPOSE_REP2" )
83105 public Builder withKernelArguments (KernelArguments kernelArguments ) {
84106 this .kernelArguments = kernelArguments ;
85107 return this ;
0 commit comments