diff --git a/docs/.continue/rules/copy.md b/docs/.continue/rules/copy.md new file mode 100644 index 000000000..1e0d9b391 --- /dev/null +++ b/docs/.continue/rules/copy.md @@ -0,0 +1,193 @@ +--- +description: copywriting +name: docs copy +--- + +# Copywriting Guidelines + +## Keep It Clear and Concise + +- Avoid unnecessary words. Get straight to the point. +- **Example:** Instead of *"Your cluster will start as soon as possible,"* say **"Launch instantly."** + +## No Fluff or Marketing Speak + +- Avoid phrases that sound overly promotional or vague. +- **Example:** Instead of *"Unlock the power of GPUs,"* say **"Deploy an H100 GPU cluster."** + +## Action-Oriented Language + +- Focus on what the user needs to do, not generic descriptions. +- **Example:** Instead of *"You will need the SF Compute CLI and kubectl,"* say **"Install @SF Compute CLI and @kubectl to access your cluster."** + +## Consistent Formatting & Terminology + +- Use the same terms across the app (e.g., **"Cluster Duration"** instead of sometimes saying **"Run Time"**). +- Use numerals for numbers (**"8 GPUs"**, not **"eight GPUs"**). + +## Be Precise About Technical Details + +- If something requires installation, say so. +- If a feature is unavailable, specify when it’s coming or provide an alternative. + +## No Redundant Information + +- Don't repeat what the user already knows. +- **Example:** Instead of *"You are placing an order for a K8s cluster,"* just tell them what they need to do next. + +## Make Buttons and Actions Clear + +- **"Place Order"** → **"Confirm Order"** (if payment isn’t immediate). +- **"Make Changes"** → **"Edit Order"** (for clarity). +- Buttons should be title casing + +## Use a Neutral, Professional Tone + +- Avoid overly casual language unless intentional. +- **Example:** Instead of *"Almost there! Just install this tool,"* say **"Install @SF Compute CLI and @kubectl to access your cluster."** + +## Anticipate User Questions + +- If something might be unclear, preemptively address it. +- **Example:** If persistent storage isn’t available yet, say **"Persistent storage (Coming soon). Contact us for alternatives."** + +## Ensure UI Copy Feels Integrated + +- Help text shouldn’t feel disconnected from the main UI. +- **Example:** If help text is too far from the relevant section, move it closer or embed it as a bullet point. + +## Avoid Ambiguous Timeframes + +- Be **precise** about when something will happen. +- **Example:** Instead of *"Your cluster will start shortly,"* say **"Your cluster will be ready in under 60 seconds."** + +## Use User-Centered Language + +- Focus on what **the user** needs, not what the system does. +- **Example:** Instead of *"The system will allocate GPUs,"* say **"Your cluster will have dedicated GPUs."** + +## Don't Assume Prior Knowledge + +- If using technical terms, **briefly explain or link to docs**. +- **Example:** Instead of *"Use InfiniBand networking,"* say **"Use InfiniBand networking (high-speed data transfer between nodes)."** + +## Default to Positive Language + +- Frame messages in an **encouraging, problem-solving way**, even for errors. +- **Example:** Instead of *"Your order failed,"* say **"Something went wrong—try again or contact support."** + +## Minimize Distractions in Critical Actions + +- During checkout or confirmations, **keep the user focused** by avoiding extra links or unnecessary text. +- **Example:** Instead of: + > "You're about to place an order for a cluster. Did you know we also offer persistent storage? Contact us for more info." + Use: + > "Review your order details, then confirm your cluster setup." + +## Write Error Messages That Guide Users + +- Don’t just state **what went wrong—tell them how to fix it**. +- **Example:** Instead of *"Invalid API key,"* say **"Your API key is incorrect or expired. Generate a new key in your account settings."** + +## Keep Confirmation Messages Clear & Reassuring + +- After an action, let users know **what happens next**. +- **Example:** Instead of *"Your order was placed,"* say **"Your cluster is being deployed. You’ll receive access details shortly."** + +## Keep Form Labels and Inputs Simple + +- Labels should be **short and clear**. +- Placeholder text should **not repeat labels**. +- **Example:** + - Bad *"Please enter your email address below:"* + - Good **Label:** "Email" → **Input Placeholder:** "" + +## Ensure All Call-to-Action (CTA) Buttons Are Specific + +- Every button should **describe the action it triggers**. +- **Example:** + - Bad "Submit" + - Good "Deploy Cluster" + + ## Keep It Short, but Not Cryptic + +- Use the **fewest words possible** without losing clarity. +- **Example:** Instead of *"Your cluster is now being provisioned and will be available shortly,"* say **"Provisioning your cluster…"** +- Avoid unnecessary explanations—**the UI should guide users, not overwhelm them**. + +## Prioritize Clarity Over Cleverness + +- Avoid jargon unless your audience **already understands it**. +- **Example:** Instead of *"GPU nodes are booting up,"* say **"Your GPUs are starting up."** +- Don’t use technical terms **just to sound impressive**—only when they’re necessary. + +## Show, Don’t Tell + +- If an action **is already obvious from the UI**, **don’t repeat it**. +- **Example:** If there’s a "Deploy" button, **no need to add text saying "Click deploy to start your app."** +- Let **labels, buttons, and structure** guide the user instead of over-explaining. + +## Use Sentence Case Everywhere + +- Except for Buttons and Links. +- **Example:** + - Bad *"Confirm Your Order"* + - Good **"Confirm your order"** + +## Error Messages Should Be Helpful, Not Alarming + +- **Example:** Instead of *"Error 503: Something went wrong,"* say **"Server is temporarily unavailable. Try again in a few minutes."** +- Keep it **calm and constructive**—users shouldn’t feel like they broke something. + +## CTA Buttons Should Be Actionable + +- Buttons should **describe the action** clearly. +- **Example:** + - Bad *"Submit"* + - Good **"Deploy Cluster"** + - Good **"Generate API Key"** +- Avoid vague labels like **"OK"** or **"Done"** if they can be more specific. + +## Use Progressive Disclosure for Complex Information + +- **Don’t overload users with details upfront.** +- Show advanced settings **only when needed**. +- **Example:** Instead of displaying **all API settings** immediately, add a **"Show advanced settings"** toggle. + +## Default to a Professional, Neutral Tone + +- Avoid sounding too **robotic** or too **casual**. +- **Example:** Instead of *"Oops! Something went wrong 😢,"* say **"We couldn't complete your request. Try again in a moment."** +- Keep personality **subtle**—Vercel and Linear add warmth through **clean design**, not excessive humor. + +## Confirm Actions with Context + +- **When users take an important action, confirm it.** +- **Example:** After deploying, instead of just closing the modal, show: + > **"Your app has been deployed. View it live at @yourdomain.com."** +- This reassures users **something actually happened**. + +## Avoid Passive Voice + +- Make copy **direct and active**. +- **Example:** + - Bad *"Your order has been placed."* + - Good **"You placed your order."** + - Bad *"Clusters are being deployed."* + - Good **"Deploying your cluster…"** + +## Keep the UI Copy Consistent + +- If you call it **"Cluster Size"** in one place, **don’t call it "GPU Count" elsewhere**. +- Consistency builds **trust and usability**. + +## Assume the User Knows What They’re Doing + +- Don’t over-explain concepts **developers already understand**. +- **Example:** Instead of *"A Kubernetes cluster is a set of machines that…"*, just **link to docs**. +- Keep in-product copy **focused on action, not education**. + +## If It’s Not Necessary, Remove It + +- Every extra word **adds friction**. +- **Example:** Instead of *"Your cluster setup is now complete and you can start using it,"* say **"Your cluster is ready."** \ No newline at end of file diff --git a/docs/docs/advanced/overview.mdx b/docs/docs/advanced/00-overview.mdx similarity index 100% rename from docs/docs/advanced/overview.mdx rename to docs/docs/advanced/00-overview.mdx diff --git a/docs/docs/CLA.md b/docs/docs/advanced/CLA.md similarity index 100% rename from docs/docs/CLA.md rename to docs/docs/advanced/CLA.md diff --git a/docs/docs/advanced/model-roles/intro.mdx b/docs/docs/advanced/model-roles/00-intro.mdx similarity index 100% rename from docs/docs/advanced/model-roles/intro.mdx rename to docs/docs/advanced/model-roles/00-intro.mdx diff --git a/docs/docs/advanced/reference.mdx b/docs/docs/advanced/reference.mdx index 05b42fe86..83548843d 100644 --- a/docs/docs/advanced/reference.mdx +++ b/docs/docs/advanced/reference.mdx @@ -19,7 +19,7 @@ from [the Hub](https://hub.continue.dev/explore/assistants) or locally - in your workspace in a `/.continue/assistants` folder, with the same naming convention :::info -Config YAML replaces [`config.json`](./json-reference.md), which is deprecated. View the **[Migration Guide](./yaml-migration.md)**. +Config YAML replaces `config.json`, which is deprecated. View the **[Migration Guide](./yaml-migration)**. ::: An assistant is made up of: @@ -191,9 +191,9 @@ chat, editing, and summarizing. provider and model. Supported capabilities include `tool_use` and `image_input`. - `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists. - `promptTemplates`: Can be used to override the default prompt templates for different model roles. Valid values are - `chat`, [`edit`](./advanced/model-roles/edit.mdx#prompt-templating), [ - `apply`](./advanced/model-roles/apply.mdx#prompt-templating) and [ - `autocomplete`](./advanced/model-roles/autocomplete.md#prompt-templating). The `chat` property must be a + `chat`, [`edit`](./model-roles/edit#prompt-templating), [ + `apply`](./model-roles/apply#prompt-templating) and [ + `autocomplete`](./model-roles/autocomplete#prompt-templating). The `chat` property must be a valid template name, such as `llama3` or `anthropic`. - `chatOptions`: If the model includes role `chat`, these settings apply for Chat and Agent mode: - `baseSystemMessage`: Can be used to override the default system prompt for **Chat** mode. @@ -295,8 +295,8 @@ context: ### `rules` List of rules that the LLM should follow. These are concatenated into the system message for -all [Chat](./chat/how-to-use-it.md), [Edit](./edit/how-to-use-it.md), and [Agent](./agent/how-to-use-it.md) requests. -See the [rules deep dive](./advanced/deep-dives/rules.mdx) for details. +all [Chat](../features/chat/quick-start), [Edit](../features/edit/quick-start), and [Agent](../features/agent/quick-start) requests. +See the [rules deep dive](../customization/rules) for details. Explicit rules can either be simple text or an object with the following properties: @@ -400,7 +400,7 @@ mcpServers: ### `data` -Destinations to which [development data](./advanced/deep-dives/development-data.md) will be sent. +Destinations to which [development data](./deep-dives/development-data) will be sent. **Properties:** diff --git a/docs/docs/advanced/troubleshooting.mdx b/docs/docs/advanced/troubleshooting.mdx index cc8f90592..60a8af406 100644 --- a/docs/docs/advanced/troubleshooting.mdx +++ b/docs/docs/advanced/troubleshooting.mdx @@ -42,7 +42,7 @@ To view prompt logs/analytics, you can enable the Continue Console. 3. Reload the window 4. Open the Continue Console by using the command palette (cmd/ctrl + shift + P) and searching for "Continue: Focus on Continue Console View" -![Continue Console](../static/img/continue-console.png) +![Continue Console](/img/continue-console.png) ### JetBrains @@ -56,7 +56,7 @@ Some JetBrains-related logs may also be found by clicking "Help" > "Show Log in We are constantly making fixes and improvements to Continue, but the latest changes remain in a "pre-release" version for roughly a week so that we can test their stability. If you are experiencing issues, you can try the pre-release by going to the Continue extension page in VS Code and selecting "Switch to Pre-Release" as shown below. -![Pre-Release](../static/img/prerelease.png) +![Pre-Release](/img/prerelease.png) ### JetBrains diff --git a/docs/docs/agent/context-selection.md b/docs/docs/agent/context-selection.md deleted file mode 100644 index f840a946c..000000000 --- a/docs/docs/agent/context-selection.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Context selection -description: How context can be selected for Chat -keywords: [context] -sidebar_position: 3 ---- - -You can use the same [methods to manually add context as Chat](../chat/context-selection.md). - -In addition, tool call responses are automatically included as context items. - -This enables Agent mode to see the result of the previous action and decide what to do next. diff --git a/docs/docs/agent/how-it-works.md b/docs/docs/agent/how-it-works.md deleted file mode 100644 index bbf216db8..000000000 --- a/docs/docs/agent/how-it-works.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: How it works -description: How Agent works -keywords: [how, agent, works] -sidebar_position: 4 ---- - -Agent offers the same functionality as Chat, while also including tools in the request to the model and an interface for handling tool calls and responses. - -## The tool handshake - -Tools provide a flexible, powerful way for models to interface with the external world. They are provided to the model as a JSON object with a name and an arguments schema. For example, a `read_file` tool with a `filepath` argument will give the model the ability to request the contents of a specific file. - -The following handshake describes how Agent uses tools: - -1. In Agent mode, available tools are sent along with `user` chat requests -2. The model can choose to include a tool call in its response -3. The user gives permission. This step is skipped if the policy for that tool is set to `Automatic` -4. Continue calls the tool using built-in functionality or the MCP server that offers that particular tool -5. Continue sends the result back to the model -6. The model responds, potentially with another tool call and step 2 begins again - -:::info -In [Chat mode](../chat/how-to-use-it.md), tools are **not** included in the request to the model. -::: - -## Built-in tools - -Continue includes several built-in tools which provide the model access to IDE functionality: - -- **Read file** (`builtin_read_file`): read the contents of a file within the project -- **Read currently open file** (`builtin_read_currently_open_file`): read the contents of the currently open file -- **Create new file** (`builtin_create_new_file`): Create a new file within the project, with path and contents specified by the model -- **Exact search** (`builtin_exact_search`): perform a `ripgrep` search within the project -- **Glob search** (`builtin_file_glob_search`): perform a glob search on files in the project. Currently limits to 100 output and warns the Agent if limit reached. -- **Run terminal command** (`builtin_run_terminal_command`): run a terminal command from the workspace root -- **Search web** (`builtin_search_web`): Perform a web search to get top results -- **View diff** (`builtin_view_diff`): View the current working git diff -- **View repo map** (`builtin_view_repo_map`): request a copy of the repository map—same as the [Repo Map Context Provider](../advanced/context-integration/custom-providers#repository-map) -- **View subdirectory** (`builtin_view_subdirectory`): request a copy of a repo map for a specific directory within the project -- **Create Rule Block** (`builtin_create_rule_block`): creates a new rule block in `.continue/rules` based on the contents of the conversation diff --git a/docs/docs/agent/how-to-customize.md b/docs/docs/agent/how-to-customize.md deleted file mode 100644 index ef427afe7..000000000 --- a/docs/docs/agent/how-to-customize.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: How to customize -description: How to customize Chat -keywords: [customize, chat] -sidebar_position: 5 ---- - -## Add Rules Blocks - -Adding Rules can be done in your assistant locally or in the Hub. - -[Explore Rules on the Hub](https://hub.continue.dev/explore/rules) and see the [Rules deep dive](../advanced/deep-dives/rules.mdx) for more details and tips on creating rules. - -## Add MCP tools - -You can add MCP servers to your assistant to give Agent access to more tools. [Explore MCP Servers on the Hub](https://hub.continue.dev/explore/mcp) and see the [MCP guide](../advanced/deep-dives/mcp.mdx) for more details. - -## Tool policies - -You can adjust Agent's usage behavior for each tool in your assistant to one of these options: - -- **Ask First (default)** - request permission from the user; show the `Cancel` and `Continue` buttons -- **Automatic** - do not request permission, automatically call the tool and feed the response back to the model -- **Excluded** - do not send this tool to the model - -:::warning -Be careful setting any tools to `automatic` if their behavior is not read-only. -::: - -First, open `Tool Policies` by clicking the tools icon in the input toolbar - -![Input Toolbar](/img/lump-toolbar.png) - -Then, you can view and change tool policies. To change a policy, click on the policy text ("Excluded", etc.) to toggle it. You can also turn groups of tools (e.g. all Built-in tools or all tools from a specific MCP server) off using the section toggles. - -![Tool Policies](/img/tool-policies.png) - -Tool policies are stored locally per user. diff --git a/docs/docs/agent/how-to-use-it.md b/docs/docs/agent/how-to-use-it.md deleted file mode 100644 index 250a99d3e..000000000 --- a/docs/docs/agent/how-to-use-it.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: Agent -description: How to use Agent -sidebar_label: How to use it -keywords: [how, use, agent] -sidebar_position: 1 ---- - -![agent mode](/img/agent.gif) - -## How to use it - -Agent equips the Chat model with the tools needed to handle a wide range of coding tasks, allowing the model to make decisions and save you the work of manually finding context and performing actions. - -### Use Agent - -You can switch to `Agent` in the mode selector below the chat input box. - -![How to select agent mode](/img/mode-select-agent.png) - -:::info -If Agent is disabled with a `Not Supported` message, the selected model or provider doesn't support tools, or Continue doesn't yet support tools with it. See [Model Setup](./model-setup.mdx) for more information. -::: - -### Chat with Agent - -Agent lives within the same interface as [Chat](../chat/how-it-works.md), so the same [input](../chat/how-to-use-it.md#type-a-request-and-press-enter) is used to send messages and you can still use the same manual methods of providing context, such as [`@` context providers](../chat/how-to-use-it.md#reference-context-with-the--symbol) or adding [highlighted code from the editor](../chat/how-to-use-it.md#highlight-a-code-section-to-include-as-context). - -#### Use natural language - -With Agent, you can provide natural language instruction and let the model do the work. As an example, you might say - -> Set the @typescript-eslint/naming-convention rule to "off" for all eslint configurations in this project - -Agent will then decide which tools to use to get the job done. - -## Give Agent permission - -By default, Agent will ask permission when it wants to use a tool. Click `Continue` to allow Agent mode to proceed with the tool call or `Cancel` to reject it. - -![agent requesting permission](/img/agent-permission.png) - -You can use tool policies to exclude or make usage automatic for specific tools. See [How to Customize](./how-to-customize.md) for more background. - -## View Tool Responses - -Any data returned from a tool call is automatically fed back into the model as a context item. Most errors are also caught and returned, so that Agent mode can decide how to proceed. - -![agent response](/img/agent-response.png) diff --git a/docs/docs/agent/model-setup.mdx b/docs/docs/agent/model-setup.mdx deleted file mode 100644 index ef2a6c285..000000000 --- a/docs/docs/agent/model-setup.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Model setup -description: Models for Continue Agent -keywords: [model, agent] -sidebar_position: 2 ---- - -Agent can be used with models that support tool use through Continue. - -For the best Agent experience we recommend Claude Sonnet 4 from Anthropic. Add Claude 3.7 Sonnet to your assistant from the hub [here](https://hub.continue.dev/anthropic/claude-4-sonnet). You can get an API key from the [Anthropic console](https://console.anthropic.com/settings/keys). - -Currently the following models are recommended: - -- [Anthropic](../advanced/model-providers/top-level/anthropic.mdx) - we recommend [Claude Sonnet 4](https://hub.continue.dev/anthropic/claude-4-sonnet) -- [OpenAI](../advanced/model-providers/top-level/openai.mdx) - we recommend [GPT-4o](https://hub.continue.dev/openai/gpt-4o) -- [Gemini](../advanced/model-providers/top-level/gemini.mdx) - we recommend [Gemini 2.5 Pro](https://hub.continue.dev/google/gemini-2.5-pro) - -The best chat models generally support tool use. See [recommended chat models](../advanced/model-roles/chat.mdx#recommended-chat-models) for more. diff --git a/docs/docs/autocomplete/context-selection.md b/docs/docs/autocomplete/context-selection.md deleted file mode 100644 index f237a3625..000000000 --- a/docs/docs/autocomplete/context-selection.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Context selection -description: Autocomplete context selection -keywords: [context, autocomplete, lsp, recent] -sidebar_position: 3 ---- - -Autocomplete will automatically determine context based on the current cursor position. We use the following techniques to determine what to include in the prompt: - -### File prefix/suffix - -We will always include the code from your file prior to and after the cursor position. - -### Definitions from the Language Server Protocol - -Similar to how you can use cmd/ctrl + `click` in your editor, we use the same tool (the LSP) to power "go to definition". For example, if you are typing out a function call, we will include the function definition. Or, if you are writing code inside of a method, we will include the type definitions for any parameters or the return type. - -### Imported files - -Because there are often many imports, we can't include all of them. Instead, we look for symbols around your cursor that have matching imports and use that as context. - -### Recent files - -We automatically consider recently opened or edited files and include snippets that are relevant to the current completion. diff --git a/docs/docs/autocomplete/how-it-works.md b/docs/docs/autocomplete/how-it-works.md deleted file mode 100644 index 565d88c86..000000000 --- a/docs/docs/autocomplete/how-it-works.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: How it works -description: How Autocomplete works -keywords: [how, autocomplete, context] -sidebar_position: 4 ---- - -Autocomplete is a [compound AI system](https://bair.berkeley.edu/blog/2024/02/18/compound-ai-systems/) that uses a combination of retrieval methods and response processing techniques. The system can be understood in roughly three parts. - -## Timing - -In order to display suggestions quickly, without sending too many requests, we do the following: - -- Debouncing: If you are typing quickly, we won't make a request on each keystroke. Instead, we wait until you have finished. -- Caching: If your cursor is in a position that we've already generated a completion for, this completion is reused. For example, if you backspace, we'll be able to immediately show the suggestion you saw before. - -## Context - -As explained on the [context selection](./context-selection.md) page, Continue uses a number of retrieval methods to find relevant snippets from your codebase to include in the prompt. - -## Filtering - -Language models aren't perfect, but can be made much closer by adjusting their output. We do extensive post-processing on responses before displaying a suggestion, including: - -- filtering out special tokens -- stopping early when re-generating code -- fixing indentation - -We will also occasionally entirely filter out responses if they are bad. This is often due to extreme repetition. - -You can learn more about how it works in the [Autocomplete deep dive](../advanced/deep-dives/autocomplete.mdx). diff --git a/docs/docs/autocomplete/how-to-customize.md b/docs/docs/autocomplete/how-to-customize.md deleted file mode 100644 index 905294e42..000000000 --- a/docs/docs/autocomplete/how-to-customize.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: How to customize -description: How to customize Autocomplete -keywords: [customize] -sidebar_position: 5 ---- - -Continue offers a handful of settings to customize autocomplete behavior. Visit the [User Settings Page](../advanced/deep-dives/settings.md) to manage these settings. - -For a comprehensive guide on all configuration options and their impacts, see the [Autocomplete deep dive](../advanced/deep-dives/autocomplete.mdx). diff --git a/docs/docs/autocomplete/how-to-use-it.md b/docs/docs/autocomplete/how-to-use-it.md deleted file mode 100644 index 950a41993..000000000 --- a/docs/docs/autocomplete/how-to-use-it.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: Autocomplete -description: Autocomplete \- how to use it -sidebar_label: How to use it -keywords: [autocomplete] -sidebar_position: 1 ---- - -![autocomplete](/img/autocomplete.gif) - -## How to use it - -Autocomplete provides inline code suggestions as you type. To enable it, simply click the "Continue" button in the status bar at the bottom right of your IDE or ensure the "Enable Tab Autocomplete" option is checked in your IDE settings. - -### Accepting a full suggestion - -Accept a full suggestion by pressing Tab - -### Rejecting a full suggestion - -Reject a full suggestion with Esc - -### Partially accepting a suggestion - -For more granular control, use cmd/ctrl + → to accept parts of the suggestion word-by-word. - -### Forcing a suggestion (VS Code) - -If you want to trigger a suggestion immediately without waiting, or if you've dismissed a suggestion and want a new one, you can force it by using the keyboard shortcut **cmd/ctrl + alt + space**. diff --git a/docs/docs/autocomplete/model-setup.mdx b/docs/docs/autocomplete/model-setup.mdx deleted file mode 100644 index ad7c2a10f..000000000 --- a/docs/docs/autocomplete/model-setup.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: Model setup -description: Autocomplete \-model setup -keywords: [model, autocomplete] -sidebar_position: 2 ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -For the best autocomplete experience we recommend Codestral from Mistral. - -Add Codestral to your assistant from the hub [here](https://hub.continue.dev/mistral/codestral). Visit the [Mistral Platform](https://console.mistral.ai/codestral) to get a Codestral API key. - -For a fully local autocomplete experience, we recommend [Qwen 2.5 Coder 1.5B on Ollama](https://hub.continue.dev/ollama/qwen2.5-coder-1.5b). - -For more details about setup and recommended models, visit the [autocomplete deep dive](../advanced/deep-dives/autocomplete.mdx). diff --git a/docs/docs/blocks/context-providers.md b/docs/docs/blocks/context-providers.md deleted file mode 100644 index 60444b5cb..000000000 --- a/docs/docs/blocks/context-providers.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Context Blocks -sidebar_label: Context -description: Determine what internal information your AI assistant can access -keywords: [context, blocks, repositories, integration, knowledge base] -sidebar_position: 2 ---- - -These blocks determine what internal information your AI assistant can access: - -- **Connect to source repositories** and issues, CI/CD systems, wikis, and knowledge bases -- **Determine the scope** of what the AI can "see" when providing assistance -- **Customize** to match your specific development environment -- **Include proprietary code patterns** unique to your organization -- **Integrate data sources** to connect to any internal system with valuable context - -![Context Blocks Overview](/img/context-blocks-overview.png) - -## Learn More - -Learn more about context providers [here](../advanced/reference#context), and check out [this guide](../advanced/tutorials/build-your-own-context-provider.mdx) to creating your own custom context provider. diff --git a/docs/docs/blocks/data.md b/docs/docs/blocks/data.md deleted file mode 100644 index 2360bc4f5..000000000 --- a/docs/docs/blocks/data.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Data Blocks -sidebar_label: Data -description: Help organizations capture and analyze AI assistant usage data -keywords: [data, blocks, analytics, metrics, storage, compliance] -sidebar_position: 7 ---- - -These help organizations capture and analyze AI assistant usage data: - -- **Analytics Integration**: Export metrics to observability platforms like Splunk or New Relic -- **Cloud Storage**: Store development data in S3/Azure Blob for model fine-tuning and auditing -- **Impact Measurement**: Track acceptance rates and productivity outcomes for ROI calculation -- **Compliance Reporting**: Generate audit trails for security and governance requirements - -![Data Blocks Overview](/img/data-blocks-overview.png) - -## Learn More - -You can read more about development data [here](../advanced/deep-dives/development-data.md). Data destinations are configured in the [`data`](../advanced/reference#data) section of `config.yaml`. diff --git a/docs/docs/blocks/docs.md b/docs/docs/blocks/docs.md deleted file mode 100644 index 2d1e2f2bd..000000000 --- a/docs/docs/blocks/docs.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Docs Blocks -sidebar_label: Docs -description: Bring your documentation directly into the IDE -keywords: [docs, blocks, documentation, guidance, flow] -sidebar_position: 3 ---- - -This is how Continue brings your documentation directly into the IDE: - -- **Provide just-in-time guidance** without context switching -- **Reduce support burden** by making information discoverable -- **Keep developers in flow** by eliminating searches through multiple systems - -![Docs Blocks Overview](/img/docs-blocks-overview.png) - -## Learn More - -Learn more in the [@Docs deep dive](../advanced/deep-dives/docs.mdx), and view [`docs`](../advanced/reference#docs) in the YAML Reference for more details. diff --git a/docs/docs/blocks/mcp.md b/docs/docs/blocks/mcp.md deleted file mode 100644 index fe15b2f8a..000000000 --- a/docs/docs/blocks/mcp.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: MCP Blocks -sidebar_label: MCP -description: Model Context Protocol servers provide specialized functionality -keywords: [mcp, blocks, model context protocol, integrations, tools] -sidebar_position: 4 ---- - -Model Context Protocol servers provide specialized functionality: - -- **Enable integration** with external tools and systems -- **Create extensible interfaces** for custom capabilities -- **Support complex interactions** with your development environment -- **Allow partners** to contribute specialized functionality -- **Connect to databases** to understand schema and data models during development - -![MCP Blocks Overview](/img/mcp-blocks-overview.png) - -## Learn More - -Learn more in the [MCP deep dive](../advanced/deep-dives/mcp.mdx), and view [`mcpServers`](../advanced/reference#mcpservers) in the YAML Reference for more details. -description: Model Context Protocol servers provide specialized functionality -keywords: [mcp, blocks, model context protocol, integrations, tools] -sidebar_position: 4 - ---- - -Model Context Protocol servers provide specialized functionality: - -- Enable integration with external tools and systems -- Create extensible interfaces for custom capabilities -- Support more complex interactions with your development environment -- Allow partners to contribute specialized functionality -- Database Connectors: Understand schema and data models during development - -![MCP Blocks Overview](/img/mcp-blocks-overview.png) - -## Learn More - -Learn more in the [MCP deep dive](../advanced/deep-dives/mcp.mdx), and view [`mcpServers`](../advanced/reference#mcpservers) in the YAML Reference for more details. diff --git a/docs/docs/blocks/models.md b/docs/docs/blocks/models.md deleted file mode 100644 index 7c8223618..000000000 --- a/docs/docs/blocks/models.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Model Blocks -sidebar_label: Model -description: Foundation of the entire assistant experience offering specialized capabilities -keywords: [model, blocks, chat, edit, apply, autocomplete, embedding, reranker] -sidebar_position: 1 ---- - -These blocks form the foundation of the entire assistant experience, offering different specialized capabilities: - -- **[Chat](../advanced/model-roles/chat.mdx)**: Power conversational interactions about code and provide detailed guidance -- **[Edit](../advanced/model-roles/edit.mdx)**: Handle complex code transformations and refactoring tasks -- **[Apply](../advanced/model-roles/apply.mdx)**: Execute targeted code modifications with high accuracy -- **[Autocomplete](../advanced/model-roles/autocomplete.md)**: Provide real-time suggestions as developers type -- **[Embedding](../advanced/model-roles/embeddings.mdx)**: Transform code into vector representations for semantic search -- **[Reranker](../advanced/model-roles/reranking.mdx)**: Improve search relevance by ordering results based on semantic meaning - -![Model Blocks Overview](/img/model-blocks-overview.png) - -## Learn More - -Continue supports [many model providers](../advanced/model-providers), including Anthropic, OpenAI, Gemini, Ollama, Amazon Bedrock, Azure, xAI, DeepSeek, and more. Models can have various roles like `chat`, `edit`, `apply`, `autocomplete`, `embed`, and `rerank`. - -Read more about roles [here](../advanced/model-roles/intro.mdx) and view [`models`](../advanced/reference#models) in the YAML Reference. diff --git a/docs/docs/blocks/prompts.md b/docs/docs/blocks/prompts.md deleted file mode 100644 index 9689c03f9..000000000 --- a/docs/docs/blocks/prompts.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Prompt Blocks -sidebar_label: Prompt -description: Specialized instructions that shape how models respond -keywords: [prompts, blocks, instructions, guidance, code review] -sidebar_position: 6 ---- - -These are the specialized instructions that shape how models respond: - -- **Define interaction patterns** for specific tasks or frameworks -- **Encode domain expertise** for particular technologies -- **Ensure consistent guidance** aligned with organizational practices -- **Can be shared and reused** across multiple assistants -- **Act as automated code reviewers** that ensure consistency across teams - -![Prompt Blocks Overview](/img/prompts-blocks-overview.png) - -## Learn More - -Prompt blocks have the same syntax as [prompt files](../advanced/deep-dives/prompts.md). The `config.yaml` spec for `prompts` can be found [here](../advanced/reference#prompts). diff --git a/docs/docs/blocks/rules.md b/docs/docs/blocks/rules.md deleted file mode 100644 index 20874a3a4..000000000 --- a/docs/docs/blocks/rules.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: Rules Blocks -sidebar_label: Rules -description: Guardrails for your AI coding assistants -keywords: [rules, blocks, standards, practices, guardrails] -sidebar_position: 5 ---- - -Rules allow you to provide specific instructions that guide how the AI assistant behaves when working with your code. Instead of the AI making assumptions about your coding standards, architecture patterns, or project-specific requirements, you can explicitly define guidelines that ensure consistent, contextually appropriate responses. - -Think of these as the guardrails for your AI coding assistants: - -- **Enforce company-specific coding standards** and security practices -- **Implement quality checks** that match your engineering culture -- **Create paved paths** for developers to follow organizational best practices - -By implementing rules, you transform the AI from a generic coding assistant into a knowledgeable team member that understands your project's unique requirements and constraints. - -### How Rules Work - -Your assistant detects rule blocks and applies the specified rules while in [Agent](../agent/how-to-use-it), [Chat](../chat/how-to-use-it), and [Edit](../edit/how-to-use-it) modes. - -## Learn More - -Learn more in the [rules deep dive](../advanced/deep-dives/rules.mdx), and view [`rules`](../advanced/reference#rules) in the YAML Reference for more details. diff --git a/docs/docs/chat/context-selection.md b/docs/docs/chat/context-selection.md deleted file mode 100644 index 1a7337e41..000000000 --- a/docs/docs/chat/context-selection.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: Context selection -description: How context can be selected for Chat -keywords: [context] -sidebar_position: 3 ---- - -## Input - -Typing a question or instructions into the input box is the only required context. All of the other methods to select and include additional context listed below are optional. - -## Highlighted code - -The highlighted code you’ve selected by pressing cmd/ctrl + L (VS Code) or cmd/ctrl + J (JetBrains) will be included in your prompt alongside the input you provide. This is the only section of code that will be provided to the model unless you highlight additional sections or use one of the other selection methods below. - -## Active file - -You can include the currently open file as context by pressing opt + enter (Mac) or alt + enter (Windows) when you send your request at Chat window(Prompt can't be empty). - -## Specific file - -You can include a specific file in your current workspace as context by typing [`@Files`](../advanced/context-integration/custom-providers#file) and selecting the file. - -## Specific folder - -You can include a folder in your current workspace as context by typing [`@Folder`](../advanced/context-integration/custom-providers#folder) and selecting the directory. It [works like `@Codebase`](../advanced/deep-dives/codebase.mdx) but only includes the files in the selected folder. - -## Codebase search - -You can automatically include relevant files from your codebase as context by typing [`@Codebase`](../advanced/context-integration/custom-providers#codebase). You can learn about how @Codebase works [here](../advanced/deep-dives/codebase.mdx). - -## Documentation site - -You can include a documentation site as context by typing [`@Docs`](../advanced/context-integration/custom-providers#docs) and selecting the documentation site. You can learn about how @Docs works [here](../advanced/deep-dives/docs.mdx). - -## Terminal contents - -You can include the contents of the terminal in your IDE as context by typing [`@Terminal`](../advanced/context-integration/custom-providers#terminal). - -## Git diff - -You can include all of the changes you've made to your current branch by typing [`@Git Diff`](../advanced/context-integration/custom-providers#git-diff). - -## Other context - -You can see a full list of built-in context providers [here](../advanced/context-integration/custom-providers) and how to create your own custom context provider [here](../advanced/tutorials/build-your-own-context-provider.mdx). diff --git a/docs/docs/chat/how-it-works.md b/docs/docs/chat/how-it-works.md deleted file mode 100644 index dc4837f36..000000000 --- a/docs/docs/chat/how-it-works.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: How it works -description: How Chat works -keywords: [how, chat, works] -sidebar_position: 4 ---- - -Using any selected code sections, all context that you have selected with @, and your input instructions, we prompt the model to provide a response in the sidebar. If you are asking a follow-up, then all earlier session context is also included. No other additional context is provided to the model. - -The model response is then streamed directly back to the sidebar. Each code section included in the response will be placed into its own code block, which gives you buttons to either “Apply to current file”, “Insert at cursor”, or “Copy” for each section. When you press cmd/ctrl + L (VS Code) or cmd/ctrl + J (JetBrains) at the end of a session, all context is cleared and a new session is started, so that you can begin a new task. - -If you would like to view the exact prompt that is sent to the model during Chat, you can [view this in the prompt logs](../advanced/troubleshooting#llm-prompt-logs). - -You can learn more about how `@Codebase` works [here](../advanced/deep-dives/codebase.mdx) and `@Docs` [here](../advanced/deep-dives/docs.mdx). diff --git a/docs/docs/chat/how-to-customize.md b/docs/docs/chat/how-to-customize.md deleted file mode 100644 index 0242f2e38..000000000 --- a/docs/docs/chat/how-to-customize.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: How to customize -description: How to customize Chat -keywords: [customize, chat] -sidebar_position: 5 ---- - -There are a number of different ways to customize Chat: - -- You can add a [`rules` block](../hub/blocks/block-types.md#rules) to your assistant to give the model persistent instructions through the system prompt. See the [rules deep dive](../advanced/deep-dives/rules.mdx) for more information. -- You can configure [`@Codebase`](../advanced/deep-dives/codebase.mdx) -- You can configure [`@Docs`](../advanced/deep-dives/docs.mdx) -- You can [build your own context provider](../advanced/tutorials/build-your-own-context-provider.mdx) -- You can create your own [custom code RAG](../advanced/tutorials/custom-code-rag.mdx) diff --git a/docs/docs/chat/how-to-use-it.md b/docs/docs/chat/how-to-use-it.md deleted file mode 100644 index 112649aeb..000000000 --- a/docs/docs/chat/how-to-use-it.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: Chat -description: How to use Chat -sidebar_label: How to use it -keywords: [how, use, chat] -sidebar_position: 1 ---- - -![chat](/img/chat.gif) - -## How to use it - -Chat makes it easy to ask for help from an LLM without needing to leave the IDE. You send it a task, including any relevant information, and it replies with the text / code most likely to complete the task. If it does not give you what you want, then you can send follow up messages to clarify and adjust its approach until the task is completed. - -Chat is best used to understand and iterate on code or as a replacement for search engine queries. - -## Type a request and press enter - -You send it a question, and it replies with an answer. You tell it to solve a problem, and it provides you a solution. You ask for some code, and it generates it. - -## Highlight a code section to include as context - -You select a code section with your mouse, press cmd/ctrl + L (VS Code) or cmd/ctrl + J (JetBrains) to send it to the LLM, and then ask for it to be explained to you or request it to be refactored in some way. - -## Reference context with the @ symbol - -If there is information from the codebase, documentation, IDE, or other tools that you want to include as context, you can type @ to select and include it as context. You can learn more about how to use this in [Chat context selection](context-selection.md). - -## Apply generated code to your file - -When the LLM replies with edits to a file, you can click the “Apply” button. This will update the existing code in the editor to reflect the suggested changes. - -## Start a fresh session for a new task - -Once you complete a task and want to start a new one, press cmd/ctrl + L (VS Code) or cmd/ctrl + J (JetBrains) to begin a new session, ensuring only relevant context for the next task is provided to the LLM. - -## Switch between different models - -If you have configured multiple models, you can switch between models using the dropdown or by pressing cmd/ctrl + ’ diff --git a/docs/docs/chat/model-setup.mdx b/docs/docs/chat/model-setup.mdx deleted file mode 100644 index 4266bc510..000000000 --- a/docs/docs/chat/model-setup.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Model setup -description: How to set up a Chat model -keywords: [model] -sidebar_position: 2 ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -For the best chat experience we recommend Claude 3.7 Sonnet from Anthropic. - -Add Claude 3.7 Sonnet to your assistant from the hub [here](https://hub.continue.dev/anthropic/claude-3-7-sonnet). You can get an API key from the [Anthropic console](https://console.anthropic.com/settings/keys). - -Other recommended chat models include: - -- [GPT-4o from OpenAI](https://hub.continue.dev/openai/gpt-4o) -- [Grok-2 from xAI](https://hub.continue.dev/xai/grok-2) -- [Gemini 2.0 Flash from Google](https://hub.continue.dev/google/gemini-2.0-flash) -- [Llama 3.1 8b from Meta on Ollama](https://hub.continue.dev/ollama/llama3.1-8b) for a fully local experience - {/* HUB_TODO nonexistent blocks */} - {/* - Deepseek Coder 2 from deepseek on [Ollama](https://hub.continue.dev/explore/models) or [LM Studio](https://hub.continue.dev/explore/models) */} - -For more details about setup and recommended models, see [here](../advanced/model-roles/chat.mdx). diff --git a/docs/docs/customization/overview.mdx b/docs/docs/customization/00-overview.mdx similarity index 98% rename from docs/docs/customization/overview.mdx rename to docs/docs/customization/00-overview.mdx index 6ea4ad17f..ad72345d3 100644 --- a/docs/docs/customization/overview.mdx +++ b/docs/docs/customization/00-overview.mdx @@ -1,5 +1,5 @@ --- -title: Overview +title: Customization Overview description: Introduction to customizing Continue keywords: [customize, configure, config] --- diff --git a/docs/docs/customization/blocks/overview.mdx b/docs/docs/customization/blocks/00-overview.mdx similarity index 100% rename from docs/docs/customization/blocks/overview.mdx rename to docs/docs/customization/blocks/00-overview.mdx diff --git a/docs/docs/customize/changelog.md b/docs/docs/customize/changelog.md deleted file mode 100644 index 64ddc0621..000000000 --- a/docs/docs/customize/changelog.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Continue Changelog -description: Redirecting to our Changelog -hide_table_of_contents: true ---- - -# Redirecting to Changelog - -If you are not redirected automatically, follow this [link to the changelog](https://changelog.continue.dev). - - - - diff --git a/docs/docs/customize/context-providers.mdx b/docs/docs/customize/context-providers.mdx deleted file mode 100644 index 1179e984c..000000000 --- a/docs/docs/customize/context-providers.mdx +++ /dev/null @@ -1,1059 +0,0 @@ ---- -title: Context providers -description: Type '@' to select content to the LLM as context -keywords: [context, "@", provider, LLM] ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -Context Providers allow you to type '@' and see a dropdown of content that can all be fed to the LLM as context. Every context provider is a plugin, which means if you want to reference some source of information that you don't see here, you can request (or build!) a new context provider. - -As an example, say you are working on solving a new GitHub Issue. You type '@Issue' and select the one you are working on. Continue can now see the issue title and contents. You also know that the issue is related to the files 'readme.md' and 'helloNested.py', so you type '@readme' and '@hello' to find and select them. Now these 3 "Context Items" are displayed inline with the rest of your input. - -![Context Items](/img/context-provider-example.png) - -## Context blocks - -You can add context providers to assistants using [`context` blocks](../hub/blocks/block-types.md#context). Explore available context blocks in [the hub](https://hub.continue.dev/explore/context). - -## Built-in Context Providers - -You can add any built-in context-providers in your config file as shown below: - -### `@File` - -Reference any file in your current workspace. - - - - ```yaml title="config.yaml" - context: - - provider: file - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "file" - } - ] - } - ``` - - - -### `@Code` - -Reference specific functions or classes from throughout your project. - - - - ```yaml title="config.yaml" - context: - - provider: code - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "code" - } - ] - } - ``` - - - -### `@Git Diff` - -Reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing. - - - - ```yaml title="config.yaml" - context: - - provider: diff - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "diff" - } - ] - } - ``` - - - -### `@Current File` - -Reference the currently open file. - - - - ```yaml title="config.yaml" - context: - - provider: currentFile - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "currentFile" - } - ] - } - ``` - - - -### `@Terminal` - -Reference the last command you ran in your IDE's terminal and its output. - - - - ```yaml title="config.yaml" - context: - - provider: terminal - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "terminal" - } - ] - } - ``` - - - -### `@Docs` - -Reference the contents from any documentation site. - - - - ```yaml title="config.yaml" - context: - - provider: docs - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "docs" - } - ] - } - ``` - - - -Note that this will only enable the `@Docs` context provider. - -To use it, you need to add a documentation site to your config file. See the [docs](../advanced/deep-dives/docs.mdx) page for more information. - -### `@Open` - -Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files. - - - - ```yaml title="config.yaml" - context: - - provider: open - params: - onlyPinned: true - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "open", - "params": { - "onlyPinned": true - } - } - ] - } - ``` - - - -### `@Web` - -Reference relevant pages from across the web, automatically determined from your input. - -Optionally, set `n` to limit the number of results returned (default 6). - - - - ```yaml title="config.yaml" - context: - - provider: web - params: - n: 5 - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "web", - "params": { - "n": 5 - } - } - ] - } - ``` - - - -### `@Codebase` - -Reference the most relevant snippets from your codebase. - - - - ```yaml title="config.yaml" - context: - - provider: codebase - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "codebase" - } - ] - } - ``` - - - -Read more about indexing and retrieval [here](../advanced/deep-dives/codebase.mdx). - -### `@Folder` - -Uses the same retrieval mechanism as `@Codebase`, but only on a single folder. - - - - ```yaml title="config.yaml" - context: - - provider: folder - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "folder" - } - ] - } - ``` - - - -### `@Search` - -Reference the results of codebase search, just like the results you would get from VS Code search. - - - - ```yaml title="config.yaml" - context: - - provider: search - params: - maxResults: 100 # optional, defaults to 200 - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "search", - "params": { - "maxResults": 100 // optional, defaults to 200 - } - } - ] - } - ``` - - - -This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep). - -### `@Url` - -Reference the markdown converted contents of a given URL. - - - - ```yaml title="config.yaml" - context: - - provider: url - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "url" - } - ] - } - ``` - - - -### `@Clipboard` - -Reference recent clipboard items - - - - ```yaml title="config.yaml" - context: - - provider: clipboard - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "clipboard" - } - ] - } - ``` - - - -### `@Tree` - -Reference the structure of your current workspace. - - - - ```yaml title="config.yaml" - context: - - provider: tree - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "tree" - } - ] - } - ``` - - - -### `@Problems` - -Get Problems from the current file. - - - - ```yaml title="config.yaml" - context: - - provider: problems - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "problems" - } - ] - } - ``` - - - -### `@Debugger` - -Reference the contents of the local variables in the debugger. Currently only available in VS Code. - - - - ```yaml title="config.yaml" - context: - - provider: debugger - params: - stackDepth: 3 - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "debugger", - "params": { - "stackDepth": 3 - } - } - ] - } - ``` - - - -Uses the top _n_ levels (defaulting to 3) of the call stack for that thread. - -### `@Repository Map` - -Reference the outline of your codebase. By default, signatures are included along with file in the repo map. - -`includeSignatures` params can be set to false to exclude signatures. This could be necessary for large codebases and/or to reduce context size significantly. Signatures will not be included if indexing is disabled. - - - - ```yaml title="config.yaml" - context: - - provider: repo-map - params: - includeSignatures: false # default true - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "repo-map", - "params": { - "includeSignatures": false // default true - } - } - ] - } - ``` - - - -Provides a list of files and the call signatures of top-level classes, functions, and methods in those files. This helps the model better understand how a particular piece of code relates to the rest of the codebase. - -In the submenu that appears, you can select either `Entire codebase`, or specify a subfolder to generate the repostiory map from. - -This context provider is inpsired by [Aider's repository map](https://aider.chat/2023/10/22/repomap.html). - -### `@Operating System` - -Reference the architecture and platform of your current operating system. - - - - ```yaml title="config.yaml" - context: - - provider: os - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "os" - } - ] - } - ``` - - - -### Model Context Protocol - -The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then set up your configuration like this: - - - - ```yaml title="config.yaml" - mcpServers: - - name: My MCP Server - command: uvx - args: - - mcp-server-sqlite - - --db-path - - /Users/NAME/test.db - ``` - - - ```json title="config.json" - { - "experimental": { - "modelContextProtocolServers": [ - { - "transport": { - "type": "stdio", - "command": "uvx", - "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] - } - } - ] - } - } - ``` - - - -You'll then be able to type "@" and see "MCP" in the context providers dropdown. - -### `@Issue` - -Reference the conversation in a GitHub issue. - - - - ```yaml title="config.yaml" - context: - - provider: issue - params: - repos: - - owner: continuedev - repo: continue - githubToken: ghp_xxx - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "issue", - "params": { - "repos": [ - { - "owner": "continuedev", - "repo": "continue" - } - ], - "githubToken": "ghp_xxx" - } - } - ] - } - ``` - - - -Make sure to include your own [GitHub personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) to avoid being rate-limited. - -### `@Database` - -Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases. - - - - ```yaml title="config.yaml" - context: - - provider: database - params: - connections: - - name: examplePostgres - connection_type: postgres - connection: - user: username - host: localhost - database: exampleDB - password: yourPassword - port: 5432 - - name: exampleMssql - connection_type: mssql - connection: - user: username - server: localhost - database: exampleDB - password: yourPassword - - name: exampleSqlite - connection_type: sqlite - connection: - filename: /path/to/your/sqlite/database.db - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "database", - "params": { - "connections": [ - { - "name": "examplePostgres", - "connection_type": "postgres", - "connection": { - "user": "username", - "host": "localhost", - "database": "exampleDB", - "password": "yourPassword", - "port": 5432 - } - }, - { - "name": "exampleMssql", - "connection_type": "mssql", - "connection": { - "user": "username", - "server": "localhost", - "database": "exampleDB", - "password": "yourPassword" - } - }, - { - "name": "exampleSqlite", - "connection_type": "sqlite", - "connection": { - "filename": "/path/to/your/sqlite/database.db" - } - } - ] - } - } - ] - } - ``` - - - -Each connection should include a unique name, the `connection_type`, and the necessary connection parameters specific to each database type. - -Available connection types: - -- `postgres` -- `mysql` -- `sqlite` - -### `@Postgres` - -Reference the schema of a table, and some sample rows - - - - ```yaml title="config.yaml" - context: - - provider: postgres - params: - host: localhost - port: 5436 - user: myuser - password: catsarecool - database: animals - schema: public - sampleRows: 3 - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "postgres", - "params": { - "host": "localhost", - "port": 5436, - "user": "myuser", - "password": "catsarecool", - "database": "animals", - "schema": "public", - "sampleRows": 3 - } - } - ] - } - ``` - - - -The only required settings are those for creating the database connection: `host`, `port`, `user`, `password`, and `database`. - -By default, the `schema` filter is set to `public`, and the `sampleRows` is set to 3. You may unset the schema if you want to include tables from all schemas. - -[Here is a short demo.](https://github.com/continuedev/continue/pull/859) - -### `@Google` - -Reference the results of a Google search. - - - - ```yaml title="config.yaml" - context: - - provider: google - params: - serperApiKey: - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "google", - "params": { - "serperApiKey": "" - } - } - ] - } - ``` - - - -For example, type "@Google python tutorial" if you want to search and discuss ways of learning Python. - -Note: You can get an API key for free at [serper.dev](https://serper.dev). - -### `@Gitlab Merge Request` - -Reference an open MR for this branch on GitLab. - - - - ```yaml title="config.yaml" - context: - - provider: gitlab-mr - params: - token: "..." - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "gitlab-mr", - "params": { - "token": "..." - } - } - ] - } - ``` - - - -You will need to create a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with the `read_api` scope. - -#### Using Self-Hosted GitLab - -You can specify the domain to communicate with by setting the `domain` parameter in your configurtion. By default this is set to `gitlab.com`. - - - - ```yaml title="config.yaml" - context: - - provider: gitlab-mr - params: - token: "..." - domain: "gitlab.example.com" - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "gitlab-mr", - "params": { - "token": "...", - "domain": "gitlab.example.com" - } - } - ] - } - ``` - - - -#### Filtering Comments - -If you select some code to be edited, you can have the context provider filter out comments for other files. To enable this feature, set `filterComments` to `true`. - -### `@Jira` - -Reference the conversation in a Jira issue. - - - - ```yaml title="config.yaml" - context: - - provider: jira - params: - domain: company.atlassian.net - token: ATATT... - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "jira", - "params": { - "domain": "company.atlassian.net", - "token": "ATATT..." - } - } - ] - } - ``` - - - -Make sure to include your own [Atlassian API Token](https://id.atlassian.com/manage-profile/security/api-tokens), or use your `email` and `token`, with token set to your password for basic authentication. If you use your own Atlassian API Token, don't configure your email. - -#### Jira Datacenter Support - -This context provider supports both Jira API version 2 and 3. It will use version 3 by default since -that's what the cloud version uses, but if you have the datacenter version of Jira, you'll need -to set the API Version to 2 using the `apiVersion` property. - - - - ```yaml title="config.yaml" - context: - - provider: jira - params: - apiVersion: "2" - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "jira", - "params": { - "apiVersion": "2" - } - } - ] - } - ``` - - - -#### Issue Query - -By default, the following query will be used to find issues: - -```jql -assignee = currentUser() AND resolution = Unresolved order by updated DESC -``` - -You can override this query by setting the `issueQuery` parameter. - -#### Max results - -You can set the `maxResults` parameter to limit the number of results returned. The default is `50`. - -### `@Discord` - -Reference the messages in a Discord channel. - - - - ```yaml title="config.yaml" - context: - - provider: discord - params: - discordKey: "bot token" - guildId: "1234567890" - channels: - - id: "123456" - name: "example-channel" - - id: "678901" - name: "example-channel-2" - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "discord", - "params": { - "discordKey": "bot token", - "guildId": "1234567890", - "channels": [ - { - "id": "123456", - "name": "example-channel" - }, - { - "id": "678901", - "name": "example-channel-2" - } - ] - } - } - ] - } - ``` - - - -Make sure to include your own [Bot Token](https://discord.com/developers/applications), and join it to your related server . If you want more granular control over which channels are searched, you can specify a list of channel IDs to search in. If you don't want to specify any channels, just include the guild id(Server ID) and all channels will be included. The provider only reads text channels. - -### `@HTTP` - -The HttpContextProvider makes a POST request to the url passed in the configuration. The server must return 200 OK with a ContextItem object or an array of ContextItems. - - - - ```yaml title="config.yaml" - context: - - provider: http - params: - url: "https://api.example.com/v1/users" - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "http", - "params": { - "url": "https://api.example.com/v1/users" - } - } - ] - } - ``` - - - -The receiving URL should expect to receive the following parameters: - -```js title="POST parameters" -{ - query: string, - fullInput: string -} -``` - -The response 200 OK should be a JSON object with the following structure: - -```json title="Response" -[ - { - "name": "", - "description": "", - "content": "" - } -] - -// OR -{ - "name": "", - "description": "", - "content": "" -} -``` - -### `@Commits` - -Reference specific git commit metadata and diff or all of the recent commits. - - - - ```yaml title="config.yaml" - context: - - provider: commit - params: - Depth: 50 - LastXCommitsDepth: 10 - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "commit", - "params": { - "Depth": 50, - "LastXCommitsDepth": 10 - } - } - ] - } - ``` - - - -The depth is how many commits will be loaded into the submenu, defaults to 50. -The LastXCommitsDepth is how many recent commits will be included, defaults to 10. - -### `@Greptile` - -Query a [Greptile](https://www.greptile.com/) index of the current repo/branch. - - - - ```yaml title="config.yaml" - context: - - provider: greptile - params: - greptileToken: "..." - githubToken: "..." - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "greptile", - "params": { - "GreptileToken": "...", - "GithubToken": "..." - } - } - ] - } - ``` - - - -### Requesting Context Providers - -Not seeing what you want? Create an issue [here](https://github.com/continuedev/continue/issues/new?assignees=TyDunn&labels=enhancement&projects=&template=feature-request-%F0%9F%92%AA.md&title=) to request a new Context Provider. diff --git a/docs/docs/customize/deep-dives/_apply.md b/docs/docs/customize/deep-dives/_apply.md deleted file mode 100644 index 1f87a1993..000000000 --- a/docs/docs/customize/deep-dives/_apply.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -description: Learn how to use the Apply feature -keywords: [apply, speculative] -toc_max_heading_level: 5 ---- - - - -# Apply - -## Instant Diff Apply - -If you have large files (exeeding the output token of your model) the edit apply will delete all lines that exceed the model window. To mitigate you can instead of applying the changes directly, ask the chat LLM to "generate a unified diff". -The resulting diff (if the LLM has not made a mistake) can be instantly applied, changing only the lines that need to change. - -Explainer Video: https://youtu.be/b7Xxsot4gyw diff --git a/docs/docs/customize/deep-dives/autocomplete.mdx b/docs/docs/customize/deep-dives/autocomplete.mdx deleted file mode 100644 index 3e608ad99..000000000 --- a/docs/docs/customize/deep-dives/autocomplete.mdx +++ /dev/null @@ -1,162 +0,0 @@ ---- -title: Autocomplete -keywords: [autocomplete] ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -### Setting up with Codestral (recommended) - -If you want to have the best autocomplete experience, we recommend using Codestral, which is available through the [Mistral API](https://console.mistral.ai/). To do this, obtain an API key and add it to your config: - - - - [Mistral Codestral model block](https://hub.continue.dev/mistral/codestral) - - - ```yaml title="config.yaml" - models: - - name: Codestral - provider: mistral - model: codestral-latest - apiKey: - roles: - - autocomplete - ``` - - - ```json title="config.json" - { - "tabAutocompleteModel": { - "title": "Codestral", - "provider": "mistral", - "model": "codestral-latest", - "apiKey": "" - } - } - ``` - - - -:::tip[Codestral API Key] -The API keys for Codestral and the general Mistral APIs are different. If you are using Codestral, you probably want a Codestral API key, but if you are sharing the key as a team or otherwise want to use `api.mistral.ai`, then make sure to set `"apiBase": "https://api.mistral.ai/v1"` in your `tabAutocompleteModel`. -::: - -### Setting up with Ollama (default) - -If you'd like to run your autocomplete model locally, we recommend using Ollama. To do this, first download the latest version of Ollama from [here](https://ollama.ai). Then, run the following command to download our recommended model: - -```bash -ollama run qwen2.5-coder:1.5b -``` - -Then, add the model to your configuration: - - - - [Ollama Qwen 2.5 Coder 1.5B model block](https://hub.continue.dev/ollama/qwen2.5-coder-1.5b) - - - ```yaml title="config.yaml" - models: - - name: Qwen 1.5b Autocomplete Model - provider: ollama - model: qwen2.5-coder:1.5b - roles: - - autocomplete - ``` - - - ```json title="config.json" - { - "tabAutocompleteModel": { - "title": "Qwen 1.5b Autocomplete Model", - "provider": "ollama", - "model": "qwen2.5-coder:1.5b", - } - } - ``` - - - -Once the model has been downloaded, you should begin to see completions in VS Code. - -## Configuration Options - -### Hub Autocomplete models - -Explore autocomplete model configurations on [the hub](https://hub.continue.dev/explore/models?roles=autocomplete) - -### Autocomplete User Settings - -{/* - `Use autocomplete cache`: If on, caches completions */} -The following settings can be configured for autocompletion in the IDE extension [User Settings Page](./settings.md): - -- `Multiline Autocompletions`: Controls multiline completions for autocomplete. Can be set to `always`, `never`, or `auto`. Defaults to `auto` -- `Disable autocomplete in files`: List of comma-separated glob pattern to disable autocomplete in matching files. E.g., "\_/.md, \*/.txt" - -### `config.json` Configuration - -The `config.json` configuration format (deprecated) offers further configuration options through `tabAutocompleteOptions`. See the [JSON Reference](../../json-reference.md#tabautocompleteoptions) for more details. - -## FAQs - -### I want better completions, should I use GPT-4? - -Perhaps surprisingly, the answer is no. The models that we suggest for autocomplete are trained with a highly specific prompt format, which allows them to respond to requests for completing code (see examples of these prompts [here](https://github.com/continuedev/continue/blob/main/core/autocomplete/templating/AutocompleteTemplate.ts)). Some of the best commercial models like GPT-4 or Claude are not trained with this prompt format, which means that they won't generate useful completions. Luckily, a huge model is not required for great autocomplete. Most of the state-of-the-art autocomplete models are no more than 10b parameters, and increasing beyond this does not significantly improve performance. - -### I'm not seeing any completions - -Follow these steps to ensure that everything is set up correctly: - -1. Make sure you have the "Enable Tab Autocomplete" setting checked (in VS Code, you can toggle by clicking the "Continue" button in the status bar, and in JetBrains by going to Settings -> Tools -> Continue). -2. Make sure you have downloaded Ollama. -3. Run `ollama run qwen2.5-coder:1.5b` to verify that the model is downloaded. -4. Make sure that any other completion providers are disabled (e.g. Copilot), as they may interfere. -5. Check the output of the logs to find any potential errors: cmd/ctrl + shift + P -> "Toggle Developer Tools" -> "Console" tab in VS Code, ~/.continue/logs/core.log in JetBrains. -6. Check VS Code settings to make sure that `"editor.inlineSuggest.enabled"` is set to `true` (use cmd/ctrl + , then search for this and check the box) -7. If you are still having issues, please let us know in our [Discord](https://discord.gg/vapESyrFmJ) and we'll help as soon as possible. - -### Completions are only ever single-line - -To ensure that you receive multi-line completions, you can set `"multilineCompletions": "always"` in `tabAutocompleteOptions`. By default, it is `"auto"`. If you still find that you are only seeing single-line completions, this may be because some models tend to produce shorter completions when starting in the middle of a file. You can try temporarily moving text below your cursor out of your active file, or switching to a larger model. - -### Can I configure a "trigger key" for autocomplete? - -Yes, in VS Code, if you don't want to be shown suggestions automatically you can: - -1. Set `"editor.inlineSuggest.enabled": false` in VS Code settings to disable automatic suggestions -2. Open "Keyboard Shortcuts" (cmd/ctrl+k, cmd/ctrl+s) and search for `editor.action.inlineSuggest.trigger` -3. Click the "+" icon to add a new keybinding -4. Press the key combination you want to use to trigger suggestions (e.g. cmd/ctrl + space) -5. Now whenever you want to see a suggestion, you can press your key binding (e.g. cmd/ctrl + space) to trigger suggestions manually - -### Is there a shortcut to accept one line at a time? - -This is a built-in feature of VS Code, but it's just a bit hidden. Follow these settings to reassign the keyboard shortcuts in VS Code: - -1. Press `Ctrl+Shift+P`, type the command: `Preferences: Open Keyboard Shortcuts`, and enter the keyboard shortcuts settings page. -2. Search for `editor.action.inlineSuggest.acceptNextLine`. -3. Set the key binding to `Tab`. -4. Set the trigger condition (when) to `inlineSuggestionVisible && !editorReadonly`. - This will make multi-line completion (including continue and from VS Code built-in or other plugin snippets) still work, and you will see multi-line completion. However, Tab will only fill in one line at a time. Any unnecessary code can be canceled with `Esc`. - If you need to apply all the code, just press `Tab` multiple times. - -### How to turn off autocomplete - -#### VS Code - -Click the "Continue" button in the status panel at the bottom right of the screen. The checkmark will become a "cancel" symbol and you will no longer see completions. You can click again to turn it back on. - -Alternatively, open VS Code settings, search for "Continue" and uncheck the box for "Enable Tab Autocomplete". - -You can also use the default shortcut to disable autocomplete directly using a chord: press and hold ctrl/cmd + K (continue holding ctrl/cmd) and press ctrl/cmd + A. This will turn off autocomplete without navigating through settings. - -#### JetBrains - -Open Settings -> Tools -> Continue and uncheck the box for "Enable Tab Autocomplete". - -#### Feedback - -If you're turning off autocomplete, we'd love to hear how we can improve! Please let us know in our [Discord](https://discord.gg/vapESyrFmJ) or file an issue on GitHub. diff --git a/docs/docs/customize/deep-dives/codebase.mdx b/docs/docs/customize/deep-dives/codebase.mdx deleted file mode 100644 index 409ecd080..000000000 --- a/docs/docs/customize/deep-dives/codebase.mdx +++ /dev/null @@ -1,99 +0,0 @@ ---- -description: Talk to your codebase -keywords: [talk, embeddings, reranker, codebase, experimental] ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# @Codebase - -Continue indexes your codebase so that it can later automatically pull in the most relevant context from throughout your workspace. This is done via a combination of embeddings-based retrieval and keyword search. By default, all embeddings are calculated locally using `transformers.js` and stored locally in `~/.continue/index`. - -:::info[`transformers.js cannot be used in JetBrains`] -Currently, `transformers.js` cannot be used in JetBrains IDEs. However, you can select a differet embeddings model from [the list here](../model-roles/embeddings.mdx). -::: - -Currently, the codebase retrieval feature is available as the "codebase" and "folder" context providers. You can use them by typing `@Codebase` or `@Folder` in the input box, and then asking a question. The contents of the input box will be compared with the embeddings from the rest of the codebase (or folder) to determine relevant files. - -Here are some common use cases where it can be useful: - -- Asking high-level questions about your codebase - - "How do I add a new endpoint to the server?" - - "Do we use VS Code's CodeLens feature anywhere?" - - "Is there any code written already to convert HTML to markdown?" -- Generate code using existing samples as reference - - "Generate a new React component with a date picker, using the same patterns as existing components" - - "Write a draft of a CLI application for this project using Python's argparse" - - "Implement the `foo` method in the `bar` class, following the patterns seen in other subclasses of `baz`. -- Use `@Folder` to ask questions about a specific folder, increasing the likelihood of relevant results - - "What is the main purpose of this folder?" - - "How do we use VS Code's CodeLens API?" - - Or any of the above examples, but with `@Folder` instead of `@Codebase` - -Here are use cases where it is not useful: - -- When you need the LLM to see _literally every_ file in your codebase - - "Find everywhere where the `foo` function is called" - - "Review our codebase and find any spelling mistakes" -- Refactoring - - "Add a new parameter to the `bar` function and update usages" - -## Configuration - -There are a few options that let you configure the behavior of the `@codebase` context provider, which are the same for the `@folder` context provider: - - - - ```yaml title="config.yaml" - context: - - provider: codebase - params: - nRetrieve: 25 - nFinal: 5 - useReranking: true - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "codebase", - "params": { - "nRetrieve": 25, - "nFinal": 5, - "useReranking": true - } - } - ] - } - ``` - - - -### `nRetrieve` - -Number of results to initially retrieve from vector database (default: 25) - -### `nFinal` - -Final number of results to use after re-ranking (default: 5) - -### `useReranking` - -Whether to use re-ranking, which will allow initial selection of `nRetrieve` results, then will use an LLM to select the top `nFinal` results (default: true) - -## Ignore files during indexing - -Continue respects `.gitignore` files in order to determine which files should not be indexed. If you'd like to exclude additional files, you can add them to a `.continueignore` file, which follows the exact same rules as `.gitignore`. - -Continue also supports a **global** `.continueignore` file that will be respected for all workspaces, which can be created at `~/.continue/.continueignore`. - -If you want to see exactly what files Continue has indexed, the metadata is stored in `~/.continue/index/index.sqlite`. You can use a tool like [DB Browser for SQLite](https://sqlitebrowser.org/) to view the `tag_catalog` table within this file. - -If you need to force a refresh of the index, reload the VS Code window with cmd/ctrl + shift + p + "Reload Window". - -## Repository map - -Models in the Claude 3, Llama 3.1/3.2, Gemini 1.5, and GPT-4o families will automatically use a [repository map](../context-providers.mdx#repository-map) during codebase retrieval, which allows the model to understand the structure of your codebase and use it to answer questions. Currently, the repository map only contains the filepaths in the codebase. diff --git a/docs/docs/customize/deep-dives/configuration.md b/docs/docs/customize/deep-dives/configuration.md deleted file mode 100644 index b0e86b7c0..000000000 --- a/docs/docs/customize/deep-dives/configuration.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -description: Configuration -keywords: [config, settings, customize] ---- - -# Configuration - -You can easily access your assistant configuration from the Continue Chat sidebar. Open the sidebar by pressing cmd/ctrl + L (VS Code) or cmd/ctrl + J (JetBrains) and click the Assistant selector above the main chat input. Then, you can hover over an assistant and click the `new window` (hub assistants) or `gear` (local assistants) icon. - -![configure an assistant](/img/configure-continue.png) - -## Hub Assistants - -Hub Assistants can be managed in [the Hub](https://hub.continue.dev). See [Editing an Assistant](../../hub/assistants/edit-an-assistant.md) - -## YAML Config - -Local user-level configuration is stored and can be edited in your home directory in `config.yaml`: - -- `~/.continue/config.yaml` (MacOS / Linux) -- `%USERPROFILE%\.continue\config.yaml` (Windows) - -To open this `config.yaml`, you need to open the assistants dropdown in the top-right portion of the chat input. On that dropdown beside the "Local Assistant" option, select the cog icon. It will open the local `config.yaml`. - -![local-config-open-steps](/img/local-config-open-steps.png) - -When editing this file, you can see the available options suggested as you type, or check the reference below. When you save a config file from the IDE, Continue will automatically refresh to take into account your changes. A config file is automatically created the first time you use Continue, and always automatically generated with default values if it doesn't exist. - -See the full reference for `config.yaml` [here](../../advanced/reference). - -## Deprecated configuration methods - -:::info -View the `config.json` migration guide [here](../../yaml-migration.md) -::: - -- [`config.json`](../../json-reference.md) - The original configuration format which is stored in a file at the same location as `config.yaml` -- [`.continuerc.json`](#continuercjson) - Workspace-level configuration -- [`config.ts`](#configts) - Advanced configuration (probably unnecessary) - a TypeScript file in your home directory that can be used to programmatically modify (_merged_) the `config.json` schema: - - `~/.continue/config.ts` (MacOS / Linux) - - `%USERPROFILE%\.continue\config.ts` (Windows) - -### `.continuerc.json` - -The format of `.continuerc.json` is the same as `config.json`, plus one _additional_ property `mergeBehavior`, which can be set to either "merge" or "overwrite". If set to "merge" (the default), `.continuerc.json` will be applied on top of `config.json` (arrays and objects are merged). If set to "overwrite", then every top-level property of `.continuerc.json` will overwrite that property from `config.json`. - -Example - -```json title=".continuerc.json" -{ - "tabAutocompleteOptions": { - "disable": true - }, - "mergeBehavior": "overwrite" -} -``` - -### `config.ts` - -`config.yaml` or `config.json` can handle the vast majority of necessary configuration, so we recommend using it whenever possible. However, if you need to programmatically extend Continue configuration, you can use a `config.ts` file, placed at `~/.continue/config.ts` (MacOS / Linux) or `%USERPROFILE%\.continue\config.ts` (Windows). - -`config.ts` must export a `modifyConfig` function, like: - -```ts title="config.ts" -export function modifyConfig(config: Config): Config { - config.slashCommands?.push({ - name: "commit", - description: "Write a commit message", - run: async function* (sdk) { - // The getDiff function takes a boolean parameter that indicates whether - // to include unstaged changes in the diff or not. - const diff = await sdk.ide.getDiff(false); // Pass false to exclude unstaged changes - for await (const message of sdk.llm.streamComplete( - `${diff}\n\nWrite a commit message for the above changes. Use no more than 20 tokens to give a brief description in the imperative mood (e.g. 'Add feature' not 'Added feature'):`, - new AbortController().signal, - { - maxTokens: 20, - }, - )) { - yield message; - } - }, - }); - return config; -} -``` diff --git a/docs/docs/customize/deep-dives/development-data.md b/docs/docs/customize/deep-dives/development-data.md deleted file mode 100644 index a72e6db3d..000000000 --- a/docs/docs/customize/deep-dives/development-data.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Development Data -description: Collecting data on how you build software -keywords: [development data, dev data, LLM-aided development] ---- - -# Development Data - -When you use Continue, you automatically collect data on how you build software. By default, this development data is saved to `.continue/dev_data` on your local machine. - -You can read more about how development data is generated as a byproduct of LLM-aided development and why we believe that you should start collecting it now: [It’s time to collect data on how you build software](https://blog.continue.dev/its-time-to-collect-data-on-how-you-build-software) - -## Custom Data Destinations - -You can also configure custom destinations for your data, including remote HTTP endpoints and local file directories. - -For hub assistants, data destinations are configured in `data` blocks. Visit the hub to [explore example data blocks](https://hub.continue.dev/explore/data) or [create your own](https://hub.continue.dev/new?type=block&blockType=data). - -See more details about adding `data` blocks to your configuration files in the [YAML specification](../../advanced/reference#data) - -When sending development data to your own HTTP endpoint, it will receive an event JSON blob at the given `schema` version. You can view event names, schema versions, and fields [here in the source code](https://github.com/continuedev/continue/tree/main/packages/config-yaml/src/schemas/data). diff --git a/docs/docs/customize/deep-dives/docs.mdx b/docs/docs/customize/deep-dives/docs.mdx deleted file mode 100644 index 125c5d306..000000000 --- a/docs/docs/customize/deep-dives/docs.mdx +++ /dev/null @@ -1,408 +0,0 @@ ---- -description: Learn how to access and search your project's documentation directly within Continue -keywords: - [ - documentation, - indexing, - context provider, - embeddings, - docs, - embedder, - embeddings provider, - documentation, - ] -toc_max_heading_level: 5 ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# @Docs - -The [`@Docs` context provider](advanced/context-integration/custom-providers#docs) allows you to efficiently reference documentation directly within Continue. - -## Enabling the `@Docs` context provider - -To enable the `@Docs` context provider, add it to the list of context providers in your `config.json` file. - - - - ```yaml title="config.yaml" - context: - - provider: docs - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "docs" - } - ] - } - ``` - - - -## How It Works - -The `@Docs` context provider works by - -1. Crawling specified documentation sites -2. Generating embeddings for the chunked content -3. Storing the embeddings locally on your machine -4. Embedding chat input to include similar documentation chunks as context - -## Indexing Your Own Documentation - -### Hub `docs` Blocks - -@Docs uses [`docs` blocks](../../hub/blocks/block-types.md#docs) in Assistants from the hub. Visit the hub to [explore `docs` blocks](https://hub.continue.dev/explore/docs) or [create your own](https://hub.continue.dev/new?type=block&blockType=docs). - -### Through the `@Docs` Context Provider - -To add a single documentation site, we recommend using the **Add Documentation** Form within the GUI. This can be accessed - -- from the `@Docs` context provider - type `@Docs` in the chat, hit `Enter`, and search for `Add Docs` -- from the `More` 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. - -- Packages with a valid documentation URL (with a `+` icon) can be clicked to immediately kick off indexing -- Packages with partial information (with a pen icon) can be clicked to fill the form with the available information -- Note that you can hover over the information icon to see where the package suggestion was found. - -![Add documentation form](/img/docs-form.png) - -### In a configuration file - -For 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: - - - - ```yaml title="config.yaml" - docs: - - title: Nest.js - startUrl: https://docs.nestjs.com/ - faviconUrl: https://docs.nestjs.com/favicon.ico - ``` - - - ```json title="config.json" - { - "docs": [ - { - "title": "Nest.js", - "startUrl": "https://docs.nestjs.com/", - "faviconUrl": "https://docs.nestjs.com/favicon.ico" - } - ] - } - ``` - - - -See [the config reference](../../reference) for all documentation site configuration options. - -Indexing will re-sync upon saving the configuration file. - -## Configuration - -### Using Your Embeddings Provider - -If you have set up an [embeddings provider](../model-roles/embeddings.mdx), @docs will use your embeddings provider. Switching embeddings providers will trigger a re-index of all documentation sites in your configuration. - -### Reranking - -As with [@Codebase context provider configuration](./codebase#configuration), you can adjust the reranking behavior of the `@Docs` context provider with the `nRetrieve`, `nFinal`, and `useReranking`. - - - - ```yaml title="config.yaml" - 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) - ``` - - - ```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) - } - } - ] - } - ``` - - - -### GitHub - -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: - - - - ```yaml title="config.yaml" - context: - - provider: docs - params: - githubToken: - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "docs", - "params": { - "githubToken": "github_..." - } - } - ] - } - ``` - - - -### Local Crawling - -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`. - - - - ```yaml title="config.yaml" - docs: - - title: My Private Docs - startUrl: http://10.2.1.2/docs - faviconUrl: http://10.2.1.2/docs/assets/favicon.ico, - useLocalCrawling: true - ``` - - - ```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 - } - ] - } - ``` - - - -:::info -Chromium crawling has been deprecated -{/* The default local crawler is a lightweight tool that cannot render sites that are dynamically generated using JavaScript. If your sites need to be rendered, you can enable the experimental `Use Chromium for Docs Crawling` feature from your [User Settings Page](../deep-dives/settings.md) This will download and install Chromium to `~/.continue/.utils`, and use it as the local crawler. */} -::: - -Further notes: - -- If the site is only locally accessible, the default crawler will fail anyways and fall back to the local crawler. `useLocalCrawling` is especially useful if the URL itself is confidential. -- For GitHub Repos this has no effect because only the GitHub Crawler will be used, and if the repo is private it can only be accessed with a priveleged GitHub token anyways. - -## Managing your docs indexes - -You can view indexing statuses and manage your documentation sites from the `@docs indexes` section of the `More` page (three dots) - -- Continue does not automatically re-index your docs. Use `Click to re-index` to trigger a reindex for a specific source -- While a site is indexing, click `Cancel indexing` to cancel the process -- Failed indexing attempts will show an error status bar and icon -- Delete a documentation site from your configuration using the trash icon - -![More Page @docs indexes section](/img/docs-indexes.png) - -You can also view the overall status of currently indexing docs from a hideable progress bar at the bottom of the chat page - -![Documentation indexing peek](/img/docs-indexing-peek.png) - -You can also use the following IDE command to force a re-index of all docs: `Continue: Docs Force Re-Index`. - -## Examples - -### VS Code minimal setup - -The following configuration example works out of the box for VS Code. This uses the built-in embeddings provider with no reranking. - - - - ```yaml title="config.yaml" - context: - - provider: docs - - docs: - - title: Nest.js - startUrl: https://docs.nestjs.com/ - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "docs", - } - ], - "docs": [ - { - "title": "Nest.js", - "startUrl": "https://docs.nestjs.com/", - }, - ] - } - ``` - - - -### Jetbrains minimal setup - -Here is the equivalent minimal example for Jetbrains, which requires setting up an [embeddings provider](../model-roles/embeddings.mdx). - - - - ```yaml title="config.yaml" - models: - - 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/ - ``` - - - ```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" - } - } - ``` - - - -### Full-power setup (VS Code or Jetbrains) - -The following configuration example includes: - -- Examples of both public and private documentation sources -- A custom embeddings provider -- A reranker model available, with reranking parameters customized -- A GitHub token to enable GitHub crawling - - - - ```yaml title="config.yaml" - 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: - model: rerank-2 - roles: - - rerank - context: - - provider: docs - params: - githubToken: - 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 - ``` - - - ```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": "" - } - }, - "embeddingsProvider": { - "provider": "lmstudio", - "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" - } - } - ``` - - - -{/* This could also involve enabling Chromium as a backup for local documentation the [User Settings Page](../deep-dives/settings.md). */} diff --git a/docs/docs/customize/deep-dives/mcp.mdx b/docs/docs/customize/deep-dives/mcp.mdx deleted file mode 100644 index 9899518e7..000000000 --- a/docs/docs/customize/deep-dives/mcp.mdx +++ /dev/null @@ -1,181 +0,0 @@ ---- -title: MCP -description: MCP use and customization -keywords: [tool, use, function calling, claude, automatic] ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# MCP - -As AI systems get better, they're still held back by their training data and -can't access real-time information or specialized tools. The [Model Context -Protocol](https://modelcontextprotocol.io/introduction) (MCP) fixes this by -letting AI models connect with outside data sources, tools, and environments. -This allows smooth sharing of information and abilities between AI systems and -the wider digital world. This standard, created by Anthropic to bring together -prompts, context, and tool use, is key for building truly useful AI experiences -that can be set up with custom tools. - -## How it works - -Currently custom tools can be configured using the Model Context -Protocol standard to unify prompts, context, and tool use. - -MCP Servers can be added to hub Assistants using `mcpServers` blocks. You can -explore available MCP server blocks -[here](https://hub.continue.dev/explore/mcp). - -:::info -MCP can only be used in the **agent** mode. -::: - -## Quick Start - -Below is a quick example of setting up a new MCP server for use in your assistant: - -1. Create a folder called `.continue/mcpServers` at the top level of your workspace -2. Add a file called `playwright-mcp.yaml` to this folder. -3. Write the following contents to `playwright-mcp.yaml` and save. - -```yaml title=".continue/mcpServers/playwright-mcp.yaml" -name: Playwright mcpServer -version: 0.0.1 -schema: v1 -mcpServers: - - name: Browser search - command: npx - args: - - "@playwright/mcp@latest" -``` - -Now test your MCP server by prompting the following command: - -``` -Open the browser and navigate Hacker News. Save the top 10 headlines in a hn.txt file. -``` - -The result will be a generated file called `hn.txt` in the current working directory. - -![playwright mcp](/img/mcp-playwright.png) - -## Using MCP Servers - -To set up your own MCP server, read the [MCP -quickstart](https://modelcontextprotocol.io/quickstart) and then [create an -`mcpServers` -block](https://hub.continue.dev/new?type=block&blockType=mcpServers) or add a local MCP -server block to your [config file](./configuration.md): - - - - ```yaml title="config.yaml" - mcpServers: - - name: SQLite MCP - command: npx - args: - - "-y" - - "mcp-sqlite" - - "/path/to/your/database.db" - -```` - - -```json title="config.json" -{ - "experimental": { - "modelContextProtocolServers": [ - { - "transport": { - "type": "stdio", - "command": "uvx", - "args": ["mcp-server-sqlite", "--db-path", "/path/to/your/database.db"] - } - } - ] - } -} -```` - - - - -### Syntax - -MCP blocks follow the established syntax for blocks, with a few additional properties specific to MCP servers. - -- `name` (**required**): A display name for the MCP server. -- `command` (**required**): The command to run to start the MCP server. -- `type` (optional): The type of the MCP server: `sse`, `stdio`, `streamable-http` -- `args` (optional): Arguments to pass to the command. -- `env` (optional): Secrets to be injected into the command as environment variables. - -### Transport Types - -MCP now supports remote server connections through HTTP-based transports, expanding beyond the traditional local stdio transport method. This enables integration with cloud-hosted MCP servers and distributed architectures. - -#### Server-Sent Events (SSE) Transport - -For real-time streaming communication, use the SSE transport: - -```yaml -mcpServers: - - name: Name - type: sse - url: https://.... -``` - -#### Standard Input/Output (stdio) - -For local MCP servers that communicate via standard input and output: - -```yaml -mcpServers: - - name: Name - type: stdio - command: npx - args: - - "@modelcontextprotocol/server-sqlite" - - "/path/to/your/database.db" -``` - -#### Streamable HTTP Transport - -For standard HTTP-based communication with streaming capabilities: - -```yaml -mcpServers: - - name: Name - type: streamable-http - url: https://.... -``` - -These remote transport options allow you to connect to MCP servers hosted on remote infrastructure, enabling more flexible deployment architectures and shared server resources across multiple clients. - -For detailed information about transport mechanisms and their use cases, refer to the official MCP documentation on [transports](https://modelcontextprotocol.io/docs/concepts/transports#server-sent-events-sse). - -### Working with Secrets - -With some MCP servers you will need to use API keys or other secrets. You can leverage locally stored environments secrets -as well as access hosted secrets in the Continue Hub. To leverage Hub secrets, you can use the `inputs` property in your MCP env block instead of `secrets`. - -```yaml -mcpServers: - - name: Supabase MCP - command: npx - args: - - -y - - "@supabase/mcp-server-supabase@latest" - - --access-token - - ${{ secrets.SUPABASE_TOKEN }} - env: - SUPABASE_TOKEN: ${{ secrets.SUPABASE_TOKEN }} - - name: GitHub - command: npx - args: - - "-y" - - "@modelcontextprotocol/server-github" - env: - GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GITHUB_PERSONAL_ACCESS_TOKEN }} -``` diff --git a/docs/docs/customize/deep-dives/prompts.md b/docs/docs/customize/deep-dives/prompts.md deleted file mode 100644 index daaa342cd..000000000 --- a/docs/docs/customize/deep-dives/prompts.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: Prompts ---- - -Prompts are reusable instructions that can be referenced at any time during chat. They are especially useful as context for repetitive and/or complex tasks. - -:::info -Prompts were previously defined in a `.prompt` file format, but for consistency we now recommend using the same Markdown format as [rules](./rules.mdx) and adding `alwaysApply: false` to the frontmatter so that they are manually triggered. -::: - -### Quick Start - -Below is a quick example of setting up a prompt file: - -1. Create a folder called `.continue/rules` at the top level of your workspace -2. Add a file called `review-prompt.md` to this folder. -3. Write the following contents to `review-prompt.md` and save. - -```md title="review-prompt.md" ---- -name: Redux best practices review -alwaysApply: false ---- - -Review the currently open file for adherence to Redux best practices, as explained in their style guide at https://redux.js.org/style-guide/. -``` - -Now to use this prompt, you can open Chat, type /, select the prompt, and type out any additional instructions you'd like to add. - -## Further Examples - -Below are more examples to get you started. You can also visit the Hub to [explore prompts](https://hub.continue.dev/explore/prompts) or [create your own](https://hub.continue.dev/new?type=block&blockType=prompts). - -### Security review - -```md title="security-review.md" ---- -name: Security best practices review -alwaysApply: false ---- - -Review the changes in the current git diff for these security best practices: - -- Does the architecture follow security-by-design principles? -- Are there potential security vulnerabilities in the system design? -- Is sensitive data handled appropriately throughout the lifecycle? -``` - -### Pull in commonly used files for tasks - -```md title="typeorm-entity-generator.md" ---- -name: Generate a new TypeORM entity -alwaysApply: false ---- - -Referencing `src/db/dataSource.ts` and `src/db/entity/SampleEntity.ts`, generate a new TypeORM entity based on the following requirements: -``` diff --git a/docs/docs/customize/deep-dives/rules.mdx b/docs/docs/customize/deep-dives/rules.mdx deleted file mode 100644 index c19fe8d08..000000000 --- a/docs/docs/customize/deep-dives/rules.mdx +++ /dev/null @@ -1,189 +0,0 @@ ---- -description: Rules are used to provide instructions to the model for Chat, Edit, and Agent requests. -keywords: [rules, .continuerules, system, prompt, message] ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# Rules - -Rules provide instructions to the model for [Chat](../../chat/how-to-use-it.md), [Edit](../../edit/how-to-use-it.md), and [Agent](../../agent/how-to-use-it.md) requests. - -:::info Rules are not included in [autocomplete](./autocomplete.mdx) or [apply](../model-roles/apply.mdx). -::: - -## How it works - -You can view the current rules by clicking the pen icon above the main toolbar: - -![rules input toolbar section](/img/notch-rules.png) - -To form the system message, rules are joined with new lines, in the order they appear in the toolbar. This includes the base chat system message ([see below](#chat-system-message)). - -## Quick Start - -Below is a quick example of setting up a new rule file: - -1. Create a folder called `.continue/rules` at the top level of your workspace -2. Add a file called `pirates-rule.md` to this folder. -3. Write the following contents to `pirates-rule.md` and save. - -```md title=".continue/rules/pirates-rule.md" ---- -name: Pirate rule ---- - -- Talk like a pirate. -``` - -Now test your rules by asking a question about a file in chat. - -![pirate rule test](/img/pirate-rule-test.png) - -## Creating `rules` blocks - -Rules can be added locally using the "Add Rules" button while viewing the Local Assistant's rules. - -![add local rules button](/img/add-local-rules.png) - -:::info Automatically create local rule blocks -When in Agent mode, you can prompt the agent to create a rule for you using the `builtin_create_rule_block` tool if enabled. - -For example, you can say "Create a rule for this", and a rule will be created for you in `.continue/rules` based on your conversation. -::: - -Rules can also be added to an Assistant on the Continue Hub. - -Explore available rules [here](https://hub.continue.dev), or [create your own](https://hub.continue.dev/new?type=block&blockType=rules) in the Hub. - -### Syntax - -:::info - -Rules were originally defined in YAML format (demonstrated below), but we introduced Markdown for easier editing. While both are still supported, we recommend Markdown. - -::: - -Rules blocks can be simple text, written in YAML configuration files, or as Markdown (`.md`) files. They can have the following properties: - -- `name` (**required** for YAML): A display name/title for the rule -- `globs` (optional): When files are provided as context that match this glob pattern, the rule will be included. This can be either a single pattern (e.g., `"**/*.{ts,tsx}"`) or an array of patterns (e.g., `["src/**/*.ts", "tests/**/*.ts"]`). -- `regex` (optional): When files are provided as context and their content matches this regex pattern, the rule will be included. This can be either a single pattern (e.g., `"^import .* from '.*';$"`) or an array of patterns (e.g., `["^import .* from '.*';$", "^export .* from '.*';$"]`). -- `description` (optional): A description for the rule. Agents may read this description when `alwaysApply` is false to determine whether the rule should be pulled into context. -- `alwaysApply`: Determines whether the rule is always included. Behavior is described below: - - `true`: Always included, regardless of file context - - `false`: Included if globs exist AND match file context, or the agent decides to pull the rule into context based on it's description - - `undefined` (default behavior): Included if no globs exist OR globs exist and match - - - - ```yaml title="doc-standards.md" - --- - name: Documentation Standards - globs: docs/**/*.{md,mdx} - alwaysApply: false - description: Standards for writing and maintaining Continue Docs - --- - -# Continue Docs Standards - -- Follow Docusaurus documentation standards -- Include YAML frontmatter with title, description, and keywords -- Use consistent heading hierarchy starting with h2 (##) -- Include relevant Admonition components for tips, warnings, and info -- Use descriptive alt text for images -- Include cross-references to related documentation -- Reference other docs with relative paths -- Keep paragraphs concise and scannable -- Use code blocks with appropriate language tags - - ```` - - - - ```yaml title="doc-standards.yaml" - name: Documentation Standards - version: 1.0.0 - schema: v1 - - rules: - - name: Documentation Standards - globs: docs/**/*.{md,mdx} - alwaysApply: false - rule: > - - Follow Docusaurus documentation standards - - Include YAML frontmatter with title, description, and keywords - - Use consistent heading hierarchy starting with h2 (##) - - Include relevant Admonition components for tips, warnings, and info - - Use descriptive alt text for images - - Include cross-references to related documentation - - Reference other docs with relative paths - - Keep paragraphs concise and scannable - - Use code blocks with appropriate language tags - ```` - - - - - -### `.continue/rules` folder - -You can create project-specific rules by adding a `.continue/rules` folder to the root of your project and adding new rule files. - -```md title=".continue/rules/new-rule.md" ---- -name: New rule ---- - -Always give concise responses -``` - -This is also done when selecting "Add Rule" in the Assistant settings. This will create a new folder in `.continue/rules` with a default file named `new-rule.md`. - -### Examples - -If you want concise answers: - -```md title=".continue/rules/concise-rule.md" ---- -name: Always give concise answers ---- - -Please provide concise answers. Don't explain obvious concepts. -You can assume that I am knowledgable about most programming topics. -``` - -If you want to ensure certain practices are followed, for example in React: - -```md title=".continue/rules/functional-rule.md" ---- -name: Always use functional components ---- - -Whenever you are writing React code, make sure to - -- use functional components instead of class components -- use hooks for state management -- define an interface for your component props -- use Tailwind CSS for styling -- modularize components into smaller, reusable pieces -``` - -### Chat System Message - -Continue includes a simple default system message for [Chat](../../chat/how-to-use-it.md) and [Agent](../../agent/how-to-use-it.md) requests, to help the model provide reliable codeblock formats in its output. - -This can be viewed in the rules section of the toolbar (see above), or in the source code [here](https://github.com/continuedev/continue/blob/main/core/llm/constructMessages.ts#L4). - -Advanced users can override this system message for a specific model if needed by using `chatOptions.baseSystemMessage`. See the [`config.yaml` reference](../../advanced/reference#models). - -### `.continuerules` - -:::warning - -`.continuerules` will be deprecated in a future release. Please use the `.continue/rules` folder instead. - -::: - -You can create project-specific rules by adding a `.continuerules` file to the root of your project. This file is raw text and its full contents will be used as rules. diff --git a/docs/docs/customize/deep-dives/settings.md b/docs/docs/customize/deep-dives/settings.md deleted file mode 100644 index 82af98c15..000000000 --- a/docs/docs/customize/deep-dives/settings.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: User Settings Page -description: Reference for Adjusting User-Specific Settings -keywords: [config, settings, configuration, customize, customization, sidebar] ---- - -# The User Settings Page - -The **User Settings page** can be accessed by clicking the gear icon in the header of the Continue sidebar and then selecting the "Settings" tab. - -![settings](/img/settings-header.png) - -Which takes you to this page (select the "Settings" tab): - -![User Settings Page](/img/settings-page.png) - -Below that, the following settings which are not part of a configuration file are available: - -- `Show Session Tabs`: If on, displays tabs above the chat as an alternative way to organize and access your sessions. Off by default -- `Wrap Codeblocks`: If on, enables text wrapping in code blocks. Off by default. -- `Show Chat Scrollbar`: If on, enables a scrollbar in the chat window. Off by default. -- `Text-to-Speech Output`: If on, reads LLM responses aloud with TTS. Off by default. -- `Enable Session Titles`: If on, generates summary titles for each chat session after the first message, using the current Chat model. On by default. -- `Format Markdown`: If off, shows responses as raw text. On by default. -- `Allow Anonymous Telemetry`: If on, allows Continue to send anonymous telemetry. **On** by default. -- `Enable Indexing`: Enables indexing of the codebase for the @codebase and @code context providers. **On** by default. -- `Font Size`: Specifies base font size for UI elements -- `Multiline Autocompletions`: Controls multiline completions for autocomplete. Can be set to `always`, `never`, or `auto`. Defaults to `auto` -- `Autocomplete timeout`: Maximum time in milliseconds for autocomplete request/retreival. Defaults to 150 -- `Autocomplete debounce`: Minimum time in milliseconds to trigger an autocomplete request after a change. Defaults to 250 -- `Disable autocomplete in files`: List of comma-separated glob pattern to disable autocomplete in matching files. E.g., `**/*.{txt,md}` - -### Experimental settings - -At the bottom of the User Settings page there is an "Experimental Settings" section which contains new or otherwise experimental settings, including: - -- `Auto-Accept Agent Edits`: **CAUTION: Be very careful with this setting. When turned on, Agent mode's edit tool can make changes to files with no manual review or guaranteed stopping point. If on, diffs generated by the edit tool are automatically accepted and Agent proceeds with the next conversational turn.** Off by default. - - - - - diff --git a/docs/docs/customize/deep-dives/slash-commands.mdx b/docs/docs/customize/deep-dives/slash-commands.mdx deleted file mode 100644 index 059cf8213..000000000 --- a/docs/docs/customize/deep-dives/slash-commands.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: Slash commands -description: Shortcuts that can be activated by prefacing your input with '/' -keywords: [slash command, custom commands, step] ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -![actions](/img/actions.gif) - -## Slash commands - -Slash commands are shortcuts that can be activated by typing '/' in a chat session (press cmd/ctrl + L (VS Code) or cmd/ctrl + J (JetBrains)), and selecting from the dropdown. -{/* ![slash-commands](/img/slash-commands.png) */} - -Slash commands can be combined with additional instructions, including [context providers](../context-providers.mdx) or [highlighted code](../../edit/context-selection#highlighted-code). - -## Prompts - -### Assistant prompt blocks - -The easiest way to add a slash command is by adding [`prompt` blocks](../../hub/blocks/block-types.md#prompts) to your assistant, which show up as slash commands in [Chat](../../chat/how-it-works.md). - -### Prompt files - -It is also possible to write your own slash command by defining a “.prompt file.” Prompt files can be as simple as a text file, but also include templating so that you can refer to files, URLs, highlighted code, and more. - -Learn more about prompt files [here](./prompts.md) - -### MCP Server prompts - -Any prompts provided by [Model Context Protocol](https://modelcontextprotocol.io/introduction) servers are also accessible in chat as Slash Commands. See the [MCP Server Deep Dive](./mcp.mdx) for more details. diff --git a/docs/docs/customize/deep-dives/vscode-actions.md b/docs/docs/customize/deep-dives/vscode-actions.md deleted file mode 100644 index d9f1b7b66..000000000 --- a/docs/docs/customize/deep-dives/vscode-actions.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: VS Code Actions -description: VS Code Actions -keywords: [vscode, quick actions, quick, actions] ---- - -### Other triggers for Actions (VS Code) - -:::info -Currently all of these are only available in VS Code -::: - -To make common use cases even more accessible, we provide a handful of other ways to invoke actions in VS Code. - -## Quick actions - -Quick Actions are displayed as buttons above top-level classes and functions in your source code, letting you invoke actions with one click. They will edit that class or function, but nothing outside of it. They can also be customized with [.prompt files](./prompts.md) to perform custom actions. - -![quick-actions](/img/quick-actions.png) - -By default, quick actions are disabled, but can be enabled with the “Continue: Enable Quick Actions” in VS Code settings. - -## Right click actions - -Right click actions let you highlight a desired region of code, right click, and then select an action from the dropdown menu. - -The highlighted code you’ve selected will be included in your prompt alongside a pre-written set of instructions depending on the selected action. This is the only section of code that the model will attempt to edit. - -Right click actions that generate inline diffs use the same prompt and response processing logic as [Edit](../../edit/how-it-works.md). - -![context-menu](/img/context-menu.png) - -## Debug action - -The debug action is a special built-in keyboard shortcut in the VS Code extension. Use cmd/ctrl + shift + R to instantly copy the contents of the most recent terminal output into the chat sidebar and get debugging advice. There is no additional, non-visible information sent to the language model. - -``` -I got the following error, can you please help explain how to fix it? - -[ERROR_MESSAGE] -``` - -## Quick fixes - -Whenever you see red/yellow underlines in your code indicating errors, you can place your cursor nearby and VS Code will display a lightbulb icon. Either clicking the lightbulb or using the keyboard shortcut cmd/ctrl + . will show a dropdown menu of quick fixes. One of these will be the “Ask Continue” action. Either click or use cmd/ctrl + . again and Continue will attempt to help solve the problem. - -Similarly to the debug action, quick actions transparently inject a prompt into the chat window. When you select “Ask Continue”, the 3 lines above and below the error are sent to the chat followed by the question “How do I fix the following problem in the above code?: [ERROR_MESSAGE]”. - -![ask-continue](/img/ask-continue.png) diff --git a/docs/docs/customize/model-providers/assets/watsonx2.gif b/docs/docs/customize/model-providers/assets/watsonx2.gif deleted file mode 100644 index e37443ad6..000000000 Binary files a/docs/docs/customize/model-providers/assets/watsonx2.gif and /dev/null differ diff --git a/docs/docs/customize/model-providers/more/SambaNova.mdx b/docs/docs/customize/model-providers/more/SambaNova.mdx deleted file mode 100644 index 58197ae30..000000000 --- a/docs/docs/customize/model-providers/more/SambaNova.mdx +++ /dev/null @@ -1,34 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# SambaNova Cloud - -The SambaNova Cloud is a cloud platform for running large AI models with the world record open source models performance. You can follow the instructions in [this blog post](https://sambanova.ai/blog/accelerating-coding-with-sambanova-cloud?ref=blog.continue.dev) to configure your setup. - - - - ```yaml title="config.yaml" - models: - - name: SambaNova Llama 4 Scout - provider: sambanova - model: Llama-4-Scout-17B-16E-Instruct - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "SambaNova Llama 4 Scout", - "provider": "sambanova", - "model": "Llama-4-Scout-17B-16E-Instruct", - "apiKey": "" - } - ] - } - ``` - - - -[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/SambaNova.ts) diff --git a/docs/docs/customize/model-providers/more/asksage.mdx b/docs/docs/customize/model-providers/more/asksage.mdx deleted file mode 100644 index b7d7ede26..000000000 --- a/docs/docs/customize/model-providers/more/asksage.mdx +++ /dev/null @@ -1,91 +0,0 @@ -# Ask Sage - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -:::info -To get an Ask Sage API key login to the Ask Sage platform (If you don't have an account, you can create one [here](https://chat.asksage.ai/)) and follow the instructions in the Ask Sage Docs: [Ask Sage API Key](https://docs.asksage.ai/docs/api-documentation/api-documentation.html) -::: - -## Configuration - -To use the Ask Sage models, you can use the following - - - - ```yaml title="config.yaml" - models: - - name: GPT-4 gov - provider: askSage - model: gpt4-gov - apiBase: https://api.asksage.ai/server/ - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "GPT-4 gov", - "provider": "askSage", - "model": "gpt4-gov", - "apiBase": "https://api.asksage.ai/server/", - "apiKey": "" - } - ] - } - ``` - - - -The `apiBase` will be listed on the Ask Sage platform when you generate an `API key`. You will see context as shown below: - -> Server API for query/training etc.: -> -> - Documentation: https://app.swaggerhub.com/apis-docs/NICOLASCHAILLAN_1/server_ask-sage_api/1.0 -> - URL for this API is: https://api.asksage.ai/server/ - -## Usage - -Currently, the setup for the models provided by Ask Sage is to support the following two functionalities provided by Continue.Dev: - -- `Chat` to understand and iterate on code in the sidebar -- `Edit` to modify code without leaving your current file - -More models, functionalities and documentation will be added in the future for Ask Sage Integration. - -> We recommend to utilize the `OpenAI` or `Anthropic` models for the best performance and results for the `Chat` and `Edit` functionalities. - -## Ask Sage Documentation - -Ask Sage documentation is not available with Continue.Dev, so if you have any questions or need help with Ask Sage type `@ask` and select the `Ask Sage` option in the chat. Then procced to ask your question about Ask Sage. - -## Current Models From Ask Sage Supported - -The current Models available provided by Ask Sage are: - -| Index | Model | Added | -| ----- | --------------------- | ----- | -| 1 | GPT-4 Gov | ✅ | -| 2 | GPT-4o Gov | ✅ | -| 3 | GPT-4o-mini Gov | ✅ | -| 4 | GPT-3.5-Turbo Gov | ✅ | -| 5 | GPT-4o | ✅ | -| 6 | GPT-4o-mini | ✅ | -| 7 | GPT-4 | ✅ | -| 8 | GPT-4-32K | ✅ | -| 9 | GPT-o1 | ✅ | -| 10 | GPT-o1-mini | ✅ | -| 10 | GPT-o3-mini | ✅ | -| 11 | GPT-3.5-turbo | ✅ | -| 12 | Claude 3.5 Sonnet Gov | ✅ | -| 13 | Claude 3 Opus | ✅ | -| 14 | Claude 3 Sonet | ✅ | -| 15 | Claude 3.5 Sonnet | ✅ | -| 16 | Grok (xAI) | ✅ | -| 17 | Groq Llama 3.3 | ✅ | -| 18 | Groq 70B | ✅ | -| 19 | Gemini Pro | ✅ | -| 20 | llama 3 | ✅ | -| 21 | Mistral Large | ✅ | diff --git a/docs/docs/customize/model-providers/more/cerebras.mdx b/docs/docs/customize/model-providers/more/cerebras.mdx deleted file mode 100644 index 838b1d1b9..000000000 --- a/docs/docs/customize/model-providers/more/cerebras.mdx +++ /dev/null @@ -1,36 +0,0 @@ -# Cerebras Inference - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -Cerebras Inference uses specialized silicon to provides fast inference. - -1. Create an account in the portal [here](https://cloud.cerebras.ai/). -2. Create and copy the API key for use in Continue. -3. Update your Continue config file: - - - - ```yaml title="config.yaml" - models: - - name: Cerebras Llama 3.1 70B - provider: cerebras - model: llama3.1-70b - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Cerebras Llama 3.1 70B", - "provider": "cerebras", - "model": "llama3.1-70b", - "apiKey": "" - } - ] - } - ``` - - diff --git a/docs/docs/customize/model-providers/more/cloudflare.mdx b/docs/docs/customize/model-providers/more/cloudflare.mdx deleted file mode 100644 index 8463d2557..000000000 --- a/docs/docs/customize/model-providers/more/cloudflare.mdx +++ /dev/null @@ -1,87 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# Cloudflare Workers AI - -Cloudflare Workers AI can be used for both chat and tab autocompletion in Continue. Here is an example of Cloudflare Workers AI configuration: - - - - ```yaml title="config.yaml" - models: - - name: Llama 3 8B - provider: cloudflare - apiKey: - model: "@cf/meta/llama-3-8b-instruct" - contextLength: 2400 - defaultCompletionOptions: - maxTokens: 500 - roles: - - chat - env: - accountId: YOUR CLOUDFLARE ACCOUNT ID - - name: DeepSeek Coder 6.7b Instruct - provider: cloudflare - apiKey: - model: "@hf/thebloke/deepseek-coder-6.7b-instruct-awq" - contextLength: 2400 - defaultCompletionOptions: - maxTokens: 500 - roles: - - chat - env: - accountId: YOUR CLOUDFLARE ACCOUNT ID - - name: DeepSeek 7b - provider: cloudflare - apiKey: - model: "@hf/thebloke/deepseek-coder-6.7b-base-awq" - roles: - - autocomplete - env: - accountId: YOUR CLOUDFLARE ACCOUNT ID - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Llama 3 8B", - "provider": "cloudflare", - "accountId": "YOUR CLOUDFLARE ACCOUNT ID", - "apiKey": "YOUR CLOUDFLARE API KEY", - "contextLength": 2400, - "completionOptions": { - "maxTokens": 500 - }, - "model": "@cf/meta/llama-3-8b-instruct" - }, - { - "title": "DeepSeek Coder 6.7b Instruct", - "provider": "cloudflare", - "accountId": "YOUR CLOUDFLARE ACCOUNT ID", - "apiKey": "YOUR CLOUDFLARE API KEY", - "contextLength": 2400, - "completionOptions": { - "maxTokens": 500 - }, - "model": "@hf/thebloke/deepseek-coder-6.7b-instruct-awq" - } - ], - "tabAutocompleteModel": { - "title": "DeepSeek 7b", - "provider": "cloudflare", - "accountId": "YOUR CLOUDFLARE ACCOUNT ID", - "apiKey": "YOUR CLOUDFLARE API KEY", - "model": "@hf/thebloke/deepseek-coder-6.7b-base-awq" - } - } - ``` - - - -Visit the [Cloudflare dashboard](https://dash.cloudflare.com/) to [create an API key](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - -Review [available models](https://developers.cloudflare.com/workers-ai/models/) on Workers AI - -[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Cloudflare.ts) diff --git a/docs/docs/customize/model-providers/more/cohere.mdx b/docs/docs/customize/model-providers/more/cohere.mdx deleted file mode 100644 index b68814ffd..000000000 --- a/docs/docs/customize/model-providers/more/cohere.mdx +++ /dev/null @@ -1,102 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# Cohere - -Before using Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/api-keys) to create an API key. - -## Chat model - -We recommend configuring **Command A** as your chat model. - - - - ```yaml title="config.yaml" - models: - - name: Command A 03-2025 - provider: cohere - model: command-a-03-2025 - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Command A 03-2025", - "provider": "cohere", - "model": "command-a-03-2025", - "apiKey": "" - } - ] - } - ``` - - - -## Autocomplete model - -Cohere currently does not offer any autocomplete models. - -[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers. - -## Embeddings model - -We recommend configuring **embed-v4.0** as your embeddings model. - - - - ```yaml title="config.yaml" - models: - - name: Cohere Embed v4.0 - provider: cohere - model: embed-v4.0 - apiKey: - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "cohere", - "model": "embed-v4.0", - "apiKey": "" - } - } - ``` - - - -## Reranking model - -We recommend configuring **rerank-v3.5** as your reranking model. - - - - ```yaml title="config.yaml" - models: - - name: Cohere Rerank v3.5 - provider: cohere - model: rerank-v3.5 - apiKey: - roles: - - rerank - ``` - - - ```json title="config.json" - { - "reranker": { - "name": "cohere", - "params": { - "model": "rerank-v3.5", - "apiKey": "" - } - } - } - ``` - - diff --git a/docs/docs/customize/model-providers/more/deepinfra.mdx b/docs/docs/customize/model-providers/more/deepinfra.mdx deleted file mode 100644 index de3e09e23..000000000 --- a/docs/docs/customize/model-providers/more/deepinfra.mdx +++ /dev/null @@ -1,34 +0,0 @@ -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -# DeepInfra - -[DeepInfra](https://deepinfra.com) provides inference for open-source models at very low cost. To get started with DeepInfra, obtain your API key [here](https://deepinfra.com/dash). Then, find the model you want to use [here](https://deepinfra.com/models?type=text-generation) and copy the name of the model. Continue can then be configured to use the `DeepInfra` LLM class, like the example here: - - - - ```yaml title="config.yaml" - models: - - name: DeepInfra - provider: deepinfra - model: mistralai/Mixtral-8x7B-Instruct-v0.1 - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "provider": "deepinfra", - "title": "DeepInfra", - "model": "mistralai/Mixtral-8x7B-Instruct-v0.1", - "apiKey": "" - } - ] - } - ``` - - - -[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/DeepInfra.ts) diff --git a/docs/docs/customize/model-providers/more/flowise.mdx b/docs/docs/customize/model-providers/more/flowise.mdx deleted file mode 100644 index c0257f851..000000000 --- a/docs/docs/customize/model-providers/more/flowise.mdx +++ /dev/null @@ -1,34 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# Flowise - -[Flowise](https://flowiseai.com/) is a low-code/no-code drag & drop tool with the aim to make it easy for people to visualize and build LLM apps. Continue can then be configured to use the `Flowise` LLM class, like the example here: - - - - ```yaml title="config.yaml" - models: - - name: Flowise - provider: flowise - model: - apiBase: - ``` - - - ```json title="config.json" - { - "models": [ - { - "provider": "flowise", - "title": "Flowise", - "model": "", - "apiBase": "" - } - ] - } - ``` - - - -[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Flowise.ts) diff --git a/docs/docs/customize/model-providers/more/function-network.mdx b/docs/docs/customize/model-providers/more/function-network.mdx deleted file mode 100644 index e2089ac1a..000000000 --- a/docs/docs/customize/model-providers/more/function-network.mdx +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: Function Network -slug: ../function-network ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# Function Network - -> Private, Affordable User-Owned AI - -:::info - -To get an API key, login to the Function Network Developer Platform. If you don't have an account, you can create one [here](https://www.function.network/join-waitlist). - -::: - -## Chat model - -Function Network supports a number of models for chat. We recommend using LLama 3.1 70b or Qwen2.5-Coder-32B-Instruct. - - - - ```yaml title="config.yaml" - models: - - name: Llama 3.1 70b - provider: function-network - model: meta/llama-3.1-70b-instruct - apiKey: - roles: - - chat - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Llama 3.1 70b", - "provider": "function-network", - "model": "meta/llama-3.1-70b-instruct", - "apiKey": "" - } - ] - } - ``` - - - -[Click here](https://docs.function.network/models-supported/chat-and-code-completion) to see a list of chat model providers. - -## Autocomplete model - -Function Network supports a number of models for autocomplete. We recommend using Llama 3.1 8b or Qwen2.5-Coder-1.5B. - - - - ```yaml title="config.yaml" - models: - - name: Deepseek Coder 6.7b - provider: function-network - model: thebloke/deepseek-coder-6.7b-base-awq - apiKey: - roles: - - autocomplete - ``` - - - ```json title="config.json" - { - "tabAutocompleteModel": { - "title": "Deepseek Coder 6.7b", - "provider": "function-network", - "model": "thebloke/deepseek-coder-6.7b-base-awq", - "apiKey": "" - } - } - ``` - - - -## Embeddings model - -Function Network supports a number of models for embeddings. We recommend using baai/bge-base-en-v1.5. - - - - ```yaml title="config.yaml" - models: - - name: BGE Base En - provider: function-network - model: baai/bge-base-en-v1.5 - apiKey: - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "function-network", - "model": "baai/bge-base-en-v1.5", - "apiKey": "" - } - } - ``` - - - -[Click here](https://docs.function.network/models-supported/embeddings) to see a list of embeddings model providers. - -## Reranking model - -Function Network currently does not offer any reranking models. diff --git a/docs/docs/customize/model-providers/more/groq.mdx b/docs/docs/customize/model-providers/more/groq.mdx deleted file mode 100644 index 2c33e37f1..000000000 --- a/docs/docs/customize/model-providers/more/groq.mdx +++ /dev/null @@ -1,41 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# Groq - -:::info -Check if your chosen model is still supported by referring to the [model documentation](https://console.groq.com/docs/models). If a model has been deprecated, you may encounter a 404 error when attempting to use it. -::: - -Groq provides the fastest available inference for open-source language models, including the entire Llama 3.1 family. - -1. Obtain an API key [here](https://console.groq.com/keys) -2. Update your Continue config file like this: - - - - ```yaml title="config.yaml" - models: - - name: Llama 3.3 70b Versatile - provider: groq - model: llama-3.3-70b-versatile - apiKey: - roles: - - chat - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Llama 3.3 70b Versatile", - "provider": "groq", - "model": "llama-3.3-70b-versatile", - "apiKey": "" - } - ] - } - ``` - - diff --git a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx deleted file mode 100644 index 91f37051a..000000000 --- a/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx +++ /dev/null @@ -1,36 +0,0 @@ -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -# HuggingFace Inference Endpoints - -Hugging Face Inference Endpoints are an easy way to setup instances of open-source language models on any cloud. Sign up for an account and add billing [here](https://huggingface.co/settings/billing), access the Inference Endpoints [here](https://ui.endpoints.huggingface.co), click on “New endpoint”, and fill out the form (e.g. select a model like [WizardCoder-Python-34B-V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)), and then deploy your model by clicking “Create Endpoint”. Change `~/.continue/config.json` to look like this: - - - - ```yaml title="config.yaml" - models: - - name: Hugging Face Inference API - provider: huggingface-inference-api - model: MODEL_NAME - apiKey: - apiBase: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Hugging Face Inference API", - "provider": "huggingface-inference-api", - "model": "MODEL_NAME", - "apiKey": "", - "apiBase": "" - } - ] - } - ``` - - - -[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/HuggingFaceInferenceAPI.ts) diff --git a/docs/docs/customize/model-providers/more/ipex_llm.mdx b/docs/docs/customize/model-providers/more/ipex_llm.mdx deleted file mode 100644 index 5af95a7cf..000000000 --- a/docs/docs/customize/model-providers/more/ipex_llm.mdx +++ /dev/null @@ -1,66 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# IPEX-LLM - -:::info -[**IPEX-LLM**](https://github.com/intel-analytics/ipex-llm) is a PyTorch library for running LLM on Intel CPU and GPU (e.g., local PC with iGPU, discrete GPU such as Arc A-Series, Flex and Max) with very low latency. -::: - -IPEX-LLM supports accelerated Ollama backend to be hosted on Intel GPU. Refer to [this guide](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/ollama_quickstart.html) from IPEX-LLM official documentation about how to install and run Ollama serve accelerated by IPEX-LLM on Intel GPU. You can then configure Continue to use the IPEX-LLM accelerated `"ollama"` provider as follows: - - - - ```yaml title="config.yaml" - models: - - name: IPEX-LLM - provider: ollama - model: AUTODETECT - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "IPEX-LLM", - "provider": "ollama", - "model": "AUTODETECT" - } - ] - } - ``` - - - -If you would like to reach the Ollama service from another machine, make sure you set or export the environment variable `OLLAMA_HOST=0.0.0.0` before executing the command `ollama serve`. Then, in the Continue configuration, set `'apiBase'` to correspond with the IP address / port of the remote machine. That is, Continue can be configured to be: - - - - ```yaml title="config.yaml" - models: - - name: IPEX-LLM - provider: ollama - model: AUTODETECT - apiBase: http://your-ollama-service-ip:11434 - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "IPEX-LLM", - "provider": "ollama", - "model": "AUTODETECT", - "apiBase": "http://your-ollama-service-ip:11434" - } - ] - } - ``` - - - -:::tip -If you would like to preload the model before your first conversation with that model in Continue, you could refer to [here](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/continue_quickstart.html#pull-and-prepare-the-model) for more information. -::: diff --git a/docs/docs/customize/model-providers/more/kindo.mdx b/docs/docs/customize/model-providers/more/kindo.mdx deleted file mode 100644 index 2315fe7a1..000000000 --- a/docs/docs/customize/model-providers/more/kindo.mdx +++ /dev/null @@ -1,69 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# Kindo - -Kindo offers centralized control over your organization's AI operations, ensuring data protection and compliance with internal policies while supporting various commercial and open-source models. To get started, sign up [here](https://app.kindo.ai/), create an API key in [Settings > API > API Keys](https://app.kindo.ai/settings/api), and choose a model from the list of supported models in the "Available Models" tab or copy and paste the config in [Plugins > Your Configuration](https://app.kindo.ai/plugins). - -## Config Example - - - - ```yaml title="config.yaml" - models: - - name: Claude 3.5 Sonnet - provider: kindo - model: claude-3-5-sonnet - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Claude 3.5 Sonnet", - "provider": "kindo", - "model": "claude-3-5-sonnet", - "apiKey": "" - } - ] - } - ``` - - - -## Tab Autocomplete Config Example - - - - ```yaml title="config.yaml" - models: - - name: WhiteRabbitNeo - provider: kindo - model: /models/WhiteRabbitNeo-33B-DeepSeekCoder - apiKey: - roles: - - autocomplete - ``` - - - ```json title="config.json" - { - "tabAutocompleteModel": [ - { - "title": "WhiteRabbitNeo", - "provider": "kindo", - "model": "/models/WhiteRabbitNeo-33B-DeepSeekCoder", - "apiKey": "", - "template": "none" - } - ] - } - ``` - - - -## Security - -To update your organization's model access, adjust the controls in [security settings](https://app.kindo.ai/security-settings). diff --git a/docs/docs/customize/model-providers/more/llamacpp.mdx b/docs/docs/customize/model-providers/more/llamacpp.mdx deleted file mode 100644 index 5b210bb6b..000000000 --- a/docs/docs/customize/model-providers/more/llamacpp.mdx +++ /dev/null @@ -1,40 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# LlamaCpp - -Run the llama.cpp server binary to start the API server. If running on a remote server, be sure to set host to 0.0.0.0: - -```bash -.\server.exe -c 4096 --host 0.0.0.0 -t 16 --mlock -m models\meta\llama\codellama-7b-instruct.Q8_0.gguf -``` - -After it's up and running, change `~/.continue/config.json` to look like this: - - - - ```yaml title="config.yaml" - models: - - name: Llama CPP - provider: llama.cpp - model: MODEL_NAME - apiBase: http://localhost:8080 - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Llama CPP", - "provider": "llama.cpp", - "model": "MODEL_NAME", - "apiBase": "http://localhost:8080" - } - ] - } - ``` - - - -[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/LlamaCpp.ts) diff --git a/docs/docs/customize/model-providers/more/llamafile.mdx b/docs/docs/customize/model-providers/more/llamafile.mdx deleted file mode 100644 index e674d2f83..000000000 --- a/docs/docs/customize/model-providers/more/llamafile.mdx +++ /dev/null @@ -1,32 +0,0 @@ -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -# Llamafile - -A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contained binary that can run an open-source LLM. You can configure this provider in your config.json as follows: - - - - ```yaml title="config.yaml" - models: - - name: Llamafile - provider: llamafile - model: mistral-7b - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Llamafile", - "provider": "llamafile", - "model": "mistral-7b" - } - ] - } - ``` - - - -[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Llamafile.ts) diff --git a/docs/docs/customize/model-providers/more/lmstudio.mdx b/docs/docs/customize/model-providers/more/lmstudio.mdx deleted file mode 100644 index 6dedb0a88..000000000 --- a/docs/docs/customize/model-providers/more/lmstudio.mdx +++ /dev/null @@ -1,88 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# LM Studio - -[LM Studio](https://lmstudio.ai) is an application for Mac, Windows, and Linux that makes it easy to locally run open-source models and comes with a great UI. To get started with LM Studio, download from the website, use the UI to download a model, and then start the local inference server. Continue can then be configured to use the `LMStudio` LLM class: - - - - ```yaml title="config.yaml" - models: - - name: LM Studio - provider: lmstudio - model: llama2-7b - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "LM Studio", - "provider": "lmstudio", - "model": "llama2-7b" - } - ] - } - ``` - - - -### Embeddings model - -LMStudio supports embeddings endpoints, and comes with the `nomic-ai/nomic-embed-text-v1.5-GGUF` model (as of Nov 2024, check your models) - - - - ```yaml title="config.yaml" - models: - - name: Nomic Embed Text - provider: lmstudio - model: nomic-ai/nomic-embed-text-v1.5-GGUF - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "lmstudio", - "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" - } - } - ``` - - - -## Setting up a remote instance - -To configure a remote instance of LM Studio, add the `"apiBase"` property to your model in config.json: - - - - ```yaml title="config.yaml" - models: - - name: Nomic Embed Text - provider: lmstudio - model: nomic-ai/nomic-embed-text-v1.5-GGUF - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "lmstudio", - "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" - } - } - ``` - - - -This `apiBase` will now be used instead of the default `http://localhost:1234/v1`. - -[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/LMStudio.ts) diff --git a/docs/docs/customize/model-providers/more/moonshot.mdx b/docs/docs/customize/model-providers/more/moonshot.mdx deleted file mode 100644 index 0d9f838eb..000000000 --- a/docs/docs/customize/model-providers/more/moonshot.mdx +++ /dev/null @@ -1,94 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# Moonshot - -[Moonshot AI](https://platform.moonshot.cn/) provides high-quality large language model services with competitive pricing and excellent performance. - -## Configuration - -To use Moonshot AI models, you need to: - -1. Get an API key from [Moonshot AI Platform](https://platform.moonshot.cn/) -2. Add the following configuration: - - - - ```yaml title="config.yaml" - models: - - name: Moonshot - provider: moonshot - model: moonshot-v1-8k - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Moonshot", - "provider": "moonshot", - "model": "moonshot-v1-8k", - "apiKey": "" - } - ] - } - ``` - - - -## Available Models - -Moonshot AI currently provides the following models: - -- `moonshot-v1-8k`: Base model with 8K context window -- `moonshot-v1-32k`: Base model with 32K context window -- `moonshot-v1-128k`: Base model with 128K context window - -## Configuration Options - -| Option | Description | Default | -| --------- | ----------------- | ----------------------------- | -| `apiKey` | Moonshot API key | Required | -| `apiBase` | API base URL | `https://api.moonshot.cn/v1/` | -| `model` | Model name to use | `moonshot-v1-8k` | - -## Example - -Here's a complete configuration example: - - - - ```yaml title="config.yaml" - models: - - name: Moonshot-8K - provider: moonshot - model: moonshot-v1-8k - apiKey: - defaultCompletionOptions: - temperature: 0.7 - topP: 0.95 - maxTokens: 2048 - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Moonshot-8K", - "provider": "moonshot", - "model": "moonshot-v1-8k", - "apiKey": "", - "completionOptions": { - "temperature": 0.7, - "topP": 0.95, - "maxTokens": 2048 - } - } - ] - } - ``` - - diff --git a/docs/docs/customize/model-providers/more/morph.mdx b/docs/docs/customize/model-providers/more/morph.mdx deleted file mode 100644 index 46a9adab3..000000000 --- a/docs/docs/customize/model-providers/more/morph.mdx +++ /dev/null @@ -1,112 +0,0 @@ -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -# Morph - -Morph provides a fast apply model that helps you quickly and accurately apply code changes from chat suggestions to your files. It's optimized for speed and precision when integrating generated code into your existing codebase. You can sign up for Morph's generous free tier [here](https://morphllm.com/dashboard). Then, update your configuration file as follows: - - - - ```yaml title="config.yaml" - models: - - uses: morphllm/morph-v0 - with: - MORPH_API_KEY: ${{ secrets.MORPH_API_KEY }} -``` -or -```yaml title="config.yaml" - - name: Morph Fast Apply - provider: openai - model: morph-v2 - apiKey: - apiBase: https://api.morphllm.com/v1/ - roles: - - apply - promptTemplates: - apply: "{{{ original_code }}}\n{{{ new_code }}}" - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Morph Fast Apply", - "provider": "openai", - "model": "morph-v2", - "apiKey": "", - "apiBase": "https://api.morphllm.com/v1/", - "roles": ["apply"], - "promptTemplates": { - "apply": "{{{ original_code }}}\n{{{ new_code }}}" - } - } - ] - } - ``` - - - -## Embeddings model - -We recommend configuring **morph-embedding-v2** as your embeddings model. - - - - ```yaml title="config.yaml" - models: - - name: Morph Embeddings - provider: openai - model: morph-embedding-v2 - apiKey: - apiBase: https://api.morphllm.com/v1/ - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "openai", - "model": "morph-embedding-v2", - "apiKey": "", - "apiBase": "https://api.morphllm.com/v1/" - } - } - ``` - - - -## Reranking model - -We recommend configuring **morph-rerank-v2** as your reranking model. - - - - ```yaml title="config.yaml" - models: - - name: Morph Reranker - provider: cohere - model: morph-rerank-v2 - apiKey: - apiBase: https://api.morphllm.com/v1/ - roles: - - rerank - ``` - - - ```json title="config.json" - { - "reranker": { - "name": "cohere", - "params": { - "model": "morph-rerank-v2", - "apiKey": "", - "apiBase": "https://api.morphllm.com/v1/" - } - } - } - ``` - - diff --git a/docs/docs/customize/model-providers/more/msty.mdx b/docs/docs/customize/model-providers/more/msty.mdx deleted file mode 100644 index d23955fd4..000000000 --- a/docs/docs/customize/model-providers/more/msty.mdx +++ /dev/null @@ -1,79 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# Msty - -[Msty](https://msty.app/) is an application for Windows, Mac, and Linux that makes it really easy to run online as well as local open-source models, including Llama-2, DeepSeek Coder, etc. No need to fidget with your terminal, run a command, or anything. Just download the app from the website, click a button, and you are up and running. Continue can then be configured to use the `Msty` LLM class: - - - - ```yaml title="config.yaml" - models: - - name: Msty - provider: msty - model: deepseek-coder:6.7b - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Msty", - "provider": "msty", - "model": "deepseek-coder:6.7b", - } - ] - } - ``` - - - -## Completion Options - -In addition to the model type, you can also configure some of the parameters that Msty uses to run the model. - -- temperature: options.temperature - This is a parameter that controls the randomness of the generated text. Higher values result in more creative but potentially less coherent outputs, while lower values lead to more predictable and focused outputs. -- top_p: options.topP - This sets a threshold (between 0 and 1) to control how diverse the predicted tokens should be. The model generates tokens that are likely according to their probability distribution, but also considers the top-k most probable tokens. -- top_k: options.topK - This parameter limits the number of unique tokens to consider when generating the next token in the sequence. Higher values increase the variety of generated sequences, while lower values lead to more focused outputs. -- num_predict: options.maxTokens - This determines the maximum number of tokens (words or characters) to generate for the given input prompt. -- num_thread: options.numThreads - This is the multi-threading configuration option that controls how many threads the model uses for parallel processing. Higher values may lead to faster generation times but could also increase memory usage and complexity. Set this to one or two lower than the number of threads your CPU can handle to leave some for your GUI when running the model locally. -- use_mmap: options.useMmap - For Ollama, this parameter allows the model to be mapped into memory. If disabled can enhance response time on low end devices but will slow down the stream. - -## Authentication - -If you need to send custom headers for authentication, you may use the `requestOptions.headers` property like this: - - - - ```yaml title="config.yaml" - models: - - name: Msty - provider: msty - model: deepseek-coder:6.7b - requestOptions: - headers: - Authorization: Bearer xxx - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Msty", - "provider": "msty", - "model": "deepseek-coder:6.7b", - "requestOptions": { - "headers": { - "Authorization": "Bearer xxx" - } - } - } - ] - } - ``` - - - -[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Msty.ts) diff --git a/docs/docs/customize/model-providers/more/ncompass.mdx b/docs/docs/customize/model-providers/more/ncompass.mdx deleted file mode 100644 index 2aa678569..000000000 --- a/docs/docs/customize/model-providers/more/ncompass.mdx +++ /dev/null @@ -1,34 +0,0 @@ -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -# nCompass - -The nCompass Technologies API exposes an extremely fast inference engine for open-source language models. You can sign up [here](https://app.ncompass.tech/api-settings), copy your API key on the initial welcome screen, and then hit the play button on any model from the [nCompass Models list](https://ncompass.tech/models). Change `~/.continue/config.json` to look like this: - - - - ```yaml title="Package or config.yaml" - models: - - name: Ncompass Gemma 3 Coder - provider: ncompass - model: google/gemma-3-27b-it - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Ncompass Gemma 3 Coder", - "provider": "ncompass", - "model": "google/gemma-3-27b-it", - "apiKey": "" - } - ] - } - ``` - - - -[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/NCompass.ts) diff --git a/docs/docs/customize/model-providers/more/nebius.mdx b/docs/docs/customize/model-providers/more/nebius.mdx deleted file mode 100644 index 35c654bbb..000000000 --- a/docs/docs/customize/model-providers/more/nebius.mdx +++ /dev/null @@ -1,67 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# Nebius AI Studio - -You can get an API key from the [Nebius AI Studio API keys page](https://studio.nebius.ai/settings/api-keys) - -## Availible models - -Available models can be found on the [Nebius AI Studio models page](https://studio.nebius.ai/models/text2text) - -## Chat model - - - - ```yaml title="config.yaml" - models: - - name: DeepSeek R1 - provider: nebius - model: deepseek-ai/DeepSeek-R1 - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "DeepSeek R1", - "provider": "nebius", - "model": "deepseek-ai/DeepSeek-R1", - "apiKey": "" - } - ] - } - ``` - - - -## Embeddings model - -Available models can be found on the [Nebius AI Studio embeddings page](https://studio.nebius.ai/models/embedding) - - - - ```yaml title="config.yaml" - models: - - name: BAAI Embedder - provider: nebius - model: BAAI/bge-en-icl - apiKey: - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "nebius", - "model": "BAAI/bge-en-icl", - "apiKey": "" - } - } - ``` - - diff --git a/docs/docs/customize/model-providers/more/novita.mdx b/docs/docs/customize/model-providers/more/novita.mdx deleted file mode 100644 index ca2f603b0..000000000 --- a/docs/docs/customize/model-providers/more/novita.mdx +++ /dev/null @@ -1,34 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# Novita - -[Novita AI](https://novita.ai?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) offers an affordable, reliable, and simple inference platform with scalable [LLM API](https://novita.ai/docs/model-api/reference/introduction.html), empowering developers to build AI applications. Try the [Novita AI Llama 3 API Demo](https://novita.ai/model-api/product/llm-api/playground/meta-llama-llama-3.1-70b-instruct?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) today!. You can sign up [here](https://novita.ai/user/login?&redirect=/&utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), copy your API key on the [Key Management](https://novita.ai/settings/key-management?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), and then hit the play button on any model from the [Novita AI Models list](https://novita.ai/llm-api?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link). Change `~/.continue/config.json` to look like this: - - - - ```yaml title="config.yaml" - models: - - name: Llama 3.1 8B - provider: novita - model: meta-llama/llama-3.1-8b-instruct - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Llama 3.1 8B", - "provider": "novita", - "model": "meta-llama/llama-3.1-8b-instruct", - "apiKey": "" - } - ] - } - ``` - - - -[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Novita.ts) diff --git a/docs/docs/customize/model-providers/more/nvidia.mdx b/docs/docs/customize/model-providers/more/nvidia.mdx deleted file mode 100644 index 27fdc9041..000000000 --- a/docs/docs/customize/model-providers/more/nvidia.mdx +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: NVIDIA ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -:::info -[View the docs](https://docs.nvidia.com/nim/large-language-models/latest/getting-started.html#option-1-from-api-catalog) to learn how to get an API key. -::: - -## Chat model - -We recommend configuring **Nemotron-4-340B-Instruct** as your chat model. - - - - ```yaml title="config.yaml" - models: - - name: Nemotron-4-340B-Instruct - provider: nvidia - model: nvidia-nemotron-4-340b-instruct - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Nemotron-4-340B-Instruct", - "provider": "nvidia", - "model": "nvidia-nemotron-4-340b-instruct", - "apiKey": "" - } - ] - } - ``` - - - -## Autocomplete model - -NVIDIA currently does not offer any autocomplete models. - -[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers. - -## Embeddings model - -We recommend configuring **NVIDIA Retrieval QA Mistral 7B** as your embeddings model. - - - - ```yaml title="config.yaml" - models: - - name: Nvidia Embedder - provider: nvidia - model: nvidia/nv-embedqa-mistral-7b-v2 - apiKey: - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "nvidia", - "model": "nvidia/nv-embedqa-mistral-7b-v2", - "apiKey": "" - } - } - ``` - - - -## Reranking model - -NVIDIA currently does not offer any reranking models. - -[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/more/openrouter.mdx b/docs/docs/customize/model-providers/more/openrouter.mdx deleted file mode 100644 index cc7902a65..000000000 --- a/docs/docs/customize/model-providers/more/openrouter.mdx +++ /dev/null @@ -1,74 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# OpenRouter - -OpenRouter is a unified interface for commercial and open-source models, giving you access to the best models at the best prices. You can sign up [here](https://openrouter.ai/signup), create your API key on the [keys page](https://openrouter.ai/keys), and then choose a model from the [list of supported models](https://openrouter.ai/models). - -Change `~/.continue/config.json` to look like the following. - - - - ```yaml title="config.yaml" - models: - - name: OpenRouter LLaMA 70 8B - provider: openrouter - model: meta-llama/llama-3-70b-instruct - apiBase: https://openrouter.ai/api/v1 - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "OpenRouter LLaMA 70 8B", - "provider": "openrouter", - "model": "meta-llama/llama-3-70b-instruct", - "apiBase": "https://openrouter.ai/api/v1", - "apiKey": "" - } - ] - } - ``` - - - -To utilize features such as provider preferences or model routing configuration, include these parameters inside the `models[].requestsOptions.extraBodyProperties` field of your plugin config. - -For example, to prevent extra long prompts from being compressed, you can explicitly turn off the feature like so: - - - - ```yaml title="config.yaml" - models: - - name: Example Model - provider: exampleProvider - model: example-model - requestOptions: - extraBodyProperties: - transforms: [] - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Example Model", - "provider": "exampleProvider", - "model": "example-model", - "requestOptions": { - "extraBodyProperties": { - "transforms": [] - } - } - } - ] - } - ``` - - - -Learn more about available settings [here](https://openrouter.ai/docs). diff --git a/docs/docs/customize/model-providers/more/openvino_model_server.mdx b/docs/docs/customize/model-providers/more/openvino_model_server.mdx deleted file mode 100644 index 91dd7886f..000000000 --- a/docs/docs/customize/model-providers/more/openvino_model_server.mdx +++ /dev/null @@ -1,29 +0,0 @@ -# OpenVINO™ Model Server - -:::info -[**OpenVINO™ Mode Server**](https://github.com/openvinotoolkit/model_server) is scalable inference server for models optimized with OpenVINO™ for Intel CPU, iGPU, GPU and NPU. -::: - -OpenVINO™ Mode Server supports text generation via OpenAI Chat Completions API. Simply select OpenAI provider to point `apiBase` to running OVMS instance. Refer [to this demo](https://docs.openvino.ai/2025/model-server/ovms_demos_code_completion_vsc.html) on official OVMS documentation to easily set up your own local server. - -Example configuration once OVMS is launched: - -```yaml title="config.yaml" -models: - - name: OVMS CodeLlama-7b-Instruct-hf - provider: openai - model: codellama/CodeLlama-7b-Instruct-hf - apiKey: unused - apiBase: http://localhost:5555/v3 - roles: - - chat - - edit - - apply - - name: OVMS Qwen2.5-Coder-1.5B - provider: openai - model: Qwen/Qwen2.5-Coder-1.5B - apiKey: unused - apiBase: http://localhost:5555/v3 - roles: - - autocomplete -``` diff --git a/docs/docs/customize/model-providers/more/ovhcloud.mdx b/docs/docs/customize/model-providers/more/ovhcloud.mdx deleted file mode 100644 index 6dd4613b9..000000000 --- a/docs/docs/customize/model-providers/more/ovhcloud.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: OVHcloud AI Endpoints ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -OVHcloud AI Endpoints is a serverless inference API that provides access to a curated selection of models (e.g., Llama, Mistral, Qwen, Deepseek). It is designed with security and data privacy in mind and is compliant with GDPR. - -:::info -To get started, create an API key on the OVHcloud [AI Endpoints website](https://endpoints.ai.cloud.ovh.net/). For more information, including pricing, visit the OVHcloud [AI Endpoints product page](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/). -::: - -## Chat model - -We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model. -Check our [catalog](https://endpoints.ai.cloud.ovh.net/catalog) to see all of our models hsoted on AI Endpoints. - - - - ```yaml title="config.yaml" - models: - - name: Qwen2.5-Coder-32B-Instruct - provider: ovhcloud - model: qwen2.5-coder-32b - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Qwen2.5-Coder-32B-Instruct", - "provider": "ovhcloud", - "model": "qwen2.5-coder-32b", - "apiKey": "" - } - ] - } - ``` - - - -## Embeddings model - -We recommend configuring **bge-multilingual-gemma2** as your embeddings model. - - - - ```yaml title="config.yaml" - models: - - name: BGE Multilingual Gemma2 - provider: ovhcloud - model: bge-multilingual-gemma2 - apiKey: - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "ovhcloud", - "model": "bge-multilingual-gemma2", - "apiKey": "" - } - } - ``` - - diff --git a/docs/docs/customize/model-providers/more/relace.mdx b/docs/docs/customize/model-providers/more/relace.mdx deleted file mode 100644 index 2b046c318..000000000 --- a/docs/docs/customize/model-providers/more/relace.mdx +++ /dev/null @@ -1,38 +0,0 @@ -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -# Relace - -Relace provides a fast apply model through their API that helps you reliably and almost instantly apply chat suggestions to your codebase. You can sign up and obtain an API key [here](https://app.relace.ai/settings/api-keys). Then, change your configuration file to look like this: - - - - ```yaml title="Package or config.yaml" - models: - - name: Relace Fast Apply - provider: relace - model: Fast-Apply - apiKey: - roles: - - apply - promptTemplates: - apply: "{{{ new_code }}}" - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Relace Fast Apply", - "provider": "relace", - "model": "Fast-Apply", - "apiKey": "" - } - ] - } - ``` - - - -[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Relace.ts) diff --git a/docs/docs/customize/model-providers/more/replicatellm.mdx b/docs/docs/customize/model-providers/more/replicatellm.mdx deleted file mode 100644 index c7a58e076..000000000 --- a/docs/docs/customize/model-providers/more/replicatellm.mdx +++ /dev/null @@ -1,36 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# ReplicateLLM - -Replicate is a great option for newly released language models or models that you've deployed through their platform. Sign up for an account [here](https://replicate.ai/), copy your API key, and then select any model from the [Replicate Streaming List](https://replicate.com/collections/streaming-language-models). Change `~/.continue/config.json` to look like this: - - - - ```yaml title="config.yaml" - models: - - name: Replicate CodeLLama - provider: replicate - model: codellama-13b - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Replicate CodeLLama", - "provider": "replicate", - "model": "codellama-13b", - "apiKey": "" - } - ] - } - ``` - - - -If you don't specify the `model` parameter, it will default to `replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781`. - -[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Replicate.ts) diff --git a/docs/docs/customize/model-providers/more/sagemaker.mdx b/docs/docs/customize/model-providers/more/sagemaker.mdx deleted file mode 100644 index 33aa6e253..000000000 --- a/docs/docs/customize/model-providers/more/sagemaker.mdx +++ /dev/null @@ -1,57 +0,0 @@ -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -# AWS SageMaker - -SageMaker can be used for both chat and embedding models. Chat models are supported for endpoints deployed with [LMI](https://docs.djl.ai/docs/serving/serving/docs/lmi/index.html), and embedding models are supported for endpoints deployed with [HuggingFace TEI](https://huggingface.co/blog/sagemaker-huggingface-embedding) - -Here is an example Sagemaker configuration setup: - - - - ```yaml title="config.yaml" - models: - - name: deepseek-6.7b-instruct - provider: sagemaker - model: lmi-model-deepseek-coder-xxxxxxx - region: us-west-2 - roles: - - chat - - name: mxbai-embed - provider: sagemaker - model: mxbai-embed-large-v1-endpoint - roles: - - embed - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "deepseek-6.7b-instruct", - "provider": "sagemaker", - "model": "lmi-model-deepseek-coder-xxxxxxx", - "region": "us-west-2" - } - ], - "embeddingsProvider": { - "provider": "sagemaker", - "model": "mxbai-embed-large-v1-endpoint" - } - } - ``` - - - -The value in model should be the SageMaker endpoint name you deployed. - -Authentication will be through temporary or long-term credentials in -~/.aws/credentials under a profile called "sagemaker". - -```title="~/.aws/credentials -[sagemaker] -aws_access_key_id = abcdefg -aws_secret_access_key = hijklmno -aws_session_token = pqrstuvwxyz # Optional: means short term creds. -``` diff --git a/docs/docs/customize/model-providers/more/scaleway.mdx b/docs/docs/customize/model-providers/more/scaleway.mdx deleted file mode 100644 index 299c6cc19..000000000 --- a/docs/docs/customize/model-providers/more/scaleway.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: Scaleway ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -:::info -Scaleway Generative APIs give you instant access to leading AI models hosted in European data centers, ideal for developers requiring low latency, full data privacy, and compliance with EU AI Act. -You can generate your API key in [Scaleway's console](https://console.scaleway.com/generative-api/models). -Read the [quickstart documentation here](https://www.scaleway.com/en/docs/ai-data/generative-apis/quickstart/). -::: - -## Chat model - -We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model. -[Click here](https://www.scaleway.com/en/docs/ai-data/generative-apis/reference-content/supported-models/) to see the list of available chat models. - - - - ```yaml title="config.yaml" - models: - - name: Qwen2.5-Coder-32B-Instruct - provider: scaleway - model: qwen2.5-coder-32b-instruct - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Qwen2.5-Coder-32B-Instruct", - "provider": "scaleway", - "model": "qwen2.5-coder-32b-instruct", - "apiKey": "" - } - ] - } - ``` - - - -## Autocomplete model - -Scaleway currently does not offer any autocomplete models. - -[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers. - -## Embeddings model - -We recommend configuring **BGE-Multilingual-Gemma2** as your embeddings model. - - - - ```yaml title="config.yaml" - models: - - name: BGE Multilingual Gemma2 - provider: scaleway - model: bge-multilingual-gemma2 - apiKey: - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "scaleway", - "model": "bge-multilingual-gemma2", - "apiKey": "" - } - } - ``` - - diff --git a/docs/docs/customize/model-providers/more/siliconflow.mdx b/docs/docs/customize/model-providers/more/siliconflow.mdx deleted file mode 100644 index 79ccd8e71..000000000 --- a/docs/docs/customize/model-providers/more/siliconflow.mdx +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: SiliconFlow ---- - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -:::info -You can get an API key from the [Silicon Cloud](https://cloud.siliconflow.cn/account/ak). -::: - -## Chat model - -We recommend configuring **Qwen/Qwen2.5-Coder-32B-Instruct** as your chat model. - - - - ```yaml title="config.yaml" - models: - - name: Qwen - provider: siliconflow - model: Qwen/Qwen2.5-Coder-32B-Instruct - apiKey: - roles: - - chat - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Qwen", - "provider": "siliconflow", - "model": "Qwen/Qwen2.5-Coder-32B-Instruct", - "apiKey": "" - } - ] - } - ``` - - - -## Autocomplete model - -We recommend configuring **Qwen/Qwen2.5-Coder-7B-Instruct** as your autocomplete model. - - - - ```yaml title="config.yaml" - models: - - name: Qwen - provider: siliconflow - model: Qwen/Qwen2.5-Coder-32B-Instruct - apiKey: - roles: - - autocomplete - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Qwen", - "provider": "siliconflow", - "model": "Qwen/Qwen2.5-Coder-32B-Instruct", - "apiKey": "" - } - ] - "tabAutocompleteModel": { - "title": "Qwen", - "provider": "siliconflow", - "model": "Qwen/Qwen2.5-Coder-7B-Instruct", - "apiKey": "" - } - } - ``` - - - -## Embeddings model - -SiliconFlow provide some embeddings models. [Click here](https://siliconflow.cn/models) to see a list of embeddings models. - -## Reranking model - -SiliconFlow provide some reranking models. [Click here](https://siliconflow.cn/models) to see a list of reranking models. diff --git a/docs/docs/customize/model-providers/more/textgenwebui.mdx b/docs/docs/customize/model-providers/more/textgenwebui.mdx deleted file mode 100644 index 2f41c4ab9..000000000 --- a/docs/docs/customize/model-providers/more/textgenwebui.mdx +++ /dev/null @@ -1,32 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# TextGenWebUI - -TextGenWebUI is a comprehensive, open-source language model UI and local server. You can set it up with an OpenAI-compatible server plugin, and then configure it like this: - - - - ```yaml title="config.yaml" - models: - - name: Text Generation WebUI - provider: text-gen-webui - apiBase: http://localhost:5000/v1 - model: MODEL_NAME - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Text Generation WebUI", - "provider": "text-gen-webui", - "apiBase": "http://localhost:5000/v1", - "model": "MODEL_NAME" - } - ] - } - ``` - - diff --git a/docs/docs/customize/model-providers/more/together.mdx b/docs/docs/customize/model-providers/more/together.mdx deleted file mode 100644 index 7b2f3b829..000000000 --- a/docs/docs/customize/model-providers/more/together.mdx +++ /dev/null @@ -1,34 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# Together - -The Together API is a cloud platform for running large AI models. You can sign up [here](https://api.together.xyz/signup), copy your API key on the initial welcome screen, and then hit the play button on any model from the [Together Models list](https://docs.together.ai/docs/serverless-models). Change `~/.continue/config.json` to look like this: - - - - ```yaml title="config.yaml" - models: - - name: Together Qwen2.5 Coder - provider: together - model: Qwen/Qwen2.5-Coder-32B-Instruct - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Together Qwen2.5 Coder", - "provider": "together", - "model": "Qwen/Qwen2.5-Coder-32B-Instruct", - "apiKey": "" - } - ] - } - ``` - - - -[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Together.ts) diff --git a/docs/docs/customize/model-providers/more/venice.md b/docs/docs/customize/model-providers/more/venice.md deleted file mode 100644 index b8d8faf35..000000000 --- a/docs/docs/customize/model-providers/more/venice.md +++ /dev/null @@ -1,35 +0,0 @@ -# Venice - -Venice.AI is a privacy focused generative AI platform, allowing users to interact with open-source LLMs without storing any private user data. To get started with Venice's API, either purchase a pro account, stake $VVV to obtain daily inference allotments or fund your account with USD and head over to https://venice.ai/settings/api. Venice hosts state of the art open-source AI models and supports the OpenAI API standard, allowing users to easily interact with the platform. Learn more about the Venice API at https://venice.ai/api. - -Change `~/.continue/config.json` to look like the following. - -```json title="config.json" -{ - "models": [ - { - "provider": "venice", - "title": "Autodetect", - "model": "AUTODETECT", - "apiKey": "..." - } - ] -} -``` - -To utilize features offered by the venice API that are not apart of the standard OpenAI API schema, include these as `venice_parameters` - -For example, to use models with no system prompt, you can explicitly turn off the feature like so: - -```json title="config.json" -{ - "completionOptions": { - "venice_parameters": { - "include_venice_system_prompt" : false - }, - ... - } -} -``` - -Learn more about available settings [here](https://docs.venice.ai/api-reference/api-spec). diff --git a/docs/docs/customize/model-providers/more/vllm.mdx b/docs/docs/customize/model-providers/more/vllm.mdx deleted file mode 100644 index 4ae25dafc..000000000 --- a/docs/docs/customize/model-providers/more/vllm.mdx +++ /dev/null @@ -1,107 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# vLLM - -vLLM is an open-source library for fast LLM inference which typically is used to serve multiple users at the same time. It can also be used to run a large model on multiple GPU:s (e.g. when it doesn´t fit in a single GPU). Run their OpenAI-compatible server using `vllm serve`. See their [server documentation](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html) and the [engine arguments documentation](https://docs.vllm.ai/en/latest/usage/engine_args.html). - -```shell -vllm serve meta-llama/Meta-Llama-3.1-8B-Instruct -``` - -## Chat model - -We recommend configuring **Llama3.1 8B** as your chat model. - - - - ```yaml title="config.yaml" - models: - - name: Llama3.1 8B Instruct - provider: vllm - model: meta-llama/Meta-Llama-3.1-8B-Instruct - apiBase: http:///v1 - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Llama3.1 8B Instruct", - "provider": "vllm", - "model": "meta-llama/Meta-Llama-3.1-8B-Instruct", - "apiBase": "http:///v1" - } - ] - } - ``` - - - -## Autocomplete model - -We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. - - - - ```yaml title="config.yaml" - models: - - name: Qwen2.5-Coder 1.5B - provider: vllm - model: Qwen/Qwen2.5-Coder-1.5B - apiBase: http:///v1 - roles: - - autocomplete - ``` - - - ```json title="config.json" - { - "tabAutocompleteModel": { - "title": "Qwen2.5-Coder 1.5B", - "provider": "vllm", - "model": "Qwen/Qwen2.5-Coder-1.5B", - "apiBase": "http:///v1" - } - } - ``` - - - -## Embeddings model - -We recommend configuring **Nomic Embed Text** as your embeddings model. - - - - ```yaml title="config.yaml" - models: - - name: VLLM Nomad Embed Text - provider: vllm - model: nomic-ai/nomic-embed-text-v1 - apiBase: http:///v1 - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "vllm", - "model": "nomic-ai/nomic-embed-text-v1", - "apiBase": "http:///v1" - } - } - ``` - - - -## Reranking model - -Continue automatically handles vLLM's response format (which uses `results` instead of `data`). - -[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers. - -The continue implementation uses [OpenAI](../top-level/openai.mdx) under the hood. [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Vllm.ts) diff --git a/docs/docs/customize/model-providers/more/watsonx.mdx b/docs/docs/customize/model-providers/more/watsonx.mdx deleted file mode 100644 index 1bc247399..000000000 --- a/docs/docs/customize/model-providers/more/watsonx.mdx +++ /dev/null @@ -1,279 +0,0 @@ -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# IBM watsonx - -watsonx, developed by IBM, offers a variety of pre-trained AI foundation models that can be used for natural language processing (NLP), computer vision, and speech recognition tasks. - -## Setup - -Accessing watsonx models can be done either through watsonx SaaS on IBM Cloud or using a dedicated watsonx.ai Software instance. - -### watsonx.ai SaaS - IBM Cloud - -To get started with watsonx SaaS, visit the [registration page](https://dataplatform.cloud.ibm.com/registration/stepone?context=wx). If you do not have an existing IBM Cloud account, you can sign up for a free trial. - -To authenticate to watsonx.ai SaaS with Continue, you will need to create a project and [set up an API key](https://www.ibm.com/docs/en/mas-cd/continuous-delivery?topic=cli-creating-your-cloud-api-key). Then, in continue: - -- Set **apiBase** to your watsonx SaaS endpoint, e.g. `https://us-south.ml.cloud.ibm.com` for US South region. -- Set **projectId** to your watsonx project ID. -- Set **apiKey** to your watsonx API Key. - -### watsonx.ai Software - -To authenticate to your watsonx.ai Software instance with Continue, you can use either `username/password` or `ZenApiKey` method: - -1. _Option 1_ (Recommended): using `ZenApiKey` authentication: - - Set **apiBase** to your watsonx software endpoint, e.g. `https://cpd-watsonx.apps.example.com`. - - Set **projectId** to your watsonx project ID. - - Set **apiKey** to your watsonx Zen API Key. To generate it: - 1. Log in to the CPD web client. - 2. From the toolbar, click your avatar. - 3. Click **Profile and settings**. - 4. Click **API key** > **Generate new key**. - 5. Click **Generate**. - 6. Click **Copy** and save your key somewhere safe. You cannot recover this key if you lose it. - 7. Generate your ZenApiKey by running the following command in your preferred terminal: `echo ":" | base64`, replacing `` with your CPD username and `` with the API Key you just created. -2. _Option 2_: using `username/password` authentication: - - Set **apiBase** to your watsonx software endpoint, e.g. `https://cpd-watsonx.apps.example.com`. - - Set **projectId** to your watsonx project ID. - - Set **API Key** to your watsonx Username and Password using `username:password` as format. - -## Configuration - -Add the following configuration: - - - - ```yaml title="config.yaml" - models: - - name: watsonx - Model Name - provider: watsonx - model: model ID - apiBase: https://us-south.ml.cloud.ibm.com - apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD - env: - projectId: PROJECT_ID - apiVersion: 2024-03-14 - ``` - - - ```json title="config.json" - { - "models": [ - { - "model": "model ID", - "title": "watsonx - Model Name", - "provider": "watsonx", - "apiBase": "https://us-south.ml.cloud.ibm.com", - "projectId": "PROJECT_ID", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14" - } - ] - } - ``` - - - -`apiVersion` is optional and defaults to the latest version. - -If you are using a custom deployment endpoint, set `deploymentID` to the model's deployment ID. You can find it in the watsonx.ai Prompt Lab UI by selecting the corresponding model and opening the `` tab on the right, which will display the endpoint's URL containing the deployment ID. - - - - ```yaml title="config.yaml" - models: - - name: watsonx - Model Name - provider: watsonx - model: model ID - apiBase: watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com - apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD - env: - apiVersion: 2024-03-14 - deploymentId: DEPLOYMENT_ID - ``` - - - ```json title="config.json" - { - "models": [ - { - "model": "model ID", - "title": "watsonx - Model Name", - "provider": "watsonx", - "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14", - "deploymentId": "DEPLOYMENT_ID" - } - ] - } - ``` - - - -### Configuration Options - -Make sure to specify a template name, such as `granite` or `llama3`, and to set the `contextLength` to the model's context window size. -You can also configure generation parameters, such as temperature, topP, topK, frequency penalty, and stop sequences: - - - - ```yaml title="config.yaml" - models: - - name: Granite Code 20b - provider: watsonx - model: ibm/granite-20b-code-instruct - apiBase: watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com - apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD - template: granite - defaultCompletionOptions: - contextLength: 8000 - temperature: 0.1 - topP: 0.3 - topK: 20 - maxTokens: 2000 - frequencyPenalty: 1.1 - stop: - - Question: - - "\n\n\n" - env: - projectId: PROJECT_ID - apiVersion: 2024-03-14 - - ``` - - - ```json title="config.json" - { - "models": [ - { - "model": "ibm/granite-20b-code-instruct", - "title": "Granite Code 20b", - "provider": "watsonx", - "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", - "projectId": "PROJECT_ID", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14", - "template": "granite", - "contextLength": 8000, - "completionOptions": { - "temperature": 0.1, - "topP": 0.3, - "topK": 20, - "maxTokens": 2000, - "frequencyPenalty": 1.1, - "stop": ["Question:", "\n\n\n"] - } - } - ] - } - ``` - - - -## Tab Auto Complete Model - -Granite models are recommended for tab auto complete. The configuration is similar to that of the chat models: - - - - ```yaml title="config.yaml" - models: - - name: Granite Code 8b - provider: watsonx - model: ibm/granite-8b-code-instruct - apiBase: watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com - projectId: PROJECT_ID - apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD - apiVersion: 2024-03-14 - roles: - - autocomplete - ``` - - - ```json title="config.json" - { - "tabAutocompleteModel": { - "model": "ibm/granite-8b-code-instruct", - "title": "Granite Code 8b", - "provider": "watsonx", - "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", - "projectId": "PROJECT_ID", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14", - "contextLength": 4000 - } - } - ``` - - - -## Embeddings Model - -To view the list of available embeddings models, visit [this page](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/fm-models-embed.html?context=wx&pos=2#ibm-provided). - - - - ```yaml title="config.yaml" - models: - - name: Watsonx Embedder - provider: watsonx - model: ibm/slate-30m-english-rtrvr-v2 - apiBase: https://us-south.ml.cloud.ibm.com - projectId: PROJECT_ID - apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD - apiVersion: 2024-03-14 - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "watsonx", - "model": "ibm/slate-30m-english-rtrvr-v2", - "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", - "projectId": "PROJECT_ID", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14" - } - } - ``` - - - -## Reranker - - - - ```yaml title="config.yaml" - models: - - name: Watsonx Reranker - provider: watsonx - model: cross-encoder/ms-marco-minilm-l-12-v2 - apiBase: https://us-south.ml.cloud.ibm.com - projectId: PROJECT_ID - apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD - apiVersion: 2024-03-14 - ``` - - - ```json title="config.json" - { - "reranker": { - "name": "watsonx", - "params": { - "model": "cross-encoder/ms-marco-minilm-l-12-v2", - "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com", - "projectId": "PROJECT_ID", - "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD", - "apiVersion": "2024-03-14" - } - } - } - ``` - - diff --git a/docs/docs/customize/model-providers/top-level/anthropic.mdx b/docs/docs/customize/model-providers/top-level/anthropic.mdx deleted file mode 100644 index 4786c3719..000000000 --- a/docs/docs/customize/model-providers/top-level/anthropic.mdx +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: Anthropic -slug: ../anthropic ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -:::info -You can get an API key from the [Anthropic console](https://console.anthropic.com/account/keys). -::: - -## Chat model - -We recommend configuring **Claude 4 Sonnet** as your chat model. - - - - ```yaml title="config.yaml" - models: - - name: Claude 4 Sonnet - provider: anthropic - model: claude-sonnet-4-20250514 - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Claude 4 Sonnet", - "provider": "anthropic", - "model": "claude-sonnet-4-latest", - "apiKey": "" - } - ] - } - ``` - - - -## Autocomplete model - -Anthropic currently does not offer any autocomplete models. - -[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers. - -## Embeddings model - -Anthropic currently does not offer any embeddings models. - -[Click here](../../model-roles/embeddings.mdx) to see a list of embeddings model providers. - -## Reranking model - -Anthropic currently does not offer any reranking models. - -[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers. - -## Prompt caching - -Anthropic supports [prompt caching with Claude](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching), which allows Claude models to cache system messages and conversation history between requests to improve performance and reduce costs. - -Prompt caching is generally available for: - -- Claude 4 Sonnet -- Claude 3.7 Sonnet -- Claude 3.5 Sonnet -- Claude 3.5 Haiku - -To enable caching of the system message and the turn-by-turn conversation, update your model configuration as follows: - - - - ```yaml title="config.yaml" - models: - - name: Anthropic - provider: anthropic - model: claude-sonnet-4-20250514 - apiKey: - roles: - - chat - defaultCompletionOptions: - promptCaching: true - ``` - - - ```json title="config.json" - { - "models": [ - { - "cacheBehavior": { - "cacheSystemMessage": true, - "cacheConversation": true - }, - "title": "Anthropic", - "provider": "anthropic", - "model": "claude-sonnet-4-latest", - "defaultCompletionOptions": { - "promptCaching": true - }, - "apiKey": "" - } - ] - } - ``` - - diff --git a/docs/docs/customize/model-providers/top-level/azure.mdx b/docs/docs/customize/model-providers/top-level/azure.mdx deleted file mode 100644 index 8202d5608..000000000 --- a/docs/docs/customize/model-providers/top-level/azure.mdx +++ /dev/null @@ -1,169 +0,0 @@ ---- -title: Azure AI Foundry -slug: ../azure ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -Azure AI Foundry is a cloud-based service that provides access to models from OpenAI, Mistral AI, and others, integrated with the security and enterprise features of the Microsoft Azure platform. To get started, create an Azure AI Foundry resource in the [Azure portal](https://portal.azure.com). - -:::info - -For details on OpenAI model setup, see [Azure OpenAI Service configuration](#azure-openai-service-configuration). - -::: - -## Chat model - -We recommend configuring **GPT-4o** as your chat model. - - - - ```yaml title="config.yaml" - models: - - name: GPT-4o - provider: azure - model: gpt-4o - apiBase: - apiKey: # If you use subscription key, try using Azure gateway to rename it apiKey - env: - deployment: - apiType: azure-foundry # Or "azure-openai" if using OpenAI models - ``` - - - ```json title="config.json" - { - "models": [{ - "title": "GPT-4o", - "provider": "azure", - "model": "gpt-4o", - "apiBase": "", - "deployment": "", - "apiKey": "", // If you use subscription key, try using Azure gateway to rename it apiKey - "apiType": "azure-foundry" // Or "azure-openai" if using OpenAI models - }] - } - ``` - - - -## Autocomplete model - -We recommend configuring **Codestral** as your autocomplete model. If you use Azure AI Foundry to deploy Codestral: - - - - ```yaml title="config.yaml" - models: - - name: Codestral - provider: mistral - model: codestral-latest - apiBase: https://..models.ai.azure.com/v1 - apiKey: - roles: - - autocomplete - ``` - - - ```json title="config.json" - { - "tabAutocompleteModel": { - "title": "Codestral", - "provider": "mistral", - "model": "codestral-latest", - "apiBase": "https://..models.ai.azure.com/v1", - "apiKey": "" - } - } - ``` - - - -## Embeddings model - -We recommend configuring **text-embedding-3-large** as your embeddings model. - - - - ```yaml title="config.yaml" - models: - - name: Text Embedding-3 Large - provider: azure - model: text-embedding-3-large - apiBase: - apiKey: - env: - deployment: - apiType: azure - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "azure", - "model": "text-embedding-3-large", - "apiBase": "", - "deployment": "", - "apiKey": "", - "apiType": "azure-foundry" // Or "azure-openai" if using OpenAI models - } - } - ``` - - - -## Reranking model - -Azure OpenAI currently does not offer any reranking models. - -[Click here](../../model-roles/reranking.mdx) to see a list of reranking models. - -## Privacy - -If you'd like to use OpenAI models but are concerned about privacy, you can use the Azure OpenAI service, which is GDPR and HIPAA compliant. - -:::info[Getting access] -[Click here](https://azure.microsoft.com/en-us/products/ai-services/openai-service) to apply for access to the Azure OpenAI service. Response times are typically within a few days. -::: - -## Azure OpenAI Service configuration - -Azure OpenAI Service requires a handful of additional parameters to be configured, such as a deployment name and API base URL. - -To find this information in _Azure AI Foundry_, first select the model that you would like to connect. Then visit _Endpoint_ > _Target URI_. - -For example, a Target URI of `https://just-an-example.openai.azure.com/openai/deployments/gpt-4o-july/chat/completions?api-version=2023-03-15-preview` would map to the following: - - - - ```yaml title="config.yaml" - models: - - name: GPT-4o Azure - model: gpt-4o - provider: azure - apiBase: https://just-an-example.openai.azure.com - apiKey: - env: - apiVersion: 2023-03-15-preview - deployment: gpt-4o-july - apiType: azure-openai - ``` - - - ```json title="config.json" - { - "title": "GPT-4o Azure", - "model": "gpt-4o", - "provider": "azure", - "apiBase": "https://just-an-example.openai.azure.com", - "deployment": "gpt-4o-july", - "apiVersion": "2023-03-15-preview", - "apiKey": "", - "apiType": "azure-openai" - } - ``` - - diff --git a/docs/docs/customize/model-providers/top-level/bedrock.mdx b/docs/docs/customize/model-providers/top-level/bedrock.mdx deleted file mode 100644 index eb2646d46..000000000 --- a/docs/docs/customize/model-providers/top-level/bedrock.mdx +++ /dev/null @@ -1,234 +0,0 @@ ---- -title: Amazon Bedrock -slug: ../bedrock ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -Amazon Bedrock is a fully managed service on AWS that provides access to foundation models from various AI companies through a single API. - -## Chat model - -We recommend configuring **Claude 3.7 Sonnet** as your chat model. - - - - ```yaml title="config.yaml" - models: - - name: Claude 3.7 Sonnet - provider: bedrock - model: us.anthropic.claude-3-7-sonnet-20250219-v1:0 - env: - region: us-east-1 - profile: bedrock - roles: - - chat - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Claude 3.7 Sonnet", - "provider": "bedrock", - "model": "us.anthropic.claude-3-7-sonnet-20250219-v1:0", - "region": "us-east-1", - "profile": "bedrock" - } - ] - } - ``` - - - -> If you run into the following error when connecting to the new Claude 3.5 Sonnet 2 models from AWS - `400 Invocation of model ID anthropic.claude-3-5-sonnet-20241022-v2:0 with on-demand throughput isn't supported. Retry your request with the ID or ARN of an inference profile that contains this model.` - -> You can fix this using the following config: - - - - ```yaml title="config.yaml" - models: - - name: Claude 3.5 Sonnet - provider: bedrock - model: us.anthropic.claude-3-5-sonnet-20241022-v2:0 - env: - region: us-east-1 - profile: bedrock - roles: - - chat - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Claude 3.5 Sonnet", - "provider": "bedrock", - "model": "us.anthropic.claude-3-5-sonnet-20241022-v2:0", - "region": "us-east-1", - "profile": "bedrock" - } - ] - } - ``` - - - -## Autocomplete model - -Bedrock currently does not offer any autocomplete models. However, [Codestral from Mistral](https://mistral.ai/news/codestral-2501/) and [Point from Poolside](https://aws.amazon.com/bedrock/poolside/) will be supported in the near future. - -In the meantime, you can view a list of autocomplete model providers [here](../../model-roles/autocomplete.md). - -## Embeddings model - -We recommend configuring [`amazon.titan-embed-text-v2:0`](https://docs.aws.amazon.com/bedrock/latest/devguide/models.html#amazon.titan-embed-text-v2-0) as your embeddings model. - - - - ```yaml title="config.yaml" - models: - - name: Embeddings Model - provider: bedrock - model: amazon.titan-embed-text-v2:0 - env: - region: us-west-2 - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "title": "Embeddings Model", - "provider": "bedrock", - "model": "amazon.titan-embed-text-v2:0", - "region": "us-west-2" - } - } - ``` - - - -## Reranking model - -We recommend configuring `cohere.rerank-v3-5:0` as your reranking model, you may also use `amazon.rerank-v1:0`. - - - - ```yaml title="config.yaml" - models: - - name: Bedrock Reranker - provider: bedrock - model: cohere.rerank-v3-5:0 - env: - region: us-west-2 - roles: - - rerank - ``` - - - ```json title="config.json" - { - "reranker": { - "name": "bedrock", - "params": { - "model": "cohere.rerank-v3-5:0", - "region": "us-west-2" - } - } - } - ``` - - - -## Prompt caching - -Bedrock allows Claude models to cache tool payloads, system messages, and chat -messages between requests. Enable this behavior by adding -`promptCaching: true` under `defaultCompletionOptions` in your model -configuration. - -Prompt caching is generally available for: - -- Claude 3.7 Sonnet -- Claude 3.5 Haiku -- Amazon Nova Micro -- Amazon Nova Lite -- Amazon Nova Pro - -Customers who were granted access to Claude 3.5 Sonnet v2 during the prompt -caching preview will retain that access, but it cannot be enabled for new users -on that model. - -```yaml title="config.yaml" -models: - - name: Claude 3.7 Sonnet - provider: bedrock - model: us.anthropic.claude-3-7-sonnet-20250219-v1:0 - defaultCompletionOptions: - promptCaching: true -``` - -Prompt caching is not supported in JSON configuration files, so use the YAML syntax above to enable it. - -## Authentication - -Authentication will be through temporary or long-term credentials in -`~/.aws/credentials` under a configured profile (e.g. "bedrock"). - -```title="~/.aws/credentials -[bedrock] -aws_access_key_id = abcdefg -aws_secret_access_key = hijklmno -aws_session_token = pqrstuvwxyz # Optional: means short term creds. -``` - -## Custom Imported Models - -To setup Bedrock using custom imported models, add the following to your config file: - - - - ```yaml title="config.yaml" - models: - - name: AWS Bedrock deepseek-coder-6.7b-instruct - provider: bedrockimport - model: deepseek-coder-6.7b-instruct - modelArn: arn:aws:bedrock:us-west-2:XXXXX:imported-model/XXXXXX - region: us-west-2 - profile: bedrock - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "AWS Bedrock deepseek-coder-6.7b-instruct", - "provider": "bedrockimport", - "model": "deepseek-coder-6.7b-instruct", - "modelArn": "arn:aws:bedrock:us-west-2:XXXXX:imported-model/XXXXXX", - "region": "us-west-2", - "profile": "bedrock" - } - ] - } - ``` - - - -Authentication will be through temporary or long-term credentials in -~/.aws/credentials under a configured profile (e.g. "bedrock"). - -```title="~/.aws/credentials -[bedrock] -aws_access_key_id = abcdefg -aws_secret_access_key = hijklmno -aws_session_token = pqrstuvwxyz # Optional: means short term creds. -``` diff --git a/docs/docs/customize/model-providers/top-level/deepseek.mdx b/docs/docs/customize/model-providers/top-level/deepseek.mdx deleted file mode 100644 index 28f885192..000000000 --- a/docs/docs/customize/model-providers/top-level/deepseek.mdx +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: DeepSeek -slug: ../deepseek ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -:::info -You can get an API key from the [DeepSeek console](https://www.deepseek.com/). -::: - -## Chat model - -We recommend configuring **DeepSeek Chat** as your chat model. - - - - ```yaml title="config.yaml" - models: - - name: DeepSeek Chat - provider: deepseek - model: deepseek-chat - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "DeepSeek Chat", - "provider": "deepseek", - "model": "deepseek-chat", - "apiKey": "" - } - ] - } - ``` - - - -## Autocomplete model - -We recommend configuring **DeepSeek Coder** as your autocomplete model. - - - - ```yaml title="config.yaml" - models: - - name: DeepSeek Coder - provider: deepseek - model: deepseek-coder - apiKey: - roles: - - autocomplete - ``` - - - ```json title="config.json" - { - "tabAutocompleteModel": { - "title": "DeepSeek Coder", - "provider": "deepseek", - "model": "deepseek-coder", - "apiKey": "" - } - } - ``` - - - -## Embeddings model - -DeepSeek currently does not offer any embeddings models. - -[Click here](../../model-roles/embeddings.mdx) to see a list of embeddings model providers. - -## Reranking model - -DeepSeek currently does not offer any reranking models. - -[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/gemini.mdx b/docs/docs/customize/model-providers/top-level/gemini.mdx deleted file mode 100644 index 5bde15a79..000000000 --- a/docs/docs/customize/model-providers/top-level/gemini.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: Gemini -slug: ../gemini ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -:::info -You can get an API key from the [Google AI Studio](https://aistudio.google.com/). -::: - -## Chat model - -We recommend configuring **Gemini 2.0 Flash** as your chat model. - - - - ```yaml title="config.yaml" - models: - - name: Gemini 2.0 Flash - provider: gemini - model: gemini-2.0-flash - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Gemini 2.0 Flash", - "provider": "gemini", - "model": "gemini-2.0-flash", - "apiKey": "" - } - ] - } - ``` - - - -## Autocomplete model - -Gemini currently does not offer any autocomplete models. - -[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers. - -## Embeddings model - -We recommend configuring **text-embedding-004** as your embeddings model. - - - - ```yaml title="config.yaml" - models: - - name: Gemini Embeddings - provider: gemini - model: models/text-embedding-004 - apiKey: - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "gemini", - "model": "models/text-embedding-004", - "apiKey": "" - } - } - ``` - - - -## Reranking model - -Gemini currently does not offer any reranking models. - -[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/inception.mdx b/docs/docs/customize/model-providers/top-level/inception.mdx deleted file mode 100644 index 625bfcc10..000000000 --- a/docs/docs/customize/model-providers/top-level/inception.mdx +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: Inception -slug: ../inception ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -:::info -You can get an API key from the [Inception Dashboard](https://platform.inceptionlabs.ai/dashboard/api-keys). -::: - -## Chat model - -We recommend configuring **Mercury Coder Small** as your chat model. - - - - ```yaml title="config.yaml" - models: - - uses: inceptionlabs/mercury-coder-small - with: - INCEPTION_API_KEY: ${{ secrets.INCEPTION_API_KEY }} - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Mercury Coder Small", - "provider": "inception", - "model": "mercury-coder-small", - "apiKey": "" - } - ] - } - ``` - - - -## Autocomplete model - -We also recommend configuring **Mercury Coder Small** as your autocomplete model. - - - - ```yaml title="config.yaml" - models: - - uses: inceptionlabs/mercury-coder-small - with: - INCEPTION_API_KEY: ${{ secrets.INCEPTION_API_KEY }} - ``` - - - ```json title="config.json" - { - "tabAutocompleteModel": [ - { - "title": "Mercury Coder Small", - "provider": "inception", - "model": "mercury-coder-small", - "apiKey": "" - } - ] - } - ``` - - - -## Embeddings model - -Inception currently does not offer any embeddings models. - -[Click here](../../model-roles/embeddings.mdx) to see a list of embeddings model providers. - -## Reranking model - -Inception currently does not offer any reranking models. - -[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/mistral.mdx b/docs/docs/customize/model-providers/top-level/mistral.mdx deleted file mode 100644 index df936fe54..000000000 --- a/docs/docs/customize/model-providers/top-level/mistral.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: Mistral -slug: ../mistral ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -:::info -You can get an API key from the [Mistral Dashboard](https://console.mistral.ai). Note that the API key for Codestral (codestral.mistral.ai) is different from for all other models (api.mistral.ai). If you are using a Codestral API key, you should set the `apiBase` to `https://codestral.mistral.ai/v1`. Otherwise, we will default to using `https://api.mistral.ai/v1`. -::: - -## Chat model - -We recommend configuring **Mistral Large** as your chat model. - - - - ```yaml title="config.yaml" - models: - - name: Mistral Large - provider: mistral - model: mistral-large-latest - apiKey: - roles: - - chat - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Mistral Large", - "provider": "mistral", - "model": "mistral-large-latest", - "apiKey": "" - } - ] - } - ``` - - - -## Autocomplete model - -We recommend configuring **Codestral** as your autocomplete model. - - - - ```yaml title="config.yaml" - models: - - name: Codestral - provider: mistral - model: codestral-latest - # apiBase: https://codestral.mistral.ai/v1 # Do this if you are using a Codestral API key - roles: - - autocomplete - ``` - - - ```json title="config.json" - { - "tabAutocompleteModel": { - "title": "Codestral", - "provider": "mistral", - "model": "codestral-latest" - // "apiBase": "https://codestral.mistral.ai/v1" // Do this if you are using a Codestral API key - } - } - ``` - - - -## Embeddings model - -We recommend configuring **Mistral Embed** as your embeddings model. - - - - ```yaml title="config.yaml" - models: - - name: Mistral Embed - provider: mistral - model: mistral-embed - apiKey: - apiBase: https://api.mistral.ai/v1 - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "mistral", - "model": "mistral-embed", - "apiKey": "", - "apiBase": "https://api.mistral.ai/v1" - } - } - ``` - - - -## Reranking model - -Mistral currently does not offer any reranking models. - -[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/ollama.mdx b/docs/docs/customize/model-providers/top-level/ollama.mdx deleted file mode 100644 index 92759e2cb..000000000 --- a/docs/docs/customize/model-providers/top-level/ollama.mdx +++ /dev/null @@ -1,128 +0,0 @@ ---- -title: Ollama -slug: ../ollama ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -Ollama is an open-source tool that allows to run large language models (LLMs) locally on their own computers. To use Ollama, you can install it [here](https://ollama.ai/download) and download the model you want to run with the `ollama run` command. - -## Chat model - -We recommend configuring **Llama3.1 8B** as your chat model. - - - - ```yaml title="config.yaml" - models: - - name: Llama3.1 8B - provider: ollama - model: llama3.1:8b - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Llama3.1 8B", - "provider": "ollama", - "model": "llama3.1:8b" - } - ] - } - ``` - - - -## Autocomplete model - -We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. - - - - ```yaml title="config.yaml" - models: - - name: Qwen2.5-Coder 1.5B - provider: ollama - model: qwen2.5-coder:1.5b-base - roles: - - autocomplete - ``` - - - ```json title="config.json" - { - "tabAutocompleteModel": { - "title": "Qwen2.5-Coder 1.5B", - "provider": "ollama", - "model": "qwen2.5-coder:1.5b-base" - } - } - ``` - - - -## Embeddings model - -We recommend configuring **Nomic Embed Text** as your embeddings model. - - - - ```yaml title="config.yaml" - models: - - name: Nomic Embed Text - provider: ollama - model: nomic-embed-text - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "ollama", - "model": "nomic-embed-text" - } - } - ``` - - - -## Reranking model - -Ollama currently does not offer any reranking models. - -[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers. - -## Using a remote instance - -To configure a remote instance of Ollama, add the `"apiBase"` property to your model in config.json: - - - - ```yaml title="config.yaml" - models: - - name: Llama3.1 8B - provider: ollama - model: llama3.1:8b - apiBase: http://:11434 - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Llama3.1 8B", - "provider": "ollama", - "model": "llama3.1:8b", - "apiBase": "http://:11434" - } - ] - } - ``` - - diff --git a/docs/docs/customize/model-providers/top-level/openai.mdx b/docs/docs/customize/model-providers/top-level/openai.mdx deleted file mode 100644 index 7e3870720..000000000 --- a/docs/docs/customize/model-providers/top-level/openai.mdx +++ /dev/null @@ -1,160 +0,0 @@ ---- -title: OpenAI -slug: ../openai ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -:::info -You can get an API key from the [OpenAI console](https://platform.openai.com/account/api-keys) -::: - -## Chat model - -We recommend configuring **GPT-4o** as your chat model. - - - - ```yaml title="config.yaml" - models: - - name: GPT-4o - provider: openai - model: gpt-4o - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "GPT-4o", - "provider": "openai", - "model": "gpt-4o", - "apiKey": "" - } - ] - } - ``` - - - -## Autocomplete model - -OpenAI currently does not offer any autocomplete models. - -[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers. - -## Embeddings model - -We recommend configuring **text-embedding-3-large** as your embeddings model. - - - - ```yaml title="config.yaml" - models: - - name: OpenAI Embeddings - provider: openai - model: text-embedding-3-large - apiKey: - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "openai", - "model": "text-embedding-3-large", - "apiKey": "" - } - } - ``` - - - -## Reranking model - -OpenAI currently does not offer any reranking models. - -[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers. - -## OpenAI compatible servers / APIs - -OpenAI compatible servers - -- [KoboldCpp](https://github.com/lostruins/koboldcpp) -- [text-gen-webui](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/openai#setup--installation) -- [FastChat](https://github.com/lm-sys/FastChat/blob/main/docs/openai_api.md) -- [LocalAI](https://localai.io/basics/getting_started/) -- [llama-cpp-python](https://github.com/abetlen/llama-cpp-python#web-server) -- [TensorRT-LLM](https://github.com/NVIDIA/trt-llm-as-openai-windows?tab=readme-ov-file#examples) -- [vLLM](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html) -- [BerriAI/litellm](https://github.com/BerriAI/litellm) - -OpenAI compatible APIs - -- [Anyscale Endpoints](https://github.com/continuedev/deploy-os-code-llm#others) -- [Anyscale Private Endpoints](https://github.com/continuedev/deploy-os-code-llm#anyscale-private-endpoints) - -If you are using an OpenAI compatible server / API, you can change the `apiBase` like this: - - - - ```yaml title="config.yaml" - models: - - name: OpenAI-compatible server / API - provider: openai - model: MODEL_NAME - apiBase: http://localhost:8000/v1 - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "OpenAI-compatible server / API", - "provider": "openai", - "model": "MODEL_NAME", - "apiKey": "", - "apiBase": "http://localhost:8000/v1" - } - ] - } - ``` - - - -To force usage of `chat/completions` instead of `completions` endpoint you can set: - - - - ```yaml title="config.yaml" - models: - - name: OpenAI-compatible server / API - provider: openai - model: MODEL_NAME - apiBase: http://localhost:8000/v1 - useLegacyCompletionsEndpoint: true - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "OpenAI-compatible server / API", - "provider": "openai", - "model": "MODEL_NAME", - "apiBase": "http://localhost:8000/v1", - "useLegacyCompletionsEndpoint": true - } - ] - } - ``` - - diff --git a/docs/docs/customize/model-providers/top-level/vertexai.mdx b/docs/docs/customize/model-providers/top-level/vertexai.mdx deleted file mode 100644 index 2863acc31..000000000 --- a/docs/docs/customize/model-providers/top-level/vertexai.mdx +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: Vertex AI -slug: ../vertexai ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -:::info -You need to enable the [Vertex AI API](https://console.cloud.google.com/marketplace/product/google/aiplatform.googleapis.com) and set up the [Google Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc). -::: - -## Chat model - -We recommend configuring **Claude 3.5 Sonnet** as your chat model. - - - - ```yaml title="config.yaml" - models: - - name: Claude 3.5 Sonnet - provider: vertexai - model: claude-3-5-sonnet-20240620 - env: - projectId: - region: us-east5 - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Claude 3.5 Sonnet", - "provider": "vertexai", - "model": "claude-3-5-sonnet-20240620", - "projectId": "[PROJECT_ID]", - "region": "us-east5" - } - ] - } - ``` - - - -## Autocomplete model - -We recommend configuring **Codestral** or **code-gecko** as your autocomplete model. - - - - ```yaml title="config.yaml" - models: - - name: Codestral (Vertex AI) - provider: vertexai - model: codestral - roles: - - autocomplete - env: - projectId: - region: us-central1 - - ``` - - - ```json title="config.json" - { - "tabAutocompleteModel": { - "title": "Codestral (Vertex AI)", - "provider": "vertexai", - "model": "codestral", - "projectId": "[PROJECT_ID]", - "region": "us-central1" - } - } - ``` - - - -## Embeddings model - -We recommend configuring **text-embedding-004** as your embeddings model. - - - - ```yaml title="config.yaml" - models: - - name: Text Embedding-004 - provider: vertexai - model: text-embedding-004 - env: - projectId: - region: us-central1 - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "vertexai", - "model": "text-embedding-004", - "projectId": "[PROJECT_ID]", - "region": "us-central1" - } - } - ``` - - - -## Reranking model - -Vertex AI currently does not offer any reranking models. - -[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-providers/top-level/xAI.mdx b/docs/docs/customize/model-providers/top-level/xAI.mdx deleted file mode 100644 index 3c049790d..000000000 --- a/docs/docs/customize/model-providers/top-level/xAI.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: xAI -slug: ../xai ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -:::info -You can get an API key from the [xAI console](https://console.x.ai/) -::: - -## Chat model - -We recommend configuring **grok-2-latest** as your chat model. For information on other available models, visit [xAI Documentation](https://docs.x.ai/docs/models). - - - - Add the [xAI Grok 2 model block](https://hub.continue.dev/xai/grok-2) on the hub. - - - ```yaml title="config.yaml" - models: - - name: Grok 2 - provider: xAI - model: grok-2-latest - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Grok 2", - "provider": "xAI", - "model": "grok-2-latest", - "apiKey": "" - } - ] - } - ``` - - - -## Autocomplete model - -xAI currently does not offer any autocomplete models. - -[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers. - -## Embeddings model - -xAI currently does not offer any embeddings models. - -[Click here](../../model-roles/embeddings.mdx) to see a list of embeddings model providers. - -## Reranking model - -xAI currently does not offer any reranking models. - -[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers. diff --git a/docs/docs/customize/model-roles/apply.mdx b/docs/docs/customize/model-roles/apply.mdx deleted file mode 100644 index d1ee7609b..000000000 --- a/docs/docs/customize/model-roles/apply.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: Apply Role -description: Apply model role -keywords: [apply, model, role] -sidebar_position: 4 ---- - -When editing code, Chat and Edit model output often doesn't clearly align with existing code. A model with the `apply` role is used to generate a more precise diff to apply changes to a file. - -## Recommended Apply models - -We recommend [Morph Fast Apply](https://morphllm.com) or [Relace's Instant Apply model](https://hub.continue.dev/relace/instant-apply) for the fastest Apply experience. You can sign up for Morph's free tier [here](https://morphllm.com/dashboard) or get a Relace API key [here](https://app.relace.ai/settings/api-keys). - -However, most Chat models can also be used for applying code changes. We recommend smaller/cheaper models for the task, such as Claude 3.5 Haiku. - -:::info -Explore all apply models in [the Hub](https://hub.continue.dev/explore/models?roles=apply) -::: - -## Prompt templating - -You can customize the prompt template used for applying code changes by setting the `promptTemplates.apply` property in your model configuration. Continue uses [Handlebars syntax](https://handlebarsjs.com/guide/) for templating. - -Available variables for the apply template: - -- `{{{original_code}}}` - The original code before changes -- `{{{new_code}}}` - The new code after changes - -Example: - -```yaml -models: - - name: My Custom Apply Template - provider: anthropic - model: claude-3-5-sonnet-latest - promptTemplates: - apply: | - Original: {{{original_code}}} - New: {{{new_code}}} - - Please generate the final code without any markers or explanations. -``` diff --git a/docs/docs/customize/model-roles/autocomplete.md b/docs/docs/customize/model-roles/autocomplete.md deleted file mode 100644 index 9f39f154d..000000000 --- a/docs/docs/customize/model-roles/autocomplete.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: Autocomplete Role -description: Autocomplete model role -keywords: [autocomplete, model, role] -sidebar_position: 2 ---- - -An "autocomplete model" is an LLM that is trained on a special format called fill-in-the-middle (FIM). This format is designed to be given the prefix and suffix of a code file and predict what goes between. This task is very specific, which on one hand means that the models can be smaller (even a 3B parameter model can perform well). On the other hand, this means that Chat models, though larger, will often perform poorly even with extensive prompting. - -In Continue, autocomplete models are used to display inline [Autocomplete](../../autocomplete/how-to-use-it.md) suggestions as you type. Autocomplete models are designated by adding the `autocomplete` to the model's `roles` in `config.yaml`. - -## Recommended Autocomplete models - -Visit the [Autocomplete Deep Dive](../deep-dives/autocomplete.mdx) for recommended models and more details. - -## Prompt templating - -You can customize the prompt template used when autocomplete happens by setting the `promptTemplates.autocomplete` property in your model configuration. Continue uses [Handlebars syntax](https://handlebarsjs.com/guide/) for templating. - -Available variables for the apply template: - -- `{{{prefix}}}` - the code before your cursor -- `{{{suffix}}}` - the code after your cursor -- `{{{filename}}}` - the name of the file your cursor currently is -- `{{{reponame}}}` - the name of the folder where the codebase is -- `{{{language}}}` - the name of the programming language in full (ex. Typescript) - -Example: - -```yaml -models: - - name: My Custom Autocomplete Template - provider: ollama - model: qwen2.5-coder:1.5b - promptTemplates: - autocomplete: | - ` - globalThis.importantFunc = importantFunc - <|fim_prefix|>{{{prefix}}}<|fim_suffix|>{{{suffix}}}<|fim_middle|> - ` -``` diff --git a/docs/docs/customize/model-roles/chat.mdx b/docs/docs/customize/model-roles/chat.mdx deleted file mode 100644 index 7761114d2..000000000 --- a/docs/docs/customize/model-roles/chat.mdx +++ /dev/null @@ -1,407 +0,0 @@ ---- -title: Chat Role -description: Chat model role -keywords: [chat, model, role] -sidebar_position: 1 ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -A "chat model" is an LLM that is trained to respond in a conversational format. Because they should be able to answer general questions and generate complex code, the best chat models are typically large, often 405B+ parameters. - -In Continue, these models are used for normal [Chat](../../chat/how-to-use-it.md) and [VS Code actions](../deep-dives/vscode-actions.md). The selected chat model will also be used for [Edit](../../edit/how-to-use-it.md) and [Apply](./apply.mdx) if no `edit` or `apply` models are specified, respectively. - -## Recommended Chat models - -## Best overall experience - -For the best overall Chat experience, you will want to use a 400B+ parameter model or one of the frontier models. - -### Claude Sonnet 3.7 from Anthropic - -Our current top recommendation is Claude 3.7 Sonnet from [Anthropic](../model-providers/top-level/anthropic.mdx). - - - - View the [Claude 3.7 Sonnet model block](https://hub.continue.dev/anthropic/claude-3-7-sonnet) on the hub. - - - ```yaml title="config.yaml" - models: - - name: Claude 3.7 Sonnet - provider: anthropic - model: claude-3-7-sonnet-latest - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Claude 3.5 Sonnet", - "provider": "anthropic", - "model": "claude-3-5-sonnet-latest", - "apiKey": "" - } - ] - } - ``` - - - -### Gemma from Google DeepMind - -If you prefer to use an open-weight model, then the Gemma family of Models from Google DeepMind is a good choice. You will need to decide if you use it through a SaaS model provider, e.g. [Together](../model-providers/more/together.mdx), or self-host it, e.g. [Ollama](../model-providers/top-level/ollama.mdx). - - - - - - Add the [Ollama Gemma 3 27B block](https://hub.continue.dev/ollama/gemma3-27b) from the hub - - - Add the [Together Gemma 2 27B Instruct block](https://hub.continue.dev/togetherai/gemma-2-instruct-27b) from the hub - - - - - - - ```yaml title="config.yaml" - models: - - name: "Gemma 3 27B" - provider: "ollama" - model: "gemma3:27b" - ``` - - - ```yaml title="config.yaml" - models: - - name: "Gemma 3 27B" - provider: "together" - model: "google/gemma-2-27b-it" - apiKey: - ``` - - - - - - - ```json title="config.json" - { - "models": [ - { - "title": "Gemma 3 27B", - "provider": "ollama", - "model": "gemma3:27b" - } - ] - } - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Gemma 3 27B", - "provider": "together", - "model": "google/gemma-2-27b-it", - "apiKey": "" - } - ] - } - ``` - - - - - -### GPT-4o from OpenAI - -If you prefer to use a model from [OpenAI](../model-providers/top-level/openai.mdx), then we recommend GPT-4o. - - - - Add the [OpenAI GPT-4o block](https://hub.continue.dev/openai/gpt-4o) from the hub - - - ```yaml title="config.yaml" - models: - - name: GPT-4o - provider: openai - model: '' - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "GPT-4o", - "provider": "openai", - "model": "", - "apiKey": "" - } - ] - } - ``` - - - -### Grok-2 from xAI - -If you prefer to use a model from [xAI](../model-providers/top-level/xAI.mdx), then we recommend Grok-2. - - - - Add the [xAI Grok-2 block](https://hub.continue.dev/xai/grok-2) from the hub - - - ```yaml title="config.yaml" - models: - - name: Grok-2 - provider: xAI - model: grok-2-latest - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Grok-2", - "provider": "xAI", - "model": "grok-2-latest", - "apiKey": "" - } - ] - } - ``` - - - -### Gemini 2.0 Flash from Google - -If you prefer to use a model from [Google](../model-providers/top-level/gemini.mdx), then we recommend Gemini 2.0 Flash. - - - - Add the [Gemini 2.0 Flash block](https://hub.continue.dev/google/gemini-2.0-flash) from the hub - - - ```yaml title="config.yaml" - models: - - name: Gemini 2.0 Flash - provider: gemini - model: gemini-2.0-flash - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Gemini 2.0 Flash", - "provider": "gemini", - "model": "gemini-2.0-flash", - "apiKey": "" - } - ] - } - ``` - - - -## Local, offline experience - -For the best local, offline Chat experience, you will want to use a model that is large but fast enough on your machine. - -### Llama 3.1 8B - -If your local machine can run an 8B parameter model, then we recommend running Llama 3.1 8B on your machine (e.g. using [Ollama](../model-providers/top-level/ollama.mdx) or [LM Studio](../model-providers/more/lmstudio.mdx)). - - - - - - Add the [Ollama Llama 3.1 8b block](https://hub.continue.dev/ollama/llama3.1-8b) from the hub - - {/* HUB_TODO nonexistent block */} - {/* - Add the [LM Studio Llama 3.1 8b block](https://hub.continue.dev/explore/models) from the hub - */} - - - - - - ```yaml title="config.yaml" - models: - - name: Llama 3.1 8B - provider: ollama - model: llama3.1:8b - ``` - - - ```yaml title="config.yaml" - models: - - name: Llama 3.1 8B - provider: lmstudio - model: llama3.1:8b - ``` - - - ```yaml title="config.yaml" - models: - - name: Llama 3.1 8B - provider: msty - model: llama3.1:8b - ``` - - - - - - - ```json title="config.json" - { - "models": [ - { - "title": "Llama 3.1 8B", - "provider": "ollama", - "model": "llama3.1:8b" - } - ] - } - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Llama 3.1 8B", - "provider": "lmstudio", - "model": "llama3.1-8b" - } - ] - } - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Llama 3.1 8B", - "provider": "msty", - "model": "llama3.1-8b" - } - ] - } - ``` - - - - - -### DeepSeek Coder 2 16B - -If your local machine can run a 16B parameter model, then we recommend running DeepSeek Coder 2 16B (e.g. using [Ollama](../model-providers/top-level/ollama.mdx) or [LM Studio](../model-providers/more/lmstudio.mdx)). - - - {/* HUB_TODO nonexistent blocks */} - {/* - - - Add the [Ollama Deepseek Coder 2 16B block](https://hub.continue.dev/explore/models) from the hub - - - Add the [LM Studio Deepseek Coder 2 16B block](https://hub.continue.dev/explore/models) from the hub - - - */} - - - - ```yaml title="config.yaml" - models: - - name: DeepSeek Coder 2 16B - provider: ollama - model: deepseek-coder-v2:16b - ``` - - - ```yaml title="config.yaml" - models: - - name: DeepSeek Coder 2 16B - provider: lmstudio - model: deepseek-coder-v2:16b - ``` - - - ```yaml title="config.yaml" - models: - - name: DeepSeek Coder 2 16B - provider: msty - model: deepseek-coder-v2:16b - ``` - - - - - - - ```json title="config.json" - { - "models": [ - { - "title": "DeepSeek Coder 2 16B", - "provider": "ollama", - "model": "deepseek-coder-v2:16b", - "apiBase": "http://localhost:11434" - } - ] - } - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "DeepSeek Coder 2 16B", - "provider": "lmstudio", - "model": "deepseek-coder-v2:16b" - } - ] - } - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "DeepSeek Coder 2 16B", - "provider": "msty", - "model": "deepseek-coder-v2:16b" - } - ] - } - ``` - - - - - -## Other experiences - -There are many more models and providers you can use with Chat beyond those mentioned above. Read more [here](../model-roles/chat.mdx) diff --git a/docs/docs/customize/model-roles/edit.mdx b/docs/docs/customize/model-roles/edit.mdx deleted file mode 100644 index ca4572f26..000000000 --- a/docs/docs/customize/model-roles/edit.mdx +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: Edit Role -description: Edit model role -keywords: [edit, editing, model, role] -sidebar_position: 3 ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -It's often useful to select a different model to respond to Edit prompts than for chat prompts, as Edits are often more code-specific and may require less conversational readability. - -In Continue, you can add `edit` to a model's roles to specify that it can be used for Edit requests. If no edit models are specified, the selected `chat` model is used. - - - - Use model roles. - ```yaml title="config.yaml" - models: - - name: Claude 3.5 Sonnet - provider: anthropic - model: claude-3-5-sonnet-latest - apiKey: - roles: - - edit - ``` - - - Set the `experimental.modelRoles.inlineEdit` property in `config.json`. - ```json title="config.json" - { - "models": { - "name": "Claude 3.5 Sonnet", - "provider": "anthropic", - "model": "claude-3-5-sonnet-latest", - "apiKey": "" - }, - "experimental": { - "modelRoles": { - "inlineEdit": "Claude 3.5 Sonnet", - } - } - } - ``` - - - -Explore edit models in [the hub](https://hub.continue.dev/explore/models?roles=edit). Generally, our recommendations for Edit overlap with recommendations for Chat. - -## Prompt templating - -You can customize the prompt template used for editing code by setting the `promptTemplates.edit` property in your model configuration. Continue uses [Handlebars syntax](https://handlebarsjs.com/guide/) for templating. - -Available variables for the edit template: - -- `{{{userInput}}}` - The user's edit request/instruction -- `{{{language}}}` - The programming language of the code -- `{{{codeToEdit}}}` - The code that's being edited -- `{{{prefix}}}` - Content before the edit area -- `{{{suffix}}}` - Content after the edit area -- `{{{supportsCompletions}}}` - Whether the model supports completions API -- `{{{supportsPrefill}}}` - Whether the model supports prefill capability - -Example: - -```yaml -models: - - name: My Custom Edit Template - provider: openai - model: gpt-4o - promptTemplates: - edit: | - `Here is the code before editing: - \`\`\`{{{language}}} - {{{codeToEdit}}} - \`\`\` - - Here is the edit requested: - "{{{userInput}}}" - - Here is the code after editing:` -``` diff --git a/docs/docs/customize/model-roles/embeddings.mdx b/docs/docs/customize/model-roles/embeddings.mdx deleted file mode 100644 index ce5357792..000000000 --- a/docs/docs/customize/model-roles/embeddings.mdx +++ /dev/null @@ -1,154 +0,0 @@ ---- -title: Embed Role -description: Embed model role -keywords: [embedding, model, role, embeddings] -sidebar_position: 5 ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -An "embeddings model" is trained to convert a piece of text into a vector, which can later be rapidly compared to other vectors to determine similarity between the pieces of text. Embeddings models are typically much smaller than LLMs, and will be extremely fast and cheap in comparison. - -In Continue, embeddings are generated during indexing and then used by [@Codebase](../deep-dives/codebase.mdx) to perform similarity search over your codebase. - -You can add `embed` to a model's `roles` to specify that it can be used to embed. - -:::info[Built-in model (VS Code only)] -`transformers.js` is used as a built-in embeddings model in VS Code. In JetBrains, there currently is no built-in embedder. -::: - -## Recommended embedding models - -If you have the ability to use any model, we recommend `voyage-code-3`, which is listed below along with the rest of the options for embeddings models. - -If you want to generate embeddings locally, we recommend using `nomic-embed-text` with [Ollama](../model-providers/top-level/ollama.mdx#embeddings-model). - -### Voyage AI - -After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this: - - - - [Voyage Code 3 Embedder Block](https://hub.continue.dev/voyageai/voyage-code-3) - - - ```yaml title="config.yaml" - models: - - name: Voyage Code 3 - provider: voyage - model: voyage-code-3 - apiKey: - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "voyage", - "model": "voyage-code-3", - "apiKey": "" - } - } - ``` - - - -### Ollama - -See [here](../model-providers/top-level/ollama.mdx#embeddings-model) for instructions on how to use Ollama for embeddings. - -### Transformers.js (currently VS Code only) - -[Transformers.js](https://huggingface.co/docs/transformers.js/index) is a JavaScript port of the popular [Transformers](https://huggingface.co/transformers/) library. It allows embeddings to be calculated entirely locally. The model used is `all-MiniLM-L6-v2`, which is shipped alongside the Continue extension. - - - - ```yaml title="config.yaml" - models: - - name: default-transformers - provider: transformers.js - roles: - - embed - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "transformers.js" - } - } - ``` - - - -### Text Embeddings Inference - -[Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own embeddings endpoint. You can configure embeddings to use your endpoint as follows: - - - {/* HUB_TODO nonexistent block */} - {/* - [HuggingFace Text Embedder Block](https://hub.continue.dev/) - */} - - ```yaml title="config.yaml" - models: - - name: Huggingface TEI Embedder - provider: huggingface-tei - apiBase: http://localhost:8080 - apiKey: - roles: [embed] - ``` - - - ```json title="config.json" - { - "embeddingsProvider": { - "provider": "huggingface-tei", - "apiBase": "http://localhost:8080", - "apiKey": "" - } - } - ``` - - - -### OpenAI - -See [here](../model-providers/top-level/openai.mdx#embeddings-model) for instructions on how to use OpenAI for embeddings. - -### Cohere - -See [here](../model-providers/more/cohere.mdx#embeddings-model) for instructions on how to use Cohere for embeddings. - -### Gemini - -See [here](../model-providers/top-level/gemini.mdx#embeddings-model) for instructions on how to use Gemini for embeddings. - -### Vertex - -See [here](../model-providers/top-level/vertexai.mdx#embeddings-model) for instructions on how to use Vertex for embeddings. - -### Mistral - -See [here](../model-providers/top-level/mistral.mdx#embeddings-model) for instructions on how to use Mistral for embeddings. - -### NVIDIA - -See [here](../model-providers/more/nvidia.mdx#embeddings-model) for instructions on how to use NVIDIA for embeddings. - -### Bedrock - -See [here](../model-providers/top-level/bedrock.mdx#embeddings-model) for instructions on how to use Bedrock for embeddings. - -### WatsonX - -See [here](../model-providers/more/watsonx.mdx#embeddings-model) for instructions on how to use WatsonX for embeddings. - -### LMStudio - -See [here](../model-providers/more/lmstudio.mdx#embeddings-model) for instructions on how to use LMStudio for embeddings. diff --git a/docs/docs/customize/model-roles/intro.mdx b/docs/docs/customize/model-roles/intro.mdx deleted file mode 100644 index b57bde25e..000000000 --- a/docs/docs/customize/model-roles/intro.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: Intro to Roles -description: Apply model role -keywords: [apply, model, role] -sidebar_position: 0 -sidebar_label: Introduction ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -Models in Continue can be configured to be used for various roles in the extension. - -- [`chat`](./chat.mdx): Used for chat conversations in the extension sidebar -- [`autocomplete`](./autocomplete.md): Used for autocomplete code suggestions in the editor -- [`edit`](./edit.mdx): Used to generate code based on edit prompts -- [`apply`](./apply.mdx): Used to decide how to apply edits to a file -- [`embed`](./embeddings.mdx): Used to generate embeddings used for vector search (@Codebase and @Docs context providers) -- [`rerank`](./reranking.mdx): Used to rerank results from vector search - -These roles can be specified for a `config.yaml` model block using `roles`. See the [YAML Specification](../../advanced/reference#models) for more details. - -## Selecting model roles - -You can control which of the models in your assistant for a given role will be currently used for that role. Above the main input, click the 3 dots and then the cube icon to expand the `Models` section. Then you can use the dropdowns to select an active model for each role. - -![Settings Active Models Section](/img/settings-model-roles.png) - -:::info -`roles` are not explicitly defined within `config.json` (deprecated) - they are infered by the top level keys like `embeddingsProvider` -::: diff --git a/docs/docs/customize/model-roles/reranking.mdx b/docs/docs/customize/model-roles/reranking.mdx deleted file mode 100644 index c16dab7a0..000000000 --- a/docs/docs/customize/model-roles/reranking.mdx +++ /dev/null @@ -1,156 +0,0 @@ ---- -title: Rerank Role -description: Rerank model role -keywords: [rerank, reranking, model, role] -sidebar_position: 6 ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -A "reranking model" is trained to take two pieces of text (often a user question and a document) and return a relevancy score between 0 and 1, estimating how useful the document will be in answering the question. Rerankers are typically much smaller than LLMs, and will be extremely fast and cheap in comparison. - -In Continue, rerankers are designated using the `rerank` role and used by [@Codebase](../deep-dives/codebase.mdx) in order to select the most relevant code snippets after vector search. - -## Recommended reranking models - -If you have the ability to use any model, we recommend `rerank-2` by Voyage AI, which is listed below along with the rest of the options for rerankers. - -### Voyage AI - -Voyage AI offers the best reranking model for code with their `rerank-2` model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure a reranker as follows: - - - - [Voyage Rerank 2 Block](https://hub.continue.dev/voyageai/rerank-2) - - - ```yaml title="config.yaml" - models: - - name: My Voyage Reranker - provider: voyage - apiKey: - model: rerank-2 - roles: - - rerank - ``` - - - ```json title="config.json" - { - "reranker": { - "name": "voyage", - "params": { - "model": "rerank-2", - "apiKey": "" - } - } - } - ``` - - - -### Cohere - -See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rerank-2). - - - {/* HUB_TODO block doesn't exist */} - {/* - [Cohere Reranker English v3](https://hub.continue.dev/) - */} - - ```yaml title="config.yaml" - models: - - name: Cohere Reranker - provider: cohere - model: rerank-english-v3.0 - apiKey: - roles: - - rerank - ``` - - - ```json title="config.json" - { - "reranker": { - "name": "cohere", - "params": { - "model": "rerank-english-v3.0", - "apiKey": "" - } - } - } - ``` - - - -### LLM - -If you only have access to a single LLM, then you can use it as a reranker. This is discouraged unless truly necessary, because it will be much more expensive and still less accurate than any of the above models trained specifically for the task. Note that this will not work if you are using a local model, for example with Ollama, because too many parallel requests need to be made. - - - {/* HUB_TODO block doesn't exist */} - {/* - [GPT-4o LLM Reranker Block](https://hub.continue.dev/) - */} - - ```yaml title="config.yaml" - models: - - name: LLM Reranker - provider: openai - model: gpt-4o - roles: - - rerank - ``` - - - ```json title="config.json" - { - "reranker": { - "name": "llm", - "params": { - "modelTitle": "My Model Title" - } - } - } - ``` - - - -The `"modelTitle"` field must match one of the models in your "models" array in config.json. - -### Text Embeddings Inference - -[Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own [reranker endpoint](https://huggingface.github.io/text-embeddings-inference/#/Text%20Embeddings%20Inference/rerank). You can configure your reranker as follows: - - - {/* HUB_TODO */} - {/* - [HuggingFace TEI Reranker block](https://hub.continue.dev/) - */} - - ```yaml title="config.yaml" - models: - - name: Huggingface-tei Reranker - provider: huggingface-tei - apiBase: http://localhost:8080 - apiKey: - roles: - - rerank - ``` - - - ```json title="config.json" - { - "reranker": { - "name": "huggingface-tei", - "params": { - "apiBase": "http://localhost:8080", - "apiKey": "" - } - } - } - ``` - - diff --git a/docs/docs/customize/overview.md b/docs/docs/customize/overview.md deleted file mode 100644 index 6ea4ad17f..000000000 --- a/docs/docs/customize/overview.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Overview -description: Introduction to customizing Continue -keywords: [customize, configure, config] ---- - -Continue can be deeply customized. For example you might: - -- **Change your Model Provider**. Continue allows you to choose your favorite or even add multiple model providers. This allows you to use different models for different tasks, or to try another model if you're not happy with the results from your current model. Continue supports all of the popular model providers, including OpenAI, Anthropic, Microsoft/Azure, Mistral, and more. You can even self host your own model provider if you'd like. Learn more about [model providers](../advanced/model-providers/). -- **Select different models for specific tasks**. Different Continue features can use different models. We call these _model roles_. For example, you can use a different model for chat than you do for autocomplete. Learn more about [model roles](./model-roles/) . -- **Add a Context Provider**. Context providers allow you to add information to your prompts, giving your LLM additional context to work with. Context providers allow you to reference snippets from your codebase, or lookup relevant documentation, or use a search engine to find information and much more. Learn more about [context providers](./context-providers.mdx). -- **Create a Slash Command**. Slash commands allow you to easily add custom functionality to Continue. You can use a slash command that allows you to generate a shell command from natural language, or perhaps generate a commit message, or create your own custom command to do whatever you want. Learn more about [slash commands](./deep-dives/slash-commands.mdx). -- **Call external tools and functions**. Unchain your LLM with the power of tools using [Agent](../agent/how-to-use-it.md). Add custom tools using [MCP Servers](./deep-dives/mcp.mdx) - -Whatever you choose, you'll probably start by editing your Assistant. - -## Editing your assistant - -You can easily access your assistant configuration from the Continue Chat sidebar. Open the sidebar by pressing cmd/ctrl + L (VS Code) or cmd/ctrl + J (JetBrains) and click the Assistant selector above the main chat input. Then, you can hover over an assistant and click the `new window` (hub assistants) or `gear` (local assistants) icon. - -![configure an assistant](/img/configure-continue.png) - -- See [Editing Hub Assistants](../hub/assistants/edit-an-assistant.md) for more details on managing your hub assistant -- See the [Config Deep Dive](./deep-dives/configuration.md) for more details on configuring local assistants. diff --git a/docs/docs/customize/tutorials/assets/image.png b/docs/docs/customize/tutorials/assets/image.png deleted file mode 100644 index 284b2afc9..000000000 Binary files a/docs/docs/customize/tutorials/assets/image.png and /dev/null differ diff --git a/docs/docs/customize/tutorials/build-your-own-context-provider.mdx b/docs/docs/customize/tutorials/build-your-own-context-provider.mdx deleted file mode 100644 index d8bdc39be..000000000 --- a/docs/docs/customize/tutorials/build-your-own-context-provider.mdx +++ /dev/null @@ -1,329 +0,0 @@ ---- -title: Build your own context provider ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -# Build Your Own Context Provider - -Continue offers several way to provide your custom context to the extension. - -## HTTP Context Provider - -Continue can retrieve context from a custom HTTP server that you create and serve. Add the `@HTTP` context provider to your configuration like this: - - - - ```yaml title="config.yaml" - context: - provider: http - params: - url: https://myserver.com/context-provider - title: http - displayTitle: My Custom Context - description: Gets things from my private list - options: - maxItems: 20 - ``` - - - ```json title="config.json" - { - "name": "http", - "params": { - "url": "https://myserver.com/context-provider", - "title": "http", - "description": "Custom HTTP Context Provider", - "displayTitle": "My Custom Context", - "options": { - "maxItems": 20 - } - } - } - ``` - - - -Then, create a server that responds to requests as are made from [HttpContextProvider.ts](https://github.com/continuedev/continue/blob/main/core/context/providers/HttpContextProvider.ts). See the `hello` endpoint in [context_provider_server.py](https://github.com/continuedev/continue/blob/main/core/context/providers/context_provider_server.py) for an example that uses FastAPI. - -The `"options"` property can be used to send additional parameters to your endpoint. The full request body has the following shape: - -```typescript -{ - query: string; - fullInput: string; - options: Record; - - workspacePath?: string; // Only provided if the server is local. -} -``` - -:::info -The following methods for creating custom context providers are deprecated. We recommend using HTTP context providers, [MCP Servers](../context-providers.mdx#model-context-protocol), and [Prompts](../deep-dives/prompts.md) where possible. -::: - -## Using CustomContextProvider - -Custom context providers can be implemented in a `config.ts` placed in your Continue global directory (`~/.continue` for MacOS, `%USERPROFILE%/.continue` for Windows). You can implement the `CustomContextProvider` interface in your `config.ts` - -```typescript -interface CustomContextProvider { - title: string; - displayTitle?: string; - description?: string; - renderInlineAs?: string; - type?: ContextProviderType; - getContextItems( - query: string, - extras: ContextProviderExtras, - ): Promise; - loadSubmenuItems?: ( - args: LoadSubmenuItemsArgs, - ) => Promise; -} -``` - -As an example, let's say you have a set of internal documents that have been indexed in a vector database. You've set up a simple REST API that allows internal users to query and get back relevant snippets. This context provider will send the query to this server and return the results from the vector database. The return type of `getContextItems` _must_ be an array of objects that have all of the following properties: - -- `name`: The name of the context item, which will be displayed as a title -- `description`: A longer description of the context item -- `content`: The actual content of the context item, which will be fed to the LLM as context - -```typescript title="~/.continue/config.ts" -const RagContextProvider: CustomContextProvider = { - title: "rag", - displayTitle: "RAG", - description: - "Retrieve snippets from our vector database of internal documents", - - getContextItems: async ( - query: string, - extras: ContextProviderExtras, - ): Promise => { - const response = await fetch("https://internal_rag_server.com/retrieve", { - method: "POST", - body: JSON.stringify({ query }), - }); - - const results = await response.json(); - - return results.map((result) => ({ - name: result.title, - description: result.title, - content: result.contents, - })); - }, -}; -``` - -It can then be added in `config.ts` like so: - -```typescript title="~/.continue/config.ts" -export function modifyConfig(config: Config): Config { - if (!config.contextProviders) { - config.contextProviders = []; - } - config.contextProviders.push(RagContextProvider); - return config; -} -``` - -This is automatically appended to your configuration. - -### Custom Context Providers with Submenu or Query - -There are 3 types of context providers: "normal", "query", and "submenu". The "normal" type is the default, and is what we've seen so far. - -The **"query"** type is used when you want to display a text box to the user, and then use the contents of that text box to generate the context items. Built-in examples include "search" and "google". This text is what gets passed to the "query" argument in `getContextItems`. To implement a "query" context provider, simply set `"type": "query"` in your custom context provider object. - -The **"submenu"** type is used when you want to display a list of searchable items in the dropdown. Built-in examples include "issue" and "folder". To implement a "submenu" context provider, set `"type": "submenu"` and implement the `loadSubmenuItems` and `getContextItems` functions. Here is an example that shows a list of all README files in the current workspace: - -```typescript title="~/.continue/config.ts" -const ReadMeContextProvider: CustomContextProvider = { - title: "readme", - displayTitle: "README", - description: "Reference README.md files in your workspace", - type: "submenu", - - getContextItems: async ( - query: string, - extras: ContextProviderExtras, - ): Promise => { - // 'query' is the filepath of the README selected from the dropdown - const content = await extras.ide.readFile(query); - return [ - { - name: getFolder(query), - description: getFolderAndBasename(query), - content, - }, - ]; - }, - - loadSubmenuItems: async ( - args: LoadSubmenuItemsArgs, - ): Promise => { - const { ide } = args; - - // Filter all workspace files for READMEs - const workspaceDirs = await ide.getWorkspaceDirs(); - - const allFiles = await Promise.all( - workspaceDirs.map((dir) => - ide.subprocess(`find ${dir} -name "README.md"`), - ), - ); - - // 'readmes' now contains an array of file paths for each README.md file found in the workspace, - // excluding those in 'node_modules' - const readmes = allFiles - .flatMap((mds) => mds[0].split("\n")) - .filter((file) => file.trim() !== "" && !file.includes("/node_modules/")); - - // Return the items that will be shown in the dropdown - return readmes.map((filepath) => { - return { - id: filepath, - title: getFolder(filepath), - description: getFolderAndBasename(filepath), - }; - }); - }, -}; - -export function modifyConfig(config: Config): Config { - if (!config.contextProviders) { - config.contextProviders = []; - } - config.contextProviders.push(ReadMeContextProvider); - return config; -} - -function getFolder(path: string): string { - return path.split(/[\/\\]/g).slice(-2)[0]; -} - -function getFolderAndBasename(path: string): string { - return path - .split(/[\/\\]/g) - .slice(-2) - .join("/"); -} -``` - -The flow of information in the above example is as follows: - -1. The user types `@readme` and selects it from the dropdown, now displaying the submenu where they can search for any item returned by `loadSubmenuItems`. -2. The user selects one of the READMEs in the submenu, enters the rest of their input, and presses enter. -3. The `id` of the chosen `ContextSubmenuItem` is passed to `getContextItems` as the `query` argument. In this case it is the filepath of the README. -4. The `getContextItems` function can then use the `query` to retrieve the full contents of the README and format the content before returning the context item which will be included in the prompt. - -### Importing outside modules - -To include outside Node modules in your config.ts, run `npm install ` from the `~/.continue` directory, and then import them in config.ts. - -Continue will use [esbuild](https://esbuild.github.io/) to bundle your `config.ts` and any dependencies into a single Javascript file. The exact configuration used can be found [here](https://github.com/continuedev/continue/blob/5c9874400e223bbc9786a8823614a2e501fbdaf7/extensions/vscode/src/ideProtocol.ts#L45-L52). - -### `CustomContextProvider` Reference - -- `title`: An identifier for the context provider -- `displayTitle` (optional): The title displayed in the dropdown -- `description` (optional): The longer description displayed in the dropdown when hovered -- `type` (optional): The type of context provider. Options are "normal", "query", and "submenu". Defaults to "normal". -- `renderInlineAs` (optional): The string that will be rendered inline at the top of the prompt. If no value is provided, the `displayTitle` will be used. An empty string can be provided to prevent rendering the default `displayTitle`. -- `getContextItems`: A function that returns the documents to include in the prompt. It should return a list of `ContextItem`s, and is given access to the following arguments: - - `extras.fullInput`: A string representing the user's full input to the text box. This can be used for example to generate an embedding to compare against a set of other embedded documents - - `extras.embeddingsProvider`: The embeddings provider has an `embed` function that will convert text (such as `fullInput`) to an embedding - - `extras.llm`: The current default LLM, which you can use to make completion requests - - `extras.ide`: An instance of the `IDE` class, which lets you gather various sources of information from the IDE, including the contents of the terminal, the list of open files, or any warnings in the currently open file. - - `query`: (not currently used) A string representing the query -- `loadSubmenuItems` (optional): A function that returns a list of `ContextSubmenuItem`s to display in a submenu. It is given access to an `IDE`, the same that is passed to `getContextItems`. - . - -## Extension API for VSCode - -Continue exposes an API for registering context providers from a 3rd party VSCode extension. This is useful if you have a VSCode extension that provides some additional context that you would like to use in Continue. To use this API, add the following to your `package.json`: - -```json title="package.json" -{ - "extensionDependencies": ["continue.continue"] -} -``` - -Or install the Continue Core module from npm: - -```bash -npm i @continuedev/core -``` - -You can add the Continue core module as a dev dependency in your `package.json`: - -```json title="package.json" -{ - "devDependencies": { - "@continuedev/core": "^0.0.1" - } -} -``` - -Then, you can use the `registerCustomContextProvider` function to register your context provider. Your custom context provider must implement the `IContextProvider` interface. -Here is an example: - -```typescript title="myCustomContextProvider.ts" -import * as vscode from "vscode"; -import { - IContextProvider, - ContextProviderDescription, - ContextProviderExtras, - ContextItem, - LoadSubmenuItemsArgs, - ContextSubmenuItem, -} from "@continuedev/core"; - -class MyCustomProvider implements IContextProvider { - get description(): ContextProviderDescription { - return { - title: "Custom", - displayTitle: "Custom", - description: "my custom context provider", - type: "normal", - }; - } - - async getContextItems( - query: string, - extras: ContextProviderExtras, - ): Promise { - return [ - { - name: "Custom", - description: "Custom description", - content: "Custom content", - }, - ]; - } - - async loadSubmenuItems( - args: LoadSubmenuItemsArgs, - ): Promise { - return []; - } -} - -// create an instance of your custom provider -const customProvider = new MyCustomProvider(); - -// get Continue extension using vscode API -const continueExt = vscode.extensions.getExtension("Continue.continue"); - -// get the API from the extension -const continueApi = continueExt?.exports; - -// register your custom provider -continueApi?.registerCustomContextProvider(customProvider); -``` - -This will register `MyCustomProvider` with Continue! - -![alt text](./assets/image.png) diff --git a/docs/docs/customize/tutorials/custom-code-rag.mdx b/docs/docs/customize/tutorials/custom-code-rag.mdx deleted file mode 100644 index 145c38f10..000000000 --- a/docs/docs/customize/tutorials/custom-code-rag.mdx +++ /dev/null @@ -1,171 +0,0 @@ -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -# Custom code RAG - -While Continue comes with [@Codebase](../deep-dives/codebase.mdx) out of the box, you might wish to set up your own vector database and build a custom retrieval-augmented generation (RAG) system. This can allow you to access code that is not available locally, to index code a single time across all users, or to include custom logic. In this guide, we'll walk you through the steps it takes to build this. - -## Step 1: Choose an embeddings model - -If possible, we recommend using [`voyage-code-3`](https://docs.voyageai.com/docs/embeddings), which will give the most accurate answers of any existing embeddings model for code. You can obtain an API key [here](https://dash.voyageai.com/api-keys). Because their API is [OpenAI-compatible](https://docs.voyageai.com/reference/embeddings-api), you can use any OpenAI client by swapping out the URL. - -## Step 2: Choose a vector database - -There are a number of available vector databases, but because most vector databases will be able to performantly handle large codebases, we would recommend choosing one for ease of setup and experimentation. - -[LanceDB](https://lancedb.github.io/lancedb/basic/) is a good choice for this because it can run in-memory with libraries for both Python and Node.js. This means that in the beginning you can focus on writing code rather than setting up infrastructure. If you have already chosen a vector database, then using this instead of LanceDB is also a fine choice. - -## Step 3: Choose a "chunking" strategy - -Most embeddings models can only handle a limited amount of text at once. To get around this, we "chunk" our code into smaller pieces. - -If you use `voyage-code-3`, it has a maximum context length of 16,000 tokens, which is enough to fit most files. This means that in the beginning you can get away with a more naive strategy of truncating files that exceed the limit. In order of easiest to most comprehensive, 3 chunking strategies you can use are: - -1. Truncate the file when it goes over the context length: in this case you will always have 1 chunk per file. -2. Split the file into chunks of a fixed length: starting at the top of the file, add lines in your current chunk until it reaches the limit, then start a new chunk. -3. Use a recursive, abstract syntax tree (AST)-based strategy: this is the most exact, but most complex. In most cases you can achieve high quality results by using (1) or (2), but if you'd like to try this you can find a reference example in [our code chunker](https://github.com/continuedev/continue/blob/main/core/indexing/chunk/code.ts) or in [LlamaIndex](https://docs.llamaindex.ai/en/stable/api_reference/node_parsers/code/). - -As usual in this guide, we recommend starting with the strategy that gives 80% of the benefit with 20% of the effort. - -## Step 4: Put together an indexing script - -Indexing, in which we will insert your code into the vector database in a retrievable format, happens in three steps: - -1. Chunking -2. Generating embeddings -3. Inserting into the vector database - -With LanceDB, we can do steps 2 and 3 simultaneously, as demonstrated [in their docs](https://lancedb.github.io/lancedb/basic/#using-the-embedding-api). If you are using Voyage AI for example, it would be configured like this: - -```python -from lancedb.pydantic import LanceModel, Vector -from lancedb.embeddings import get_registry - -db = lancedb.connect("/tmp/db") -func = get_registry().get("openai").create( - name="voyage-code-3", - base_url="https://api.voyageai.com/v1/", - api_key=os.environ["VOYAGE_API_KEY"], -) - -class CodeChunks(LanceModel): - filename: str - text: str = func.SourceField() - # 1024 is the default dimension for `voyage-code-3`: https://docs.voyageai.com/docs/embeddings#model-choices - vector: Vector(1024) = func.VectorField() - -table = db.create_table("code_chunks", schema=CodeChunks, mode="overwrite") -table.add([ - {"text": "print('hello world!')", filename: "hello.py"}, - {"text": "print('goodbye world!')", filename: "goodbye.py"} -]) - -query = "greetings" -actual = table.search(query).limit(1).to_pydantic(CodeChunks)[0] -print(actual.text) -``` - -:::tip - -If you are indexing more than one repository, it is best to store these in separate "tables" (terminology used by LanceDB) or "collections" (terminology used by some other vector DBs). The alternative of adding a "repository" field and then filtering by this is less performant. - -::: - -Regardless of which database or model you have chosen, your script should iterate over all of the files that you wish to index, chunk them, generate embeddings for each chunk, and then insert all of the chunks into your vector database. - -## Step 5: Run your indexing script - -:::tip - -In a perfect production version, you would want to build "automatic, incremental indexing", so that you whenever a file changes, that file and nothing else is automatically re-indexed. This has the benefits of perfectly up-to-date embeddings and lower cost. - -That said, we highly recommend first building and testing the pipeline before attempting this. Unless your codebase is being entirely rewritten frequently, an incremental refresh of the index is likely to be sufficient and reasonably cheap. -::: - -At this point, you've written your indexing script and tested that you can make queries from your vector database. Now, you'll want a plan for when to run the indexing script. - -In the beginning, you should probably run it by hand. Once you are confident that your custom RAG is providing value and is ready for the long-term, then you can set up a cron job to run it periodically. Because codebases are largely unchanged in short time frames, you won't want to re-index more than once a day. Once per week or month is probably even sufficient. - -## Step 6: Set up your server - -In order for the Continue extension to access your custom RAG system, you'll need to set up a server. This server is responsible for recieving a query from the extension, querying the vector database, and returning the results in the format expected by Continue. - -Here is a reference implementation using FastAPI that is capable of handling requests from Continue's "http" context provider. - -```python -""" -This is an example of a server that can be used with the "http" context provider. -""" - -from fastapi import FastAPI -from pydantic import BaseModel - - -class ContextProviderInput(BaseModel): - query: str - fullInput: str - - -app = FastAPI() - - -@app.post("/retrieve") -async def create_item(item: ContextProviderInput): - results = [] # TODO: Query your vector database here. - - # Construct the "context item" format expected by Continue - context_items = [] - for result in results: - context_items.append({ - "name": result.filename, - "description": result.filename, - "content": result.text, - }) - - return context_items -``` - -After you've set up your server, you can configure Continue to use it by adding the "http" context provider to your `contextProviders` array in your configuration: - - - - ```yaml title="config.yaml" - context: - - provider: http - params: - url: https://myserver.com/retrieve - name: http - description: Custom HTTP Context Provider - displayTitle: My Custom Context - ``` - - - ```json title="config.json" - { - "contextProviders": [ - { - "name": "http", - "params": { - "url": "https://myserver.com/retrieve", - "title": "http", - "description": "Custom HTTP Context Provider", - "displayTitle": "My Custom Context" - } - } - ] - } - ``` - - - -## Step 7 (Bonus): Set up reranking - -If you'd like to improve the quality of your results, a great first step is to add reranking. This involves retrieving a larger initial pool of results from the vector database, and then using a reranking model to order them from most to least relevant. This works because the reranking model can perform a slightly more expensive calculation on the small set of top results, and so can give a more accurate ordering than similarity search, which has to search over all entries in the database. - -If you wish to return 10 total results for each query for example, then you would: - -1. Retrieve ~50 results from the vector database using similarity search -2. Send all of these 50 results to the reranker API along with the query in order to get relevancy scores for each -3. Sort the results by relevancy score and return the top 10 - -We recommend using the `rerank-2` model from Voyage AI, which has examples of usage [here](https://docs.voyageai.com/docs/reranker). diff --git a/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx b/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx deleted file mode 100644 index ab3c9b1b5..000000000 --- a/docs/docs/customize/tutorials/how-to-self-host-a-model.mdx +++ /dev/null @@ -1,124 +0,0 @@ ---- -title: How to self-host a model ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -You can deploy a model in your [AWS](https://github.com/continuedev/deploy-os-code-llm#aws), [GCP](https://github.com/continuedev/deploy-os-code-llm#gcp), [Azure](https://github.com/continuedev/deploy-os-code-llm#azure), [Lambda](https://lambdalabs.com/), or [other clouds](https://github.com/continuedev/deploy-os-code-llm#others-2) using: - -- [HuggingFace TGI](https://github.com/continuedev/deploy-os-code-llm#tgi) -- [vLLM](https://github.com/continuedev/deploy-os-code-llm#vllm) -- [SkyPilot](https://github.com/continuedev/deploy-os-code-llm#skypilot) -- [Anyscale Private Endpoints](https://github.com/continuedev/deploy-os-code-llm#anyscale-private-endpoints) (OpenAI compatible API) -- [Lambda](https://github.com/continuedev/deploy-os-code-llm#lambda) - -## Self-hosting an open-source model - -For many cases, either Continue will have a built-in provider or the API you use will be OpenAI-compatible, in which case you can use the "openai" provider and change the "baseUrl" to point to the server. - -However, if neither of these are the case, you will need to wire up a new LLM object. - -## Authentication - -Basic authentication can be done with any provider using the `apiKey` field: - - - - ```yaml title="config.yaml" - models: - - name: Ollama - provider: ollama - model: llama2-7b - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Ollama", - "provider": "ollama", - "model": "llama2-7b", - "apiKey": "" - } - ] - } - ``` - - - -This translates to the header `"Authorization": "Bearer xxx"`. - -If you need to send custom headers for authentication, you may use the `requestOptions.headers` property like in this example with Ollama: - - - - ```yaml title="config.yaml" - models: - - name: Ollama - provider: ollama - model: llama2-7b - requestOptions: - headers: - X-Auth-Token: xxx - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Ollama", - "provider": "ollama", - "model": "llama2-7b", - "requestOptions": { - "headers": { - "X-Auth-Token": "xxx" - } - } - } - ] - } - ``` - - - -Similarly if your model requires a Certificate for authentication, you may use the `requestOptions.clientCertificate` property like in the example below: - - - - ```yaml title="config.yaml" - models: - - name: Ollama - provider: ollama - model: llama2-7b - requestOptions: - clientCertificate: - cert: C:\tempollama.pem - key: C:\tempollama.key - passphrase: c0nt!nu3 - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Ollama", - "provider": "ollama", - "model": "llama2-7b", - "requestOptions": { - "clientCertificate": { - "cert": "C:\\tempollama.pem", - "key": "C:\\tempollama.key", - "passphrase": "c0nt!nu3" - } - } - } - ] - } - ``` - - diff --git a/docs/docs/customize/tutorials/llama3.1.mdx b/docs/docs/customize/tutorials/llama3.1.mdx deleted file mode 100644 index 6be204e99..000000000 --- a/docs/docs/customize/tutorials/llama3.1.mdx +++ /dev/null @@ -1,218 +0,0 @@ ---- -title: Using Llama 3.1 with Continue -description: How to use Llama 3.1 with Continue -keywords: [llama, meta, togetherai, ollama, replicate] ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -Continue makes it easy to code with the latest open-source models, including the entire Llama 3.1 family of models. Llama 3.2 models are also supported but not recommended for chat, because they are specifically designed to be small or multi-modal. - -If you haven't already installed Continue, you can do that [here for VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) or [here for JetBrains](https://plugins.jetbrains.com/plugin/22707-continue). For more general information on customizing Continue, read [our customization docs](../overview.md). - -Below we share some of the easiest ways to get up and running, depending on your use-case. - -## Ollama - -Ollama is the fastest way to get up and running with local language models. We recommend trying Llama 3.1 8b, which is impressive for its size and will perform well on most hardware. - -1. Download Ollama [here](https://ollama.ai/) (it should walk you through the rest of these steps) -2. Open a terminal and run `ollama run llama3.1:8b` -3. Change your Continue config file like this: - - - - ```yaml title="config.yaml" - models: - - name: Llama 3.1 8b - provider: ollama - model: llama3.1-8b - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Llama 3.1 8b", - "provider": "ollama", - "model": "llama3.1-8b" - } - ] - } - ``` - - - -## Groq - -:::info -Check if your chosen model is still supported by referring to the [model documentation](https://console.groq.com/docs/models). If a model has been deprecated, you may encounter a 404 error when attempting to use it. -::: - -Groq provides the fastest available inference for open-source language models, including the entire Llama 3.1 family. - -1. Obtain an API key [here](https://console.groq.com/keys) -2. Update your Continue config file like this: - - - - ```yaml title="config.yaml" - models: - - name: Llama 3.3 70b Versatile - provider: groq - model: llama-3.3-70b-versatile - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Llama 3.3 70b Versatile", - "provider": "groq", - "model": "llama-3.3-70b-versatile", - "apiKey": "" - } - ] - } - ``` - - - -## Together AI - -Together AI provides fast and reliable inference of open-source models. You'll be able to run the 405b model with good speed. - -1. Create an account [here](https://api.together.xyz/signup) -2. Copy your API key that appears on the welcome screen -3. Update your Continue config file like this: - - - - ```yaml title="config.yaml" - models: - - name: Llama 3.1 405b - provider: together - model: llama3.1-405b - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Llama 3.1 405b", - "provider": "together", - "model": "llama3.1-405b", - "apiKey": "" - } - ] - } - ``` - - - -## Replicate - -Replicate makes it easy to host and run open-source AI with an API. - -1. Get your Replicate API key [here](https://replicate.ai/) -2. Change your Continue config file like this: - - - - ```yaml title="config.yaml" - models: - - name: Llama 3.1 405b - provider: replicate - model: llama3.1-405b - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Llama 3.1 405b", - "provider": "replicate", - "model": "llama3.1-405b", - "apiKey": "" - } - ] - } - ``` - - - -## SambaNova - -SambaNova Cloud provides world record Llama3.1 70B/405B serving. - -1. Create an account [here](http://cloud.sambanova.ai?utm_source=continue&utm_medium=external&utm_campaign=cloud_signup) -2. Copy your API key -3. Update your Continue config file like this: - - - - ```yaml title="config.yaml" - models: - - name: SambaNova Llama 3.1 405B - provider: sambanova - model: llama3.1-405b - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "SambaNova Llama 3.1 405B", - "provider": "sambanova", - "model": "llama3.1-405b", - "apiKey": "" - } - ] - } - ``` - - - -## Cerebras Inference - -Cerebras Inference uses specialized silicon to provides fast inference for the Llama3.1 8B/70B. - -1. Create an account in the portal [here](https://cloud.cerebras.ai/). -2. Create and copy the API key for use in Continue. -3. Update your Continue config file: - - - - ```yaml title="config.yaml" - models: - - name: Cerebras Llama 3.1 70B - provider: cerebras - model: llama3.1-70b - apiKey: - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Cerebras Llama 3.1 70B", - "provider": "cerebras", - "model": "llama3.1-70b", - "apiKey": "" - } - ] - } - ``` - - diff --git a/docs/docs/customize/tutorials/running-continue-without-internet.md b/docs/docs/customize/tutorials/running-continue-without-internet.md deleted file mode 100644 index 2ba683909..000000000 --- a/docs/docs/customize/tutorials/running-continue-without-internet.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Running Continue without Internet -description: How to run Continue without Internet -keywords: [no internet, air-gapped, local model] ---- - -Continue can be run even on an air-gapped computer if you use a local model. Only a few adjustments are required for this to work. - -1. Download the latest .vsix file from the [Open VSX Registry](https://open-vsx.org/extension/Continue/continue) and [install it to VS Code](https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix). -2. Open the [User Settings Page](../deep-dives/settings.md) and turn off "Allow Anonymous Telemetry". This will stop Continue from attempting requests to PostHog for [anonymous telemetry](../../telemetry.md). -3. Also in `config.json`, set the default model to a local model. You can available options [here](../model-providers/). -4. Restart VS Code to ensure that the changes to `config.json` or `config.yaml` take effect. diff --git a/docs/docs/customize/tutorials/set-up-codestral.mdx b/docs/docs/customize/tutorials/set-up-codestral.mdx deleted file mode 100644 index e613acb5c..000000000 --- a/docs/docs/customize/tutorials/set-up-codestral.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: How to set up Codestral -description: How to set up Codestral -keywords: [codestral, mistral, model setup] ---- - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - -![mistral x continue](../../../static/img/mistral-x-continue.png) - -**Here is a step-by-step guide on how to set up Codestral with Continue using the Mistral AI API:** - -1. Install the Continue VS Code or JetBrains extension following the instructions [here](../../getting-started/install.md) - -2. Click on the gear icon in the bottom right corner of the Continue window to open `~/.continue/config.json` (MacOS) / `%userprofile%\.continue\config.json` (Windows) - -3. Log in and create an API key on Mistral AI's La Plateforme [here](https://console.mistral.ai/codestral). Make sure you get an API key from the "Codestral" page. - -4. To use Codestral as your model for both `autocomplete` and `chat`, insert your Mistral API key below and add it to your configuration file: - - - - ```yaml title="config.yaml" - models: - - name: Codestral - provider: mistral - model: codestral-latest - apiKey: - apiBase: https://codestral.mistral.ai/v1 - roles: - - chat - - autocomplete - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "Codestral", - "provider": "mistral", - "model": "codestral-latest", - "apiKey": "", - "apiBase": "https://codestral.mistral.ai/v1" - } - ], - "tabAutocompleteModel": [ - { - "title": "Codestral", - "provider": "mistral", - "model": "codestral-latest", - "apiKey": "", - "apiBase": "https://codestral.mistral.ai/v1" - } - ] - } - ``` - - - -5. If you run into any issues or have any questions, please join our Discord and post in the `#help` channel [here](https://discord.gg/EfJEfdFnDQ) diff --git a/docs/docs/edit/context-selection.md b/docs/docs/edit/context-selection.md deleted file mode 100644 index 921003be6..000000000 --- a/docs/docs/edit/context-selection.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Context selection -sidebar_position: 3 -description: How to select context for Edit -keywords: [edit, cmd i, works] ---- - -## Input - -The input you provide is included in the prompt. - -## Code to Edit - -The **entire contents** of each file (the current file for Jetbrains inline Edit, the `Code to Edit` item for VS Code Edit mode) are included in the prompt for context. The model will only attempt to edit the highlighted/specified ranges. - -## Context Providers - -In VS Code Edit mode, you can use `@` to add context using [Context Providers](../advanced/context-integration/custom-providers), similar to [Chat](../chat/context-selection.md). Some context providers may be disabled in Edit mode. diff --git a/docs/docs/edit/how-it-works.md b/docs/docs/edit/how-it-works.md deleted file mode 100644 index 10697d1bd..000000000 --- a/docs/docs/edit/how-it-works.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: How Edit works -sidebar_position: 4 -description: How it works -keywords: [edit, cmd l, works] ---- - -Using the highlighted code, the contents of the current file containing your highlight, and your input instructions, we prompt the model to edit the code according to your instructions. No other additional context is provided to the model. - -The model response is then streamed directly back to the highlighted range in your code, where we apply a diff formatting to show the proposed changes. - -If you accept the diff, we remove the previously highlighted lines, and if you reject the diff, we remove the proposed changes. - -If you would like to view the exact prompt that is sent to the model during an edit, you can [find it in the prompt logs](../advanced/troubleshooting#check-the-logs). diff --git a/docs/docs/edit/how-to-customize.mdx b/docs/docs/edit/how-to-customize.mdx deleted file mode 100644 index 8829d4831..000000000 --- a/docs/docs/edit/how-to-customize.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: How to customize -sidebar_position: 5 -description: How to customize Edit -keywords: [edit, cmd i, works] ---- - -## Setting active Edit/Apply model - -You can configure particular models from your Assistant to be used for Edit and Apply requests (see [How it Works](./how-it-works.md)). Above the main input, click the 3 dots and then the cube icon to expand the `Models` section. Then, you can use the dropdowns to select models to use for Edit and Apply. - -![Settings Active Models Section](/img/model-roles-edit.png) - -See [Edit role](../advanced/model-roles/edit.mdx) and [Apply role](../advanced/model-roles/apply.mdx) for more details. diff --git a/docs/docs/edit/how-to-use-it.md b/docs/docs/edit/how-to-use-it.md deleted file mode 100644 index 84b4acb2c..000000000 --- a/docs/docs/edit/how-to-use-it.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Edit -sidebar_position: 1 -sidebar_label: How to use it -description: How to use Edit -keywords: [edit, cmd l, use] ---- - -![edit](/img/edit.gif) - -## How to use it - -Edit is a convenient way to make quick changes to specific code and files. Select code, describe your code changes, and a diff will be streamed inline to your file which you can accept or reject. - -Edit is recommended for small, targeted changes, such as - -- Writing comments -- Generating unit tests -- Refactoring functions or methods - -## Highlight code and activate - -Highlight the block of code you would like to modify and press cmd/ctrl + i to active Edit mode. You can also enter Edit mode by pressing cmd/ctrl + i with no code highlighted, which will default to editing the current file. - -## Describe code changes - -Describe the changes you would like the model to make to your highlighted code. For edits, a good prompt should be relatively short and concise. For longer, more complex tasks, we recommend using [Chat](../chat/how-to-use-it.md). - -## Accept or reject changes - -Proposed changes appear as inline diffs within your highlighted text. - -You can navigate through each proposed change, accepting or rejecting them using cmd/ctrl + opt + y (to accept) or cmd/ctrl + opt + n (to reject). - -You can also accept or reject all changes at once using cmd/ctrl + shift + enter (to accept) or cmd/ctrl + shift + delete/backspace (to reject). - -If you want to request a new suggestion for the same highlighted code section, you can use cmd/ctrl + i to re-prompt the model. - -## VS Code - -In VS Code, Edit is implemented in the extension sidebar with a similar interface to [Chat](../chat/how-it-works.md), and you can also enter Edit mode by using the Mode Selector below the main Chat input to select `Edit`. - -![edit mode selected](/img/select-edit-mode.png) - -You can also reject and accept diffs using the `Reject All` and `Accept All` buttons that show up in the Chat when diffs are present (see examples below). - -### Adding Code to Edit - -Along with adding highlighted code, you can also manually add files to edit using the `Add file` combobox or by clicking the dropdown and selecting `Add all open files` to add all files that are currently open in the editor. - -## Jetbrains - -In Jetbrains, Edit is implemented as an inline popup. See the header GIF example. diff --git a/docs/docs/edit/model-setup.md b/docs/docs/edit/model-setup.md deleted file mode 100644 index a76865dcd..000000000 --- a/docs/docs/edit/model-setup.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Model setup -sidebar_position: 2 -description: How to set up an Edit model -keywords: [edit, cmd l, model] ---- - -By default, Edit uses the [same model as Chat](../chat/model-setup.mdx), and we recommend [Claude 3.7 Sonnet](https://hub.continue.dev/anthropic/claude-3-7-sonnet) from Anthropic. Visit [the Hub](https://hub.continue.dev/explore/models?roles=edit) to explore other Edit models. - -For the best Edit experience, we also recommend setting up an Apply model, specially trained to apply diffs to files. We recommend [Morph v0 Fast Apply](https://hub.continue.dev/morphllm/morph-v0) or [Relace Instant Apply](https://hub.continue.dev/relace/instant-apply). Explore other apply models on the [the Hub](https://hub.continue.dev/explore/models?roles=apply). diff --git a/docs/docs/features/overview.mdx b/docs/docs/features/00-overview.mdx similarity index 100% rename from docs/docs/features/overview.mdx rename to docs/docs/features/00-overview.mdx diff --git a/docs/docs/getting-started/overview.mdx b/docs/docs/getting-started/00-overview.mdx similarity index 100% rename from docs/docs/getting-started/overview.mdx rename to docs/docs/getting-started/00-overview.mdx diff --git a/docs/docs/hub/overview.mdx b/docs/docs/hub/00-overview.mdx similarity index 100% rename from docs/docs/hub/overview.mdx rename to docs/docs/hub/00-overview.mdx diff --git a/docs/docs/hub/assistants/intro.md b/docs/docs/hub/assistants/00-intro.md similarity index 100% rename from docs/docs/hub/assistants/intro.md rename to docs/docs/hub/assistants/00-intro.md diff --git a/docs/docs/hub/blocks/intro.md b/docs/docs/hub/blocks/00-intro.md similarity index 100% rename from docs/docs/hub/blocks/intro.md rename to docs/docs/hub/blocks/00-intro.md diff --git a/docs/docs/introduction.md b/docs/docs/introduction.md index e8bd4269e..7c9ebb7d8 100644 --- a/docs/docs/introduction.md +++ b/docs/docs/introduction.md @@ -15,11 +15,11 @@ keywords: ] --- -![Continue Logo](../static/img/intro.png) +![Continue Logo](/img/intro.png) **Continue enables developers to create, share, and use custom AI code assistants with our open-source [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension) extensions and [hub of models, rules, prompts, docs, and other building blocks](https://hub.continue.dev)** -- [Chat](chat/how-to-use-it) to understand and iterate on code in the sidebar -- [Autocomplete](autocomplete/how-to-use-it) to receive inline code suggestions as you type -- [Edit](edit/how-to-use-it) to modify code without leaving your current file -- [Agent](agent/how-to-use-it) to make more substantial changes to your codebase +- [Chat](features/chat/quick-start) to understand and iterate on code in the sidebar +- [Autocomplete](features/autocomplete/quick-start) to receive inline code suggestions as you type +- [Edit](features/edit/quick-start) to modify code without leaving your current file +- [Agent](features/agent/quick-start) to make more substantial changes to your codebase diff --git a/docs/docs/json-reference.md b/docs/docs/json-reference.md deleted file mode 100644 index 5b37cb0e9..000000000 --- a/docs/docs/json-reference.md +++ /dev/null @@ -1,530 +0,0 @@ ---- -title: config.json Reference -description: Reference for the Continue _config.json_ configuration file -keywords: [config, config_schema.json, json] ---- - -:::info -We recently introduced a new configuration format, `config.yaml`, to replace `config.json`. See the `config.yaml` reference and migration guide [here](./reference.md). -::: - -Below are details for each property that can be set in `config.json`. The config schema code is found in [`extensions/vscode/config_schema.json`](https://github.com/continuedev/continue/blob/main/extensions/vscode/config_schema.json). - -**All properties at all levels are optional unless explicitly marked required** - -### `models` - -Your **chat** models are defined here, which are used for [Chat](./chat/how-to-use-it.md), [Edit](./edit/how-to-use-it.md) and [VS Code actions](./advanced/deep-dives/vscode-actions.md). - -Each model has specific configuration options tailored to its provider and functionality, which can be seen as suggestions while editing the json. - -**Properties:** - -- `title` (**required**): The title to assign to your model, shown in dropdowns, etc. -- `provider` (**required**): The provider of the model, which determines the type and interaction method. Options inclued `openai`, `ollama`, `xAI`, etc., see IntelliJ suggestions. -- `model` (**required**): The name of the model, used for prompt template auto-detection. Use `AUTODETECT` special name to get all available models. -- `apiKey`: API key required by providers like OpenAI, Anthropic, Cohere, and xAI. -- `apiBase`: The base URL of the LLM API. -- `contextLength`: Maximum context length of the model, typically in tokens (default: 2048). -- `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists. -- `template`: Chat template to format messages. Auto-detected for most models but can be overridden. See intelliJ suggestions. -- `promptTemplates`: A mapping of prompt template names (e.g., `edit`) to template strings. [Customization Guide](https://docs.continue.dev/model-setup/configuration#customizing-the-edit-prompt). -- `completionOptions`: Model-specific completion options, same format as top-level [`completionOptions`](#completionoptions), which they override. -- `systemMessage`: A system message that will precede responses from the LLM. -- `requestOptions`: Model-specific HTTP request options, same format as top-level [`requestOptions`](#requestoptions), which they override. -- `apiType`: Specifies the type of API (`openai` or `azure`). -- `apiVersion`: Azure API version (e.g., `2023-07-01-preview`). -- `engine`: Engine for Azure OpenAI requests. -- `capabilities`: Override auto-detected capabilities: - - `uploadImage`: Boolean indicating if the model supports image uploads. - - `tools`: Boolean indicating if the model supports tool use. - -_(AWS Only)_ - -- `profile`: AWS security profile for authorization. -- `modelArn`: AWS ARN for imported models (e.g., for `bedrockimport` provider). -- `region`: Region where the model is hosted (e.g., `us-east-1`, `eu-central-1`). - -Example: - -```json title="config.json" -{ - "models": [ - { - "title": "Ollama", - "provider": "ollama", - "model": "AUTODETECT" - }, - { - "model": "gpt-4o", - "contextLength": 128000, - "title": "GPT-4o", - "provider": "openai", - "apiKey": "YOUR_API_KEY" - } - ] -} -``` - -### `tabAutocompleteModel` - -Specifies the model or models for tab autocompletion, defaulting to an Ollama instance. This property uses the same format as `models`. Can be an array of models or an object for one model. - -Example - -```json title="config.json" -{ - "tabAutocompleteModel": { - "title": "My Starcoder", - "provider": "ollama", - "model": "starcoder2:3b" - } -} -``` - -### `tabAutocompleteOptions` - -Specifies options for tab autocompletion behavior. - -**Properties:** - -- `disable`: If `true`, disables tab autocomplete (default: `false`). -- `maxPromptTokens`: Maximum number of tokens for the prompt (default: `1024`). -- `debounceDelay`: Delay (in ms) before triggering autocomplete (default: `350`). -- `maxSuffixPercentage`: Maximum percentage of prompt for suffix (default: `0.2`). -- `prefixPercentage`: Percentage of input for prefix (default: `0.3`). -- `template`: Template string for autocomplete, using Mustache templating. You can use the `{{{ prefix }}}`, `{{{ suffix }}}`, `{{{ filename }}}`, `{{{ reponame }}}`, and `{{{ language }}}` variables. -- `onlyMyCode`: If `true`, only includes code within the repository (default: `true`). - -Example - -```json title="config.json" -{ - "tabAutocompleteOptions": { - "debounceDelay": 500, - "maxPromptTokens": 1500, - "disableInFiles": ["*.md"] - } -} -``` - -### `embeddingsProvider` - -Embeddings model settings - the model used for @Codebase and @docs. - -**Properties:** - -- `provider` (**required**): Specifies the embeddings provider, with options including `transformers.js`, `ollama`, `openai`, `cohere`, `gemini`, etc -- `model`: Model name for embeddings. -- `apiKey`: API key for the provider. -- `apiBase`: Base URL for API requests. -- `requestOptions`: Additional HTTP request settings specific to the embeddings provider. -- `maxEmbeddingChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens. -- `maxEmbeddingBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk. - -(AWS ONLY) - -- `region`: Specifies the region hosting the model. -- `profile`: AWS security profile. - -Example: - -```json title="config.json" -{ - "embeddingsProvider": { - "provider": "openai", - "model": "text-embedding-ada-002", - "apiKey": "", - "maxEmbeddingChunkSize": 256, - "maxEmbeddingBatchSize": 5 - } -} -``` - -### `completionOptions` - -Parameters that control the behavior of text generation and completion settings. Top-level `completionOptions` apply to all models, _unless overridden at the model level_. - -**Properties:** - -- `stream`: Whether to stream the LLM response. Currently only respected by the `anthropic` and `ollama` providers; other providers will always stream (default: `true`). -- `temperature`: Controls the randomness of the completion. Higher values result in more diverse outputs. -- `topP`: The cumulative probability for nucleus sampling. Lower values limit responses to tokens within the top probability mass. -- `topK`: The maximum number of tokens considered at each step. Limits the generated text to tokens within this probability. -- `presencePenalty`: Discourages the model from generating tokens that have already appeared in the output. -- `frequencyPenalty`: Penalizes tokens based on their frequency in the text, reducing repetition. -- `mirostat`: Enables Mirostat sampling, which controls the perplexity during text generation. Supported by Ollama, LM Studio, and llama.cpp providers (default: `0`, where `0` = disabled, `1` = Mirostat, and `2` = Mirostat 2.0). -- `stop`: An array of stop tokens that, when encountered, will terminate the completion. Allows specifying multiple end conditions. -- `maxTokens`: The maximum number of tokens to generate in a completion (default: `2048`). -- `numThreads`: The number of threads used during the generation process. Available only for Ollama as `num_thread`. -- `keepAlive`: For Ollama, this parameter sets the number of seconds to keep the model loaded after the last request, unloading it from memory if inactive (default: `1800` seconds, or 30 minutes). -- `numGpu`: For Ollama, this parameter overrides the number of gpu layers that will be used to load the model into VRAM. -- `useMmap`: For Ollama, this parameter allows the model to be mapped into memory. If disabled can enhance response time on low end devices but will slow down the stream. -- `reasoning`: Enables thinking/reasoning for Anthropic Claude 3.7+ models. -- `reasoningBudgetTokens`: Sets budget tokens for thinking/reasoning in Anthropic Claude 3.7+ models. - -Example - -```json title="config.json" -{ - "completionOptions": { - "stream": false, - "temperature": 0.5 - } -} -``` - -### `requestOptions` - -Default HTTP request options that apply to all models and context providers, unless overridden at the model level. - -**Properties:** - -- `timeout`: Timeout for each request to the LLM (default: 7200 seconds). -- `verifySsl`: Whether to verify SSL certificates for requests. -- `caBundlePath`: Path to a custom CA bundle for HTTP requests - path to `.pem` file (or array of paths) -- `proxy`: Proxy URL to use for HTTP requests. -- `headers`: Custom headers for HTTP requests. -- `extraBodyProperties`: Additional properties to merge with the HTTP request body. -- `noProxy`: List of hostnames that should bypass the specified proxy. -- `clientCertificate`: Client certificate for HTTP requests. - - - `cert`: Path to the client certificate file. - - `key`: Path to the client certificate key file. - - `passphrase`: Optional passphrase for the client certificate key file. - -Example - -```json title="config.json" -{ - "requestOptions": { - "headers": { - "X-Auth-Token": "xxx" - } - } -} -``` - -### `reranker` - -Configuration for the reranker model used in response ranking. - -**Properties:** - -- `name` (**required**): Reranker name, e.g., `cohere`, `voyage`, `llm`, `huggingface-tei`, `bedrock` -- `params`: - - `model`: Model name - - `apiKey`: Api key - - `region`: Region (for Bedrock only) - -Example - -```json title="config.json" -{ - "reranker": { - "name": "voyage", - "params": { - "model": "rerank-2", - "apiKey": "" - } - } -} -``` - -### `docs` - -List of documentation sites to index. - -**Properties:** - -- `title` (**required**): Title of the documentation site, displayed in dropdowns, etc. -- `startUrl` (**required**): Start page for crawling - usually root or intro page for docs - -- `maxDepth`: Maximum link depth for crawling. Default `4` -- `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`). -- `useLocalCrawling`: Skip the default crawler and only crawl using a local crawler. - -Example - -```json title="config.json" -"docs": [ - { - "title": "Continue", - "startUrl": "https://docs.continue.dev/intro", - "faviconUrl": "https://docs.continue.dev/favicon.ico", - } -] -``` - -### `slashCommands` - -Custom commands initiated by typing "/" in the sidebar. Commands include predefined functionality or may be user-defined. - -**Properties:** - -- `name`: The command name. Options include "issue", "share", "cmd", "http", "commit", and "review". -- `description`: Brief description of the command. -- `step`: (Deprecated) Used for built-in commands; set the name for pre-configured options. -- `params`: Additional parameters to configure command behavior (command-specific - see code for command) - -The following commands are built-in and can be added to `config.json` to make them visible: - -#### `/share` - -Generate a shareable markdown transcript of your current chat history. - -```json title="config.json" -{ - "slashCommands": [ - { - "name": "share", - "description": "Export the current chat session to markdown", - "params": { "outputDir": "~/.continue/session-transcripts" } - } - ] -} -``` - -Use the `outputDir` parameter to specify where you want to the markdown file to be saved. - -#### `/cmd` - -Generate a shell command from natural language and (only in VS Code) automatically paste it into the terminal. - -```json title="config.json" -{ - "slashCommands": [ - { - "name": "cmd", - "description": "Generate a shell command" - } - ] -} -``` - -#### `/commit` - -Shows the LLM your current git diff and asks it to generate a commit message. - -```json title="config.json" -{ - "slashCommands": [ - { - "name": "commit", - "description": "Generate a commit message for the current changes" - } - ] -} -``` - -#### `/http` - -Write a custom slash command at your own HTTP endpoint. Set 'url' in the params object for the endpoint you have setup. The endpoint should return a sequence of string updates, which will be streamed to the Continue sidebar. See our basic [FastAPI example](https://github.com/continuedev/continue/blob/74002369a5e435735b83278fb965e004ae38a97d/core/context/providers/context_provider_server.py#L34-L45) for reference. - -```json title="config.json" -{ - "slashCommands": [ - { - "name": "http", - "description": "Does something custom", - "params": { "url": "" } - } - ] -} -``` - -#### `/issue` - -Describe the issue you'd like to generate, and Continue will turn into a well-formatted title and body, then give you a link to the draft so you can submit. Make sure to set the URL of the repository you want to generate issues for. - -```json title="config.json" -{ - "slashCommands": [ - { - "name": "issue", - "description": "Generate a link to a drafted GitHub issue", - "params": { "repositoryUrl": "https://github.com/continuedev/continue" } - } - ] -} -``` - -#### `/onboard` - -The onboard slash command helps to familiarize yourself with a new project by analyzing the project structure, READMEs, and dependency files. It identifies key folders, explains their purpose, and highlights popular packages used. Additionally, it offers insights into the project's architecture. - -```json title="config.json" -{ - "slashCommands": [ - { - "name": "onboard", - "description": "Familiarize yourself with the codebase" - } - ] -} -``` - -Example: - -```json title="config.json" -{ - "slashCommands": [ - { - "name": "commit", - "description": "Generate a commit message" - }, - { - "name": "share", - "description": "Export this session as markdown" - }, - { - "name": "cmd", - "description": "Generate a shell command" - } - ] -} -``` - -### `customCommands` - -User-defined commands for prompt shortcuts in the sidebar, allowing quick access to common actions. - -**Properties:** - -- `name`: The name of the custom command. -- `prompt`: Text prompt for the command. -- `description`: Brief description explaining the command's function. - -Example: - -```json title="config.json" -{ - "customCommands": [ - { - "name": "test", - "prompt": "Write a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.", - "description": "Write unit tests for highlighted code" - } - ] -} -``` - -### `contextProviders` - -List of the pre-defined context providers that will show up as options while typing in the chat, and their customization with `params`. - -**Properties:** - -- `name`: Name of the context provider, e.g. `docs` or `web` -- `params`: A context-provider-specific record of params to configure the context behavior - -Example - -```json title="config.json" -{ - "contextProviders": [ - { - "name": "code", - "params": {} - }, - { - "name": "docs", - "params": {} - }, - { - "name": "diff", - "params": {} - }, - { - "name": "open", - "params": {} - } - ] -} -``` - -### `userToken` - -An optional token that identifies the user, primarily for authenticated services. - -### `systemMessage` - -Defines a system message that appears before every response from the language model, providing guidance or context. - -### `experimental` - -Several experimental config parameters are available, as described below: - -`experimental`: - -- `defaultContext`: Defines the default context for the LLM. Uses the same format as `contextProviders` but includes an additional `query` property to specify custom query parameters.= -- `modelRoles`: - - `inlineEdit`: Model title for inline edits. - - `applyCodeBlock`: Model title for applying code blocks. - - `repoMapFileSelection`: Model title for repo map selections. -- `quickActions`: Array of custom quick actions - - `title` (**required**): Display title for the quick action. - - `prompt` (**required**): Prompt for quick action. - - `sendToChat`: If `true`, sends result to chat; else inserts in document. Default is `false`. -- `contextMenuPrompts`: - - `comment`: Prompt for commenting code. - - `docstring`: Prompt for adding docstrings. - - `fix`: Prompt for fixing code. - - `optimize`: Prompt for optimizing code. -- `modelContextProtocolServers`: See [Model Context Protocol](/advanced/context-integration/custom-providers#model-context-protocol) - -Example - -```json title="config.json" -{ - "experimental": { - "modelRoles": { - "inlineEdit": "Edit Model" - }, - "quickActions": [ - { - "title": "Tags", - "prompt": "Return a list of any function and class names from the included code block", - "sendToChat": true - } - ], - "contextMenuPrompts": { - "fixGrammar": "Fix grammar in the above but allow for typos." - }, - "modelContextProtocolServers": [ - { - "transport": { - "type": "stdio", - "command": "uvx", - "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] - } - } - ] - } -} -``` - -### Fully deprecated settings - -Some deprecated `config.json` settings are no longer stored in config and have been moved to be editable through the [User Settings Page](./advanced/deep-dives/settings.md). If found in `config.json`, they will be auto-migrated to User Settings and removed from `config.json`. - -- `allowAnonymousTelemetry`: This value will be migrated to the safest merged value (`false` if either are `false`). -- `promptPath`: This value will override during migration. -- `disableIndexing`: This value will be migrated to the safest merged value (`true` if either are `true`). -- `disableSessionTitles`/`ui.getChatTitles`: This value will be migrated to the safest merged value (`true` if either are `true`). `getChatTitles` takes precedence if set to false -- `tabAutocompleteOptions` - - `useCache`: This value will override during migration. - - `disableInFiles`: This value will be migrated to the safest merged value (arrays of file matches merged/deduplicated) - - `multilineCompletions`: This value will override during migration. -- `experimental` - - `useChromiumForDocsCrawling`: This value will override during migration. - - `readResponseTTS`: This value will override during migration. -- `ui` - all will override during migration - - - `codeBlockToolbarPosition` - - `fontSize` - - `codeWrap` - - `displayRawMarkdown` - - `showChatScrollbar` - - See [User Settings Page](./advanced/deep-dives/settings.md) for more information about each option. diff --git a/docs/docs/reference.md b/docs/docs/reference.md deleted file mode 100644 index 05b42fe86..000000000 --- a/docs/docs/reference.md +++ /dev/null @@ -1,556 +0,0 @@ ---- -title: Config YAML Reference -description: Reference for the Continue configuration YAML file -keywords: [config, yaml, configuration, customize, customization] ---- - -# config.yaml Reference - -## Introduction - -Continue hub assistants are defined using the `config.yaml` specification. Assistants can be loaded -from [the Hub](https://hub.continue.dev/explore/assistants) or locally - -- [Continue Hub](https://hub.continue.dev/explore/assistants) - YAML is stored on the hub and automatically synced to - the extension -- Locally - - in your global `.continue` folder (`~/.continue` on Mac, `%USERPROFILE%\.continue`) within `.continue/assistants`. - The name of the file will be used as the display name of the assistant, e.g. `My Assistant.yaml` - - in your workspace in a `/.continue/assistants` folder, with the same naming convention - -:::info -Config YAML replaces [`config.json`](./json-reference.md), which is deprecated. View the **[Migration Guide](./yaml-migration.md)**. -::: - -An assistant is made up of: - -1. **Top level properties**, which specify the `name`, `version`, and `config.yaml` `schema` for the assistant -2. **Block lists**, which are composable arrays of coding assistant building blocks available to the assistant, such as - models, docs, and context providers. - -A block is a single standalone building block of a coding assistants, e.g., one model or one documentation source. In -`config.yaml` syntax, a block consists of the same top-level properties as assistants (`name`, `version`, and `schema`), -but only has **ONE** item under whichever block type it is. - -Examples of blocks and assistants can be found on the [Continue hub](https://hub.continue.dev/explore/assistants). - -Assistants can either explicitly define blocks - see [Properties](#properties) below - or import and configure existing -hub blocks. - -### Using Blocks - -Hub blocks and assistants are identified with a slug in the format `owner-slug/block-or-assistant-slug`, where an owner -can be a user or organization (For example, if you want to use -the [OpenAI 4o Model block](https://hub.continue.dev/openai/gpt-4o), your slug would be `openai/gpt-4o`). These blocks -are pulled from [https://hub.continue.dev](https://hub.continue.dev). - -Blocks can be imported into an assistant by adding a `uses` clause under the block type. This can be alongside other -`uses` clauses or explicit blocks of that type. - -For example, the following assistant imports an Anthropic model and defines an Ollama DeepSeek one. - -```yaml title="Assistant models section" -models: - - uses: anthropic/claude-3.5-sonnet # an imported model block - - model: deepseek-reasoner # an explicit model block - provider: ollama -``` - -### Local Blocks - -It is also possible to define blocks locally in a `.continue` folder. This folder can be located at either the root of -your workspace (these will automatically be applied to all assistants when you are in that workspace) or in your home -directory at `~/.continue` (these will automatically be applied globally). - -Place your YAML files in the following folders: - -Assistants: - -- `.continue/assistants` - for assistants - -Blocks: - -- `.continue/rules` - for rules -- `.continue/models` - for models -- `.continue/prompts` - for prompts -- `.continue/context` - for context providers -- `.continue/docs` - for docs -- `.continue/data` - for data -- `.continue/mcpServers` - for MCP Servers - -You can find many examples of each of these block types on -the [Continue Explore Page](https://hub.continue.dev/explore/models) - -:::info -Local blocks utilizing mustache notation for secrets (`${{ secrets.SECRET_NAME }}`) can read secret values: - -- globally, from a `.env` located in the global `.continue` folder (`~/.continue/.env`) -- per-workspace, from a `.env` file located at the root of the current workspace. - ::: - -### Inputs - -Blocks can be passed user inputs, including hub secrets and raw text values. To create a block that has an input, use -mustache templating as follows: - -```yaml title="Block config.yaml" -name: myprofile/custom-model -models: - - name: My Favorite Model - provider: anthropic - apiKey: ${{ inputs.ANTHROPIC_API_KEY }} - defaultCompletionOptions: - temperature: ${{ inputs.TEMP }} -``` - -Which can then be imported like - -```yaml title="Assistant config.yaml" -name: myprofile/custom-assistant -models: - - uses: myprofile/custom-model - with: - ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }} - TEMP: 0.9 -``` - -Note that hub secrets can be passed as inputs, using a similar mustache format: `secrets.SECRET_NAME`. - -### Overrides - -Block properties can be also be directly overriden using `override`. For example: - -```yaml title="Assistant config.yaml" -name: myprofile/custom-assistant -models: - - uses: myprofile/custom-model - with: - ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }} - TEMP: 0.9 - override: - roles: - - chat -``` - -## Properties - -Below are details for each property that can be set in `config.yaml`. - -**All properties at all levels are optional unless explicitly marked as required.** - -The top-level properties in the `config.yaml` configuration file are: - -- [`name`](#name) (**required**) -- [`version`](#version) (**required**) -- [`schema`](#schema) (**required**) -- [`models`](#models) -- [`context`](#context) -- [`rules`](#rules) -- [`prompts`](#prompts) -- [`docs`](#docs) -- [`mcpServers`](#mcpservers) -- [`data`](#data) - ---- - -### `name` - -The `name` property specifies the name of your project or configuration. - -```yaml title="config.yaml" -name: MyProject -``` - ---- - -### `version` - -The `version` property specifies the version of your project or configuration. - -### `schema` - -The `schema` property specifies the schema version used for the `config.yaml`, e.g. `v1` - ---- - -### `models` - -The `models` section defines the language models used in your configuration. Models are used for functionalities such as -chat, editing, and summarizing. - -**Properties:** - -- `name` (**required**): A unique name to identify the model within your configuration. -- `provider` (**required**): The provider of the model (e.g., `openai`, `ollama`). -- `model` (**required**): The specific model name (e.g., `gpt-4`, `starcoder`). -- `apiBase`: Can be used to override the default API base that is specified per model -- `roles`: An array specifying the roles this model can fulfill, such as `chat`, `autocomplete`, `embed`, `rerank`, - `edit`, `apply`, `summarize`. The default value is `[chat, edit, apply, summarize]`. Note that the `summarize` role is - not currently used. -- `capabilities`: Array of strings denoting model capabilities, which will overwrite Continue's autodetection based on - provider and model. Supported capabilities include `tool_use` and `image_input`. -- `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists. -- `promptTemplates`: Can be used to override the default prompt templates for different model roles. Valid values are - `chat`, [`edit`](./advanced/model-roles/edit.mdx#prompt-templating), [ - `apply`](./advanced/model-roles/apply.mdx#prompt-templating) and [ - `autocomplete`](./advanced/model-roles/autocomplete.md#prompt-templating). The `chat` property must be a - valid template name, such as `llama3` or `anthropic`. -- `chatOptions`: If the model includes role `chat`, these settings apply for Chat and Agent mode: - - `baseSystemMessage`: Can be used to override the default system prompt for **Chat** mode. - -- `embedOptions`: If the model includes role `embed`, these settings apply for embeddings: - - `maxChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens. - - `maxBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk. -- `defaultCompletionOptions`: Default completion options for model settings. - - `contextLength`: Maximum context length of the model, typically in tokens. - - `maxTokens`: Maximum number of tokens to generate in a completion. - - `temperature`: Controls the randomness of the completion. Values range from `0.0` (deterministic) to `1.0` (random). - - `topP`: The cumulative probability for nucleus sampling. - - `topK`: Maximum number of tokens considered at each step. - - `stop`: An array of stop tokens that will terminate the completion. - - `reasoning`: Boolean to enable thinking/reasoning for Anthropic Claude 3.7+ models. - - `reasoningBudgetTokens`: Budget tokens for thinking/reasoning in Anthropic Claude 3.7+ models. -- `requestOptions`: HTTP request options specific to the model. - - `timeout`: Timeout for each request to the language model. - - `verifySsl`: Whether to verify SSL certificates for requests. - - `caBundlePath`: Path to a custom CA bundle for HTTP requests. - - `proxy`: Proxy URL for HTTP requests. - - `headers`: Custom headers for HTTP requests. - - `extraBodyProperties`: Additional properties to merge with the HTTP request body. - - `noProxy`: List of hostnames that should bypass the specified proxy. - - `clientCertificate`: Client certificate for HTTP requests. - - `cert`: Path to the client certificate file. - - `key`: Path to the client certificate key file. - - `passphrase`: Optional passphrase for the client certificate key file. - -#### Example - -```yaml title="config.yaml" -models: - - name: GPT-4o - provider: openai - model: gpt-4o - roles: - - chat - - edit - - apply - defaultCompletionOptions: - temperature: 0.7 - maxTokens: 1500 - - - name: Codestral - provider: mistral - model: codestral-latest - roles: - - autocomplete - - - name: My Model - OpenAI-Compatible - provider: openai - apiBase: http://my-endpoint/v1 - model: my-custom-model - capabilities: - - tool_use - - image_input - roles: - - chat - - edit -``` - ---- - -### `context` - -The `context` section defines context providers, which supply additional information or context to the language models. -Each context provider can be configured with specific parameters. - -More information about usage/params for each context provider can be found [here](/advanced/context-integration/custom-providers) - -**Properties:** - -- `provider` (**required**): The identifier or name of the context provider (e.g., `code`, `docs`, `web`) -- `name`: Optional name for the provider -- `params`: Optional parameters to configure the context provider's behavior. - -**Example:** - -```yaml title="config.yaml" -context: - - provider: file - - provider: code - - provider: codebase - params: - nFinal: 10 - - provider: docs - - provider: diff - - provider: http - name: Context Server 1 - params: - url: "https://api.example.com/server1" - - provider: folder - - provider: terminal -``` - ---- - -### `rules` - -List of rules that the LLM should follow. These are concatenated into the system message for -all [Chat](./chat/how-to-use-it.md), [Edit](./edit/how-to-use-it.md), and [Agent](./agent/how-to-use-it.md) requests. -See the [rules deep dive](./advanced/deep-dives/rules.mdx) for details. - -Explicit rules can either be simple text or an object with the following properties: - -- `name` (**required**): A display name/title for the rule -- `rule` (**required**): The text content of the rule -- `globs` (optional): When files are provided as context that match this glob pattern, the rule will be included. This - can be either a single pattern (e.g., `"**/*.{ts,tsx}"`) or an array of patterns (e.g., - `["src/**/*.ts", "tests/**/*.ts"]`). - -```yaml title="config.yaml" -rules: - - Always annotate Python functions with their parameter and return types - - - name: TypeScript best practices - rule: Always use TypeScript interfaces to define shape of objects. Use type aliases sparingly. - globs: "**/*.{ts,tsx}" - - - name: TypeScript test patterns - rule: In TypeScript tests, use Jest's describe/it pattern and follow best practices for mocking. - globs: - - "src/**/*.test.ts" - - "tests/**/*.ts" - - - uses: myprofile/my-mood-setter - with: - TONE: concise -``` - ---- - -### `prompts` - -A list of custom prompts that can be invoked from the chat window. Each prompt has a name, description, and the actual -prompt text. - -```yaml title="config.yaml" -prompts: - - name: check - description: Check for mistakes in my code - prompt: | - Please read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant: - - Syntax errors - - Logic errors - - Security vulnerabilities -``` - ---- - -### `docs` - -List of documentation sites to index. - -**Properties:** - -- `name` (**required**): Name of the documentation site, displayed in dropdowns, etc. -- `startUrl` (**required**): Start page for crawling - usually root or intro page for docs - - - -- `maxDepth`: Maximum link depth for crawling. Default `4` -- `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`). -- `useLocalCrawling`: Skip the default crawler and only crawl using a local crawler. - -Example - -```yaml title="config.yaml" -docs: - - name: Continue - startUrl: https://docs.continue.dev/intro - favicon: https://docs.continue.dev/favicon.ico -``` - ---- - -### `mcpServers` - - - -The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify -prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. - -**Properties:** - -- `name` (**required**): The name of the MCP server. -- `command` (**required**): The command used to start the server. -- `args`: An optional array of arguments for the command. -- `env`: An optional map of environment variables for the server process. -- `connectionTimeout`: An optional connection timeout number to the server in milliseconds. - -**Example:** - -```yaml title="config.yaml" -mcpServers: - - name: My MCP Server - command: uvx - args: - - mcp-server-sqlite - - --db-path - - /Users/NAME/test.db -``` - -### `data` - -Destinations to which [development data](./advanced/deep-dives/development-data.md) will be sent. - -**Properties:** - -- `name` (**required**): The display name of the data destination -- `destination` (**required**): The destination/endpoint that will receive the data. Can be: - - an HTTP endpoint that will receive a POST request with a JSON blob - - a file URL to a directory in which events will be dumpted to `.jsonl` files -- `schema` (**required**): the schema version of the JSON blobs to be sent. Options include `0.1.0` and `0.2.0` -- `events`: an array of event names to include. Defaults to all events if not specified. -- `level`: a pre-defined filter for event fields. Options include `all` and `noCode`; the latter excludes data like file - contents, prompts, and completions. Defaults to `all` -- `apiKey`: api key to be sent with request (Bearer header) -- `requestOptions`: Options for event POST requests. Same format as [model requestOptions](#models). - - **Example:** - -```yaml title="config.yaml" -data: - - name: Local Data Bank - destination: file:///Users/dallin/Documents/code/continuedev/continue-extras/external-data - schema: 0.2.0 - level: all - - name: My Private Company - destination: https://mycompany.com/ingest - schema: 0.2.0 - level: noCode - events: - - autocomplete - - chatInteraction -``` - ---- - -## Complete YAML Config Example - -Putting it all together, here's a complete example of a `config.yaml` configuration file: - -```yaml title="config.yaml" -name: MyProject -version: 0.0.1 -schema: v1 - -models: - - uses: anthropic/claude-3.5-sonnet - with: - ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} - override: - defaultCompletionOptions: - temperature: 0.8 - - name: GPT-4 - provider: openai - model: gpt-4 - roles: - - chat - - edit - defaultCompletionOptions: - temperature: 0.5 - maxTokens: 2000 - requestOptions: - headers: - Authorization: Bearer YOUR_OPENAI_API_KEY - - - name: Ollama Starcoder - provider: ollama - model: starcoder - roles: - - autocomplete - defaultCompletionOptions: - temperature: 0.3 - stop: - - "\n" - -rules: - - Give concise responses - - Always assume TypeScript rather than JavaScript - -prompts: - - name: test - description: Unit test a function - prompt: | - Please write a complete suite of unit tests for this function. You should use the Jest testing framework. The tests should cover all possible edge cases and should be as thorough as possible. You should also include a description of each test case. - - uses: myprofile/my-favorite-prompt - -context: - - provider: diff - - provider: file - - provider: codebase - - provider: code - - provider: docs - params: - startUrl: https://docs.example.com/introduction - rootUrl: https://docs.example.com - maxDepth: 3 - -mcpServers: - - name: DevServer - command: npm - args: - - run - - dev - env: - PORT: "3000" - -data: - - name: My Private Company - destination: https://mycompany.com/ingest - schema: 0.2.0 - level: noCode - events: - - autocomplete - - chatInteraction -``` - -## Using YAML anchors to avoid config duplication - -You can also use node anchors to avoid duplication of properties. To do so, -adding the YAML version header `%YAML 1.1` is needed, here's an example of -a `config.yaml` configuration file using anchors: - -```yaml title="config.yaml" -%YAML 1.1 ---- -name: MyProject -version: 0.0.1 -schema: v1 - -model_defaults: &model_defaults - provider: openai - apiKey: my-api-key - apiBase: https://api.example.com/llm - -models: - - name: mistral - <<: *model_defaults - model: mistral-7b-instruct - roles: - - chat - - edit - - - name: qwen2.5-coder-7b-instruct - <<: *model_defaults - model: qwen2.5-coder-7b-instruct - roles: - - chat - - edit - - - name: qwen2.5-coder-7b - <<: *model_defaults - model: qwen2.5-coder-7b - useLegacyCompletionsEndpoint: false - roles: - - autocomplete -``` diff --git a/docs/docs/telemetry.md b/docs/docs/telemetry.md deleted file mode 100644 index 1b54cf6cf..000000000 --- a/docs/docs/telemetry.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: Telemetry -description: Learn how Continue collects anonymous usage information and how you can opt out. -keywords: [telemetry, anonymous, usage info, opt out] ---- - -## Overview - -The open-source Continue Extensions collect and report **anonymous** usage information to help us improve our product. This data enables us to understand user interactions and optimize the user experience effectively. You can opt out of telemetry collection at any time if you prefer not to share your usage information. - -We utilize [Posthog](https://posthog.com/), an open-source platform for product analytics, to gather and store this data. For transparency, you can review the implementation code [here](https://github.com/continuedev/continue/blob/main/gui/src/hooks/CustomPostHogProvider.tsx) or read our [official privacy policy](https://continue.dev/privacy). - -## Tracking Policy - -All data collected by the open-source Continue extensions is anonymized and stripped of personally identifiable information (PII) before being sent to PostHog. We are committed to maintaining the privacy and security of your data. - -## What We Track - -The following usage information is collected and reported: - -- **Suggestion Interactions:** Whether you accept or reject suggestions (excluding the actual code or prompts involved). -- **Model and Command Information:** The name of the model and command used. -- **Token Metrics:** The number of tokens generated. -- **System Information:** The name of your operating system (OS) and integrated development environment (IDE). -- **Pageviews:** General pageview statistics. - -## How to Opt Out - -You can disable anonymous telemetry by visiting the [User Settings Page](./advanced/deep-dives/settings.md) and toggling "Allow Anonymous Telemetry" off. - -Alternatively in VS Code, you can disable telemetry through your VS Code settings by unchecking the "Continue: Telemetry Enabled" box (this will override the Settings Page settings). VS Code settings can be accessed with `File` > `Preferences` > `Settings` (or use the keyboard shortcut ctrl + , on Windows/Linux or cmd + , on macOS). diff --git a/docs/docs/troubleshooting.mdx b/docs/docs/troubleshooting.mdx deleted file mode 100644 index cc8f90592..000000000 --- a/docs/docs/troubleshooting.mdx +++ /dev/null @@ -1,173 +0,0 @@ ---- -title: Troubleshooting -description: Troubleshooting while waiting for help during beta / alpha testing -keywords: [reload, delete, manually, logs, server, console] ---- - -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; - -1. [Check the logs](#check-the-logs) -2. [Try the latest pre-release](#download-the-latest-pre-release) -3. [Download an older version](#download-an-older-version) -4. [Resolve keyboard shortcut issues](#keyboard-shortcuts-not-resolving) -5. [Check FAQs for common issues](#faqs) - -## Check the logs - -To solve many problems, the first step is reading the logs to find the relevant error message. To do this, follow these steps: - -### VS Code - -#### Console logs - -:::info -In order to view debug logs, which contain extra information, click the dropdown at the top that says "Default levels" and select "Verbose". -::: - -1. cmd + shift + P for MacOS or ctrl + - shift - + P for Windows -2. Search for and then select "Developer: Toggle Developer Tools" -3. This will open the [Chrome DevTools window](https://developer.chrome.com/docs/devtools/) -4. Select the `Console` tab -5. Read the console logs - -#### Prompt Logs (Continue Console) - -To view prompt logs/analytics, you can enable the Continue Console. - -1. Open VS Code settings (cmd/ctrl + ,) -2. Search for the setting "Continue: Enable Console" and enable it -3. Reload the window -4. Open the Continue Console by using the command palette (cmd/ctrl + shift + P) and searching for "Continue: Focus on Continue Console View" - -![Continue Console](../static/img/continue-console.png) - -### JetBrains - -Open `~/.continue/logs/core.log` to view the logs for the Continue plugin. The most recent logs are found at the bottom of the file. - -Some JetBrains-related logs may also be found by clicking "Help" > "Show Log in Explorer/Finder". - -## Download the latest pre-release - -### VS Code - -We are constantly making fixes and improvements to Continue, but the latest changes remain in a "pre-release" version for roughly a week so that we can test their stability. If you are experiencing issues, you can try the pre-release by going to the Continue extension page in VS Code and selecting "Switch to Pre-Release" as shown below. - -![Pre-Release](../static/img/prerelease.png) - -### JetBrains - -On JetBrains, the "pre-release" happens through their Early Access Program (EAP) channel. To download the latest EAP version, enable the EAP channel: - -1. Open JetBrains settings (cmd/ctrl + ,) and go to "Plugins" -2. Click the gear icon at the top -3. Select "Manage Plugin Repositories..." -4. Add "[https://plugins.jetbrains.com/plugins/eap/list](https://plugins.jetbrains.com/plugins/eap/list)" to the list -5. You'll now always be able to download the latest EAP version from the marketplace - -## Download an Older Version - -If you've tried everything, reported an error, know that a previous version was working for you, and are waiting to hear back, you can try downloading an older version of the extension. - -For VS Code, All versions are hosted on the Open VSX Registry [here](https://open-vsx.org/extension/Continue/continue). Once you've downloaded the extension, which will be a .vsix file, you can install it manually by following the instructions [here](https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix). - -You can find older versions of the JetBrains extension on their [marketplace](https://plugins.jetbrains.com/plugin/22707-continue), which will walk you through installing from disk. - -## Keyboard shortcuts not resolving - -If your keyboard shortcuts are not resolving, you may have other commands that are taking precedence over the Continue shortcuts. You can see if this is the case, and change your shortcut mappings, in the configuration of your IDE. - -- [VSCode keyboard shortcuts docs](https://code.visualstudio.com/docs/getstarted/keybindings) -- [IntelliJ keyboard shortcut docs](https://www.jetbrains.com/help/idea/configuring-keyboard-and-mouse-shortcuts.html) - -## FAQs - -### Networking Issues - -#### Configure Certificates - -If you're seeing a `fetch failed` error and your network requires custom certificates, you will need to configure them in your config file. In each of the objects in the `"models"` array, add `requestOptions.caBundlePath` like this: - - - - ```yaml title="config.yaml" - models: - - name: My Model - ... - requestOptions: - caBundlePath: /path/to/cert.pem - ``` - - - ```json title="config.json" - { - "models": [ - { - "title": "My Model", - ... - "requestOptions": { - "caBundlePath": "/path/to/cert.pem" - } - } - ], - } - ``` - - - -You may also set `requestOptions.caBundlePath` to an array of paths to multiple certificates. - -**_Windows VS Code Users_**: Installing the [win-ca](https://marketplace.visualstudio.com/items?itemName=ukoloff.win-ca) extension should also correct this issue. - -#### VS Code Proxy Settings - -If you are using VS Code and require requests to be made through a proxy, you are likely already set up through VS Code's [Proxy Server Support](https://code.visualstudio.com/docs/setup/network#_proxy-server-support). To double-check that this is enabled, use cmd/ctrl + , to open settings and search for "Proxy Support". Unless it is set to "off", then VS Code is responsible for making the request to the proxy. - -#### code-server - -Continue can be used in [code-server](https://coder.com/), but if you are running across an error in the logs that includes "This is likely because the editor is not running in a secure context", please see [their documentation on securely exposing code-server](https://coder.com/docs/code-server/latest/guide#expose-code-server). - -### I installed Continue, but don't see the sidebar window - -By default the Continue window is on the left side of VS Code, but it can be dragged to right side as well, which we recommend in our tutorial. In the situation where you have previously installed Continue and moved it to the right side, it may still be there. You can reveal Continue either by using cmd/ctrl+L or by clicking the button in the top right of VS Code to open the right sidebar. - -### I'm getting a 404 error from OpenAI - -If you have entered a valid API key and model, but are still getting a 404 error from OpenAI, this may be because you need to add credits to your billing account. You can do so from the [billing console](https://platform.openai.com/settings/organization/billing/overview). If you just want to check that this is in fact the cause of the error, you can try adding $1 to your account and checking whether the error persists. - -### I'm getting a 404 error from OpenRouter - -If you have entered a valid API key and model, but are still getting a 404 error from OpenRouter, this may be because models that do not support function calling will return an error to Continue when a request is sent. -Example error: -`HTTP 404 Not Found from https://openrouter.ai/api/v1/chat/completions` - -### Indexing issues - -If you are having persistent errors with indexing, our recommendation is to rebuild your index from scratch. Note that for large codebases this may take some time. - -This can be accomplished using the following command: `Continue: Rebuild codebase index`. - -### Android Studio - "Nothing to show" in Chat - -This can be fixed by selecting `Actions > Choose Boot runtime for the IDE` then selecting the latest version, and then restarting Android Studio. [See this thread](https://github.com/continuedev/continue/issues/596#issuecomment-1789327178) for details. - -### I received a "Codebase indexing disabled - Your Linux system lacks required CPU features (AVX2, FMA)" notification - -We use LanceDB as our vector database for codebase search features. On x64 Linux systems, LanceDB requires specific CPU features (FMA and AVX2) which may not be available on older processors. - -Most Continue features will work normally, including autocomplete and chat. However, commands that rely on codebase indexing, such as `@codebase`, `@files`, and `@folder`, will be disabled. - -For more details about this requirement, see the [LanceDB issue #2195](https://github.com/lancedb/lance/issues/2195). - -### How do I reset the state of the extension? - -Continue stores it's data in the `~/.continue` directory (%USERPROFILE%\.continue` on Windows). - -If you'd like to perform a clean reset of the extension, including removing all configuration files, indices, etc, you can remove this directory, uninstall, and then reinstall. - -## Still having trouble? - -You can also join our Discord community [here](https://discord.gg/vapESyrFmJ) for additional support and discussions. Alternatively, you can create a GitHub issue [here](https://github.com/continuedev/continue/issues/new?assignees=&labels=bug&projects=&template=bug-report-%F0%9F%90%9B.md&title=), providing details of your problem, and we'll be able to help you out more quickly. diff --git a/docs/docs/yaml-migration.md b/docs/docs/yaml-migration.md deleted file mode 100644 index 54a8b7d0d..000000000 --- a/docs/docs/yaml-migration.md +++ /dev/null @@ -1,358 +0,0 @@ ---- -title: Config Migration to YAML -description: Reference for migrating from JSON to YAML Continue configuration. -keywords: [config, yaml, configuration, customize, customization, migration] ---- - -# Migrating Config to YAML - -Continue's YAML configuration format provides more readable, maintainable, consistent configuration files, as well as new configuration options and removal of some old configuration options. YAML is the preferred format and will be used to integrate with future Continue products. Below is a brief guide for migration from `config.json` to `config.yaml`. - -See also - -- [Intro to YAML](https://yaml.org/) -- [JSON Continue Config Reference](/json-reference) -- [YAML Continue Config Reference](/reference) - -## Create YAML file - -Create a `config.yaml` file in your Continue Global Directory (`~/.continue` on Mac, `%USERPROFILE%\.continue`) alongside your current `config.json` file. If a `config.yaml` file is present, it will be loaded instead of `config.json`. - -Give your configuration a `name` and a `version`: - -```yaml title="config.yaml" -name: my-configuration -version: 0.0.1 -schema: v1 -``` - -### Models - -Add all model configurations in `config.json`, including models in `models`, `tabAutocompleteModel`, `embeddingsProvider`, and `reranker`, to the `models` section of your new YAML config file. A new `roles` YAML field specifies which roles a model can be used for, with possible values `chat`, `autocomplete`, `embed`, `rerank`, `edit`, `apply`, `summarize`. - -- `models` in config should have `roles: [chat]` -- `tabAutocompleteModel`(s) in config should have `roles: [autocomplete]` -- `embeddingsProvider` in config should have `roles: [embed]` -- `reranker` in config should have `roles: [rerank]` -- `experimental.modelRoles` is replaced by simply adding roles to the model - - `inlineEdit` -> e.g. `roles: [chat, edit]` - - `applyCodeBlock` -> e.g. `roles: [chat, apply]` - -Model-level `requestOptions` remain, with minor changes. See [YAML Continue Config Reference](./reference.md#models) - -Model-level `completionOptions` are replaced by `defaultCompletionOptions`, with minor changes. See [YAML Continue Config Reference](./reference.md#models) - - - -**Before** - -```json title="config.json"" -{ - "models": [ - { - "title": "GPT-4", - "provider": "openai", - "model": "gpt-4", - "apiKey": "", - "completionOptions": { - "temperature": 0.5, - "maxTokens": 2000 - } - }, - { - "title": "Ollama", - "provider": "ollama", - "model": "AUTODETECT" - }, - { - "title": "My Open AI Compatible Model", - "provider": "openai", - "apiBase": "http://3.3.3.3/v1", - "model": "my-openai-compatible-model", - "requestOptions": { - "headers": { "X-Auth-Token": "" } - } - } - ], - "tabAutocompleteModel": { - "title": "My Starcoder", - "provider": "ollama", - "model": "starcoder2:3b" - }, - "embeddingsProvider": { - "provider": "openai", - "model": "text-embedding-ada-002", - "apiKey": "", - "maxEmbeddingChunkSize": 256, - "maxEmbeddingBatchSize": 5 - }, - "reranker": { - "name": "voyage", - "params": { - "model": "rerank-2", - "apiKey": "" - } - } -} -``` - -**After** - -```yaml title="config.yaml" -models: - - name: GPT-4 - provider: openai - model: gpt-4 - apiKey: - defaultCompletionOptions: - temperature: 0.5 - maxTokens: 2000 - roles: - - chat - - edit - - - name: My Voyage Reranker - provider: voyage - apiKey: - roles: - - rerank - - - name: My Starcoder - provider: ollama - model: starcoder2:3b - roles: - - autocomplete - - - name: My Ada Embedder - provider: openai - apiKey: - roles: - - embed - embedOptions: - - maxChunkSize: 256 - - maxBatchSize: 5 - - - name: Ollama Autodetect - provider: ollama - model: AUTODETECT - - - name: My Open AI Compatible Model - Apply - provider: openai - model: my-openai-compatible-model - apiBase: http://3.3.3.3/v1 - requestOptions: - headers: - X-Auth-Token: - roles: - - chat - - apply -``` - -Note that the `repoMapFileSelection` experimental model role has been deprecated and is only available in `config.json`. - -### Context Providers - -The JSON `contextProviders` field is replaced by the YAML `context` array. - -- JSON `name` maps to `provider` -- JSON `params` map to `params` - -**Before** - -```json title="config.json"" -{ - "contextProviders": [ - { - "name": "docs" - }, - { - "name": "codebase", - "params": { - "nRetrieve": 30, - "nFinal": 3 - } - }, - { - "name": "diff", - "params": {} - } - ] -} -``` - -**After** - -```yaml title="config.yaml" -context: - - provider: docs - - - provider: codebase - params: - nRetrieve: 30 - nFinal: 3 - - - provider: diff -``` - -### System Message - -The `systemMessage` property has been replaced with a `rules` property that takes an array of strings. - -**Before** - -```json title="config.json"" -{ - "systemMessage": "Always give concise responses" -} -``` - -**After** - -```yaml title="config.yaml" -rules: - - Always give concise responses -``` - -### Prompts - -Rather than with `customCommands`, you can now use the `prompts` field to define custom prompts. - -**Before** - -```json title="config.json"" -{ - "customCommands": [ - { - "name": "check", - "description": "Check for mistakes in my code", - "prompt": "{{{ input }}}\n\nPlease read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:\n- Syntax errors\n- Logic errors\n- Security vulnerabilities\n- Performance issues\n- Anything else that looks wrong\n\nOnce you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found." - } - ] -} -``` - -**After** - -```yaml title="config.yaml" -prompts: - - name: check - description: Check for mistakes in my code - prompt: | - Please read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant: - - Syntax errors - - Logic errors - - Security vulnerabilities - - Performance issues - - Anything else that looks wrong - - Once you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found. -``` - -### Documentation - -Documentation is largely the same, but the `title` property has been replaced with `name`. The `startUrl`, `rootUrl`, and `faviconUrl` properties remain. - -**Before** - -```json title="config.json"" -{ - "docs": [ - { - "startUrl": "https://docs.nestjs.com/", - "title": "nest.js" - }, - { - "startUrl": "https://mysite.com/docs/", - "title": "My site" - } - ] -} -``` - -**After** - -```yaml title="config.yaml" -docs: - - name: nest.js - startUrl: https://docs.nestjs.com/ - - - name: My site - startUrl: https://mysite.com/docs/ -``` - -### MCP Servers - -**Properties:** - -- `name` (**required**): The name of the MCP server. -- `command` (**required**): The command used to start the server. -- `args`: An optional array of arguments for the command. -- `env`: An optional map of environment variables for the server process. - -**Before** - -```json title="config.json"" -{ - "experimental": { - "modelContextProtocolServers": [ - { - "transport": { - "type": "stdio", - "command": "uvx", - "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"], - "env": { - "KEY": "" - } - } - } - ] - } -} -``` - -**After** - -```yaml title="config.yaml" -mcpServers: - - name: My MCP Server - command: uvx - args: - - mcp-server-sqlite - - --db-path - - /Users/NAME/test.db - env: - KEY: -``` - ---- - -## Deprecated configuration options - -Some deprecated `config.json` settings are no longer stored in config and have been moved to be editable through the [User Settings Page](./advanced/deep-dives/settings.md) (Gear Icon). If found in `config.json`, they will be auto-migrated to User Settings and removed from `config.json`. - -See the [JSON Config Reference](./json-reference#fully-deprecated-settings) for more information on fully deprecated options. - -The following top-level fields from `config.json` still work when using `config.json` but have been deprecated and don't have a YAML equivalent: - -- Slash commands (JSON `slashCommands`) -- top-level `requestOptions` -- top-level `completionOptions` -- `tabAutocompleteOptions` - - `disable` - - `maxPromptTokens` - - `debounceDelay` - - `maxSuffixPercentage` - - `prefixPercentage` - - `template` - - `onlyMyCode` -- `analytics` - -The following top-level fields from `config.json` have been deprecated. Most UI-related and user-specific options will move into a settings page in the UI - -- `customCommands` -- `experimental` -- `userToken` - -## New Configuration options - -The YAML configuration format offers new configuration options not available in the JSON format. See the [YAML Config Reference](./reference) for more information. diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 7dba155d5..1a9dd27cc 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -113,11 +113,9 @@ const config = { href: "/", }, { - type: "docSidebar", - sidebarId: "guidesSidebar", - position: "left", + to: "/guides/", label: "Guides", - href: "/guides", + position: "left", }, { to: "https://hub.continue.dev", @@ -249,11 +247,11 @@ const config = { from: "/hub/blocks", }, { - to: "/customize/overview", + to: "/customization/overview", from: ["/customize", "/customization"], }, { - to: "/customize/deep-dives/mcp", + to: "/customization/blocks/mcp-tools", from: "/customize/tools", }, { @@ -261,27 +259,27 @@ const config = { from: ["/install/vscode", "/install/jetbrains"], }, { - to: "/customize/deep-dives/settings", + to: "/advanced/deep-dives/settings", from: "/customize/settings", }, { - to: "/customize/model-roles", + to: "/advanced/model-roles/intro", from: ["/customize/model-types", "/setup/overview"], }, { - to: "/customize/model-roles/embeddings", + to: "/advanced/model-roles/embeddings", from: "/customize/model-types/embeddings", }, { - to: "/customize/model-roles/autocomplete", + to: "/advanced/model-roles/autocomplete", from: "/customize/model-types/autocomplete", }, { - to: "/customize/model-roles/chat", + to: "/advanced/model-roles/chat", from: "/customize/model-types/chat", }, { - to: "/customize/model-roles/reranking", + to: "/advanced/model-roles/reranking", from: "/customize/model-types/reranking", }, { @@ -295,30 +293,30 @@ const config = { ], }, { - to: "/customize/model-providers", + to: "/advanced/model-providers/anthropic", from: ["/setup/select-provider", "/setup/model-providers"], }, { - to: "/customize/deep-dives/codebase", + to: "/advanced/deep-dives/codebase", from: [ "/walkthroughs/codebase-embeddings", "/features/codebase-embeddings", ], }, { - to: "/customize/deep-dives/autocomplete", + to: "/advanced/deep-dives/autocomplete", from: [ "/walkthroughs/tab-autocomplete", "/features/tab-autocomplete", ], }, { - to: "/customize/deep-dives/prompts", + to: "/advanced/deep-dives/prompts", from: ["/walkthroughs/prompt-files", "/features/prompt-files"], }, // TODO - actions redirects { - to: "/customize/deep-dives/slash-commands", + to: "/advanced/deep-dives/slash-commands", from: [ "/actions/how-to-use-it", "/actions/how-to-customize", @@ -332,15 +330,15 @@ const config = { }, { - to: "/customize/deep-dives/vscode-actions", + to: "/advanced/deep-dives/vscode-actions", from: ["/walkthroughs/quick-actions"], }, { - to: "/customize/changelog", + to: "/advanced/reference", from: "/changelog", }, { - to: "/reference", + to: "/advanced/reference", from: [ "/customization/code-config", "/reference/config", @@ -348,176 +346,160 @@ const config = { ], }, { - to: "/customize/context-providers", + to: "/advanced/context-integration/custom-providers", from: ["/customization/context-providers"], }, { - to: "/customize/deep-dives/development-data", + to: "/advanced/deep-dives/development-data", from: ["/development-data", "/customize/development-data"], }, { - to: "/customize/deep-dives/docs", + to: "/advanced/context-integration/documentation", from: "/features/talk-to-your-docs", }, { - to: "/customize/model-providers/anthropic", + to: "/advanced/model-providers/anthropic", from: "/reference/Model Providers/anthropicllm", }, { - to: "/customize/model-providers/azure", + to: "/advanced/model-providers/azure", from: "/reference/Model Providers/azure", }, { - to: "/customize/model-providers/bedrock", + to: "/advanced/model-providers/bedrock", from: "/reference/Model Providers/bedrock", }, { - to: "/customize/model-providers/deepseek", + to: "/advanced/model-providers/deepseek", from: "/reference/Model Providers/deepseek", }, { - to: "/customize/model-providers", + to: "/advanced/model-providers/anthropic", from: "/reference/Model Providers/freetrial", }, { - to: "/customize/model-providers/gemini", + to: "/advanced/model-providers/gemini", from: "/reference/Model Providers/geminiapi", }, { - to: "/customize/model-providers/mistral", + to: "/advanced/model-providers/mistral", from: "/reference/Model Providers/mistral", }, { - to: "/customize/model-providers/ollama", + to: "/advanced/model-providers/ollama", from: "/reference/Model Providers/ollama", }, { - to: "/customize/model-providers/openai", + to: "/advanced/model-providers/openai", from: "/reference/Model Providers/openai", }, - { - to: "/customize/tutorials/custom-code-rag", - from: "/walkthroughs/custom-code-rag", - }, - { - to: "/customize/tutorials/llama3.1", - from: "/walkthroughs/llama3.1", - }, - { - to: "/customize/tutorials/running-continue-without-internet", - from: "/walkthroughs/running-continue-without-internet", - }, - { - to: "/customize/tutorials/set-up-codestral", - from: "/walkthroughs/set-up-codestral", - }, { to: "/", from: "/intro", }, { - to: "/customize/model-providers/more/cloudflare", + to: "/advanced/model-providers/more/cloudflare", from: "/reference/Model Providers/cloudflare", }, { - to: "/customize/model-providers/more/cohere", + to: "/advanced/model-providers/more/cohere", from: "/reference/Model Providers/cohere", }, { - to: "/customize/model-providers/more/deepinfra", + to: "/advanced/model-providers/more/deepinfra", from: "/reference/Model Providers/deepinfra", }, { - to: "/customize/model-providers/more/flowise", + to: "/advanced/model-providers/more/flowise", from: "/reference/Model Providers/flowise", }, { - to: "/customize/model-providers/more/huggingfaceinferenceapi", + to: "/advanced/model-providers/more/huggingfaceinferenceapi", from: "/reference/Model Providers/huggingfaceinferenceapi", }, { - to: "/customize/model-providers/more/ipex_llm", + to: "/advanced/model-providers/more/ipex_llm", from: "/reference/Model Providers/ipex_llm", }, { - to: "/customize/model-providers/more/kindo", + to: "/advanced/model-providers/more/kindo", from: "/reference/Model Providers/kindo", }, { - to: "/customize/model-providers/more/llamacpp", + to: "/advanced/model-providers/more/llamacpp", from: "/reference/Model Providers/llamacpp", }, { - to: "/customize/model-providers/more/llamafile", + to: "/advanced/model-providers/more/llamafile", from: "/reference/Model Providers/llamafile", }, { - to: "/customize/model-providers/more/lmstudio", + to: "/advanced/model-providers/more/lmstudio", from: "/reference/Model Providers/lmstudio", }, { - to: "/customize/model-providers/more/msty", + to: "/advanced/model-providers/more/msty", from: "/reference/Model Providers/msty", }, { - to: "/customize/model-providers/more/openrouter", + to: "/advanced/model-providers/more/openrouter", from: "/reference/Model Providers/openrouter", }, { - to: "/customize/model-providers/more/replicatellm", + to: "/advanced/model-providers/more/replicatellm", from: "/reference/Model Providers/replicatellm", }, { - to: "/customize/model-providers/more/sagemaker", + to: "/advanced/model-providers/more/sagemaker", from: "/reference/Model Providers/sagemaker", }, { - to: "/customize/model-providers/more/textgenwebui", + to: "/advanced/model-providers/more/textgenwebui", from: "/reference/Model Providers/textgenwebui", }, { - to: "/customize/model-providers/more/together", + to: "/advanced/model-providers/more/together", from: "/reference/Model Providers/together", }, { - to: "/customize/model-providers/more/novita", + to: "/advanced/model-providers/more/novita", from: "/reference/Model Providers/novita", }, { - to: "/customize/model-providers/more/vllm", + to: "/advanced/model-providers/more/vllm", from: "/reference/Model Providers/vllm", }, { - to: "/customize/model-providers/more/watsonx", + to: "/advanced/model-providers/more/watsonx", from: "/reference/Model Providers/watsonx", }, { - to: "/customize/model-providers/more/nebius", + to: "/advanced/model-providers/more/nebius", from: "/reference/Model Providers/nebius", }, // Sidebar items that should route directly to a subpage { - to: "/chat/how-to-use-it", - from: "/chat", + to: "/features/chat/quick-start", + from: ["/chat", "/chat/how-to-use-it"], }, { - to: "/agent/how-to-use-it", - from: "/agent", + to: "/features/agent/quick-start", + from: ["/agent", "/agent/how-to-use-it"], }, { - to: "/edit/how-to-use-it", - from: "/edit", + to: "/features/edit/quick-start", + from: ["/edit", "/edit/how-to-use-it"], }, { - to: "/autocomplete/how-to-use-it", - from: "/autocomplete", + to: "/features/autocomplete/quick-start", + from: ["/autocomplete", "/autocomplete/how-to-use-it"], }, { to: "/getting-started/install", from: "/getting-started", }, { - to: "/customize/deep-dives/prompts", + to: "/advanced/deep-dives/prompts", from: "/customize/deep-dives/prompt-files", }, ], diff --git a/docs/guides/_category_.json b/docs/guides/_category_.json new file mode 100644 index 000000000..9c3cb9bac --- /dev/null +++ b/docs/guides/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "Guides", + "position": 1, + "link": { + "type": "generated-index", + "title": "Guides", + "description": "Learn how to use Continue with comprehensive guides and tutorials" + } +} \ No newline at end of file diff --git a/docs/docs/advanced/tutorials/assets/image.png b/docs/guides/assets/image.png similarity index 100% rename from docs/docs/advanced/tutorials/assets/image.png rename to docs/guides/assets/image.png diff --git a/docs/guides/best-practices.mdx b/docs/guides/best-practices.mdx new file mode 100644 index 000000000..d12917bd9 --- /dev/null +++ b/docs/guides/best-practices.mdx @@ -0,0 +1,134 @@ +--- +title: Best Practices for AI-Assisted Development +description: Learn how to get the most out of Continue with proven techniques and workflows +--- + +# Best Practices for AI-Assisted Development + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Master the art of AI-assisted development with these proven best practices. + +## Writing Effective Prompts + +### Be Specific and Clear + +Sed do eiusmod tempor incididunt: + +**Good prompt:** +"Create a Python function that validates email addresses using regex and returns True if valid" + +**Less effective:** +"Make an email function" + +### Provide Context + +Ut enim ad minim veniam: + +- Include relevant code snippets +- Mention frameworks and libraries +- Specify constraints or requirements +- Share example inputs/outputs + +## Code Generation Tips + +### Start Small + +Duis aute irure dolor in reprehenderit: + +1. Generate one function at a time +2. Test incrementally +3. Build complexity gradually +4. Refactor with AI assistance + +### Review and Verify + +Excepteur sint occaecat cupidatat: + +- Always review generated code +- Test edge cases +- Check for security issues +- Validate performance + +## Workflow Integration + +### Daily Development + +Lorem ipsum dolor sit amet: + +**Morning Routine:** +1. Review yesterday's code with AI +2. Plan today's tasks +3. Generate boilerplate early + +**During Development:** +- Use autocomplete for routine code +- Chat for problem-solving +- Edit for refactoring + +**End of Day:** +- Generate documentation +- Create commit messages +- Review code quality + +## Common Patterns + +### Debugging with AI + +Sed do eiusmod tempor: + +1. Copy error message +2. Include relevant code context +3. Ask for explanation and fix +4. Understand the solution + +### Learning New Technologies + +Ut enim ad minim veniam: + +- Start with simple examples +- Ask for explanations +- Request best practices +- Build incrementally + +## Avoiding Pitfalls + +### Don't Rely Blindly + +Duis aute irure dolor: + +- Understand generated code +- Verify logic and algorithms +- Check for outdated patterns +- Maintain code ownership + +### Security Considerations + +Excepteur sint occaecat: + +- Never share sensitive data +- Review authentication code +- Check for SQL injection +- Validate input handling + +## Advanced Techniques + +### Custom Instructions + +Lorem ipsum dolor sit amet: + +- Create reusable prompts +- Define coding standards +- Set project conventions +- Build prompt templates + +### Context Management + +Sed do eiusmod: + +- Use @Codebase effectively +- Reference documentation +- Include test cases +- Maintain conversation focus + +--- + +*Remember: AI is a tool to enhance, not replace, your development skills* \ No newline at end of file diff --git a/docs/docs/advanced/tutorials/build-your-own-context-provider.mdx b/docs/guides/build-your-own-context-provider.mdx similarity index 100% rename from docs/docs/advanced/tutorials/build-your-own-context-provider.mdx rename to docs/guides/build-your-own-context-provider.mdx diff --git a/docs/docs/advanced/tutorials/custom-code-rag.mdx b/docs/guides/custom-code-rag.mdx similarity index 98% rename from docs/docs/advanced/tutorials/custom-code-rag.mdx rename to docs/guides/custom-code-rag.mdx index 145c38f10..bb2c42ef3 100644 --- a/docs/docs/advanced/tutorials/custom-code-rag.mdx +++ b/docs/guides/custom-code-rag.mdx @@ -1,3 +1,8 @@ +--- +title: Custom Code RAG +description: Build your own vector database and custom retrieval-augmented generation system +--- + import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; diff --git a/docs/guides/development/_category_.json b/docs/guides/development/_category_.json new file mode 100644 index 000000000..e8397bfac --- /dev/null +++ b/docs/guides/development/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "Development Setup", + "position": 2, + "link": { + "type": "generated-index", + "title": "Development Setup Guides", + "description": "Set up Continue in your development environment" + } +} \ No newline at end of file diff --git a/docs/guides/development/jetbrains-setup.mdx b/docs/guides/development/jetbrains-setup.mdx new file mode 100644 index 000000000..2ed6cdc2b --- /dev/null +++ b/docs/guides/development/jetbrains-setup.mdx @@ -0,0 +1,67 @@ +--- +title: Setting up Continue with JetBrains +description: Complete guide to installing and configuring Continue in JetBrains IDEs +--- + +# Setting up Continue with JetBrains + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. This guide covers the complete setup process for Continue in JetBrains IDEs including IntelliJ IDEA, PyCharm, WebStorm, and more. + +## Prerequisites + +Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua: + +- JetBrains IDE (2022.3 or newer) +- Java Runtime Environment +- Active internet connection + +## Installation Steps + +### Step 1: Install from Marketplace + +Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris: + +1. Open Settings/Preferences (`Cmd/Ctrl + ,`) +2. Navigate to Plugins +3. Search for "Continue" +4. Click Install and restart IDE + +### Step 2: Initial Configuration + +Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore: + +- Configure API keys +- Select default models +- Set up keyboard shortcuts + +## Features in JetBrains + +### Code Completion + +Excepteur sint occaecat cupidatat non proident: + +- Smart completion based on context +- Multi-line suggestions +- Language-aware completions + +### Chat Interface + +Lorem ipsum dolor sit amet: + +- Docked tool window +- Floating window option +- Keyboard navigation + +## Troubleshooting + +### Common Issues + +Sed do eiusmod tempor incididunt: + +1. **Plugin not loading**: Check IDE version compatibility +2. **Connection issues**: Verify firewall settings +3. **Performance**: Adjust memory settings + +--- + +*Compatible with JetBrains IDEs 2022.3 and newer* \ No newline at end of file diff --git a/docs/guides/getting-started.mdx b/docs/guides/getting-started.mdx new file mode 100644 index 000000000..f44620d29 --- /dev/null +++ b/docs/guides/getting-started.mdx @@ -0,0 +1,100 @@ +--- +title: Getting Started with Continue +description: Your first steps with Continue - from installation to your first AI-assisted code +--- + +# Getting Started with Continue + +Welcome to Continue! This guide will walk you through your first steps with AI-assisted development. + +## Quick Start Checklist + +Before we begin, make sure you have: + +- [ ] VS Code or JetBrains IDE installed +- [ ] An active internet connection +- [ ] 5 minutes to set up Continue + +## Step 1: Installation + +Choose your IDE and follow the installation steps: + +### VS Code +1. Open VS Code +2. Go to Extensions (Cmd/Ctrl + Shift + X) +3. Search for "Continue" +4. Click Install + +### JetBrains +1. Open your JetBrains IDE +2. Go to Settings → Plugins +3. Search for "Continue" +4. Click Install and restart + +## Step 2: First Run + +After installation: + +1. Look for the Continue icon in your IDE +2. Click to open the Continue panel +3. Sign in to Continue Hub +4. Select your first assistant + +## Step 3: Your First AI Interaction + +Try these beginner-friendly commands: + +### Ask a Question +Type in the chat: "How do I create a function in Python?" + +### Generate Code +1. Create a new file +2. Type a comment: `// Function to calculate fibonacci` +3. Press Tab to see Continue's suggestion + +### Explain Code +1. Select any code in your editor +2. Press Cmd/Ctrl + L (VS Code) or Cmd/Ctrl + J (JetBrains) +3. Ask: "What does this code do?" + +## Step 4: Explore Features + +### Chat +- Ask questions about your code +- Get explanations of errors +- Request code improvements + +### Autocomplete +- Start typing and see suggestions +- Press Tab to accept +- Use arrow keys to navigate options + +### Edit +- Select code to modify +- Describe the changes you want +- Review and apply suggestions + +## Next Steps + +Now that you're set up: + +1. **Explore Assistants**: Try different AI models +2. **Customize Settings**: Adjust to your preferences +3. **Learn Shortcuts**: Master keyboard commands +4. **Join Community**: Get help and share tips + +## Pro Tips + +- **Be Specific**: The more context you provide, the better the suggestions +- **Iterate**: Don't hesitate to ask follow-up questions +- **Experiment**: Try different approaches to find what works best + +## Getting Help + +- Check our [troubleshooting guide](/advanced/troubleshooting) +- Join our [Discord community](https://discord.gg/continue) +- Browse [featured assistants](/hub/featured-assistants) + +--- + +Welcome to the future of coding with Continue! 🚀 \ No newline at end of file diff --git a/docs/docs/advanced/tutorials/how-to-self-host-a-model.mdx b/docs/guides/how-to-self-host-a-model.mdx similarity index 100% rename from docs/docs/advanced/tutorials/how-to-self-host-a-model.mdx rename to docs/guides/how-to-self-host-a-model.mdx diff --git a/docs/guides/index.mdx b/docs/guides/index.mdx new file mode 100644 index 000000000..96e0e7f2c --- /dev/null +++ b/docs/guides/index.mdx @@ -0,0 +1,56 @@ +--- +title: Continue Guides +description: Comprehensive guides and tutorials for using Continue effectively +slug: / +--- + +# Continue Guides + +Welcome to the Continue Guides! These comprehensive tutorials and how-to articles will help you get the most out of Continue's AI-powered development features. + +## What You'll Find Here + +### 🚀 Getting Started +- [Getting Started with Continue](./getting-started) - Your first steps with AI-assisted development +- [Best Practices](./best-practices) - Proven techniques for effective AI coding + +### 💻 Development Setup +- [VS Code Setup](./development/vscode-setup) - Complete VS Code configuration guide +- [JetBrains Setup](./development/jetbrains-setup) - Set up Continue in JetBrains IDEs + +### 🔧 Model & Setup Guides +- [Using Ollama with Continue](./ollama-guide) - Local AI development with Ollama +- [Setting up Codestral](./set-up-codestral) - Configure Mistral's Codestral model +- [How to Self-Host a Model](./how-to-self-host-a-model) - Self-hosting AI models +- [Running Continue Without Internet](./running-continue-without-internet) - Offline development setup +- [Llama 3.1 Setup](./llama3.1) - Getting started with Llama 3.1 + +### 📚 Language-Specific Guides +- [Python Development](./languages/python-guide) - Python-specific workflows and tips +- [JavaScript/TypeScript](./languages/javascript-guide) - Modern JS/TS development + +### 🔗 Integration Guides +- [Git Workflow Integration](./integration/git-workflow) - Enhance your Git workflow with AI + +### 🛠️ Advanced Tutorials +- [Build Your Own Context Provider](./build-your-own-context-provider) - Create custom context providers +- [Custom Code RAG](./custom-code-rag) - Implement custom retrieval-augmented generation + +## How to Use These Guides + +Each guide is designed to be: +- **Practical**: Real-world examples and use cases +- **Progressive**: Start simple, build complexity +- **Comprehensive**: Cover common scenarios and edge cases + +## Contributing + +Have a guide idea or found an issue? We welcome contributions! Check our [GitHub repository](https://github.com/continuedev/continue) to get involved. + +## Stay Updated + +These guides are regularly updated with new features and best practices. Bookmark this page and check back often! + +--- + +*Choose a guide above to get started with Continue!* \ No newline at end of file diff --git a/docs/guides/integration/_category_.json b/docs/guides/integration/_category_.json new file mode 100644 index 000000000..dade4e9e1 --- /dev/null +++ b/docs/guides/integration/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "Integration Guides", + "position": 4, + "link": { + "type": "generated-index", + "title": "Integration Guides", + "description": "Integrate Continue with your tools and workflows" + } +} \ No newline at end of file diff --git a/docs/guides/integration/git-workflow.mdx b/docs/guides/integration/git-workflow.mdx new file mode 100644 index 000000000..343d6e885 --- /dev/null +++ b/docs/guides/integration/git-workflow.mdx @@ -0,0 +1,87 @@ +--- +title: Git Workflow Integration +description: Integrate Continue into your Git workflow for better commit messages and code reviews +--- + +# Git Workflow Integration + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Enhance your Git workflow with Continue's AI assistance for commits, reviews, and branch management. + +## Commit Message Generation + +Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua: + +### Automatic Commit Messages +- Analyze staged changes +- Generate conventional commits +- Include scope and breaking changes +- Multi-language support + +### Usage Example +```bash +# Stage your changes +git add . + +# Use Continue to generate commit message +# Based on the diff and changes +``` + +## Code Review Assistance + +Ut enim ad minim veniam, quis nostrud exercitation: + +### Pull Request Reviews +- Summarize changes +- Identify potential issues +- Suggest improvements +- Generate review comments + +### Pre-commit Checks +- Code style validation +- Security scanning +- Performance analysis +- Test coverage + +## Branch Management + +Duis aute irure dolor in reprehenderit: + +### Smart Branching +1. Generate branch names from issues +2. Create feature branch templates +3. Merge conflict resolution +4. Rebase assistance + +## Integration Setup + +### Git Hooks + +Excepteur sint occaecat cupidatat: + +```bash +# .git/hooks/prepare-commit-msg +#!/bin/sh +# Continue can help generate commit messages +``` + +### CI/CD Pipeline + +Lorem ipsum dolor sit amet: + +- GitHub Actions integration +- GitLab CI templates +- Jenkins pipelines +- Azure DevOps + +## Best Practices + +Sed do eiusmod tempor: + +1. Use conventional commit format +2. Review AI suggestions before committing +3. Maintain consistent branch naming +4. Integrate with existing workflows + +--- + +*Works with Git 2.30+ and all major Git platforms* \ No newline at end of file diff --git a/docs/guides/languages/_category_.json b/docs/guides/languages/_category_.json new file mode 100644 index 000000000..eaed995d5 --- /dev/null +++ b/docs/guides/languages/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "Language Guides", + "position": 3, + "link": { + "type": "generated-index", + "title": "Language-Specific Guides", + "description": "Learn how to use Continue with different programming languages" + } +} \ No newline at end of file diff --git a/docs/guides/languages/javascript-guide.mdx b/docs/guides/languages/javascript-guide.mdx new file mode 100644 index 000000000..761a435a8 --- /dev/null +++ b/docs/guides/languages/javascript-guide.mdx @@ -0,0 +1,75 @@ +--- +title: JavaScript/TypeScript Development with Continue +description: Best practices and workflows for JavaScript and TypeScript development using Continue +--- + +# JavaScript/TypeScript Development with Continue + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Master JavaScript and TypeScript development with Continue's AI-powered assistance. + +## JavaScript Features + +Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua: + +### Modern JavaScript +- ES6+ syntax support +- Async/await patterns +- Destructuring and spread operators +- Module imports/exports + +### Framework Support +- React components and hooks +- Vue.js composition API +- Angular services and components +- Node.js backend development + +## TypeScript Integration + +Ut enim ad minim veniam, quis nostrud exercitation: + +### Type Assistance +- Interface generation +- Type inference improvements +- Generic type suggestions +- Union and intersection types + +### Configuration +```typescript +// Example: Generate types from usage +function processData(data) { + // Continue can infer and generate types +} +``` + +## Common Workflows + +### React Development + +Duis aute irure dolor in reprehenderit: + +```jsx +// Generate React components +// Continue helps with hooks and state management +``` + +### API Development + +Excepteur sint occaecat cupidatat: + +- Express.js routes +- GraphQL schemas +- REST API endpoints +- Validation middleware + +## Best Practices + +Lorem ipsum dolor sit amet: + +1. Use ESLint integration +2. Enable TypeScript strict mode +3. Leverage JSDoc comments +4. Test-driven development + +--- + +*Optimized for ES2022+ and TypeScript 5.0+* \ No newline at end of file diff --git a/docs/docs/advanced/tutorials/llama3.1.mdx b/docs/guides/llama3.1.mdx similarity index 100% rename from docs/docs/advanced/tutorials/llama3.1.mdx rename to docs/guides/llama3.1.mdx diff --git a/docs/guides/overview.mdx b/docs/guides/overview.mdx deleted file mode 100644 index 9769d6ac9..000000000 --- a/docs/guides/overview.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: Guides Overview -description: Comprehensive guides for using Continue with different tools and workflows -slug: / ---- - -# Continue Guides - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris. - -## Getting Started Guides - -### Development Environment Setup -- [Using Ollama with Continue: A Developer's Guide](./ollama-guide) -- [Setting up Continue with VS Code](./vscode-setup) -- [JetBrains Integration Guide](./jetbrains-setup) - -## Advanced Workflows - -### AI-Powered Development -- [Code Review with Continue](./code-review) -- [Debugging with AI Assistance](./debugging-guide) -- [Test Generation Strategies](./test-generation) - -### Integration Guides -- [CI/CD Pipeline Integration](./cicd-integration) -- [Team Collaboration Best Practices](./team-collaboration) -- [Custom Context Provider Development](./custom-providers) - -## Language-Specific Guides - -### Popular Languages -- [Python Development with Continue](./python-guide) -- [JavaScript/TypeScript Best Practices](./javascript-guide) -- [Go Development Workflow](./go-guide) -- [Rust Programming with Continue](./rust-guide) - -## Use Case Examples - -### Real-World Applications -- [Building a REST API](./rest-api-example) -- [Frontend Component Development](./frontend-components) -- [Database Schema Design](./database-design) -- [API Documentation Generation](./api-docs) - ---- - -*All guides are regularly updated to reflect the latest Continue features and best practices.* \ No newline at end of file diff --git a/docs/docs/advanced/tutorials/running-continue-without-internet.md b/docs/guides/running-continue-without-internet.mdx similarity index 100% rename from docs/docs/advanced/tutorials/running-continue-without-internet.md rename to docs/guides/running-continue-without-internet.mdx diff --git a/docs/docs/advanced/tutorials/set-up-codestral.mdx b/docs/guides/set-up-codestral.mdx similarity index 96% rename from docs/docs/advanced/tutorials/set-up-codestral.mdx rename to docs/guides/set-up-codestral.mdx index e613acb5c..66abc2725 100644 --- a/docs/docs/advanced/tutorials/set-up-codestral.mdx +++ b/docs/guides/set-up-codestral.mdx @@ -7,7 +7,7 @@ keywords: [codestral, mistral, model setup] import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; -![mistral x continue](../../../static/img/mistral-x-continue.png) +![mistral x continue](/img/mistral-x-continue.png) **Here is a step-by-step guide on how to set up Codestral with Continue using the Mistral AI API:** diff --git a/docs/netlify.toml b/docs/netlify.toml index 4a27060d5..7c6302f7d 100644 --- a/docs/netlify.toml +++ b/docs/netlify.toml @@ -1,297 +1,33 @@ -# Netlify Redirects for Documentation Restructuring +# Simple redirects for documentation restructuring -# Core Features Redirects - -## Chat +# Core feature redirects [[redirects]] from = "/chat/how-to-use-it" to = "/features/chat/quick-start" status = 301 -[[redirects]] - from = "/chat/how-it-works" - to = "/features/chat/how-it-works" - status = 301 - -[[redirects]] - from = "/chat/how-to-customize" - to = "/customization/chat" - status = 301 - -[[redirects]] - from = "/chat/context-selection" - to = "/advanced/context-integration/chat-context" - status = 301 - -[[redirects]] - from = "/chat/model-setup" - to = "/customization/models" - status = 301 - -## Autocomplete [[redirects]] from = "/autocomplete/how-to-use-it" to = "/features/autocomplete/quick-start" status = 301 -[[redirects]] - from = "/autocomplete/how-it-works" - to = "/features/autocomplete/how-it-works" - status = 301 - -[[redirects]] - from = "/autocomplete/how-to-customize" - to = "/customization/autocomplete" - status = 301 - -[[redirects]] - from = "/autocomplete/context-selection" - to = "/advanced/context-integration/autocomplete-context" - status = 301 - -[[redirects]] - from = "/autocomplete/model-setup" - to = "/customization/models" - status = 301 - -## Edit [[redirects]] from = "/edit/how-to-use-it" to = "/features/edit/quick-start" status = 301 -[[redirects]] - from = "/edit/how-it-works" - to = "/features/edit/how-it-works" - status = 301 - -[[redirects]] - from = "/edit/how-to-customize" - to = "/customization/edit" - status = 301 - -[[redirects]] - from = "/edit/context-selection" - to = "/advanced/context-integration/edit-context" - status = 301 - -[[redirects]] - from = "/edit/model-setup" - to = "/customization/models" - status = 301 - -## Agent [[redirects]] from = "/agent/how-to-use-it" to = "/features/agent/quick-start" status = 301 -[[redirects]] - from = "/agent/how-it-works" - to = "/features/agent/how-it-works" - status = 301 - -[[redirects]] - from = "/agent/how-to-customize" - to = "/customization/agent" - status = 301 - -[[redirects]] - from = "/agent/context-selection" - to = "/advanced/context-integration/agent-context" - status = 301 - -[[redirects]] - from = "/agent/model-setup" - to = "/customization/models" - status = 301 - -# Blocks Redirects -[[redirects]] - from = "/blocks/context-providers" - to = "/advanced/context-integration/custom-providers" - status = 301 - -[[redirects]] - from = "/blocks/data" - to = "/advanced/deep-dives/data-blocks" - status = 301 - -[[redirects]] - from = "/blocks/docs" - to = "/advanced/context-integration/documentation" - status = 301 - -[[redirects]] - from = "/blocks/mcp" - to = "/customization/blocks/mcp-tools" - status = 301 - -[[redirects]] - from = "/blocks/models" - to = "/customization/models" - status = 301 - -[[redirects]] - from = "/blocks/prompts" - to = "/customization/blocks/prompts" - status = 301 - -[[redirects]] - from = "/blocks/rules" - to = "/customization/rules" - status = 301 - -# Customization Redirects -[[redirects]] - from = "/customize/overview" - to = "/customization/overview" - status = 301 - -[[redirects]] - from = "/customize/context-providers" - to = "/advanced/context-integration/custom-providers" - status = 301 - -[[redirects]] - from = "/customize/model-providers/*" - to = "/advanced/model-providers/:splat" - status = 301 - -[[redirects]] - from = "/customize/model-roles/*" - to = "/advanced/model-roles/:splat" - status = 301 - -[[redirects]] - from = "/customize/deep-dives/*" - to = "/advanced/deep-dives/:splat" - status = 301 - -[[redirects]] - from = "/customize/tutorials/*" - to = "/advanced/tutorials/:splat" - status = 301 - -# Deep Dives Specific Redirects -[[redirects]] - from = "/customize/deep-dives/autocomplete" - to = "/advanced/deep-dives/autocomplete" - status = 301 - -[[redirects]] - from = "/customize/deep-dives/codebase" - to = "/advanced/context-integration/codebase" - status = 301 - -[[redirects]] - from = "/customize/deep-dives/configuration" - to = "/advanced/deep-dives/configuration" - status = 301 - -[[redirects]] - from = "/customize/deep-dives/development-data" - to = "/advanced/deep-dives/development-data" - status = 301 - -[[redirects]] - from = "/customize/deep-dives/docs" - to = "/advanced/context-integration/documentation" - status = 301 - -[[redirects]] - from = "/customize/deep-dives/mcp" - to = "/customization/blocks/mcp-tools" - status = 301 - -[[redirects]] - from = "/customize/deep-dives/prompts" - to = "/customization/blocks/prompts" - status = 301 - -[[redirects]] - from = "/customize/deep-dives/rules" - to = "/customization/rules" - status = 301 - -[[redirects]] - from = "/customize/deep-dives/settings" - to = "/advanced/deep-dives/settings" - status = 301 - -[[redirects]] - from = "/customize/deep-dives/slash-commands" - to = "/advanced/context-integration/slash-commands" - status = 301 - -[[redirects]] - from = "/customize/deep-dives/vscode-actions" - to = "/advanced/deep-dives/vscode-actions" - status = 301 - -# Hub Redirects -[[redirects]] - from = "/hub/introduction" - to = "/hub/overview" - status = 301 - -[[redirects]] - from = "/hub/assistants/intro" - to = "/hub/featured-assistants" - status = 301 - -[[redirects]] - from = "/hub/assistants/use-an-assistant" - to = "/hub/using-assistants" - status = 301 - -[[redirects]] - from = "/hub/assistants/create-an-assistant" - to = "/hub/publishing" - status = 301 - -[[redirects]] - from = "/hub/assistants/edit-an-assistant" - to = "/hub/publishing" - status = 301 - -[[redirects]] - from = "/hub/blocks/*" - to = "/customization/blocks" - status = 301 - -[[redirects]] - from = "/hub/governance/*" - to = "/hub/community" - status = 301 - -[[redirects]] - from = "/hub/source-control" - to = "/hub/publishing" - status = 301 - -# Other Redirects -[[redirects]] - from = "/telemetry" - to = "/advanced/telemetry" - status = 301 - -[[redirects]] - from = "/troubleshooting" - to = "/advanced/troubleshooting" - status = 301 - +# Top-level redirects [[redirects]] from = "/reference" to = "/advanced/reference" status = 301 [[redirects]] - from = "/json-reference" - to = "/advanced/reference" - status = 301 - -[[redirects]] - from = "/yaml-migration" - to = "/advanced/yaml-migration" + from = "/troubleshooting" + to = "/advanced/troubleshooting" status = 301 \ No newline at end of file diff --git a/docs/sidebars.js b/docs/sidebars.js index 46414b91b..3d52888ad 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -17,7 +17,7 @@ const sidebars = { }, { type: "category", - label: "Core Features", + label: "Features", items: [ { type: "autogenerated", @@ -37,7 +37,7 @@ const sidebars = { }, { type: "category", - label: "Hub & Sharing", + label: "Hub", items: [ { type: "autogenerated", @@ -58,128 +58,8 @@ const sidebars = { ], guidesSidebar: [ { - type: "category", - label: "Guides", - items: [ - { - type: "autogenerated", - dirName: "guides", - }, - ], - }, - ], - customizingSidebar: [ - "customize/overview", - { - type: "category", - label: "Model providers", - link: { - slug: "/customize/model-providers", - type: "generated-index", - }, - items: [ - { - type: "autogenerated", - dirName: "customize/model-providers/top-level", - }, - { - type: "category", - label: "More", - link: { - slug: "/customize/model-providers/more", - type: "generated-index", - }, - items: [ - { - type: "autogenerated", - dirName: "customize/model-providers/more", - }, - ], - }, - ], - }, - { - type: "category", - label: "Model roles", - link: { - slug: "/customize/model-roles", - type: "generated-index", - }, - items: [ - { - type: "autogenerated", - dirName: "customize/model-roles", - }, - ], - }, - { - type: "category", - label: "Deep dives", - items: [ - { - type: "autogenerated", - dirName: "customize/deep-dives", - }, - ], - }, - { - type: "category", - label: "Tutorials", - items: [ - { - type: "autogenerated", - dirName: "customize/tutorials", - }, - ], - }, - { - type: "link", - label: "Reference", - href: "/reference", - }, - ], - hubSidebar: [ - "hub/introduction", - { - type: "category", - label: "Assistants", - items: [ - "hub/assistants/intro", - "hub/assistants/use-an-assistant", - "hub/assistants/create-an-assistant", - "hub/assistants/edit-an-assistant", - ], - }, - { - type: "category", - label: "Blocks", - items: [ - "hub/blocks/intro", - "hub/blocks/block-types", - "hub/blocks/use-a-block", - "hub/blocks/create-a-block", - "hub/blocks/bundles", - ], - }, - { - type: "category", - label: "Secrets", - items: ["hub/secrets/secret-types", "hub/secrets/secret-resolution"], - }, - { - type: "category", - label: "Governance", - items: [ - "hub/governance/org-permissions", - "hub/governance/creating-an-org", - "hub/governance/pricing", - ], - }, - "hub/source-control", - { - type: "link", - label: "Customize", - href: "/customize/overview", + type: "autogenerated", + dirName: "guides", }, ], };