Skip to content

Demo Copilot Extension that connect to Dust

Notifications You must be signed in to change notification settings

Djiit/github-copilot-dust

Repository files navigation

GitHub Copilot Extension for Dust

Warning

This is a work in progress and not yet ready for use. Documentation and code may be incomplete or incorrect.

This is a GitHub Copilot extension that allows you to send messages to the Dust assistant. You will need to have an active Dust subscription to use this extension.

Note

This extension is a "skillset". Refer to the GitHub Copilot documentation for more information.

Usage

Setup up your application: https://docs.github.com/en/copilot/building-copilot-extensions/setting-up-copilot-extensions

You'll need at least 2 skills, as in the screenshot below:

Skills

Here is an example of the dust skill parameters, that should map to the /skills/dust endpoint.

{
  "type": "object",
  "properties": {
    "assistant": {
      "type": "string",
      "description": "Name of the assistant to talk to."
    },
    "message": {
      "type": "string",
      "description": "The message to send to Dust",
      "required": "true"
    }
  }
}

Copy and adjust the .env file:

cp .env .env.local

Run the server:

pnpm run dev

Optionally expose the server to the internet using e.g. ngrok to test it live from GitHub Copilot:

ngrok http 3000

Deployment

Using Docker

A docker image is available on GitHub Container Registry at ghcr.io/djiit/github-copilot-dust.

You can run it with the following command:

docker run \
  -p 3000:3000 \
  -e DUST_WORKSPACE_ID=your-workspace-id \
  -e DUST_API_KEY=your-api-key \
  - OTEL_SERVICE_NAME=github-copilot-dust \ # Optional
  ghcr.io/djiit/github-copilot-dust:main

Observability

It uses OpenTelemetry for observability. You can disable it by setting OTEL_SDK_DISABLED=true.

Metrics

It exposes a /metrics endpoint for Prometheus monitoring on port 9464.

Traces

You can configure it using any supported environment variables. E.g. to export traces to a local Jaeger instance listening on default port, set:

export OTEL_TRACES_EXPORTER="otlp"
export OTEL_EXPORTER_OTLP_PROTOCOL="http/json"

About

Demo Copilot Extension that connect to Dust

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages