This is a Sinatra-based application that serves as a bridge between GitHub Copilot and GPT-4 model. It provides endpoints to interact with the GPT-4 model and handles authorization using GitHub tokens.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You need to have Ruby installed on your machine. You can check if you have Ruby installed by running:
ruby -v
Clone the repository:
git clone https://github.com/lululau/copilot2gpt.git
cd copilot2gpt
Install the required gems:
bundle install
You can start the application by running:
bundle exec exe/copilot2gpt
The application will start on port 8080.
The application provides the following endpoints:
GET /openai/models
: Returns a list of available models.POST /openai/chat/completions
: Mocks a Cloudflare AI Gateway APIPOST /v1/chat/completions
: Completes a chat with the AI model.
This application can also be run in a Docker container. Build the Docker image by running:
docker build -t your-image-name .
Then, you can start the application in a Docker container by running:
docker run -p 8080:8080 your-image-name
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
This project is licensed under the MIT License - see the LICENSE.md file for details.