I would like to use Github Copilot AI completion model in a python script. I can not find proper documentation about API. I only found these that describe how to get metrics or do user management but not to send prompt to the model. How can I programmatically interact with Github Copilot?
I have and academic Github Copilot account and would like to allow other users having the same account to use my script.
I would like to use Github Copilot AI completion model in a python script. I can not find proper documentation about API. I only found these https://docs.github/en/rest/copilot?apiVersion=2022-11-28 that describe how to get metrics or do user management but not to send prompt to the model. How can I programmatically interact with Github Copilot?
I have and academic Github Copilot account and would like to allow other users having the same account to use my script.
Share Improve this question edited Nov 21, 2024 at 10:34 Leone asked Nov 20, 2024 at 19:24 LeoneLeone 311 silver badge4 bronze badges 02 Answers
Reset to default 1Short answer is - No for Github Copilot, but Yes for another GitHub product.
GitHub Copilot is not intended to expose any mechanism behind the scene, it's very complex and being changed everyday. The GitHub Copilot backend will have a specific proxy to handle and filter content - not going directly to Azure OpenAI as usual. Also the token and its lifetime is quite short and only use for application purpose, not development.
Another product - GitHub Models will allow you to explore any state-of-the-art model https://github/marketplace/models/, you may have to request joining the waitlist and wait for its approval. Read more here https://github.blog/news-insights/product-news/introducing-github-models/. Absolutely, the way you use it in Python code is the same way with Azure OpenAI, OpenAI SDK, having an endpoint and secret key then enjoy it.
Another product - GitHub Copilot Extension, allowing you to reuse GitHub Copilot credential to create an agent for specific task, such as @docker, @azure,.. once agent installed, developer can leverage GitHub Copilot Chat as usual. The market is still humble but it will be bigger soon https://github/marketplace?type=apps&copilot_app=true
You can write your own code to connect to the GitHub Copilot API. This is done very quickly with the new framework Sensei. Read more here: https://dev.to/blnkoff/sensei-simplify-api-client-generation-b2e
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742335061a4424485.html
评论列表(0条)