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.4.0.tar.gz (49.7 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.4.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gh_pydantic_ai-0.4.0.tar.gz
  • Upload date:
  • Size: 49.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for gh_pydantic_ai-0.4.0.tar.gz
Algorithm Hash digest
SHA256 97d8fe09a1ad1b9408a32d857f3967fe3e00e4dc3fc5633299d205dfcb6bb29a
MD5 bbfecc5223913acd4c3a467884a917ab
BLAKE2b-256 024d78a1dab8a808cec34cf637e349bd162a2016c770be35abaed92df397e292

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gh_pydantic_ai-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for gh_pydantic_ai-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 23af6a53b1b1b65b5dc4b73900fba23c4fb2a8ee7e13ac3527abd992891cef4c
MD5 f7c2f67b8ec3af3401e49b450aa79a5c
BLAKE2b-256 26ddce4095f5f3648afa078bcbf14397fc71f87422d678333c9fec6a956e1491

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