Recently Open AI introduced custom GPTs, and the feature that made me exited was actions. According to their docs:
Actions allow GPTs to integrate external data or interact with the real-world, such as connecting GPTs to databases, plugging them into your emails, or making them your shopping assistant, all through APIs.
What if we make GPT to interact with GitHub repositories with GitHub API?
Here's the list of actions that could be useful:
- Create a repository
- Read files from a repository
- Create or update files in a repository
Probably, such custom GPT can open new possibilities in our developer's workflow.
So I've created a custom GPT. Here's the link
In order to enable this GPT to interact with your GitHub, you should provide access token. Here's how to generate it:
- Go to GitHub and open Settings
- Click Developer Settings in the sidebar menu
- Click Personal access token menu
- You can generate Fine grained tokens or classic tokens. Please take into account, that if you want this GPT to create repo, you should give bigger scope.
Let's open our custom GPT:
Let's put this prompt:
You should create Vanilla JS project without dependencies.
I will open index.html, and I will see there one button called "Increase". Each item I press the button, I see the big number above the button which is incremented. Each time I press the button, the number is incremented and can be seen in the UI. Button should be also big. Both button and number should be at the center of the page. Button is below the number.
You can generate files and upload them to GitHub right away.
GPT responded showing the understanding of what it should do. It requested an auth token from me, to interact with GitHub from my account.
It performed two actions, and gave me the link to the repository
Here's the result when I've opened index.html
file:
Link to the AI generated repository
Link to the custom GPT
I think in the near future we will have very capable GPTs, that will be able to do the work for us, developers. And our role will come to the following:
- Generate prompts according to requirements/specifications of stakeholders
- Feed this prompts to custom GPTs, and receive git commits as outputs.
- Check the work, making sure that everything is working as expected. Do some small changes in code if necessary.
Please let me know what do you think.
In the next post I will provide a more complicated use case.
Top comments (0)