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

Uploaded Python 3

File details

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

File metadata

  • Download URL: gh_pydantic_ai-0.3.3.tar.gz
  • Upload date:
  • Size: 47.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","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.3.3.tar.gz
Algorithm Hash digest
SHA256 4d9e5dfdca9505d1aa64c5cbf4c68dc92338102faac23e18572a30cdaa82d8b6
MD5 8954c9e4f3be5a619b5e1cc192ae60a8
BLAKE2b-256 778c5d8a21ff19b7af8649f39ecac3a18bd0bf893053a770bd4d9f960504210f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gh_pydantic_ai-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","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.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6d144b6809c890043be92e1261ed5997724f299d8a1789d024012ce94ec44763
MD5 c6bc5b5f4dc24e5f892857778c747d65
BLAKE2b-256 4aef06807926a8c78c601323160d8d3389c800f3fee21f6ce64b7636f240b3aa

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