You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.Net: Add support for agent specific params (#11201)
### Motivation and Context
We should support agent specific parameters on the concrete agent
implementations for invoke.
### Description
Add support for agent specific params
### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
Copy file name to clipboardexpand all lines: dotnet/src/Agents/Abstractions/Agent.cs
+2-2
Original file line number
Diff line number
Diff line change
@@ -180,7 +180,7 @@ public virtual IAsyncEnumerable<AgentResponseItem<StreamingChatMessageContent>>
180
180
/// <param name="thread">The conversation thread to continue with this invocation. If not provided, creates a new thread.</param>
181
181
/// <param name="options">Optional parameters for agent invocation.</param>
182
182
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
183
-
/// <returns>An async list of response items that each contain a <see cref="ChatMessageContent"/> and an <see cref="AgentThread"/>.</returns>
183
+
/// <returns>An async list of response items that each contain a <see cref="StreamingChatMessageContent"/> and an <see cref="AgentThread"/>.</returns>
184
184
/// <remarks>
185
185
/// To continue this thread in the future, use an <see cref="AgentThread"/> returned in one of the response items.
186
186
/// </remarks>
@@ -202,7 +202,7 @@ public virtual IAsyncEnumerable<AgentResponseItem<StreamingChatMessageContent>>
202
202
/// <param name="thread">The conversation thread to continue with this invocation. If not provided, creates a new thread.</param>
203
203
/// <param name="options">Optional parameters for agent invocation.</param>
204
204
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
205
-
/// <returns>An async list of response items that each contain a <see cref="ChatMessageContent"/> and an <see cref="AgentThread"/>.</returns>
205
+
/// <returns>An async list of response items that each contain a <see cref="StreamingChatMessageContent"/> and an <see cref="AgentThread"/>.</returns>
206
206
/// <remarks>
207
207
/// To continue this thread in the future, use an <see cref="AgentThread"/> returned in one of the response items.
/// Invoke the agent with the provided message and arguments.
164
+
/// </summary>
165
+
/// <param name="messages">The messages to pass to the agent.</param>
166
+
/// <param name="thread">The conversation thread to continue with this invocation. If not provided, creates a new thread.</param>
167
+
/// <param name="options">Optional parameters for agent invocation.</param>
168
+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
169
+
/// <returns>An async list of response items that each contain a <see cref="ChatMessageContent"/> and an <see cref="AgentThread"/>.</returns>
170
+
/// <remarks>
171
+
/// To continue this thread in the future, use an <see cref="AgentThread"/> returned in one of the response items.
/// Invoke the agent with the provided message and arguments.
263
+
/// </summary>
264
+
/// <param name="messages">The messages to pass to the agent.</param>
265
+
/// <param name="thread">The conversation thread to continue with this invocation. If not provided, creates a new thread.</param>
266
+
/// <param name="options">Optional parameters for agent invocation.</param>
267
+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
268
+
/// <returns>An async list of response items that each contain a <see cref="StreamingChatMessageContent"/> and an <see cref="AgentThread"/>.</returns>
269
+
/// <remarks>
270
+
/// To continue this thread in the future, use an <see cref="AgentThread"/> returned in one of the response items.
/// Gets or sets the additional messages to add to the thread.
67
+
/// </summary>
68
+
/// <remarks>
69
+
/// Only supports messages with <see href="https://platform.openai.com/docs/api-reference/runs/createRun#runs-createrun-additional_messages">role = User or Assistant</see>.
/// Gets or sets a value that indicates whether the code_interpreter tool is enabled.
75
+
/// </summary>
76
+
publicboolEnableCodeInterpreter{get;init;}
77
+
78
+
/// <summary>
79
+
/// Gets or sets a value that indicates whether the file_search tool is enabled.
80
+
/// </summary>
81
+
publicboolEnableFileSearch{get;init;}
82
+
83
+
/// <summary>
84
+
/// Gets or sets a value that indicates whether the JSON response format is enabled.
85
+
/// </summary>
86
+
publicbool?EnableJsonResponse{get;init;}
87
+
88
+
/// <summary>
89
+
/// Gets or sets the maximum number of completion tokens that can be used over the course of the run.
90
+
/// </summary>
91
+
publicint?MaxCompletionTokens{get;init;}
92
+
93
+
/// <summary>
94
+
/// Gets or sets the maximum number of prompt tokens that can be used over the course of the run.
95
+
/// </summary>
96
+
publicint?MaxPromptTokens{get;init;}
97
+
98
+
/// <summary>
99
+
/// Gets or sets a value that indicates whether the parallel function calling is enabled during tool use.
100
+
/// </summary>
101
+
/// <value>
102
+
/// <see langword="true"/> if parallel function calling is enabled during tool use; otherwise, <see langword="false"/>. The default is <see langword="true"/>.
103
+
/// </value>
104
+
publicbool?ParallelToolCallsEnabled{get;init;}
105
+
106
+
/// <summary>
107
+
/// Gets or sets the number of recent messages that the thread will be truncated to.
108
+
/// </summary>
109
+
publicint?TruncationMessageCount{get;init;}
110
+
111
+
/// <summary>
112
+
/// Gets or sets the sampling temperature to use, between 0 and 2.
113
+
/// </summary>
114
+
publicfloat?Temperature{get;init;}
115
+
116
+
/// <summary>
117
+
/// Gets or sets the probability mass of tokens whose results are considered in nucleus sampling.
118
+
/// </summary>
119
+
/// <remarks>
120
+
/// It's recommended to set this property or <see cref="Temperature"/>, but not both.
121
+
///
122
+
/// Nucleus sampling is an alternative to sampling with temperature where the model
123
+
/// considers the results of the tokens with <see cref="TopP"/> probability mass.
124
+
/// For example, 0.1 means only the tokens comprising the top 10% probability mass are considered.
125
+
/// </remarks>
126
+
publicfloat?TopP{get;init;}
127
+
128
+
/// <summary>
129
+
/// Gets or sets a set of up to 16 key/value pairs that can be attached to an agent, used for
130
+
/// storing additional information about that object in a structured format.
131
+
/// </summary>
132
+
/// <remarks>
133
+
/// Keys can be up to 64 characters in length, and values can be up to 512 characters in length.
0 commit comments