https://github.com/copilot-extensions/github-models-extension
Copilot Extension to connect and chat with GitHub Models
https://github.com/copilot-extensions/github-models-extension
code-sample extension models
Last synced: 7 months ago
JSON representation
Copilot Extension to connect and chat with GitHub Models
- Host: GitHub
- URL: https://github.com/copilot-extensions/github-models-extension
- Owner: copilot-extensions
- Created: 2024-08-06T20:13:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-11T16:41:37.000Z (8 months ago)
- Last Synced: 2025-05-07T01:13:19.990Z (8 months ago)
- Topics: code-sample, extension, models
- Language: TypeScript
- Homepage:
- Size: 130 KB
- Stars: 87
- Watchers: 4
- Forks: 45
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - copilot-extensions/github-models-extension - Copilot Extension to connect and chat with GitHub Models (TypeScript)
README
# @models Copilot Extension
This is an agent-based [GitHub Copilot Extension](https://docs.github.com/en/copilot/using-github-copilot/using-extensions-to-integrate-external-tools-with-copilot-chat) that provides a way to interact with [GitHub Models](https://github.blog/news-insights/product-news/introducing-github-models/), directly in Copilot Chat.
## What it can do
You can ask it things like "what models are available?" or "which model should I use for my use-case?". You can also ask it to execute a basic prompt using a particular model.
| Description | Image |
| --- |--- |
| User asking `@models` for a recommended model that is low-cost and supports function calling |  |
| Dialogue with the Extension, asking for an OpenAI model |  |
| User executing a basic prompt using the model that the extension recommended |  |
## Development
1. Install dependencies:
```bash
npm install
```
2. Run the server
- To run in development mode:
```bash
npm run dev
```
- To build and run in production mode:
```bash
npm run build && npm start
```
3. Follow [this guide](https://docs.github.com/en/copilot/building-copilot-extensions/creating-a-copilot-extension/configuring-your-server-to-deploy-your-copilot-agent#configuring-your-server) to make your server accessible to the internet
In short, we would expose a public URL for our local server using the following command (follow the guide for detailed setup instructions):
```
ngrok http http://localhost:3000
```
4. Follow [this guide](https://docs.github.com/en/copilot/building-copilot-extensions/creating-a-copilot-extension/creating-a-github-app-for-your-copilot-extension) to create a GitHub app
5. Follow [this guide](https://docs.github.com/en/copilot/building-copilot-extensions/creating-a-copilot-extension/configuring-your-github-app-for-your-copilot-agent) to configure the app to use the public URL from (3.)
6. Use your newly installed app! On any copilot enabled page, type `@your-app-name ` (from the app created in 4.) to interact with your local installation of this extension!
## Copilot Extensions Documentation
- [Using Copilot Extensions](https://docs.github.com/en/copilot/using-github-copilot/using-extensions-to-integrate-external-tools-with-copilot-chat)
- [About building Copilot Extensions](https://docs.github.com/en/copilot/building-copilot-extensions/about-building-copilot-extensions)
- [Set up process](https://docs.github.com/en/copilot/building-copilot-extensions/setting-up-copilot-extensions)
- [Communicating with the Copilot platform](https://docs.github.com/en/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-the-copilot-platform)
- [Communicating with GitHub](https://docs.github.com/en/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-github)