Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedbham committed May 2, 2023
2 parents c4352dc + cdabe41 commit 1f984a5
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 8 deletions.
Binary file added docs/assets/images/module3/bookcreator1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/module3/bookcreator2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/module3/bookcreator3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/module3/semantic-function.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/module3/sk-bookcreator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 9 additions & 5 deletions docs/modules/Module3/bookcreatorflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,22 @@ nav_order: 3

## Module 3: Book Creator application detailed flow

The following sequence diagram illustrates the interactions of the Book creator Client app and the Semantic Kernel API exposed via the dotnet C# function.
The following diagrams illustrates how skills/functions are defined and the interactions of the Book creator Client app and the Semantic Kernel API service exposed via the dotnet http endpoint.

### How are semantic skills defined?

The function API exposes only 2 endpoints
![Semantic Kernel Use cases](../../assets/images/module3/semantic-function.png)

- /skills/{skillName}/invoke/{functionName}
### Sequence diagram - Book creator -> SK Service

- /planner/execute/{maxSteps}
The Semantic Kernel function API exposes 3 POST endpoints

- /skills/{skillName}/invoke/{functionName}
- /planner/createPlan
- /planner/execute/{maxSteps}

![Semantic Kernel Use cases](../../assets/images/module3/book-creator-sequence.png)

1. The childrensBookSkill is a predefined skill that with a templated prompt that can be found in the samples/skills folder, a skill may have one to many sub-skills or functions.
2. The planner skill is also a specialized skill that can leverage additional skills, embeddings and connectors.
3. The planner execute API used the templated values of the previous steps/instructions from the planner to fulfill the user's Ask.
3. The planner execute API uses the templated values of the previous steps from the planner to fulfill the user's Ask.
14 changes: 11 additions & 3 deletions docs/modules/Module3/lab-module3.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ nav_order: 2

## Module 3: Lab - Book Creator application

The Book creator sample application shows how `planner`, `skills` and `memories` are used to enrich content for a specific use case and allows you to enter in a children's book topic. Then the `Planner` creates a plan for the functions (skills) to run based on the Ask. You can see the execution plan along with the results. The `Writer` Skill functions are chained together based on the user ask.
The Book creator sample application shows how SK uses `planner`, `skills` and `memories` are to create a children's book. The `Planner` creates a plan for the skills (functions) that are pre-defined for generating a book topic and creating a book. The `Writer` pre-defined skills are chained together based on the user ask to create the book.

Requirements:

Expand Down Expand Up @@ -66,8 +66,16 @@ Requirements:

![Semantic Kernel Use cases](../../assets/images/module3/sk-bookcstart.png)

9. Follow the application prompts to enter a book idea and click **get Ideas** button to see some sample suggestions.
9. Follow the application prompts to enter a book idea and click **get Ideas** button to see some sample suggestions, screenshot should similar to below

![Semantic Kernel Use cases](../../assets/images/module3/bookcreator1.png)

10. Select an idea option and click on the **create book** button to see the newly created book. Note: you need to additionally click on the play button as shown below on the next screen to get the book contents.

![Semantic Kernel Use cases](../../assets/images/module3/sk-bcplay.png)
![Semantic Kernel Use cases](../../assets/images/module3/bookcreator2.png)

The final result of the book

![Semantic Kernel Use cases](../../assets/images/module3/bookcreator3.png)


0 comments on commit 1f984a5

Please sign in to comment.