This package contains the LangChain integration with GithubCopilot
pip install -U langchain-github-copilot
And you should configure credentials by setting the following environment variables:
GITHUB_TOKEN
How to get a Github Token?
Run the setup.py
python script to create a .env
file with the Github Token.
IMPORTANT
The Github Token generated expires after 25 minutes. We are currently working on a solution to refresh the token automatically. If needed, rerun the setup.py script to generate a new token.
python setup.py
Ressources used to understand how to generate a Github Token:
ChatGithubCopilot
class exposes chat models from GithubCopilot.
from langchain_github_copilot import ChatGithubCopilot
llm = ChatGithubCopilot()
llm.invoke("Sing a ballad of LangChain.")