Repository navigation
Commit 240a2cb
authored
.Net: Fix and add back FlowOrchestrator (microsoft#4307)
## Summary
This pull request includes a set of changes to the Orchestration.Flow
project. The changes include adding a new project,
Experimental.Orchestration.Flow, and updating the Example
FlowOrchestrator to use it. Additionally, the email plugin has been
refactored and a chat completion service has been added. Unused code has
been removed, and integration and unit tests have been updated. The
ReActEngine and FlowExecutor classes have been refactored to use
KernelArguments and FunctionResult instead of ContextVariables and
Dictionary<string, string>. The FlowOrchestrator and related extensions
have been added to the Experimental.Orchestration.Flow namespace.
Finally, plugin configurations have been updated to use input_variables
and execution_settings instead of input.parameters and completion.
## Changes
- Added Experimental.Orchestration.Flow project
- Added Experimental.Orchestration.Flow.IntegrationTests project
- Added Experimental.Orchestration.Flow.UnitTests project
- Updated Example FlowOrchestrator to use
Experimental.Orchestration.Flow
- Refactored email plugin to include a new EmailPluginV2 class and added
chat completion service
- Removed unused code related to an example of the plugin
- Updated SendEmailPlugin class to use KernelArguments instead of
ContextVariables
- Updated IFlowExecutor interface to use FunctionResult instead of
ContextVariables
- Updated ChatHistorySerializerTest class to use the ChatCompletion
namespace instead of the AI.ChatCompletion namespace
- Added new KernelFunctions to FlowExecutor class for executing flows
and steps
- Refactored FlowExecutor to use KernelFunctionFactory
- Refactored FlowExecutor to use KernelArguments and FunctionResult
instead of ContextVariables and Dictionary<string, string>
- Refactored ReActEngine to use KernelArguments instead of
ContextVariablesExtensions
- Added extension methods for FunctionResult and KernelArguments
- Added FlowOrchestrator class to Experimental.Orchestration.Flow
namespace
- Modified PromptTemplateConfigExtensions.cs to set max tokens
- Modified FlowOrchestrator.cs to use IKernelBuilder and
IFlowStatusProvider interfaces
- Updated CheckRepeatStep and CheckStartStep plugin configurations to
use input_variables
- Updated ReActEngine and gpt4 plugin configurations to use
execution_settings
- Updated ReActEngine GPT4 config.json file
---
*Powered by [Microsoft Semantic
Kernel](https://github.com/microsoft/semantic-kernel)*
### Motivation and Context
Adopt latest interfaces and add back Experimental FlowOrchestrator.
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
1. Why is this change required?
2. What problem does it solve?
3. What scenario does it contribute to?
4. If it fixes an open issue, please link to the issue here.
-->
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [x] 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
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄1 parent 3e53e50 commit 240a2cb
26 files changed
Lines changed: 757 additions & 513 deletions
File tree
- dotnet
- samples/KernelSyntaxExamples
- src
- Experimental
- Orchestration.Flow.IntegrationTests
- Orchestration.Flow.UnitTests
- Orchestration.Flow
- Abstractions
- Execution
- Extensions
- Plugins
- CheckRepeatStep
- CheckStartStep
- ReActEngine
- gpt4
- IntegrationTests/Connectors/OpenAI
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
192 | 198 | | |
193 | 199 | | |
194 | 200 | | |
| |||
439 | 445 | | |
440 | 446 | | |
441 | 447 | | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
442 | 466 | | |
443 | 467 | | |
444 | 468 | | |
| |||
504 | 528 | | |
505 | 529 | | |
506 | 530 | | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
507 | 534 | | |
508 | 535 | | |
509 | 536 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
15 | 14 | | |
16 | 15 | | |
| 16 | + | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | | - | |
| 26 | + | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
| 32 | + | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| |||
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
96 | | - | |
| 95 | + | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
| |||
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
116 | 130 | | |
117 | 131 | | |
118 | 132 | | |
119 | | - | |
120 | | - | |
| 133 | + | |
| 134 | + | |
121 | 135 | | |
122 | 136 | | |
123 | 137 | | |
124 | 138 | | |
125 | | - | |
| 139 | + | |
126 | 140 | | |
127 | 141 | | |
128 | 142 | | |
| |||
159 | 173 | | |
160 | 174 | | |
161 | 175 | | |
162 | | - | |
163 | | - | |
| 176 | + | |
| 177 | + | |
164 | 178 | | |
165 | 179 | | |
166 | 180 | | |
| |||
175 | 189 | | |
176 | 190 | | |
177 | 191 | | |
178 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
179 | 197 | | |
180 | 198 | | |
181 | 199 | | |
182 | 200 | | |
183 | 201 | | |
184 | 202 | | |
185 | 203 | | |
186 | | - | |
187 | | - | |
| 204 | + | |
| 205 | + | |
188 | 206 | | |
189 | 207 | | |
190 | 208 | | |
| |||
200 | 218 | | |
201 | 219 | | |
202 | 220 | | |
203 | | - | |
| 221 | + | |
204 | 222 | | |
205 | 223 | | |
206 | 224 | | |
207 | 225 | | |
208 | | - | |
| 226 | + | |
209 | 227 | | |
210 | 228 | | |
211 | | - | |
212 | | - | |
| 229 | + | |
213 | 230 | | |
214 | 231 | | |
215 | 232 | | |
| |||
223 | 240 | | |
224 | 241 | | |
225 | 242 | | |
226 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
227 | 246 | | |
228 | 247 | | |
229 | | - | |
| 248 | + | |
230 | 249 | | |
231 | 250 | | |
232 | 251 | | |
233 | 252 | | |
234 | 253 | | |
235 | 254 | | |
236 | 255 | | |
237 | | - | |
| 256 | + | |
238 | 257 | | |
239 | 258 | | |
240 | 259 | | |
| |||
247 | 266 | | |
248 | 267 | | |
249 | 268 | | |
250 | | - | |
251 | | - | |
| 269 | + | |
| 270 | + | |
252 | 271 | | |
253 | | - | |
| 272 | + | |
254 | 273 | | |
255 | 274 | | |
256 | | - | |
257 | | - | |
| 275 | + | |
| 276 | + | |
258 | 277 | | |
259 | 278 | | |
260 | 279 | | |
261 | 280 | | |
262 | | - | |
| 281 | + | |
263 | 282 | | |
264 | | - | |
265 | | - | |
266 | | - | |
| 283 | + | |
267 | 284 | | |
268 | 285 | | |
269 | | - | |
270 | | - | |
| 286 | + | |
| 287 | + | |
271 | 288 | | |
272 | | - | |
| 289 | + | |
| 290 | + | |
273 | 291 | | |
274 | 292 | | |
275 | 293 | | |
| |||
282 | 300 | | |
283 | 301 | | |
284 | 302 | | |
| 303 | + | |
| 304 | + | |
285 | 305 | | |
286 | 306 | | |
287 | 307 | | |
288 | 308 | | |
289 | | - | |
| 309 | + | |
290 | 310 | | |
291 | 311 | | |
292 | | - | |
| 312 | + | |
293 | 313 | | |
294 | 314 | | |
295 | 315 | | |
296 | | - | |
| 316 | + | |
297 | 317 | | |
298 | 318 | | |
299 | 319 | | |
300 | 320 | | |
301 | | - | |
302 | | - | |
| 321 | + | |
| 322 | + | |
303 | 323 | | |
304 | 324 | | |
305 | 325 | | |
| |||
312 | 332 | | |
313 | 333 | | |
314 | 334 | | |
| 335 | + | |
315 | 336 | | |
316 | 337 | | |
317 | 338 | | |
318 | | - | |
319 | | - | |
320 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
321 | 342 | | |
322 | | - | |
| 343 | + | |
323 | 344 | | |
324 | | - | |
| 345 | + | |
325 | 346 | | |
326 | | - | |
| 347 | + | |
327 | 348 | | |
328 | | - | |
| 349 | + | |
329 | 350 | | |
330 | | - | |
331 | 351 | | |
332 | 352 | | |
333 | 353 | | |
334 | | - | |
| 354 | + | |
335 | 355 | | |
336 | | - | |
| 356 | + | |
337 | 357 | | |
338 | 358 | | |
339 | 359 | | |
340 | 360 | | |
341 | 361 | | |
342 | 362 | | |
343 | 363 | | |
344 | | - | |
345 | | - | |
| 364 | + | |
| 365 | + | |
346 | 366 | | |
347 | | - | |
348 | | - | |
| 367 | + | |
| 368 | + | |
349 | 369 | | |
350 | | - | |
351 | | - | |
352 | | - | |
| 370 | + | |
| 371 | + | |
353 | 372 | | |
354 | | - | |
355 | | - | |
| 373 | + | |
| 374 | + | |
356 | 375 | | |
357 | 376 | | |
358 | | - | |
| 377 | + | |
359 | 378 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
0 commit comments