GitHub Copilot Provider for Pydantic AI
Project description
gh-copilot-pydantic-ai
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 asclaicommand frompydantic-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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gh_pydantic_ai-0.3.2.tar.gz.
File metadata
- Download URL: gh_pydantic_ai-0.3.2.tar.gz
- Upload date:
- Size: 34.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c596c61f81a8c055ec2d57fefb7e976800115e3890d3865261dcfc48f683a26b
|
|
| MD5 |
254d616bd85a30699fc69c2ebeab79fb
|
|
| BLAKE2b-256 |
9164b2bf6c01d4cf6def1b9e9a790d1ac519ec92ef5baed996a702bc80a2abbc
|
File details
Details for the file gh_pydantic_ai-0.3.2-py3-none-any.whl.
File metadata
- Download URL: gh_pydantic_ai-0.3.2-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c16549a01c9161036168e46abe6229a2b4cbeaa8a2f63588e8bd16c76a4eea55
|
|
| MD5 |
82a3280af30b3dcde21a66066ded5c25
|
|
| BLAKE2b-256 |
85799bb293c6ddf2ba3341c9aa59a0f6de1f528a1b081090887d417b55650939
|