Skip to content

Commit 2df40f4

Browse files
authored
Merge pull request #106 from dmytrostruk/update-process-framework-starter
Added more Process Framework starter projects
2 parents 9c3dfd2 + 0c74ee4 commit 2df40f4

24 files changed

+474
-17
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Process Framework: Product Documentation declarative example
2+
3+
This project example demonstrates how to define, preview, and execute a process of generating product documentation using declarative AI Agents as process steps.
4+
5+
Note: it is recommended to work with this example using [Semantic Kernel Tools](https://marketplace.visualstudio.com/items?itemName=ms-semantic-kernel.semantic-kernel) VS Code extension.
6+
7+
## Getting Started
8+
9+
1. Open the [product-documentation.process.yaml](./product-documentation.process.yaml) file in VS Code to start working with processes.
10+
11+
## Features
12+
13+
### Select an AI Model
14+
15+
To select an AI model:
16+
- Open the Semantic Kernel extension in the side panel of Visual Studio Code.
17+
- In the "AI Endpoints" section, choose your preferred AI provider and model.
18+
19+
![Select AI Model](images/select-model.jpeg)
20+
21+
### Preview a Process
22+
23+
To preview a process:
24+
- Open the [product-documentation.process.yaml](./product-documentation.process.yaml) file.
25+
- Click the **Preview Process** button in the top bar of the process file.
26+
27+
![Preview Process](images/preview-process.jpeg)
28+
29+
### Debug a Process
30+
31+
To debug a process:
32+
- Open the [product-documentation.process.yaml](./product-documentation.process.yaml) file.
33+
- Click the **Debug Process** button in the top bar of the process file.
34+
35+
![Debug Process](images/debug-process.jpeg)
36+
37+
## Reporting Issues
38+
39+
If you encounter any issues or have suggestions, please report them on our [GitHub repository](https://github.com/microsoft/semantic-kernel).
31 KB
Loading
31.8 KB
Loading
44.3 KB
Loading
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
workflow:
2+
id: ProductDocumentation
3+
inputs:
4+
events:
5+
cloud_events:
6+
- type: input_message_received
7+
data_schema:
8+
type: string
9+
nodes:
10+
- id: ProductDocumentationAgent
11+
type: declarative
12+
description: Generates an information about the product
13+
agent:
14+
type: chat_completion_agent
15+
name: ProductDocumentationAgent
16+
description: Generates an information about the product
17+
instructions: Generate a short information about coffee machine product.
18+
on_complete:
19+
- on_condition:
20+
type: default
21+
emits:
22+
- event_type: GeneratedInformation.OnResult
23+
- id: SummarizationAgent
24+
type: declarative
25+
description: Summarizes the provided information
26+
agent:
27+
type: chat_completion_agent
28+
name: SummarizationAgent
29+
description: Summarizes the provided information
30+
instructions: Summarize the provided information in 3 sentences.
31+
on_complete:
32+
- on_condition:
33+
type: default
34+
emits:
35+
- event_type: ProcessCompleted
36+
orchestration:
37+
- listen_for:
38+
event: input_message_received
39+
from: _workflow_
40+
then:
41+
- node: ProductDocumentationAgent
42+
- listen_for:
43+
event: GeneratedInformation.OnResult
44+
from: ProductDocumentationAgent
45+
then:
46+
- node: SummarizationAgent

sk-process-framework/dotnet/ProductDocumentation/ProductDocumentation.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.SemanticKernel.Process.Core" Version="1.47.0-alpha" />
11+
<PackageReference Include="Microsoft.SemanticKernel.Process.Core" Version="1.51.0-alpha" />
1212
</ItemGroup>
1313

1414
</Project>

sk-process-framework/dotnet/ProductDocumentation/README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Process Framework: Product Documentation application example
1+
# Process Framework: Product Documentation .NET example
22

3-
This project example demonstrates how to define, preview, and execute a process of generating product documentation.
3+
This project example demonstrates how to define, preview, and execute a process of generating product documentation using .NET classes as process steps.
44

55
Note: it is recommended to work with this example using [Semantic Kernel Tools](https://marketplace.visualstudio.com/items?itemName=ms-semantic-kernel.semantic-kernel) VS Code extension.
66

@@ -19,6 +19,14 @@ Note: it is recommended to work with this example using [Semantic Kernel Tools](
1919

2020
## Features
2121

22+
### Select an AI Model
23+
24+
To select an AI model:
25+
- Open the Semantic Kernel extension in the side panel of Visual Studio Code.
26+
- In the "AI Endpoints" section, choose your preferred AI provider and model.
27+
28+
![Select AI Model](images/select-model.jpeg)
29+
2230
### Preview a Process
2331

2432
To preview a process:
@@ -27,13 +35,13 @@ To preview a process:
2735

2836
![Preview Process](images/preview-process.jpeg)
2937

30-
### Execute a Process
38+
### Debug a Process
3139

32-
To execute a process:
40+
To debug a process:
3341
- Open the [product-documentation.process.yaml](./product-documentation.process.yaml) file.
34-
- Click the **Execute Process** button in the top bar of the process file.
42+
- Click the **Debug Process** button in the top bar of the process file.
3543

36-
![Execute Process](images/execute-process.jpeg)
44+
![Debug Process](images/debug-process.jpeg)
3745

3846
### Process Node Logic
3947

sk-process-framework/dotnet/ProductDocumentation/Steps/GenerateDocumentationStep.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public override ValueTask ActivateAsync(KernelProcessStepState<GeneratedDocument
2424
}
2525

2626
[KernelFunction]
27-
public async Task<string?> GenerateDocumentationAsync(Kernel kernel, KernelProcessStepContext context, string productInfo)
27+
public async Task<string?> GenerateDocumentationAsync(Kernel kernel, string productInfo)
2828
{
2929
// Add the new product info to the chat history
3030
this._state.ChatHistory!.AddUserMessage($"Product Info:\n\n{productInfo}");
@@ -35,8 +35,6 @@ public override ValueTask ActivateAsync(KernelProcessStepState<GeneratedDocument
3535

3636
var documentationString = generatedDocumentationResponse.Content!.ToString();
3737

38-
await context.EmitEventAsync("DocumentationGenerated", documentationString);
39-
4038
return documentationString;
4139
}
4240
}
31 KB
Loading
-86.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)