GithubHelp home page GithubHelp logo

johnmaeda / sk-recipes Goto Github PK

View Code? Open in Web Editor NEW
164.0 5.0 82.0 1023 KB

A collection of C# notebooks to get you started with Semantic Kernel quickly.

Home Page: https://aka.ms/semantic-kernel

C# 6.70% Jupyter Notebook 93.30%
ai llm semantic-kernel

sk-recipes's Introduction

Experimental: Semantic Kernel Recipes

There's now a free LinkedIn Learning course on Semantic Kernel available here. And a new course on building skills here.

๐Ÿ“บ Available SK Recipes

This repo is a collection of .ipynb (aka "Jupyter notebook") files to be run locally from VS Code. They are organized as a set of "recipes" to learn how to use Semantic Kernel.


๐Ÿ Prerequisites to getting started with the notebooks in this repo

For both the seasoned coding veteran and the fearless newbie learner, we've got you.

โญ๏ธ Looking for more advanced notebooks on Semantic Kernel?

Visit the Semantic Kernel GitHub repo at https://aka.ms/sk/repo.

sk-recipes's People

Contributors

johnmaeda avatar shirkey avatar thegovind avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sk-recipes's Issues

Error in Settings.cs - Cannot implicitly convert type 'Microsoft.DotNet.Interactive.PasswordString' to 'string'

While trying to run "Step 1๏ธ: Set up your OpenAI or Azure OpenAI Service key"

#!import ../config/Settings.cs

bool useAzureOpenAI = false;

await Settings.AskAzureEndpoint(useAzureOpenAI);
await Settings.AskModel(useAzureOpenAI);
await Settings.AskApiKey(useAzureOpenAI);

I got the following error:

{
	"name": "Error",
	"message": "(95,26): error CS0029: Cannot implicitly convert type 'Microsoft.DotNet.Interactive.PasswordString' to 'string'\r
(100,26): error CS0029: Cannot implicitly convert type 'Microsoft.DotNet.Interactive.PasswordString' to 'string'"
}

Had to go to lines 95 and 100 of Settings.cs and change the following:

apiKey = await InteractiveKernel.GetPasswordAsync("Please enter your Azure OpenAI API key");
// and
apiKey= await InteractiveKernel.GetPasswordAsync("Please enter your OpenAI API key");

to

apiKey = (await InteractiveKernel.GetPasswordAsync("Please enter your Azure OpenAI API key")).ToString();
// and
apiKey = (await InteractiveKernel.GetPasswordAsync("Please enter your OpenAI API key")).ToString();

Unable to pull repo

Hi,
I'm starting your tutorial, wanted to clone the repo instead of donwloading the zip but I get this error in GitHub Desktop:

Cloning into 'C:\Users\andre\Documents\GitHub\SK-Recipes'... remote: Enumerating objects: 363, done. remote: Counting objects: 100% (363/363), done. remote: Compressing objects: 100% (238/238), done. remote: Total 363 (delta 139), reused 290 (delta 78), pack-reused 0 Receiving objects: 100% (363/363), 1021.00 KiB | 8.44 MiB/s, done. Resolving deltas: 100% (139/139), done. error: invalid path 'e3-skills-rack /notebook.ipynb' fatal: unable to checkout working tree warning: Clone succeeded, but checkout failed. You can inspect what was checked out with 'git status' and retry with 'git restore --source=HEAD :/'

maybe there's a space somewhere after 'e3-skills-rack' ?

e2-first-dish: Error: AccessDenied: The request is not authorized, HTTP status: Unauthorized

I can walk through the notebook until the last cell (Step 3.3: Set your input to the templated prompt and have the kernel process it).
Cell outputs an error: Error: AccessDenied: The request is not authorized, HTTP status: Unauthorized

I've been looking around on Discord already and it seems there is a difference in API keys (service key vs regular key)?
But I don't get this.

I have davinci completions deployment active in Azure OpenAI Studio.

Edit: found a soluation! When I fill out all the credentials (model, endpoint, API-key) directly in the cell where it refers to the config.js file, everything works.

CS0029: Cannot implicitly convert type 'Microsoft.DotNet.Interactive.PasswordString' to 'string'

Hi,
running through your 2nd notebook "e2-first-dish" I get some errors on the first code block:
{
"name": "Error",
"message": "(95,26): error CS0029: Cannot implicitly convert type 'Microsoft.DotNet.Interactive.PasswordString' to 'string'\r
(100,26): error CS0029: Cannot implicitly convert type 'Microsoft.DotNet.Interactive.PasswordString' to 'string'"
}
{
"name": "Error",
"message": "(3,7): error CS0103: The name 'Settings' does not exist in the current context\r
(4,7): error CS0103: The name 'Settings' does not exist in the current context\r
(5,7): error CS0103: The name 'Settings' does not exist in the current context"
}

#!import ../config/Settings.cs

bool useAzureOpenAI = false;

await Settings.AskAzureEndpoint(useAzureOpenAI);
await Settings.AskModel(useAzureOpenAI);
await Settings.AskApiKey(useAzureOpenAI);

First thing weird is that it doesn't import the Settings namespace, the file is present. I have the prerequisites and the first notebook executed fine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.