GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — semantic-kernel-starters/sk-typescript-console-chat at main · microsoft/semantic-kernel-starters

Expand file tree

/

sk-typescript-console-chat

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

sk-typescript-console-chat

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
.eslintrc.json
.eslintrc.json
 
 
.gitignore
.gitignore
 
 
consoleChat.ts
consoleChat.ts
 
 
consoleColours.ts
consoleColours.ts
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
readme.md
readme.md
 
 
sk-typescript-console-chat.csproj
sk-typescript-console-chat.csproj
 
 
tsconfig.json
tsconfig.json
 
 

readme.md

Example: Using .NET Semantic Kernel to call Azure OpenAI

The consoleChat.js script dynamically loads the Microsoft.SemanticKernel .NET assembly and uses it to call Azure OpenAI.

This application allows you to have a conversation with Azure OpenAI. It will ask you to enter your question and return the response. You can continue the conversation by entering another question. When finished, type goodbye to end the conversation.

To run this example, first set the following environment variables, as System variables, referencing your Azure OpenAI deployment:

  • OPENAI_ENDPOINT
  • OPENAI_DEPLOYMENT
  • OPENAI_KEY

Then run the following commands in sequence:

Command Explanation
dotnet build Install SemanticKernel nuget packages into the project and generate type definitions.
npm install Install node-api-dotnet npm package into the project.
npm run build Transpile the typescript to javascript.
node consoleChat.js Run consoleChat JS code that uses the above packages to call the Azure OpenAI service.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.