PageSourceSearch

https://tabby.tabbyml.com/assets/js/bec3d5f9.935678ad.js

js tabbyml.com collected 2026-10-02 05:54:02 UTC 9,360 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7228],{29679:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>b,contentTitle:()=>x,default:()=>y,frontMatter:()=>u,metadata:()=>m,toc:()=>f});var i=n(74848),o=n(28453);const s=n.p+"assets/images/context-providers-4cb9e56472fa948a1b98fcc653bf2706.png",r=n.p+"assets/images/git-fb39f59a2e7ca38fff432120c89ca5f0.png",a=n.p+"assets/images/github-gitlab-575ddf84394aab155678b4df27f56412.png",d=n.p+"assets/images/select-repo-0a50e4667fd5910fdf5719a1ebd2cb6e.png",c=n.p+"assets/images/code-browser-entry-dc4ec5a80ac67d71e6c581d9edd65387.png",l=n.p+"assets/images/code-browser-f452b12601e97664e7529fd042092d31.png",h=n.p+"assets/images/document-b60f9d8de2b02377e6948fc2ba58511f.png",p=n.p+"assets/images/repository-job-ff7b5eda5c58e060f6bef16cd25456ae.png",g=n.p+"assets/images/repository-job-run-d2e0cb29ba5f629d851e69f51a78dab4.png",u={sidebar_position:10},x="Context Providers",m={id:"administration/context/index",title:"Context Providers",description:"Tabby Context supports two kinds of context currently:",source:"@site/docs/administration/context/index.mdx",sourceDirName:"administration/context",slug:"/administration/context/",permalink:"/docs/administration/context/",draft:!1,unlisted:!1,editUrl:"https://github.com/TabbyML/tabby/edit/main/website/docs/administration/context/index.mdx",tags:[],version:"current",sidebarPosition:10,frontMatter:{sidebar_position:10},sidebar:"tutorialSidebar",previous:{title:"Usage Analytics",permalink:"/docs/administration/usage-analytics/"},next:{title:"Code Completion",permalink:"/docs/administration/code-completion"}},b={},f=[{value:"Adding a Repository through Admin UI",id:"adding-a-repository-through-admin-ui",level:2},{value:"Adding a Repository through configuration file",id:"adding-a-repository-through-configuration-file",level:2},{value:"Adding a Developer Doc through Admin UI",id:"adding-a-developer-doc-through-admin-ui",level:2},{value:"Verifying the Repository Provider",id:"verifying-the-repository-provider",level:2}];function j(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"context-providers",children:"Context Providers"}),"\n",(0,i.jsx)(t.p,{children:"Tabby Context supports two kinds of context currently:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsx)(t.li,{children:"Source code repositories"}),"\n",(0,i.jsx)(t.li,{children:"Developer docs"}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["The source code repositories context is used to connect Tabby with a source code repository from Git, GitHub, GitLab, etc.\nTabby fetches the ",(0,i.jsx)(t.strong,{children:"codebase"}),", ",(0,i.jsx)(t.strong,{children:"pull requests / merge requests"}),", ",(0,i.jsx)(t.strong,{children:"issues"}),", and ",(0,i.jsx)(t.strong,{children:"commits"})," 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. View the use case in ",(0,i.jsx)(t.a,{href:"../answer-engine#source-code-repositories",children:"Answer Engine - Source Code Repositories"})]}),"\n",(0,i.jsxs)(t.p,{children:["The developer docs context is a critical source for engineering knowledge,\nsimply press the ",(0,i.jsx)(t.code,{children:"@"})," button in the chat interface and select the document you wish to include,\nTabby will include these documents when interacting with LLMs. View the use case in ",(0,i.jsx)(t.a,{href:"../answer-engine#developer-documentation",children:"Answer Engine - Developer Documentation"})]}),"\n",(0,i.jsx)(t.h2,{id:"adding-a-repository-through-admin-ui",children:"Adding a Repository through Admin UI"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:["Navigate to the ",(0,i.jsx)(t.strong,{children:"Integrations > Context Providers"})," page."]}),"\n"]}),"\n",(0,i.jsx)("img",{src:s,alt:"Context Providers"}),"\n",(0,i.jsxs)(t.ol,{start:"2",children:["\n",(0,i.jsxs)(t.li,{children:["Click ",(0,i.jsx)(t.strong,{children:"Create"})," to begin the process of adding a repository provider."]}),"\n"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"For Git, you only need to fill in the name and the URL of the repository."}),"\n",(0,i.jsx)("img",{src:r,alt:"Git",width:"700"}),"\n",(0,i.jsxs)(t.p,{children:["Local repositories are supported via the ",(0,i.jsx)(t.code,{children:"file://"})," protocol, but if running from a Docker container, you need to make it accessible with the ",(0,i.jsxs)(t.a,{href:"https://docs.docker.com/reference/cli/docker/container/run/#volume",children:[(0,i.jsx)(t.code,{children:"--volume"})," flag"]})," and use the internal Docker path."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"For GitHub / GitLab, a personal access token is required to access private repositories."}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Check the instructions in the corresponding tab to create a token."}),"\n"]}),"\n",(0,i.jsx)("img",{src:a,alt:"GitHub or GitLab",width:"700"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Once the token is set, you can add the repository by selecting it from the dropdown list."}),"\n"]}),"\n",(0,i.jsx)("img",{src:d,alt:"select-repo",width:"700"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.ol,{start:"3",children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["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 ",(0,i.jsx)(t.code,{children:"Jobs"})," page."]}),"\n",(0,i.jsxs)("div",{children:[(0,i.jsx)("img",{src:p,alt:"job-link"}),(0,i.jsx)("img",{src:g,alt:"job-log"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"adding-a-repository-through-configuration-file",children:"Adding a Repository through configuration file"}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.code,{children:"~/.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."]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-toml",metastring:'title="~/.tabby/config.toml"',children:'[[repositories]]\nname = "tabby"\ngit_url = "https://github.com/TabbyML/tabby.git"\n\n# git through ssh protocol.\n[[repositories]]\nname = "CTranslate2"\ngit_url = "[email protected]:Ope
1nNMT/CTranslate2.git"\n\n# local directory is also supported!\n[[repositories]]\nname = "repository_a"\ngit_url = "file:///home/users/repository_a"\n'})}),"\n",(0,i.jsx)(t.h2,{id:"adding-a-developer-doc-through-admin-ui",children:"Adding a Developer Doc through Admin UI"}),"\n",(0,i.jsx)(t.admonition,{title:"Note",type:"info",children:(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:["By default, Tabby uses the ",(0,i.jsx)(t.strong,{children:(0,i.jsx)(t.a,{href:"https://github.com/projectdiscovery/katana",children:"Katana"})})," to crawl developer documentation. For ",(0,i.jsx)(t.strong,{children:"Docker deployments"}),", Katana is pre-installed in the container image. ",(0,i.jsx)(t.strong,{children:"Non-Docker deployments"})," require manual Katana installation."]}),"\n",(0,i.jsxs)(t.li,{children:["If a developer documentation site implements the ",(0,i.jsx)(t.strong,{children:(0,i.jsx)(t.a,{href:"https://llmstxt.org/",children:"llms.txt"})})," standard, Tabby directly retrieves and indexes the specified documents, instead of using Katana for automated crawling."]}),"\n"]})}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:["Navigate to the ",(0,i.jsx)(t.strong,{children:"Integrations > Context Providers"})," page, and then select the ",(0,i.jsx)(t.code,{children:"Developer Docs(Beta)"}),"."]}),"\n"]}),"\n",(0,i.jsx)("img",{src:s,alt:"Context Providers"}),"\n",(0,i.jsxs)(t.ol,{start:"2",children:["\n",(0,i.jsxs)(t.li,{children:["Turn on the switch to enable the integrated sites, or click the ",(0,i.jsx)(t.code,{children:"+"})," button to add your own URLs"]}),"\n"]}),"\n",(0,i.jsx)("img",{src:h,alt:"Document"}),"\n",(0,i.jsx)(t.h2,{id:"verifying-the-repository-provider",children:"Verifying the Repository Provider"}),"\n",(0,i.jsxs)(t.p,{children:["Once connected, the indexing job will start automatically. You can check the status of the indexing job on the ",(0,i.jsx)(t.strong,{children:"Information > Jobs"})," page."]}),"\n",(0,i.jsxs)(t.p,{children:["Additionally, you can also visit the ",(0,i.jsx)(t.strong,{children:"Code Browser"})," page to view the connected repository."]}),"\n",(0,i.jsx)("img",{src:c,alt:"code browser entry",width:"300"}),"\n",(0,i.jsx)("img",{src:l,alt:"code browser",width:"800"})]})}function y(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(j,{...e})}):j(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>a});var i=n(96540);const o={},s=i.createContext(o);function r(e){const t=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.