Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
095ddd0
add complex plan sample
elbruno Nov 30, 2023
71994ca
agregando mas ejemplos para Kernel Memory
elbruno Nov 30, 2023
c1b2194
include notebook in Eng and Spa
elbruno Feb 29, 2024
5301dc9
Update language in skprompt.txt and add OpenAI chat completion servic…
elbruno Feb 29, 2024
f6f85c2
Update language to English in skprompt.txt files
elbruno Feb 29, 2024
cc62daa
add azure openai chat completion sample
elbruno Feb 29, 2024
447e6e7
Sample console application to show how to use native functions with S…
elbruno Feb 29, 2024
1a83086
update planner demos
elbruno Feb 29, 2024
a4236f3
add sample for memory and embeddings
elbruno Feb 29, 2024
f157081
Update notebook-en.ipynb with additional packages and memories
elbruno Feb 29, 2024
c2d9d7e
Update readme content
elbruno Feb 29, 2024
a155c38
working in Spanish translation
elbruno Mar 5, 2024
6d6a806
update Spanish notebook with translations
elbruno Mar 5, 2024
7f6579e
notebook translated to Spanish
elbruno Mar 5, 2024
876cbf4
update samples to have spanish code references and sk prompts
elbruno Mar 5, 2024
ab5a724
update memory kernel code samples to Spanish
elbruno Mar 5, 2024
6193684
samples in Spanish updated
elbruno Mar 5, 2024
6e6c261
add memory kernel samples in other languages
elbruno Mar 12, 2024
9057b21
split azure resource creation in a new notebook
elbruno Apr 9, 2024
f3c1c6b
feat: Add Spanish translations for code samples and notebooks
elbruno Apr 17, 2024
7105d86
chore: Update paths for plugin directories in notebook
elbruno Apr 17, 2024
7fb0411
chore: Update paths for plugin directories in notebook
elbruno Apr 18, 2024
c8ba832
update nuget pkgs to latest versions and test the code
elbruno May 27, 2024
6ad4d08
update qas
elbruno May 31, 2024
4c0beac
update qas
elbruno May 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
src/.vs/**
src/sk-phi2-localserver-lmstudio/obj/**
src/sk-phi2-localserver-lmstudio/bin/**
src/sk-customllm/bin/**
src/sk-customllm/obj/**
src/sk-ollama-localserver-ubuntu/bin/**
src/sk-ollama-localserver-ubuntu/obj/**
src/sk-ollama-localserver-rpi/bin/**
src/sk-ollama-localserver-rpi/obj/**
70 changes: 0 additions & 70 deletions KernelMemory/Memories.cs

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 El Bruno

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
68 changes: 34 additions & 34 deletions NativeFunctions/GetHeroInfo.cs → NativeFunctions/HeroInfo.cs
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
using System.ComponentModel;
using System.Globalization;
using Microsoft.SemanticKernel;
using System.Net.Http;
using Newtonsoft.Json.Linq;
public class Info
{
string apiKey;
public Info(string superHeroApiKey)
{
apiKey = superHeroApiKey;
}
[SKFunction, Description("Get the alter ego of a superhero")]
public string GetAlterEgo(string input)
{
// Call the API
var httpClient = new HttpClient();
var response = httpClient.GetAsync($"https://superheroapi.com/api/{apiKey}/search/{input}").Result;
// Get the response
var responseContent = response.Content.ReadAsStringAsync().Result;
// Parse the response
var json = JObject.Parse(responseContent);
// Get the hero info
var heroInfo = $"{json["results"][0]["biography"]["full-name"]}";
// Return the hero info
return heroInfo;
}
}
using System.ComponentModel;
using System.Globalization;
using Microsoft.SemanticKernel;
using System.Net.Http;
using Newtonsoft.Json.Linq;

public class HeroInfo
{
static string apiKey;
public HeroInfo(string superHeroApiKey)
{
apiKey = superHeroApiKey;
}

[KernelFunction, Description("Get the alter ego of a superhero")]
public static string GetAlterEgo(string input)
{
// Call the API
var httpClient = new HttpClient();
var response = httpClient.GetAsync($"https://superheroapi.com/api/{apiKey}/search/{input}").Result;

// Get the response
var responseContent = response.Content.ReadAsStringAsync().Result;

// Parse the response
var json = JObject.Parse(responseContent);

// Get the hero info
var heroInfo = $"{json["results"][0]["biography"]["full-name"]}";

// Return the hero info
return heroInfo;
}
}
155 changes: 155 additions & 0 deletions NativeFunctions/sampleResponse.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
{
"response": "success",
"results-for": "batman",
"results": [
{
"id": "69",
"name": "Batman",
"powerstats": {
"intelligence": "81",
"strength": "40",
"speed": "29",
"durability": "55",
"power": "63",
"combat": "90"
},
"biography": {
"full-name": "Terry McGinnis",
"alter-egos": "No alter egos found.",
"aliases": [
"Batman II",
"The Tomorrow Knight",
"The second Dark Knight",
"The Dark Knight of Tomorrow",
"Batman Beyond"
],
"place-of-birth": "Gotham City, 25th Century",
"first-appearance": "Batman Beyond #1",
"publisher": "DC Comics",
"alignment": "good"
},
"appearance": {
"gender": "Male",
"race": "Human",
"height": [
"5'10",
"178 cm"
],
"weight": [
"170 lb",
"77 kg"
],
"eye-color": "Blue",
"hair-color": "Black"
},
"work": {
"occupation": "-",
"base": "21st Century Gotham City"
},
"connections": {
"group-affiliation": "Batman Family, Justice League Unlimited",
"relatives": "Bruce Wayne (biological father), Warren McGinnis (father, deceased), Mary McGinnis (mother), Matt McGinnis (brother)"
},
"image": {
"url": "https://www.superherodb.com/pictures2/portraits/10/100/10441.jpg"
}
},
{
"id": "70",
"name": "Batman",
"powerstats": {
"intelligence": "100",
"strength": "26",
"speed": "27",
"durability": "50",
"power": "47",
"combat": "100"
},
"biography": {
"full-name": "Bruce Wayne",
"alter-egos": "No alter egos found.",
"aliases": [
"Insider",
"Matches Malone"
],
"place-of-birth": "Crest Hill, Bristol Township; Gotham County",
"first-appearance": "Detective Comics #27",
"publisher": "DC Comics",
"alignment": "good"
},
"appearance": {
"gender": "Male",
"race": "Human",
"height": [
"6'2",
"188 cm"
],
"weight": [
"210 lb",
"95 kg"
],
"eye-color": "blue",
"hair-color": "black"
},
"work": {
"occupation": "Businessman",
"base": "Batcave, Stately Wayne Manor, Gotham City; Hall of Justice, Justice League Watchtower"
},
"connections": {
"group-affiliation": "Batman Family, Batman Incorporated, Justice League, Outsiders, Wayne Enterprises, Club of Heroes, formerly White Lantern Corps, Sinestro Corps",
"relatives": "Damian Wayne (son), Dick Grayson (adopted son), Tim Drake (adopted son), Jason Todd (adopted son), Cassandra Cain (adopted ward)\nMartha Wayne (mother, deceased), Thomas Wayne (father, deceased), Alfred Pennyworth (former guardian), Roderick Kane (grandfather, deceased), Elizabeth Kane (grandmother, deceased), Nathan Kane (uncle, deceased), Simon Hurt (ancestor), Wayne Family"
},
"image": {
"url": "https://www.superherodb.com/pictures2/portraits/10/100/639.jpg"
}
},
{
"id": "71",
"name": "Batman II",
"powerstats": {
"intelligence": "88",
"strength": "11",
"speed": "33",
"durability": "28",
"power": "36",
"combat": "100"
},
"biography": {
"full-name": "Dick Grayson",
"alter-egos": "Nightwing, Robin",
"aliases": [
"Dick Grayson"
],
"place-of-birth": "-",
"first-appearance": "-",
"publisher": "Nightwing",
"alignment": "good"
},
"appearance": {
"gender": "Male",
"race": "Human",
"height": [
"5'10",
"178 cm"
],
"weight": [
"175 lb",
"79 kg"
],
"eye-color": "Blue",
"hair-color": "Black"
},
"work": {
"occupation": "-",
"base": "Gotham City; formerly Bludhaven, New York City"
},
"connections": {
"group-affiliation": "Justice League Of America, Batman Family",
"relatives": "John Grayson (father, deceased), Mary Grayson (mother, deceased), Bruce Wayne / Batman (adoptive father), Damian Wayne / Robin (foster brother), Jason Todd / Red Hood (adoptive brother), Tim Drake / Red Robin (adoptive brother), Cassandra Cain / Batgirl IV (adoptive sister)"
},
"image": {
"url": "https://www.superherodb.com/pictures2/portraits/10/100/1496.jpg"
}
}
]
}
Loading