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.0.tar.gz (42.2 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.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gh_pydantic_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d8c057489ce16d1ba943ff9376d0b64f14ccb7af6d12c62adc1d0a50c2d13962
MD5 04d985f98bcf66f752ec29763de56b9c
BLAKE2b-256 0fc4a763695dbebfe3728eb115a68e8802da52ba62d72e0e814cabe9214eb857

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gh_pydantic_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3fbfe06dbd1c6f4d84e58bc1121336aefa56eada1a869b8b752c9450a2e07a4d
MD5 fcc2317a3fa893acb7cef03fe214d650
BLAKE2b-256 181fa898956b9890af89c47948c5ea84db77a9c193f9cc66d46f8d37ba717a45

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