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.3.tar.gz (69.5 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.3-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gh_pydantic_ai-0.1.3.tar.gz
Algorithm Hash digest
SHA256 3d8b5ccd2459c2383e3c2de29c9464a95bd3babd5358a18eb61c6eaa0501b13e
MD5 3699d920155ae2107d04f49050821171
BLAKE2b-256 e86a935d4a733edf3ffd64fe3120d109bd67918ac06c92f9df918a80f34282f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gh_pydantic_ai-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 376f213b983c0ea0287d710fce59d9ec95ddaa90242f9424b438c4d7c7193311
MD5 19ccc0ddc08a1b09c61004b3d723a2e6
BLAKE2b-256 3adbebd003cec995e890d3bfeb1a1b010b001a467f23f1bc0dfb82e7cdac9eb1

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