Skip to content

datalayer/langchain-github-copilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

langchain-github-copilot

This package contains the LangChain integration with GithubCopilot

Installation

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:

Chat Models

ChatGithubCopilot class exposes chat models from GithubCopilot.

from langchain_github_copilot import ChatGithubCopilot

llm = ChatGithubCopilot()
llm.invoke("Sing a ballad of LangChain.")