Skip to main content

GitHub Copilot Provider for Pydantic AI

Project description

gh-copilot-pydantic-ai

License: MIT PyPI version Python Version

GitHub Copilot Provider for Pydantic AI.

Inspired by ericc-ch/copilot-api/.

Installation

Install the package using pipx or your favorite package manager:

pip install gh-pydantic-ai
# or with uv
uv tool install gh-pydantic-ai

CLI Usage

Authentication

First, you need to authenticate with your GitHub account.

gh-clai-internal auth

Query

After authentication, you can use the gh-clai command to interact with GitHub Copilot:

gh-clai "What is the capital of France?"

Library Usage

This library also provides GHCopilotModel for integration with Pydantic AI.

from gh_pydantic_ai import GHCopilotModel
from pydantic_ai import Agent

agent = Agent(
    model=GHCopilotModel()
)

result = agent.run_sync("What is the capital of France?")
print(result)

Commands

  • gh-clai: Main command to interact with GitHub Copilot, works same as clai command from pydantic-ai.
  • gh-clai-internal: Internal commands for authentication and other utilities.
    • auth: Authenticate with GitHub.
    • models: List available models.
    • usage: Show usage information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gh_pydantic_ai-0.1.1.tar.gz (66.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gh_pydantic_ai-0.1.1-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file gh_pydantic_ai-0.1.1.tar.gz.

File metadata

  • Download URL: gh_pydantic_ai-0.1.1.tar.gz
  • Upload date:
  • Size: 66.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.0

File hashes

Hashes for gh_pydantic_ai-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0010d57f6154fa7370f55a79c23b0c8c43997b978ac870b32e44c7fb090def03
MD5 0bd45ec2bbfd90adfc1020bf9241d640
BLAKE2b-256 db659381b5f2cffb2486a825c168198bea2785e6e71dddfda85c6ec5a571d838

See more details on using hashes here.

File details

Details for the file gh_pydantic_ai-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for gh_pydantic_ai-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5847679afa8e99fc5a079110efe84fcad1cb3001622a581dcb42e3ae72e3a82c
MD5 3bb74f9e201f8edd689f35744ed51ebf
BLAKE2b-256 a7cbc413c3eec4d17699fa59724349663c817699f6487ab46552bc65f75ac69d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page