Skip to content

Commit

Permalink
docs: add configuration based config for repository context (#2299)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxiaoys authored May 30, 2024
1 parent c4abeff commit 2984816
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion website/docs/administration/context/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import CodeBrowserUrl from "./code-browser.png";

The repository 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.

## Adding a Repository Provider
## Adding a Repository through Admin UI

1. Navigate to the **Integrations > Repository Providers** page.

Expand All @@ -33,6 +33,26 @@ The repository context is used to connect Tabby with a source code repository fr

<img src={SelectRepoUrl} alt="select-repo" width="700" />

## 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.

```toml title="~/.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"
```

## 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.
Expand Down

0 comments on commit 2984816

Please sign in to comment.