https://github.com/faisal-fida/copilot-python
FastAPI server interacts with the GitHub Copilot (Reverse Engineered). This project is a FastAPI server that interacts with the GitHub Copilot API. It authenticates with GitHub and uses the access token to get code completions from GitHub Copilot.
https://github.com/faisal-fida/copilot-python
api copilot fastapi github reverse-engineering
Last synced: about 1 year ago
JSON representation
FastAPI server interacts with the GitHub Copilot (Reverse Engineered). This project is a FastAPI server that interacts with the GitHub Copilot API. It authenticates with GitHub and uses the access token to get code completions from GitHub Copilot.
- Host: GitHub
- URL: https://github.com/faisal-fida/copilot-python
- Owner: faisal-fida
- Created: 2024-03-25T07:31:59.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-25T07:38:50.000Z (about 2 years ago)
- Last Synced: 2025-01-08T08:46:05.674Z (about 1 year ago)
- Topics: api, copilot, fastapi, github, reverse-engineering
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitHub Copilot API Server
This project is a FastAPI server that interacts with the GitHub Copilot API. It authenticates with GitHub and uses the access token to get code completions from GitHub Copilot.
## Technologies Used
- Python
- FastAPI
- HTTPX
## Getting Started
1. Clone the repository.
2. Install the dependencies with `pip install poetry && poetry install && poetry shell`.
3. Run the server with `python main.py`.
## API Endpoints
- `POST /copilot/completion/`: Get code completions from GitHub Copilot. The request body should contain a `prompt` and an optional `language` (default is "python").
## Environment Variables
- `GITHUB_CLIENT_ID`: Your GitHub client ID.
- `GITHUB_CLIENT_SECRET`: Your GitHub client secret.
- `GITHUB_REDIRECT_URI`: Your GitHub redirect URI.
## License
This project is licensed under the MIT License.
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.