Skip to main content

Module github_copilot

Module github_copilot 

Source
Expand description

GitHub Copilot API client for LLMG

Implements the Provider trait for GitHub Copilot Chat API using OAuth device flow.

Authentication Flow:

  1. Get device code from GitHub
  2. User visits verification URL and enters code
  3. Poll for access token
  4. Exchange access token for Copilot API key

Environment variables:

  • GITHUB_COPILOT_ACCESS_TOKEN: Cached OAuth access token
  • GITHUB_COPILOT_API_KEY: Cached Copilot API key
  • GITHUB_COPILOT_TOKEN_DIR: Directory to store tokens (default: ~/.config/llmg/github_copilot)

Structsยง

GitHubCopilotClient
GitHub Copilot API client