docs/reference/deprecated-docs.mdx
If you're currently using the @Docs context provider, please migrate to the new approach outlined in our codebase and documentation awareness guide. The new approach provides:
Below is the original documentation for the @Docs context provider, preserved for reference
The @Docs context provider allows you to efficiently reference documentation directly within Continue.
To enable the @Docs context provider, add it to the list of context providers in your config.json file.
context: - provider: docs
</Tab>
<Tab title="JSON">
```json title="config.json"
{
"contextProviders": [
{
"name": "docs"
}
]
}
The @Docs context provider works by
Note: Documentation configuration should now be done directly in your config.yaml file. The previous docs blocks functionality has been deprecated.
To add a single documentation site, we recommend using the Add Documentation Form within the GUI. This can be accessed
@Docs context provider - type @Docs in the chat, hit Enter, and search for Add DocsMore page (three dots icon) in the @docs indexes section
the @Docs context provider.In the Add Documentation Form, enter a Title and Start URL for the site.
Title: The name of the documentation site, used for identification in the UI.Start URL: The URL where the indexing process should begin.Indexing will begin upon submission. Progress can be viewed in the form or later in the @docs indexes section of the More page.
Documentation sources may be suggested based on package files in your repo. This currently works for Python requirements.txt files and Node.js (Javascript/Typescript) package.json files.
+ icon) can be clicked to immediately kick off indexingFor bulk documentation site adds or edits, we recommend editing your global configuration file directly. Documentation sites are stored in an array within docs in your global configuration, as follows:
docs: - title: Nest.js startUrl: https://docs.nestjs.com/ faviconUrl: https://docs.nestjs.com/favicon.ico
</Tab>
<Tab title="JSON">
```json title="config.json"
{
"docs": [
{
"title": "Nest.js",
"startUrl": "https://docs.nestjs.com/",
"faviconUrl": "https://docs.nestjs.com/favicon.ico"
}
]
}
See the config reference for all documentation site configuration options.
Indexing will re-sync upon saving the configuration file.
If you have set up an embeddings provider, @docs will use your embeddings provider. Switching embeddings providers will trigger a re-index of all documentation sites in your configuration.
As with @Codebase context provider configuration, you can adjust the reranking behavior of the @Docs context provider with the nRetrieve, nFinal, and useReranking.
context: - provider: docs params: nRetrieve: 25 # The number of docs to retrieve from the embeddings query nFinal: 5 # The number of docs chunks to return IF reranking useReranking: true # use reranking if a reranker is configured (defaults to true)
</Tab>
<Tab title="JSON">
```json title="config.json"
{
"contextProviders": [
{
"name": "docs",
"params": {
"nRetrieve": 25, // The number of docs to retrieve from the embeddings query
"nFinal": 5, // The number of docs chunks to return IF reranking
"useReranking": true // use reranking if a reranker is configured (defaults to true)
}
}
]
}
The GitHub API rate limits public requests to 60 per hour. If you want to reliably index GitHub repos, you can add a github token to your config file:
<Tabs> <Tab title="YAML"> ```yaml title="config.yaml" name: My Config version: 0.0.1 schema: v1context: - provider: docs params: githubToken: <GITHUB_TOKEN>
</Tab>
<Tab title="JSON">
```json title="config.json"
{
"contextProviders": [
{
"name": "docs",
"params": {
"githubToken": "github_..."
}
}
]
}
By default, Continue crawls documentation sites using a specialized crawling service that provides the best experience for most users and documentation sites.
If your documentation is private, you can skip the default crawler and use a local crawler instead by setting useLocalCrawling to true.
docs: - title: My Private Docs startUrl: http://10.2.1.2/docs faviconUrl: http://10.2.1.2/docs/assets/favicon.ico, useLocalCrawling: true
</Tab>
<Tab title="JSON">
```json title="config.json"
{
"docs": [
{
"title": "My Private Docs",
"startUrl": "http://10.2.1.2/docs",
"faviconUrl": "http://10.2.1.2/docs/assets/favicon.ico",
"useLocalCrawling": true
}
]
}
Further notes:
useLocalCrawling is especially useful if the URL itself is confidential.You can view indexing statuses and manage your documentation sites from the @docs indexes section of the More page (three dots)
Click to re-index to trigger a reindex for a specific sourceCancel indexing to cancel the processYou can also view the overall status of currently indexing docs from a hideable progress bar at the bottom of the chat page
You can also use the following IDE command to force a re-index of all docs: Continue: Docs Force Re-Index.
The following configuration example works out of the box for VS Code. This uses the built-in embeddings provider with no reranking.
<Tabs> <Tab title="YAML"> ```yaml title="config.yaml" name: My Config version: 0.0.1 schema: v1context: - provider: docs
docs: - title: Nest.js startUrl: https://docs.nestjs.com/
</Tab>
<Tab title="JSON">
```json title="config.json"
{
"contextProviders": [
{
"name": "docs",
}
],
"docs": [
{
"title": "Nest.js",
"startUrl": "https://docs.nestjs.com/",
},
]
}
Here is the equivalent minimal example for Jetbrains, which requires setting up an embeddings provider.
<Tabs> <Tab title="YAML"> ```yaml title="config.yaml" name: My Config version: 0.0.1 schema: v1models: - name: LMStudio embedder provider: lmstudio model: nomic-ai/nomic-embed-text-v1.5-GGUF roles: - embed context: - provider: docs docs: - title: Nest.js startUrl: https://docs.nestjs.com/
</Tab>
<Tab title="JSON">
```json title="config.json"
{
"contextProviders": [
{
"name": "docs",
}
],
"docs": [
{
"title": "Nest.js",
"startUrl": "https://docs.nestjs.com/",
},
],
"embeddingsProvider": {
"provider": "lmstudio",
"model": "nomic-ai/nomic-embed-text-v1.5-GGUF"
}
}
The following configuration example includes:
models: - name: LMStudio Nomic Text provider: lmstudio model: nomic-ai/nomic-embed-text-v1.5-GGUF roles: - embed - name: Voyage Rerank-2 provider: voyage apiKey: <VOYAGE_API_KEY> model: rerank-2 roles: - rerank context: - provider: docs params: githubToken: <GITHUB_TOKEN> nRetrieve: 25 nFinal: 5 useReranking: true docs: - title: Nest.js startUrl: https://docs.nestjs.com/ - title: My Private Docs startUrl: http://10.2.1.2/docs faviconUrl: http://10.2.1.2/docs/assets/favicon.ico useLocalCrawling: true
</Tab>
<Tab title="JSON">
```json title="config.json"
{
"contextProviders": [
{
"name": "docs",
"params": {
"githubToken": "github_...",
"nRetrieve": 25,
"nFinal": 5,
"useReranking": true
}
}
],
"docs": [
{
"title": "Nest.js",
"startUrl": "https://docs.nestjs.com/"
},
{
"title": "My Private Docs",
"startUrl": "http://10.2.1.2/docs",
"faviconUrl": "http://10.2.1.2/docs/assets/favicon.ico",
"maxDepth": 4,
"useLocalCrawling": true
}
],
"reranker": {
"name": "voyage",
"params": {
"model": "rerank-2",
"apiKey": "<YOUR_VOYAGE_API_KEY>"
}
},
"embeddingsProvider": {
"provider": "lmstudio",
"model": "nomic-ai/nomic-embed-text-v1.5-GGUF"
}
}
This setup could also involve enabling Chromium as a backup for local documentation through the User Settings Page (Gear Icon).