Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ziincinc/copilot

Repository files navigation

ziinc-copilot

This project is a Go application that demonstrates how to use retrieval augmented generation in an agent-based GitHub Copilot Extension.

Installation:

  1. Clone the repository:
git clone git@github.com:copilot-extensions/rag-extension.git
cd rag-extension
  1. Install dependencies:
go mod tidy

Usage

  1. Start up ngrok with the port provided:
ngrok http http://localhost:8080
  1. Set the environment variables (use the ngrok generated url for the FDQN)
  2. Run the application:
go run .

Accessing the Agent in Chat:

  1. In the Copilot tab of your Application settings (https://github.com/settings/apps//agent)
  • Set the URL that was set for your FQDN above with the endpoint /agent (e.g. https://6de513480979.ngrok.app/agent)
  • Set the Pre-Authorization URL with the endpoint /auth/authorization (e.g. https://6de513480979.ngrok.app/auth/authorization)
  1. In the General tab of your application settings (https://github.com/settings/apps/)
  • Set the Callback URL with the /auth/callback endpoint (e.g. https://6de513480979.ngrok.app/auth/callback)
  • Set the Homepage URL with the base ngrok endpoint (e.g. https://6de513480979.ngrok.app/auth/callback)
  1. Ensure your permissions are enabled in Permissions & events >
  • Account Permissions > Copilot Chat > Access: Read Only
  1. Ensure you install your application at (https://github.com/apps/)
  2. Now if you go to https://github.com/copilot you can @ your agent using the name of your application.

What Can It Do

Test out the agent with the following commands!

Description Prompt
User asking @agent how to configure a Copilot extension @agent How do I configure a copilot extension?
User asking @agent what a Copilot extension looks like @agent What is the response format for a copilot extension?

Copilot Extensions Documentation

About

Topics

Resources

Readme

License

MIT license

Code of conduct

Code of conduct

Security policy

Security policy

Stars

Watchers

Forks

Packages

Contributors