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 GHCopilotChatModel
from pydantic_ai import Agent

agent = Agent(
    model=GHCopilotChatModel()
)

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.3.0.tar.gz (33.9 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.3.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gh_pydantic_ai-0.3.0.tar.gz
Algorithm Hash digest
SHA256 bee7dedc525eaad9cbbbe377efbf7c741681581084a3dd59733fce69f26c6ee3
MD5 b2bba3df80586dbfe4ec11dc2d5e4ac6
BLAKE2b-256 c30091e039e328b37675036609f7a1a5fb91cf4dc322b1c253b685979cd11ed5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gh_pydantic_ai-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 87fa5cd8bac5ba3cb1de28440e606e4e8f9da64454bfc7754403c1d5c2f758f6
MD5 cf81eab2560efd6ec8282f52c779da42
BLAKE2b-256 bbb400b37e5792ea27144ff7f56883b195c2761b3525f206024a9f9c8f2ff0f6

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