Skip to content

Commit 54ee340

Browse files
authored
Python: Move notebooks into language folders (microsoft#2368)
### Motivation and Context In an effort to move all samples to their respective language folder, I've moved all of the notebooks to the correct language folder. ### Contribution Checklist - [ ] 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 😄
1 parent 3ce874b commit 54ee340

39 files changed

+57
-57
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ Getting Semantic Kernel deployed to Azure as web app service is easy with one-cl
132132
For a more hands-on overview, you can also check out the C# and Python Jupyter notebooks, starting
133133
from here:
134134

135-
- [Getting Started with C# notebook](samples/notebooks/dotnet/00-getting-started.ipynb)
136-
- [Getting Started with Python notebook](samples/notebooks/python/00-getting-started.ipynb)
135+
- [Getting Started with C# notebook](dotnet/notebooks/00-getting-started.ipynb)
136+
- [Getting Started with Python notebook](python/notebooks/00-getting-started.ipynb)
137137

138138
**Requirements:** C# notebooks require [.NET 7](https://dotnet.microsoft.com/download)
139139
and the VS Code [Polyglot extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.dotnet-interactive-vscode).

dotnet/README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,18 @@ Console.WriteLine(output);
101101
The repository contains also a few C# Jupyter notebooks that demonstrates
102102
how to get started with the Semantic Kernel.
103103

104-
See [here](../samples/notebooks/dotnet/README.md) for the full list, with
104+
See [here](./notebooks/README.md) for the full list, with
105105
requirements and setup instructions.
106106

107-
1. [Getting started](../samples/notebooks//dotnet/00-getting-started.ipynb)
108-
2. [Loading and configuring Semantic Kernel](../samples/notebooks//dotnet/01-basic-loading-the-kernel.ipynb)
109-
3. [Running AI prompts from file](../samples/notebooks//dotnet/02-running-prompts-from-file.ipynb)
110-
4. [Creating Semantic Functions at runtime (i.e. inline functions)](../samples/notebooks//dotnet/03-semantic-function-inline.ipynb)
111-
5. [Using Context Variables to Build a Chat Experience](../samples/notebooks//dotnet/04-context-variables-chat.ipynb)
112-
6. [Creating and Executing Plans](../samples/notebooks//dotnet/05-using-the-planner.ipynb)
113-
7. [Building Memory with Embeddings](../samples/notebooks//dotnet/06-memory-and-embeddings.ipynb)
114-
8. [Creating images with DALL-E 2](../samples/notebooks//dotnet/07-DALL-E-2.ipynb)
115-
9. [Chatting with ChatGPT and Images](../samples/notebooks//dotnet/08-chatGPT-with-DALL-E-2.ipynb)
107+
1. [Getting started](./notebooks/00-getting-started.ipynb)
108+
2. [Loading and configuring Semantic Kernel](./notebooks/01-basic-loading-the-kernel.ipynb)
109+
3. [Running AI prompts from file](./notebooks/02-running-prompts-from-file.ipynb)
110+
4. [Creating Semantic Functions at runtime (i.e. inline functions)](./notebooks/03-semantic-function-inline.ipynb)
111+
5. [Using Context Variables to Build a Chat Experience](./notebooks/04-context-variables-chat.ipynb)
112+
6. [Creating and Executing Plans](./notebooks/05-using-the-planner.ipynb)
113+
7. [Building Memory with Embeddings](./notebooks/06-memory-and-embeddings.ipynb)
114+
8. [Creating images with DALL-E 2](./notebooks/07-DALL-E-2.ipynb)
115+
9. [Chatting with ChatGPT and Images](./notebooks/08-chatGPT-with-DALL-E-2.ipynb)
116116

117117
# Nuget packages
118118

@@ -121,20 +121,20 @@ more features, such as connectors to services and Skills to perform specific act
121121
Unless you need to optimize which packages to include in your app, you will usually
122122
start by installing this meta-package first:
123123

124-
* **Microsoft.SemanticKernel**
124+
- **Microsoft.SemanticKernel**
125125

126126
This meta package includes core packages and OpenAI connectors, allowing to run
127127
most samples and build apps with OpenAI and Azure OpenAI.
128128

129129
Packages included in **Microsoft.SemanticKernel**:
130130

131131
1. **Microsoft.SemanticKernel.Abstractions**: contains common interfaces and classes
132-
used by the core and other SK components.
132+
used by the core and other SK components.
133133
1. **Microsoft.SemanticKernel.Core**: contains the core logic of SK, such as prompt
134-
engineering, semantic memory and semantic functions definition and orchestration.
134+
engineering, semantic memory and semantic functions definition and orchestration.
135135
1. **Microsoft.SemanticKernel.Connectors.AI.OpenAI**: connectors to OpenAI and Azure
136-
OpenAI, allowing to run semantic functions, chats, image generation with GPT3,
137-
GPT3.5, GPT4, DALL-E2. Includes also GPT tokenizers.
136+
OpenAI, allowing to run semantic functions, chats, image generation with GPT3,
137+
GPT3.5, GPT4, DALL-E2. Includes also GPT tokenizers.
138138

139139
Other SK packages available at nuget.org:
140140

@@ -148,4 +148,4 @@ Other SK packages available at nuget.org:
148148
tenant data, schedule meetings, send emails, etc.
149149
5. **Microsoft.SemanticKernel.Skills.OpenAPI**: OpenAPI skill.
150150
6. **Microsoft.SemanticKernel.Skills.Web**: Web Skill: search the web, download
151-
files, etc.
151+
files, etc.

samples/notebooks/dotnet/00-getting-started.ipynb renamed to dotnet/notebooks/00-getting-started.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
"outputs": [],
138138
"source": [
139139
"// Load the Skills Directory\n",
140-
"var skillsDirectory = Path.Combine(System.IO.Directory.GetCurrentDirectory(), \"..\", \"..\", \"skills\");\n",
140+
"var skillsDirectory = Path.Combine(System.IO.Directory.GetCurrentDirectory(), \"..\", \"..\", \"samples\", \"skills\");\n",
141141
"\n",
142142
"// Load the FunSkill from the Skills Directory\n",
143143
"var funSkillFunctions = kernel.ImportSemanticSkillFromDirectory(skillsDirectory, \"FunSkill\");\n",

samples/notebooks/dotnet/02-running-prompts-from-file.ipynb renamed to dotnet/notebooks/02-running-prompts-from-file.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
},
8080
{
8181
"cell_type": "code",
82-
"execution_count": null,
82+
"execution_count": 1,
8383
"metadata": {
8484
"dotnet_interactive": {
8585
"language": "csharp"
@@ -118,7 +118,7 @@
118118
},
119119
{
120120
"cell_type": "code",
121-
"execution_count": null,
121+
"execution_count": 3,
122122
"metadata": {
123123
"dotnet_interactive": {
124124
"language": "csharp"
@@ -130,7 +130,7 @@
130130
"outputs": [],
131131
"source": [
132132
"// note: using skills from the repo\n",
133-
"var skillsDirectory = Path.Combine(System.IO.Directory.GetCurrentDirectory(), \"..\", \"..\", \"skills\");\n",
133+
"var skillsDirectory = Path.Combine(System.IO.Directory.GetCurrentDirectory(), \"..\", \"..\", \"samples\", \"skills\");\n",
134134
"\n",
135135
"var funSkillFunctions = kernel.ImportSemanticSkillFromDirectory(skillsDirectory, \"FunSkill\");"
136136
]
@@ -145,7 +145,7 @@
145145
},
146146
{
147147
"cell_type": "code",
148-
"execution_count": null,
148+
"execution_count": 4,
149149
"metadata": {
150150
"dotnet_interactive": {
151151
"language": "csharp"

samples/notebooks/dotnet/05-using-the-planner.ipynb renamed to dotnet/notebooks/05-using-the-planner.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
},
9898
"outputs": [],
9999
"source": [
100-
"var skillsDirectory = Path.Combine(System.IO.Directory.GetCurrentDirectory(), \"..\", \"..\", \"skills\");\n",
100+
"var skillsDirectory = Path.Combine(System.IO.Directory.GetCurrentDirectory(), \"..\", \"..\", \"samples\", \"skills\");\n",
101101
"kernel.ImportSemanticSkillFromDirectory(skillsDirectory, \"SummarizeSkill\");\n",
102102
"kernel.ImportSemanticSkillFromDirectory(skillsDirectory, \"WriterSkill\");"
103103
]

samples/notebooks/dotnet/06-memory-and-embeddings.ipynb renamed to dotnet/notebooks/06-memory-and-embeddings.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,9 @@
402402
"{\n",
403403
" [\"https://github.com/microsoft/semantic-kernel/blob/main/README.md\"]\n",
404404
" = \"README: Installation, getting started, and how to contribute\",\n",
405-
" [\"https://github.com/microsoft/semantic-kernel/blob/main/samples/notebooks/dotnet/02-running-prompts-from-file.ipynb\"]\n",
405+
" [\"https://github.com/microsoft/semantic-kernel/blob/main/dotnet/notebooks/02-running-prompts-from-file.ipynb\"]\n",
406406
" = \"Jupyter notebook describing how to pass prompts from a file to a semantic skill or function\",\n",
407-
" [\"https://github.com/microsoft/semantic-kernel/blob/main/samples/notebooks/dotnet/00-getting-started.ipynb\"]\n",
407+
" [\"https://github.com/microsoft/semantic-kernel/blob/main/dotnet/notebooks/00-getting-started.ipynb\"]\n",
408408
" = \"Jupyter notebook describing how to get started with the Semantic Kernel\",\n",
409409
" [\"https://github.com/microsoft/semantic-kernel/tree/main/samples/skills/ChatSkill/ChatGPT\"]\n",
410410
" = \"Sample demonstrating how to create a chat skill interfacing with ChatGPT\",\n",

0 commit comments

Comments
 (0)