Skip to content

Commit

Permalink
Added piece on testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmaeda committed Apr 3, 2023
1 parent 20cff94 commit 239a35d
Show file tree
Hide file tree
Showing 3 changed files with 437 additions and 30 deletions.
37 changes: 8 additions & 29 deletions e2-first-dish/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand All @@ -115,15 +115,7 @@
"kernelName": "csharp"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Settings deleted. Run the notebook again to configure your AI backend.\n"
]
}
],
"outputs": [],
"source": [
"#!import ../config/Settings.cs\n",
"\n",
Expand Down Expand Up @@ -229,15 +221,9 @@
"{{$input}}\n",
"\n",
"Summarize the content above in less than 140 characters.\n",
"\"\"\";"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"> NOTHING HAPPENED? Exactly! You just set the value of a string. As long as you see a checkmark ✅ in the lower left corner of the code block, that means you can keep calm and go forward."
"\"\"\";\n",
"\n",
"Console.WriteLine(\"A string has been set to be used as a semantic function.\");"
]
},
{
Expand Down Expand Up @@ -292,16 +278,9 @@
"\n",
"var functionConfig = new SemanticFunctionConfig(promptConfig, promptTemplate);\n",
"\n",
"var summaryFunction = kernel.RegisterSemanticFunction(\"MySkill\", \"Summary\", functionConfig);\n"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"> NOTHING HAPPENED? Exactly! That's the second time so far. You just defined the parameters of the function from the string `mySemanticFunctionInline` in the first block that did absolutely nothing. As long as you see a checkmark ✅ in the lower left corner of the code block, that means you can keep calm and go forward. The next time you hit 'play' -- the fireworks will finally fly! Keep going!\n",
"\n"
"var summaryFunction = kernel.RegisterSemanticFunction(\"MySkill\", \"Summary\", functionConfig);\n",
"\n",
"Console.WriteLine(\"A semantic function has been registered.\");\n"
]
},
{
Expand Down
4 changes: 3 additions & 1 deletion e4-memories/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@
" text: \"My new dog Trixie is the cutest thing you've ever seen. She's just 2 years old.\");\n",
" \n",
"await kernel.Memory.SaveInformationAsync(memoryCollectionName, id: \"Old Facebook Post\", \n",
" text: \"Can you believe the size of the trees in Yellowstone? They're huge! I'm so committed to forestry concerns.\");\n"
" text: \"Can you believe the size of the trees in Yellowstone? They're huge! I'm so committed to forestry concerns.\");\n",
"\n",
"Console.WriteLine(\"Four GIGANTIC vectors were generated just now from those 4 pieces of text above.\");"
]
},
{
Expand Down
Loading

0 comments on commit 239a35d

Please sign in to comment.