4
4
import com .microsoft .semantickernel .builders .SemanticKernelBuilder ;
5
5
import com .microsoft .semantickernel .orchestration .InvocationContext ;
6
6
import com .microsoft .semantickernel .semanticfunctions .KernelArguments ;
7
+ import edu .umd .cs .findbugs .annotations .SuppressFBWarnings ;
7
8
8
9
import javax .annotation .Nullable ;
9
10
12
13
*/
13
14
public class AgentInvokeOptions {
14
15
15
- private final KernelArguments KernelArguments ;
16
+ private final KernelArguments kernelArguments ;
16
17
private final Kernel kernel ;
17
18
private final String additionalInstructions ;
18
19
private final InvocationContext invocationContext ;
@@ -27,33 +28,53 @@ public AgentInvokeOptions() {
27
28
/**
28
29
* Constructor for AgentInvokeOptions.
29
30
*
30
- * @param KernelArguments The arguments for the kernel function.
31
+ * @param kernelArguments The arguments for the kernel function.
31
32
* @param kernel The kernel to use.
32
33
* @param additionalInstructions Additional instructions for the agent.
33
34
* @param invocationContext The invocation context.
34
35
*/
35
- public AgentInvokeOptions (@ Nullable KernelArguments KernelArguments ,
36
+ public AgentInvokeOptions (@ Nullable KernelArguments kernelArguments ,
36
37
@ Nullable Kernel kernel ,
37
38
@ Nullable String additionalInstructions ,
38
39
@ Nullable InvocationContext invocationContext ) {
39
- this .KernelArguments = KernelArguments ;
40
+ this .kernelArguments = kernelArguments != null ? kernelArguments . copy () : null ;
40
41
this .kernel = kernel ;
41
42
this .additionalInstructions = additionalInstructions ;
42
43
this .invocationContext = invocationContext ;
43
44
}
44
45
46
+ /**
47
+ * Get the kernel arguments.
48
+ *
49
+ * @return The kernel arguments.
50
+ */
45
51
public KernelArguments getKernelArguments () {
46
- return KernelArguments ;
52
+ return kernelArguments ;
47
53
}
48
54
55
+ /**
56
+ * Get the kernel.
57
+ *
58
+ * @return The kernel.
59
+ */
49
60
public Kernel getKernel () {
50
61
return kernel ;
51
62
}
52
63
64
+ /**
65
+ * Get additional instructions.
66
+ *
67
+ * @return The additional instructions.
68
+ */
53
69
public String getAdditionalInstructions () {
54
70
return additionalInstructions ;
55
71
}
56
72
73
+ /**
74
+ * Get the invocation context.
75
+ *
76
+ * @return The invocation context.
77
+ */
57
78
public InvocationContext getInvocationContext () {
58
79
return invocationContext ;
59
80
}
@@ -80,6 +101,7 @@ public static class Builder implements SemanticKernelBuilder<AgentInvokeOptions>
80
101
* @param kernelArguments The kernel arguments.
81
102
* @return The builder.
82
103
*/
104
+ @ SuppressFBWarnings ("EI_EXPOSE_REP2" )
83
105
public Builder withKernelArguments (KernelArguments kernelArguments ) {
84
106
this .kernelArguments = kernelArguments ;
85
107
return this ;
0 commit comments