Skip to main content

Context Providers

Tabby Context supports two kinds of context currently:

  1. source code repositories
  2. developer docs

The source code context is used to connect Tabby with a source code repository from Git, GitHub, GitLab, etc. Tabby fetches the source code from the repository, parses it into an AST, and stores it in the index. During LLM inference, this context is utilized for code completion, as well as chat and search functionalities.

The developer docs context is currently on Beta, it is a critical source for engineering knowledge, simply press the @ button in the chat interface and select the document you wish to include, Tabby will include these documents when interacting with LLMs.

Adding a Repository through Admin UI​

  1. Navigate to the Integrations > Context Providers page.
Context Providers
  1. Click Create to begin the process of adding a repository provider.
  • For Git, you only need to fill in the name and the URL of the repository.

    Git

    Local repositories are supported via the file:// protocol, but if running from a Docker container, you need to make it accessible with the --volume flag and use the internal Docker path.

  • For GitHub / GitLab, a personal access token is required to access private repositories.

    • Check the instructions in the corresponding tab to create a token.
    GitHub or GitLab
    • Once the token is set, you can add the repository by selecting it from the dropdown list.
    select-repo
  1. After adding the repository, a job will be created to fetch its information and build it into the index. You can view the job's log on the Jobs page.

    job-linkjob-log

Adding a Repository through configuration file​

~/.tabby/config.toml is the configuration file for Tabby. You can add repositories with it as well, and it's also the only way to add a repository for the Tabby OSS.

~/.tabby/config.toml
[[repositories]]
name = "tabby"
git_url = "https://github.com/TabbyML/tabby.git"

# git through ssh protocol.
[[repositories]]
name = "CTranslate2"
git_url = "[email protected]:OpenNMT/CTranslate2.git"

# local directory is also supported!
[[repositories]]
name = "repository_a"
git_url = "file:///home/users/repository_a"

Adding a Developer Doc through Admin UI​

  1. Navigate to the Integrations > Context Providers page, and then select the Developer Docs(Beta).
Context Providers
  1. Turn on the switch to enable the integrated sites, or click the + button to add your own URLs
Document

Verifying the Repository Provider​

Once connected, the indexing job will start automatically. You can check the status of the indexing job on the Information > Jobs page.

Additionally, you can also visit the Code Browser page to view the connected repository.

code browser entry code browser