8000 GitHub - yuhattor/copilot-extension-dadstaxi
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

yuhattor/copilot-extension-dadstaxi

 
 

Repository files navigation

Dadstaxi Copilot Chat Example

Visual Studio Code's Copilot Chat architecture enables extension authors to integrate with the GitHub Copilot Chat experience. A chat extension is a VS Code extension that uses the Chat extension API by contributing a Chat participant. Chat participants are domain experts that can answer user queries within a specific domain.

The Language Model API enables you to use the Language Model and integrate AI-powered features and natural language processing in your Visual Studio Code extension.

When an extension uses the Chat or the Language Model API, we call it a GitHub Copilot Extension, since GitHub Copilot is the provider of the Chat and the Language Model experience.

This GitHub Copilot Extension sample shows:

  • How to contribute a chat participant to the GitHub Copilot Chat view.
  • How to return static responses to user queries.
  • How to use the Language Model API to request access to the Language Model (gpt-4o, gpt-3.5-turbo, gpt-4).

demo

Related documentation for the demo this is based on can be found here:

Installation

You can install this as an extension in VSCode from the marketplace - StuartEggerton.dadstaxi-chat-sample

Example usage

  • @dadstaxi /help - shows the help message
  • @dadstaxi /book pickup dog 3PM Wednesday - book a taxi
  • @dadstaxi /bookings - show the bookings
  • @dadstaxi can you book a cab - this will refuse to book a cab but will demo calling the language model to get a random dad joke

Developers

If you install this from the marketplace you can ignore this section. This is the inner loop for how you would develop an extension like this...

Running the Sample Locally as a developer

  • Run npm install in terminal to install dependencies
  • Run the Run Extension target in the Debug View. This will:
    • Start a task npm: watch to compile the code
    • Run the extension in a new VS Code window
    • You will see the @dadstaxi chat participant show in the GitHub Copilot Chat view

alt text

Privacy

This extension does not store the bookings - these are static and only exist in memory to generate a response. The language model is not called for any real data, only for generating samples.

If you want to build your own privacy focused extension, you should consider the following:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.9%
  • Shell 0.1%
0