Merge pull request #2260 from continuedev/docs-refactor
docs: new docs site 🚀
This commit is contained in:
commit
1a16b940fe
171 changed files with 3918 additions and 5437 deletions
46
README.md
46
README.md
|
|
@ -26,55 +26,35 @@
|
|||
|
||||
<p></p>
|
||||
|
||||
## Easily understand code sections
|
||||
## Chat
|
||||
|
||||

|
||||
[Chat](https://continue.dev/docs/chat/how-to-use-it) makes it easy to ask for help from an LLM without needing to leave the IDE
|
||||
|
||||
VS Code: `cmd+L` (MacOS) / `ctrl+L` (Windows)
|
||||

|
||||
|
||||
JetBrains: `cmd+J` (MacOS) / `ctrl+J` (Windows)
|
||||
## Autocomplete
|
||||
|
||||
## Tab to autocomplete code suggestions
|
||||
[Autocomplete](https://continue.dev/docs/autocomplete/how-to-use-it) provides inline code suggestions as you type
|
||||
|
||||

|
||||
|
||||
VS Code: `tab` (MacOS) / `tab` (Windows)
|
||||
## Edit
|
||||
|
||||
JetBrains: `tab` (MacOS) / `tab` (Windows)
|
||||
[Edit](https://continue.dev/docs/edit/how-to-use-it) is a convenient way to modify code without leaving your current file
|
||||
|
||||
## Refactor functions where you are coding
|
||||

|
||||
|
||||

|
||||
## Actions
|
||||
|
||||
VS Code: `cmd+I` (MacOS) / `ctrl+I` (Windows)
|
||||
[Actions](https://continue.dev/docs/actions/how-to-use-it) are shortcuts for common use cases.
|
||||
|
||||
JetBrains: `cmd+I` (MacOS) / `ctrl+I` (Windows)
|
||||
|
||||
## Ask questions about your codebase
|
||||
|
||||

|
||||
|
||||
VS Code: `cmd+enter` (MacOS) / `ctrl+enter` (Windows)
|
||||
|
||||
JetBrains: `cmd+enter` (MacOS) / `ctrl+enter` (Windows)
|
||||
|
||||
## Quickly use documentation as context
|
||||
|
||||

|
||||
|
||||
VS Code: `@docs` (MacOS) / `@docs` (Windows)
|
||||
|
||||
JetBrains: `@docs` (MacOS) / `@docs` (Windows)
|
||||

|
||||
|
||||
</div>
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Download for [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension)
|
||||
|
||||
You can try out Continue with our free trial models before configuring your setup.
|
||||
|
||||
Learn more about the models and providers [here](https://continue.dev/docs/setup/overview).
|
||||
Learn about how to install and use Continue in the docs [here](https://continue.dev/docs/getting-started)
|
||||
|
||||
## Contributing
|
||||
|
||||
|
|
@ -82,4 +62,4 @@ Check out the [contribution ideas board](https://github.com/orgs/continuedev/pro
|
|||
|
||||
## License
|
||||
|
||||
[Apache 2.0 © 2023 Continue Dev, Inc.](./LICENSE)
|
||||
[Apache 2.0 © 2023 Continue Dev, Inc.](./LICENSE)
|
||||
11
core/index.d.ts
vendored
11
core/index.d.ts
vendored
|
|
@ -665,6 +665,10 @@ export type ModelName =
|
|||
| "mistral-large-latest"
|
||||
| "mistral-7b"
|
||||
| "mistral-8x7b"
|
||||
| "mistral-tiny"
|
||||
| "mistral-small"
|
||||
| "mistral-medium"
|
||||
| "mistral-embed"
|
||||
// Llama 2
|
||||
| "llama2-7b"
|
||||
| "llama2-13b"
|
||||
|
|
@ -703,10 +707,6 @@ export type ModelName =
|
|||
| "gemini-1.5-pro"
|
||||
| "gemini-1.5-flash-latest"
|
||||
| "gemini-1.5-flash"
|
||||
// Mistral
|
||||
| "mistral-tiny"
|
||||
| "mistral-small"
|
||||
| "mistral-medium"
|
||||
// Tab autocomplete
|
||||
| "deepseek-1b"
|
||||
| "starcoder-1b"
|
||||
|
|
@ -801,7 +801,8 @@ export type EmbeddingsProviderName =
|
|||
| "continue-proxy"
|
||||
| "deepinfra"
|
||||
| "nvidia"
|
||||
| "voyage";
|
||||
| "voyage"
|
||||
| "mistral";
|
||||
|
||||
export interface EmbedOptions {
|
||||
apiBase?: string;
|
||||
|
|
|
|||
14
core/indexing/embeddings/MistralEmbeddingsProvider.ts
Normal file
14
core/indexing/embeddings/MistralEmbeddingsProvider.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { EmbeddingsProviderName, EmbedOptions } from "../../index.js";
|
||||
import OpenAIEmbeddingsProvider from "./OpenAIEmbeddingsProvider.js";
|
||||
|
||||
class MistralEmbeddingsProvider extends OpenAIEmbeddingsProvider {
|
||||
static providerName: EmbeddingsProviderName = "mistral";
|
||||
static maxBatchSize = 128;
|
||||
|
||||
static defaultOptions: Partial<EmbedOptions> | undefined = {
|
||||
apiBase: "https://api.mistral.ai/v1/",
|
||||
model: "mistral-embed",
|
||||
};
|
||||
}
|
||||
|
||||
export default MistralEmbeddingsProvider;
|
||||
|
|
@ -7,6 +7,7 @@ import DeepInfraEmbeddingsProvider from "./DeepInfraEmbeddingsProvider.js";
|
|||
import FreeTrialEmbeddingsProvider from "./FreeTrialEmbeddingsProvider.js";
|
||||
import GeminiEmbeddingsProvider from "./GeminiEmbeddingsProvider.js";
|
||||
import HuggingFaceTEIEmbeddingsProvider from "./HuggingFaceTEIEmbeddingsProvider.js";
|
||||
import MistralEmbeddingsProvider from "./MistralEmbeddingsProvider.js";
|
||||
import OllamaEmbeddingsProvider from "./OllamaEmbeddingsProvider.js";
|
||||
import OpenAIEmbeddingsProvider from "./OpenAIEmbeddingsProvider.js";
|
||||
import TransformersJsEmbeddingsProvider from "./TransformersJsEmbeddingsProvider.js";
|
||||
|
|
@ -33,4 +34,5 @@ export const allEmbeddingsProviders: Record<
|
|||
deepinfra: DeepInfraEmbeddingsProvider,
|
||||
nvidia: NvidiaEmbeddingsProvider,
|
||||
voyage: VoyageEmbeddingsProvider,
|
||||
mistral: MistralEmbeddingsProvider,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
# Code Configuration
|
||||
|
||||
To allow added flexibility and eventually support an entire plugin ecosystem, Continue can be configured programmatically in a TypeScript file, `~/.continue/config.ts`.
|
||||
|
||||
Whenever Continue loads, it carries out the following steps:
|
||||
|
||||
1. Load `~/.continue/config.json`
|
||||
2. Convert this into a `Config` object
|
||||
3. If `~/.continue/config.ts` exists and has defined `modifyConfig` correctly, call `modifyConfig` with the `Config` object to generate the final configuration
|
||||
|
||||
Defining a `modifyConfig` function allows you to make any final modifications to your initial `config.json`. Here's an example that sets the temperature to a random number and maxTokens to 1024:
|
||||
|
||||
```typescript title="~/.continue/config.ts"
|
||||
export function modifyConfig(config: Config): Config {
|
||||
config.completionOptions = {
|
||||
...config.completionOptions,
|
||||
temperature: Math.random(),
|
||||
maxTokens: 1024,
|
||||
};
|
||||
return config;
|
||||
}
|
||||
```
|
||||
|
|
@ -1,594 +0,0 @@
|
|||
---
|
||||
title: Context Providers
|
||||
description: Type '@' to select content to the LLM as context
|
||||
keywords: [context, "@", provider, LLM]
|
||||
---
|
||||
|
||||
# Context Providers
|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
## Built-in Context Providers
|
||||
|
||||
To use any of the built-in context providers, open `~/.continue/config.json` and add it to the `contextProviders` list.
|
||||
|
||||
### Files
|
||||
|
||||
Type '@file' to reference any file in your current workspace.
|
||||
|
||||
```json
|
||||
{ "name": "file" }
|
||||
```
|
||||
|
||||
### Code
|
||||
|
||||
Type '@code' to reference specific functions or classes from throughout your project.
|
||||
|
||||
```json
|
||||
{ "name": "code" }
|
||||
```
|
||||
|
||||
### Git Diff
|
||||
|
||||
Type '@diff' to 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.
|
||||
|
||||
```json
|
||||
{ "name": "diff" }
|
||||
```
|
||||
|
||||
### Terminal
|
||||
|
||||
Type '@terminal' to reference the contents of your IDE's terminal.
|
||||
|
||||
```json
|
||||
{ "name": "terminal" }
|
||||
```
|
||||
|
||||
### Documentation
|
||||
|
||||
Type `@docs` to index and retrieve snippets from any documentation site.
|
||||
|
||||
```json
|
||||
{ "name": "docs" }
|
||||
```
|
||||
|
||||
To learn more, visit [Talk To Your Docs](../features/talk-to-your-docs.md).
|
||||
|
||||
### Open Files
|
||||
|
||||
Type '@open' to reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files.
|
||||
|
||||
```json
|
||||
{ "name": "open", "params": { "onlyPinned": true } }
|
||||
```
|
||||
|
||||
### Codebase Retrieval
|
||||
|
||||
Type '@codebase' to automatically retrieve the most relevant snippets from your codebase. Read more about indexing and retrieval [here](../features/codebase-embeddings.md).
|
||||
|
||||
```json
|
||||
{ "name": "codebase" }
|
||||
```
|
||||
|
||||
### Folders
|
||||
|
||||
Type '@folder' to use the same retrieval mechanism as '@codebase', but only on a single folder.
|
||||
|
||||
```json
|
||||
{ "name": "folder" }
|
||||
```
|
||||
|
||||
### Exact Search
|
||||
|
||||
Type '@search' to reference the results of codebase search, just like the results you would get from VS Code search. This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep).
|
||||
|
||||
```json
|
||||
{ "name": "search" }
|
||||
```
|
||||
|
||||
### URL
|
||||
|
||||
Type '@url' and input a URL, then Continue will convert it to a markdown document to pass to the model.
|
||||
|
||||
```json
|
||||
{ "name": "url" }
|
||||
```
|
||||
|
||||
### File Tree
|
||||
|
||||
Type '@tree' to reference the structure of your current workspace. The LLM will be able to see the nested directory structure of your project.
|
||||
|
||||
```json
|
||||
{ "name": "tree" }
|
||||
```
|
||||
|
||||
### Google
|
||||
|
||||
Type '@google' to reference the results of a Google search. For example, type "@google python tutorial" if you want to search and discuss ways of learning Python.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "google",
|
||||
"params": { "serperApiKey": "<your serper.dev api key>" }
|
||||
}
|
||||
```
|
||||
|
||||
Note: You can get an API key for free at [serper.dev](https://serper.dev).
|
||||
|
||||
### GitHub Issues
|
||||
|
||||
Type '@issue' to reference the conversation in a GitHub issue. 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:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "issue",
|
||||
"params": {
|
||||
"repos": [
|
||||
{
|
||||
"owner": "continuedev",
|
||||
"repo": "continue"
|
||||
}
|
||||
],
|
||||
"githubToken": "ghp_xxx"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using Github Enterprise Server
|
||||
|
||||
When using with Github Enterprise Server, you can set the `domain` parameter to your server's hostname. By default this is set to `github.com`.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "issue",
|
||||
"params": {
|
||||
"repos": [
|
||||
{
|
||||
"owner": "continuedev",
|
||||
"repo": "continue"
|
||||
}
|
||||
],
|
||||
"githubToken": "ghp_xxx",
|
||||
"domain": "github.acme-inc.com"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### GitLab Merge Request
|
||||
|
||||
Type `@gitlab-mr` to reference an open MR for this branch on GitLab.
|
||||
|
||||
#### Configuration
|
||||
|
||||
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. then add the following to your configuration:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "gitlab-mr",
|
||||
"params": {
|
||||
"token": "..."
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 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`.
|
||||
|
||||
```json
|
||||
{
|
||||
"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 Issues
|
||||
|
||||
Type '@jira' to reference the conversation in a Jira issue. 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.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "jira",
|
||||
"params": {
|
||||
"domain": "company.atlassian.net",
|
||||
"token ": "ATATT..."
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 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.
|
||||
|
||||
```json
|
||||
"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.
|
||||
|
||||
<!--
|
||||
Note: We are currently omitting the following providers due to bugs.
|
||||
See this issue for details: https://github.com/continuedev/continue/issues/1365
|
||||
-->
|
||||
|
||||
<!-- ### Code Outline
|
||||
|
||||
Type '@outline' to reference the outline of all currently open files. The outline of a files consists of only the function and class definitions in the file. Supported file extensions are '.js', '.mjs', '.go', '.c', '.cc', '.cs', '.cpp', '.el', '.ex', '.elm', '.java', '.ml', '.php', '.ql', '.rb', '.rs', '.ts'
|
||||
|
||||
```json
|
||||
{ "name": "outline" }
|
||||
```
|
||||
|
||||
### Code Highlights
|
||||
|
||||
Type '@highlights' to reference the 'highlights' from all currently open files. The highlights are computed using Paul Gauthier's so-called ['repomap'](https://aider.chat/docs/repomap.html) technique in [Aider Chat](https://github.com/paul-gauthier/aider). Supported file extensions are the same as for '@Outline' (behind the scenes, we use the corresponding tree-sitter grammars for language parsing).
|
||||
|
||||
```json
|
||||
{ "name": "highlights" }
|
||||
``` -->
|
||||
|
||||
### PostgreSQL
|
||||
|
||||
Type `@postgres` to reference the schema of a table, and some sample rows. A dropdown will appear, allowing you to select a specific table, or all tables.
|
||||
|
||||
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)
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "postgres",
|
||||
"params": {
|
||||
"host": "localhost",
|
||||
"port": 5436,
|
||||
"user": "myuser",
|
||||
"password": "catsarecool",
|
||||
"database": "animals",
|
||||
"schema": "public",
|
||||
"sampleRows": 3
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Database Tables
|
||||
|
||||
Type `@database` to reference table schemas you can use the drop-down or start typeing table names based off of your configuration. Configuration supports multiple databases, allowing you to specify various connection details for PostgreSQL, MySQL, SQLite. Each connection should include a unique name, the connection_type (e.g., postgres, sqlite), and the necessary connection parameters specific to each database type.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "database",
|
||||
"params": {
|
||||
"connections": [
|
||||
{
|
||||
"name": "examplePostgres",
|
||||
"connection_type": "postgres",
|
||||
"connection": {
|
||||
"user": "username",
|
||||
"host": "localhost",
|
||||
"database": "exampleDB",
|
||||
"password": "yourPassword",
|
||||
"port": 5432
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "exampleSqlite",
|
||||
"connection_type": "sqlite",
|
||||
"connection": {
|
||||
"filename": "/path/to/your/sqlite/database.db"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Debugger: Local Variables
|
||||
|
||||
Type `@locals` to reference the contents of the local variables with top n level (defaulting to 3) of call stack for that thread. A dropdown will appear, allowing you to select a specific thread to see the local variables in that thread.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "locals",
|
||||
"params": {
|
||||
"stackDepth": 3
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Repository map
|
||||
|
||||
Provides an overview of all files and the call signatures of top-level classes, functions, and methods. This helps the model better understand how a particular piece of code relates to the rest of the codebase.
|
||||
|
||||
This context provider is inpsired by [Aider's repository map](https://aider.chat/2023/10/22/repomap.html).
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "repo-map"
|
||||
}
|
||||
```
|
||||
|
||||
### Operating System
|
||||
|
||||
Type `@os` to reference the architecture and platform of your current operating system.
|
||||
|
||||
```json
|
||||
{ "name": "os" }
|
||||
```
|
||||
|
||||
### 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 ContextProvider.
|
||||
|
||||
## Building Your Own Context Provider
|
||||
|
||||
### Introductory Example
|
||||
|
||||
To write your own context provider, you just have to implement the `CustomContextProvider`
|
||||
interface:
|
||||
|
||||
```typescript
|
||||
interface CustomContextProvider {
|
||||
title: string;
|
||||
displayTitle?: string;
|
||||
description?: string;
|
||||
renderInlineAs?: string;
|
||||
type?: ContextProviderType;
|
||||
getContextItems(
|
||||
query: string,
|
||||
extras: ContextProviderExtras,
|
||||
): Promise<ContextItem[]>;
|
||||
loadSubmenuItems?: (
|
||||
args: LoadSubmenuItemsArgs,
|
||||
) => Promise<ContextSubmenuItem[]>;
|
||||
}
|
||||
```
|
||||
|
||||
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<ContextItem[]> => {
|
||||
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;
|
||||
}
|
||||
```
|
||||
|
||||
No modification in `config.json` is necessary.
|
||||
|
||||
### 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"](#exact-search) and ["google"](#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"](#github-issues) and ["folder"](#folders). 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<ContextItem[]> => {
|
||||
// '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<ContextSubmenuItem[]> => {
|
||||
// Filter all workspace files for READMEs
|
||||
const allFiles = await args.ide.listWorkspaceContents();
|
||||
const readmes = allFiles.filter((filepath) =>
|
||||
filepath.endsWith("README.md"),
|
||||
);
|
||||
|
||||
// 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 <module_name>` 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`.
|
||||
|
||||
### Writing Context Providers in Other Languages
|
||||
|
||||
If you'd like to write a context provider in a language other than TypeScript, you can use the "http" context provider to call a server that hosts your own code. Add the context provider to `config.json` like this:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "http",
|
||||
"params": {
|
||||
"url": "https://myserver.com/context-provider",
|
||||
"title": "http",
|
||||
"description": "Custom HTTP Context Provider",
|
||||
"displayTitle": "My Custom Context"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Then, create a server that responds to requests as are made from [HttpContextProvider.ts](../../../core/context/providers/HttpContextProvider.ts). See the `hello` endpoint in [context_provider_server.py](../../../core/context/providers/context_provider_server.py) for an example that uses FastAPI.
|
||||
|
||||
### 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
|
||||
{
|
||||
"extensionDependencies": ["continue.continue"]
|
||||
}
|
||||
```
|
||||
|
||||
Or copy `~/.continue/type/core/index.d.ts` to your extension repository.
|
||||
|
||||
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
|
||||
import * as vscode from "vscode";
|
||||
|
||||
class MyCustomProvider implements IContextProvider {
|
||||
get description(): ContextProviderDescription {
|
||||
return {
|
||||
title: "custom",
|
||||
displayTitle: "Custom",
|
||||
description: "Custom description",
|
||||
type: "normal",
|
||||
};
|
||||
}
|
||||
|
||||
async getContextItems(
|
||||
query: string,
|
||||
extras: ContextProviderExtras,
|
||||
): Promise<ContextItem[]> {
|
||||
return [
|
||||
{
|
||||
name: "Custom",
|
||||
description: "Custom description",
|
||||
content: "Custom content",
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
async loadSubmenuItems(
|
||||
args: LoadSubmenuItemsArgs,
|
||||
): Promise<ContextSubmenuItem[]> {
|
||||
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);
|
||||
```
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
title: Other Configuration
|
||||
description: Swap out different LLM providers
|
||||
keywords: [temperature, custom policies, custom system message]
|
||||
---
|
||||
|
||||
# Other Configuration
|
||||
|
||||
See the [config.json Reference](../reference/config) for the full list of configuration options.
|
||||
|
||||
## Customize System Message
|
||||
|
||||
You can write your own system message, a set of instructions that will always be top-of-mind for the LLM, by setting the `systemMessage` property to any string. For example, you might request "Please make all responses as concise as possible and never repeat something you have already explained."
|
||||
|
||||
System messages can also reference files. For example, if there is a markdown file (e.g. at `/Users/nate/Documents/docs/reference.md`) you'd like the LLM to know about, you can reference it with [Mustache](http://mustache.github.io/mustache.5.html) templating like this: "Please reference this documentation: \{\{ Users/nate/Documents/docs/reference.md \}\}". As of now, you must use an absolute path.
|
||||
|
||||
## Temperature
|
||||
|
||||
Set `temperature` to any value between 0 and 1. Higher values will make the LLM more creative, while lower values will make it more predictable. The default is 0.5.
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
title: Overview
|
||||
description: Continue can be deeply customized
|
||||
keywords: [custom, slash commands, models, context providers]
|
||||
---
|
||||
|
||||
# Overview
|
||||
|
||||
Continue can be deeply customized by editing `config.json` and `config.ts` on your machine. You can find these files in the `~/.continue/` directory on MacOS and the `%userprofile%\.continue` directory on Windows. These files are created the first time you run Continue.
|
||||
|
||||
Currently, you can customize the following:
|
||||
|
||||
- [Models](../setup/select-model.md) and [Model Providers](../setup/model-providers.md)
|
||||
- [Context Providers](./context-providers.md)
|
||||
- [Slash Commands](./slash-commands.md)
|
||||
- [Other configuration options](../reference/config.mdx)
|
||||
|
||||
If you'd like to share Continue configuration with others, you can add a `.continuerc.json` to the root of your project. It has the same JSON Schema definition as `config.json`, and will automatically be applied on top of the local `config.json`.
|
||||
|
|
@ -1,178 +0,0 @@
|
|||
---
|
||||
title: Slash Commands
|
||||
description: Shortcuts that can be activated by prefacing your input with '/'
|
||||
keywords: [slash command, custom commands, step]
|
||||
---
|
||||
|
||||
# Slash Commands
|
||||
|
||||
Slash commands are shortcuts that can be activated by typing '/' and selecting from the dropdown. For example, the built-in '/edit' slash command lets you stream edits directly into your editor.
|
||||
|
||||

|
||||
|
||||
## Built-in Slash Commands
|
||||
|
||||
To use any of the built-in slash commands, open `~/.continue/config.json` and add it to the `slashCommands` list.
|
||||
|
||||
### `/edit`
|
||||
|
||||
Select code with ctrl/cmd + L (VS Code) or ctrl/cmd + J (JetBrains), and then type "/edit", followed by instructions for the edit. Continue will stream the changes into a side-by-side diff editor.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "edit",
|
||||
"description": "Edit highlighted code"
|
||||
}
|
||||
```
|
||||
|
||||
### `/comment`
|
||||
|
||||
Comment works just like /edit, except it will automatically prompt the LLM to comment the code.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "comment",
|
||||
"description": "Write comments for the highlighted code"
|
||||
}
|
||||
```
|
||||
|
||||
### `/share`
|
||||
|
||||
Type "/share" to generate a shareable markdown transcript of your current chat history.
|
||||
|
||||
```json
|
||||
{
|
||||
"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
|
||||
{
|
||||
"name": "cmd",
|
||||
"description": "Generate a shell command"
|
||||
}
|
||||
```
|
||||
|
||||
### `/commit`
|
||||
|
||||
Shows the LLM your current git diff and asks it to generate a commit message.
|
||||
|
||||
```json
|
||||
{
|
||||
"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
|
||||
{
|
||||
"name": "http",
|
||||
"description": "Does something custom",
|
||||
"params": { "url": "<my server endpoint>" }
|
||||
}
|
||||
```
|
||||
|
||||
### `/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
|
||||
{
|
||||
"name": "issue",
|
||||
"description": "Generate a link to a drafted GitHub issue",
|
||||
"params": { "repositoryUrl": "https://github.com/continuedev/continue" }
|
||||
}
|
||||
```
|
||||
|
||||
### `/so`
|
||||
|
||||
The StackOverflow slash command will automatically pull results from StackOverflow to answer your question, quoting links along with its answer.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "so",
|
||||
"description": "Reference StackOverflow to answer the question"
|
||||
}
|
||||
```
|
||||
|
||||
### `/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
|
||||
{
|
||||
"name": "onboard",
|
||||
"description": "Familiarize yourself with the codebase"
|
||||
}
|
||||
```
|
||||
|
||||
## Custom Slash Commands
|
||||
|
||||
There are two ways to add custom slash commands:
|
||||
|
||||
1. With natural language prompts - this is simpler and only requires writing a string or string template.
|
||||
2. With a custom function - this gives you full access to the Continue SDK and allows you to write arbitrary Typescript code.
|
||||
|
||||
### "Custom Commands" (Use Natural Language)
|
||||
|
||||
You can add custom slash commands by adding to the `customCommands` property in `config.json`.
|
||||
|
||||
- `name`: the name of the command, which will be invoked with `/name`
|
||||
- `description`: a short description of the command, which will appear in the dropdown
|
||||
- `prompt`: a templated prompt to send to the LLM
|
||||
|
||||
Custom commands are great when you are frequently reusing a prompt. For example, if you've crafted a great prompt and frequently ask the LLM to check for mistakes in your code, you could add a command like this:
|
||||
|
||||
```json title="~/.continue/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."
|
||||
}]
|
||||
```
|
||||
|
||||
#### Templating
|
||||
|
||||
The `prompt` property supports templating with Handlebars syntax. You can use the following variables:
|
||||
|
||||
- `input` (used in the example above): any additional input entered with the slash command. For example, if you type `/test only write one test`, `input` will be `only write one test`. This will also include highlighted code blocks.
|
||||
- File names: You can reference any file by providing an absolute path or a path relative to the current working directory.
|
||||
|
||||
### Custom Slash Commands
|
||||
|
||||
If you want to go a step further than writing custom commands with natural language, you can write a custom function that returns the response. This requires using `config.ts` instead of `config.json`.
|
||||
|
||||
To do this, push a new `SlashCommand` object to the `slashCommands` list. This object contains "name", the name that you will type to invoke the slash command, "description", the description seen in the dropdown menu, and "run". The `run` function is any async generator that should yield strings as you want them to be streamed to the UI. As an argument to the function, you have access to a `ContinueSDK` object with utilities such as access to certain information/actions within the IDE, the current language model, and a few other utilities. For example, here is a slash command that generates a commit message:
|
||||
|
||||
```typescript title="~/.continue/config.ts"
|
||||
export function modifyConfig(config: Config): Config {
|
||||
config.slashCommands?.push({
|
||||
name: "commit",
|
||||
description: "Write a commit message",
|
||||
run: async function* (sdk) {
|
||||
const diff = await sdk.ide.getDiff();
|
||||
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'):`,
|
||||
{
|
||||
maxTokens: 20,
|
||||
},
|
||||
)) {
|
||||
yield message;
|
||||
}
|
||||
},
|
||||
});
|
||||
return config;
|
||||
}
|
||||
```
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
title: 📝 Changelog
|
||||
title: Changelog
|
||||
description: Changelogs for the latest releases of the VSCode and JetBrains extensions
|
||||
keywords: [changelog]
|
||||
hide_table_of_contents: true
|
||||
---
|
||||
|
||||
import VSCodeChangelog from "../../extensions/vscode/CHANGELOG.md";
|
||||
import IntelliJChangelog from "../../extensions/intellij/CHANGELOG.md";
|
||||
import VSCodeChangelog from "../../../extensions/vscode/CHANGELOG.md";
|
||||
import JetBrainsChangelog from "../../../extensions/intellij/CHANGELOG.md";
|
||||
|
||||
Below are the changelogs for the latest releases of the VSCode and JetBrains extensions. Prior to 2024-07-02, the changelogs do not reflect all updates.
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ import TOCInline from "@theme/TOCInline";
|
|||
<TOCInline
|
||||
toc={toc.filter(
|
||||
(node) =>
|
||||
node.value === "VSCode Changelog" || node.value === "IntelliJ Changelog",
|
||||
node.value === "VSCode Changelog" || node.value === "JetBrains Changelog",
|
||||
)}
|
||||
/>
|
||||
|
||||
|
|
@ -25,6 +25,6 @@ import TOCInline from "@theme/TOCInline";
|
|||
|
||||
<VSCodeChangelog />
|
||||
|
||||
## IntelliJ Changelog
|
||||
## JetBrains Changelog
|
||||
|
||||
<IntelliJChangelog />
|
||||
<JetBrainsChangelog />
|
||||
|
|
@ -1,9 +1,16 @@
|
|||
---
|
||||
title: config.json Reference
|
||||
keywords: [config.json, configuration, options]
|
||||
---
|
||||
|
||||
import Schema from "@site/static/schemas/config.json";
|
||||
import JSONSchemaViewer from "@theme/JSONSchemaViewer";
|
||||
|
||||
# Configuration Options
|
||||
# Configuration options
|
||||
|
||||
The following shows the JSON Schema definition for `config.json`. You can also define a partial `config.json` object in a file called `.continuerc.json` at the root of your workspace. This will be [applied on top of](https://github.com/continuedev/continue/blob/74c1eb5e25c517c575f72d26227d31d5d2ea18ed/extensions/vscode/src/ideProtocol.ts#L165-L173) any configuration from `config.json`.
|
||||
The following shows the JSON Schema definition for `config.json`.
|
||||
|
||||
You can also define a partial `config.json` object in a file called `.continuerc.json` at the root of your workspace. This will be applied on top of any configuration from `config.json`.
|
||||
|
||||
<JSONSchemaViewer
|
||||
schema={Schema}
|
||||
324
docs/docs/customize/context-providers.md
Normal file
324
docs/docs/customize/context-providers.md
Normal file
|
|
@ -0,0 +1,324 @@
|
|||
---
|
||||
title: Context providers
|
||||
description: Type '@' to select content to the LLM as context
|
||||
keywords: [context, "@", provider, LLM]
|
||||
---
|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
## Built-in Context Providers
|
||||
|
||||
To use any of the built-in context providers, open `~/.continue/config.json` and add it to the `contextProviders` list.
|
||||
|
||||
### Files
|
||||
|
||||
Type '@file' to reference any file in your current workspace.
|
||||
|
||||
```json
|
||||
{ "name": "file" }
|
||||
```
|
||||
|
||||
### Code
|
||||
|
||||
Type '@code' to reference specific functions or classes from throughout your project.
|
||||
|
||||
```json
|
||||
{ "name": "code" }
|
||||
```
|
||||
|
||||
### Git Diff
|
||||
|
||||
Type '@diff' to 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.
|
||||
|
||||
```json
|
||||
{ "name": "diff" }
|
||||
```
|
||||
|
||||
### Terminal
|
||||
|
||||
Type '@terminal' to reference the contents of your IDE's terminal.
|
||||
|
||||
```json
|
||||
{ "name": "terminal" }
|
||||
```
|
||||
|
||||
### Documentation
|
||||
|
||||
Type `@docs` to index and retrieve snippets from any documentation site.
|
||||
|
||||
```json
|
||||
{ "name": "docs" }
|
||||
```
|
||||
|
||||
To learn more, visit `[@docs](../customize/deep-dives/docs.md)`.
|
||||
|
||||
### Open Files
|
||||
|
||||
Type '@open' to reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files.
|
||||
|
||||
```json
|
||||
{ "name": "open", "params": { "onlyPinned": true } }
|
||||
```
|
||||
|
||||
### Codebase Retrieval
|
||||
|
||||
Type '@codebase' to automatically retrieve the most relevant snippets from your codebase. Read more about indexing and retrieval [here](../customize/deep-dives/codebase.md).
|
||||
|
||||
```json
|
||||
{ "name": "codebase" }
|
||||
```
|
||||
|
||||
### Folders
|
||||
|
||||
Type '@folder' to use the same retrieval mechanism as '@codebase', but only on a single folder.
|
||||
|
||||
```json
|
||||
{ "name": "folder" }
|
||||
```
|
||||
|
||||
### Exact Search
|
||||
|
||||
Type '@search' to reference the results of codebase search, just like the results you would get from VS Code search. This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep).
|
||||
|
||||
```json
|
||||
{ "name": "search" }
|
||||
```
|
||||
|
||||
### URL
|
||||
|
||||
Type '@url' and input a URL, then Continue will convert it to a markdown document to pass to the model.
|
||||
|
||||
```json
|
||||
{ "name": "url" }
|
||||
```
|
||||
|
||||
### File Tree
|
||||
|
||||
Type '@tree' to reference the structure of your current workspace. The LLM will be able to see the nested directory structure of your project.
|
||||
|
||||
```json
|
||||
{ "name": "tree" }
|
||||
```
|
||||
|
||||
### Google
|
||||
|
||||
Type '@google' to reference the results of a Google search. For example, type "@google python tutorial" if you want to search and discuss ways of learning Python.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "google",
|
||||
"params": { "serperApiKey": "<your serper.dev api key>" }
|
||||
}
|
||||
```
|
||||
|
||||
Note: You can get an API key for free at [serper.dev](https://serper.dev).
|
||||
|
||||
### GitHub Issues
|
||||
|
||||
Type '@issue' to reference the conversation in a GitHub issue. 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:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "issue",
|
||||
"params": {
|
||||
"repos": [
|
||||
{
|
||||
"owner": "continuedev",
|
||||
"repo": "continue"
|
||||
}
|
||||
],
|
||||
"githubToken": "ghp_xxx"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### GitLab Merge Request
|
||||
|
||||
Type `@gitlab-mr` to reference an open MR for this branch on GitLab.
|
||||
|
||||
#### Configuration
|
||||
|
||||
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. then add the following to your configuration:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "gitlab-mr",
|
||||
"params": {
|
||||
"token": "..."
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 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`.
|
||||
|
||||
```json
|
||||
{
|
||||
"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 Issues
|
||||
|
||||
Type '@jira' to reference the conversation in a Jira issue. 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.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "jira",
|
||||
"params": {
|
||||
"domain": "company.atlassian.net",
|
||||
"token ": "ATATT..."
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 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.
|
||||
|
||||
```json
|
||||
"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.
|
||||
|
||||
<!--
|
||||
Note: We are currently omitting the following providers due to bugs.
|
||||
See this issue for details: https://github.com/continuedev/continue/issues/1365
|
||||
-->
|
||||
|
||||
<!-- ### Code Outline
|
||||
|
||||
Type '@outline' to reference the outline of all currently open files. The outline of a files consists of only the function and class definitions in the file. Supported file extensions are '.js', '.mjs', '.go', '.c', '.cc', '.cs', '.cpp', '.el', '.ex', '.elm', '.java', '.ml', '.php', '.ql', '.rb', '.rs', '.ts'
|
||||
|
||||
```json
|
||||
{ "name": "outline" }
|
||||
```
|
||||
|
||||
### Code Highlights
|
||||
|
||||
Type '@highlights' to reference the 'highlights' from all currently open files. The highlights are computed using Paul Gauthier's so-called ['repomap'](https://aider.chat/docs/repomap.html) technique in [Aider Chat](https://github.com/paul-gauthier/aider). Supported file extensions are the same as for '@Outline' (behind the scenes, we use the corresponding tree-sitter grammars for language parsing).
|
||||
|
||||
```json
|
||||
{ "name": "highlights" }
|
||||
``` -->
|
||||
|
||||
### PostgreSQL
|
||||
|
||||
Type `@postgres` to reference the schema of a table, and some sample rows. A dropdown will appear, allowing you to select a specific table, or all tables.
|
||||
|
||||
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)
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "postgres",
|
||||
"params": {
|
||||
"host": "localhost",
|
||||
"port": 5436,
|
||||
"user": "myuser",
|
||||
"password": "catsarecool",
|
||||
"database": "animals",
|
||||
"schema": "public",
|
||||
"sampleRows": 3
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Database Tables
|
||||
|
||||
Type `@database` to reference table schemas you can use the drop-down or start typeing table names based off of your configuration. Configuration supports multiple databases, allowing you to specify various connection details for PostgreSQL, MySQL, SQLite. Each connection should include a unique name, the connection_type (e.g., postgres, sqlite), and the necessary connection parameters specific to each database type.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "database",
|
||||
"params": {
|
||||
"connections": [
|
||||
{
|
||||
"name": "examplePostgres",
|
||||
"connection_type": "postgres",
|
||||
"connection": {
|
||||
"user": "username",
|
||||
"host": "localhost",
|
||||
"database": "exampleDB",
|
||||
"password": "yourPassword",
|
||||
"port": 5432
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "exampleSqlite",
|
||||
"connection_type": "sqlite",
|
||||
"connection": {
|
||||
"filename": "/path/to/your/sqlite/database.db"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Debugger: Local Variables
|
||||
|
||||
Type `@locals` to reference the contents of the local variables with top n level (defaulting to 3) of call stack for that thread. A dropdown will appear, allowing you to select a specific thread to see the local variables in that thread.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "locals",
|
||||
"params": {
|
||||
"stackDepth": 3
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Repository map
|
||||
|
||||
Provides an overview of all files and the call signatures of top-level classes, functions, and methods. This helps the model better understand how a particular piece of code relates to the rest of the codebase.
|
||||
|
||||
This context provider is inpsired by [Aider's repository map](https://aider.chat/2023/10/22/repomap.html).
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "repo-map"
|
||||
}
|
||||
```
|
||||
|
||||
### Operating System
|
||||
|
||||
Type `@os` to reference the architecture and platform of your current operating system.
|
||||
|
||||
```json
|
||||
{ "name": "os" }
|
||||
```
|
||||
|
||||
### 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 ContextProvider.
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
# Tab Autocomplete (beta)
|
||||
---
|
||||
title: Autocomplete
|
||||
keywords: [autocomplete]
|
||||
---
|
||||
|
||||
Continue now provides support for tab autocomplete in [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains IDEs](https://plugins.jetbrains.com/plugin/22707-continue/edit). We will be greatly improving the experience over the next few releases, and it is always helpful to hear feedback. If you have any problems or suggestions, please let us know in our [Discord](https://discord.gg/vapESyrFmJ).
|
||||
|
||||
## Setting up with Codestral (recommended)
|
||||
### 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.json`:
|
||||
|
||||
|
|
@ -17,9 +18,9 @@ If you want to have the best autocomplete experience, we recommend using Codestr
|
|||
}
|
||||
```
|
||||
|
||||
## Setting up with Ollama (default)
|
||||
### Setting up with Ollama (default)
|
||||
|
||||
We recommend setting up tab-autocomplete with a local Ollama instance. 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:
|
||||
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 starcoder2:3b
|
||||
|
|
@ -27,31 +28,7 @@ ollama run starcoder2:3b
|
|||
|
||||
Once it has been downloaded, you should begin to see completions in VS Code.
|
||||
|
||||
## Setting up with LM Studio
|
||||
|
||||
You can also set up tab-autocomplete with a local LM Studio instance by following these steps:
|
||||
|
||||
1. Download the latest version of LM Studio from [here](https://lmstudio.ai/)
|
||||
2. Download a model (e.g. search for `second-state/StarCoder2-3B-GGUF` and choose one of the options there)
|
||||
3. Go to the server section (button is on the left), select your model from the dropdown at the top, and click "Start Server"
|
||||
4. Go to the "My Models" section (button is on the left), find your selected model, and copy the name the path (example: `second-state/StarCoder2-3B-GGUF/starcoder2-3b-Q8_0.gguf`); this will be used as the "model" attribute in Continue
|
||||
5. Go to Continue and modify the configurations for a [custom model](#setting-up-a-custom-model)
|
||||
6. Set the "provider" to `lmstudio` and the "model" to the path copied earlier
|
||||
|
||||
Example:
|
||||
|
||||
```json title=~/.continue/config.json
|
||||
{
|
||||
"tabAutocompleteModel": {
|
||||
"title": "Starcoder2 3b",
|
||||
"model": "second-state/StarCoder2-3B-GGUF/starcoder2-3b-Q8_0.gguf",
|
||||
"provider": "lmstudio",
|
||||
},
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
## Setting up a custom model
|
||||
### Setting up a custom model
|
||||
|
||||
All of the configuration options available for chat models are available to use for tab-autocomplete. For example, if you wanted to use a remote Ollama instance you would edit your `config.json` like this (note that it is not inside the models array):
|
||||
|
||||
|
|
@ -67,17 +44,7 @@ All of the configuration options available for chat models are available to use
|
|||
}
|
||||
```
|
||||
|
||||
If you aren't yet familiar with the available options, you can learn more in our [overview](../setup/overview.md).
|
||||
|
||||
### What model should I use?
|
||||
|
||||
If you are running the model locally, we recommend `starcoder2:3b`.
|
||||
|
||||
If you find it to be too slow, you should try `deepseek-coder:1.3b-base`.
|
||||
|
||||
If you have a bit more compute, or are running a model in the cloud, you can upgrade to `deepseek-coder:6.7b-base`.
|
||||
|
||||
Regardless of what you are willing to spend, we do not recommend using GPT or Claude for autocomplete. Learn why [below](#i-want-better-completions-should-i-use-gpt-4).
|
||||
If you aren't yet familiar with the available options, you can find the full reference [here](../config.mdx).
|
||||
|
||||
## Configuration Options
|
||||
|
||||
|
|
@ -115,14 +82,14 @@ This object allows you to customize the behavior of tab-autocomplete. The availa
|
|||
"apiBase": "https://<my endpoint>"
|
||||
},
|
||||
"tabAutocompleteOptions": {
|
||||
"useCopyBuffer": false,
|
||||
"maxPromptTokens": 400,
|
||||
"prefixPercentage": 0.5
|
||||
"debounceDelay": 500,
|
||||
"maxPromptTokens": 1500,
|
||||
"disableInFiles": ["*.md"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
## FAQs
|
||||
|
||||
### I want better completions, should I use GPT-4?
|
||||
|
||||
|
|
@ -144,20 +111,10 @@ Follow these steps to ensure that everything is set up correctly:
|
|||
|
||||
Depending on your hardware, you may want to try a smaller, faster model. If 3b isn't working for you we recommend trying `deepseek-coder:1.3b-base`.
|
||||
|
||||
### Completions don't know about my code
|
||||
|
||||
We are working on this! Right now Continue uses the Language Server Protocol to add definitions to the prompt, as well as using similarity search over recently edited files. We will be improving the accuracy of this system greatly over the next few weeks.
|
||||
|
||||
### Completions contain formatting errors
|
||||
|
||||
If you're seeing a common pattern of mistake that might be helpful to report, please share in Discord. We will do our best to fix it 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.
|
||||
|
||||
## FAQs
|
||||
|
||||
### Can I configure a "trigger key" for autocomplete?
|
||||
|
||||
Yes, in VS Code, if you don't want to be shown suggestions automatically you can:
|
||||
|
|
@ -184,6 +141,6 @@ Alternatively, open VS Code settings, search for "Continue" and uncheck the box
|
|||
|
||||
Open Settings -> Tools -> Continue and uncheck the box for "Enable Tab Autocomplete".
|
||||
|
||||
## Feedback
|
||||
#### 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.
|
||||
72
docs/docs/customize/deep-dives/codebase.md
Normal file
72
docs/docs/customize/deep-dives/codebase.md
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
---
|
||||
description: Talk to your codebase
|
||||
keywords: [talk, embeddings, reranker, codebase, experimental]
|
||||
---
|
||||
|
||||
# @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 with `all-MiniLM-L6-v2` and stored locally in `~/.continue/index`.
|
||||
|
||||
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. These can be set in `config.json`, and are the same for the codebase and folder context providers:
|
||||
|
||||
```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`.
|
||||
|
||||
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".
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
---
|
||||
title: Talk To Your Docs
|
||||
description: Learn how to access and search your project's documentation directly within Continue
|
||||
keywords: [documentation, indexing, context provider, embeddings]
|
||||
keywords: [documentation, indexing, context provider, embeddings, docs]
|
||||
toc_max_heading_level: 5
|
||||
---
|
||||
|
||||
# @docs
|
||||
|
||||
The [`@docs` context provider](http://localhost:3000/customization/context-providers#documentation) allows you to interact with your documentation directly within Continue. This feature enables you to index any static site or GitHub markdown pages, making it easier to access and utilize your documentation while coding.
|
||||
|
||||
## Enabling the `@docs` context provider
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
# Prompt files (experimental)
|
||||
---
|
||||
title: Prompt files
|
||||
---
|
||||
|
||||
Prompt files provide a convenient way to standardize common patterns and share a collection of LLM prompts with your team. They make it easy to build and use these prompts.
|
||||
|
||||
|
|
@ -33,7 +35,7 @@ Write unit tests for the above selected code, following each of these instructio
|
|||
- Don't explain how to set up `jest`
|
||||
```
|
||||
|
||||
Now to use this prompt, you can highlight code and use `cmd/ctrl+L` to select it in the Continue sidebar.
|
||||
Now to use this prompt, you can highlight code and use `cmd/ctrl + L` to select it in the Continue sidebar.
|
||||
|
||||
Then, type "/" to see the list of slash commands and choose the one called "test". Press enter and the LLM will respond given the instructions from your prompt file.
|
||||
|
||||
|
|
@ -77,7 +79,7 @@ The following built-in variables are currently available:
|
|||
|
||||
### Context providers
|
||||
|
||||
Any [context provider](../customization/context-providers.md) that you have added to your config can be referenced using the name of the context provider. Context providers that receive an input are also supported.
|
||||
Any [context provider](../context-providers.md) that you have added to your config can be referenced using the name of the context provider. Context providers that receive an input are also supported.
|
||||
|
||||
- `{{{ terminal }}}` - The contents of the terminal
|
||||
- `{{{ url "https://github.com/continuedev/continue" }}}` - The contents of a URL
|
||||
9
docs/docs/customize/development-data.md
Normal file
9
docs/docs/customize/development-data.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
title: Development data
|
||||
description: Collecting data on how you build software
|
||||
keywords: [development data, dev data, LLM-aided development]
|
||||
---
|
||||
|
||||
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. When combined with the code that you ultimately commit, it can be used to improve the LLM that you or your team use (if you allow).
|
||||
|
||||
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)
|
||||
|
Before Width: | Height: | Size: 858 KiB After Width: | Height: | Size: 858 KiB |
|
|
@ -1,8 +1,8 @@
|
|||
# SambaNova Cloud
|
||||
|
||||
The SambaNova Cloud is a cloud platform for running large AI models with the world record Llama 3.1 70B/405B performance. You can sign up [here](https://cloud.sambanova.ai/), copy your API key on the initial welcome screen, and then hit the play button on any model from the [model list](https://community.sambanova.ai/t/quick-start-guide/104). Change `~/.continue/config.json` to look like this:
|
||||
The SambaNova Cloud is a cloud platform for running large AI models with the world record Llama 3.1 70B/405B performance. You can sign up [here](https://cloud.sambanova.ai/), copy your API key on the initial welcome screen, and then hit the play button on any model from the [model list](https://community.sambanova.ai/t/quick-start-guide/104).
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Cloudflare Workers AI can be used for both chat and tab autocompletion in Continue. To setup Cloudflare Workers AI, add the following to your `config.json` file:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
56
docs/docs/customize/model-providers/more/cohere.md
Normal file
56
docs/docs/customize/model-providers/more/cohere.md
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
# 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-R Plus** as your chat model.
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"title": "Cohere",
|
||||
"provider": "cohere",
|
||||
"model": "command-r-plus",
|
||||
"apiKey": "YOUR_API_KEY"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Autocomplete model
|
||||
|
||||
Cohere currently does not offer any autocomplete models.
|
||||
|
||||
[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers.
|
||||
|
||||
## Embeddings model
|
||||
|
||||
We recommend configuring **embed-english-v3.0** as your embeddings model.
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
"provider": "cohere",
|
||||
"model": "embed-english-v3.0",
|
||||
"apiKey": "<COHERE_API_KEY>"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Reranking model
|
||||
|
||||
We recommend configuring **rerank-english-v3.0** as your reranking model.
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
"provider": "cohere",
|
||||
"params": {
|
||||
"model": "rerank-english-v3.0",
|
||||
"apiKey": "<COHERE_API_KEY>"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
[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:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
[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:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
31
docs/docs/customize/model-providers/more/free-trial.md
Normal file
31
docs/docs/customize/model-providers/more/free-trial.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
title: Free Trial
|
||||
slug: ../free-trial
|
||||
---
|
||||
|
||||
The `"free-trial"` provider lets new users quickly try out the best experience in Continue using our API keys through a secure proxy server. To prevent abuse, we will ask you to sign in with GitHub, which you can read more about below.
|
||||
|
||||
While the Continue extension is always free to use, we cannot support infinite free LLM usage for all of our users. You will eventually need to either:
|
||||
|
||||
1. Select an open-source model to use for free [locally](../top-level/ollama.md), or
|
||||
2. Add your own API key for [Anthropic](../top-level/anthropic.md) or [another LLM provider](/customize/model-providers)
|
||||
|
||||
## FAQ about the trial
|
||||
|
||||
Continue asks free trial users to sign in so that we can prevent abuse of our API endpoints. If you are not using the free trial, we will not ask you to sign in.
|
||||
|
||||
### How do I stop Continue from asking me to sign in?
|
||||
|
||||
Remove all models from the "models" array or "tabAutocompleteModel" with `"provider": "free-trial"`, and we will never request sign in.
|
||||
|
||||
### What information is collected?
|
||||
|
||||
Continue uses your GitHub username and no other information, for the sole purpose of limiting requests.
|
||||
|
||||
### What happens if I don't sign in?
|
||||
|
||||
If you don't sign in, you can still use every feature of Continue, you will just need to provide your own LLM either with an API key or by running a local model.
|
||||
|
||||
### How is telemetry related to sign in?
|
||||
|
||||
It is not. We do not link your GitHub username to telemetry data.
|
||||
19
docs/docs/customize/model-providers/more/groq.md
Normal file
19
docs/docs/customize/model-providers/more/groq.md
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Groq
|
||||
|
||||
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:
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"title": "Llama 3.1 405b",
|
||||
"provider": "groq",
|
||||
"model": "llama3.1-405b",
|
||||
"apiKey": "<API_KEY>"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
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:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
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:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -20,7 +20,7 @@ IPEX-LLM supports accelerated Ollama backend to be hosted on Intel GPU. Refer to
|
|||
|
||||
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:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -34,6 +34,7 @@ If you would like to reach the Ollama service from another machine, make sure yo
|
|||
```
|
||||
|
||||
:::tip
|
||||
- For more configuration options regarding completion or authentication, you could refer to [here](./ollama.md#completion-options) for Ollama provider.
|
||||
- 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.
|
||||
|
||||
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.
|
||||
|
||||
:::
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
# 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 your API key on the [API keys page](https://app.kindo.ai/settings/api), and choose a model from the list of supported models in the [plugins tab](https://app.kindo.ai/plugins).
|
||||
|
||||
## Config Example
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -18,7 +19,7 @@ Kindo offers centralized control over your organization's AI operations, ensurin
|
|||
|
||||
## Tab Autocomplete Config Example
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"tabAutocompleteModel": [
|
||||
{
|
||||
|
|
@ -39,4 +40,4 @@ Kindo offers centralized control over your organization's AI operations, ensurin
|
|||
|
||||
## Security
|
||||
|
||||
To update your organization's model access, adjust the controls in [security settings](https://app.kindo.ai/security-settings).
|
||||
To update your organization's model access, adjust the controls in [security settings](https://app.kindo.ai/security-settings).
|
||||
|
|
@ -8,7 +8,7 @@ Run the llama.cpp server binary to start the API server. If running on a remote
|
|||
|
||||
After it's up and running, change `~/.continue/config.json` to look like this:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
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:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
[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:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -14,11 +14,11 @@
|
|||
}
|
||||
```
|
||||
|
||||
### Setting up a remote instance
|
||||
## Setting up a remote instance
|
||||
|
||||
To configure a remote instance of LM Studio, add the `"apiBase"` property to your model in config.json:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"title": "LM Studio",
|
||||
"model": "codestral",
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
[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:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -29,7 +29,7 @@ In addition to the model type, you can also configure some of the parameters tha
|
|||
|
||||
If you need to send custom headers for authentication, you may use the `requestOptions.headers` property like this:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -4,7 +4,7 @@ OpenRouter is a unified interface for commercial and open-source models, giving
|
|||
|
||||
Change `~/.continue/config.json` to look like the following.
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -22,7 +22,7 @@ To utilize features such as provider preferences or model routing configuration,
|
|||
|
||||
For example, to prevent extra long prompts from being compressed, you can explicitly turn off the feature like so:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
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:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
# AWS SageMaker
|
||||
# AWS SageMaker
|
||||
|
||||
SageMaker provider support SageMaker endpoint deployed with [LMI](https://docs.djl.ai/docs/serving/serving/docs/lmi/index.html)
|
||||
|
||||
To setup SageMaker, add the following to your `config.json` file:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -12,19 +12,19 @@ To setup SageMaker, add the following to your `config.json` file:
|
|||
"provider": "sagemaker",
|
||||
"model": "lmi-model-deepseek-coder-xxxxxxx",
|
||||
"region": "us-west-2"
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
The value in model should be the SageMaker endpoint name you deployed.
|
||||
|
||||
Authentication will be through temporary or long-term credentials in
|
||||
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.
|
||||
aws_session_token = pqrstuvwxyz # Optional: means short term creds.
|
||||
```
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
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 in your `config.json` like this:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
# TogetherLLM
|
||||
# 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/models-inference). Change `~/.continue/config.json` to look like this:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -6,9 +6,9 @@ Run the OpenAI-compatible server by vLLM using `vllm serve`. See their [server d
|
|||
vllm serve NousResearch/Meta-Llama-3-8B-Instruct --max-model-len 1024
|
||||
```
|
||||
|
||||
The continue implementation uses [OpenAI](./openai.md) under the hood and automatically selects the available model. You only need to set the `apiBase` like this:
|
||||
The continue implementation uses [OpenAI](../top-level/openai.md) under the hood and automatically selects the available model. You only need to set the `apiBase` like this:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
84
docs/docs/customize/model-providers/more/watsonx.md
Normal file
84
docs/docs/customize/model-providers/more/watsonx.md
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
# 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 [setup an API key](https://www.ibm.com/docs/en/mas-cd/continuous-delivery?topic=cli-creating-your-cloud-api-key). Then, in continue:
|
||||
|
||||
- Set **watsonx URL** to your watsonx SaaS endpoint, e.g. `https://us-south.ml.cloud.ibm.com` for US South region.
|
||||
- Set **watsonx Project ID** to your watsonx project ID.
|
||||
- Set **watsonx API Key** 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 **watsonx URL** to your watsonx software endpoint, e.g. `https://cpd-watsonx.apps.example.com`.
|
||||
- Set **watsonx Project ID** to your watsonx project ID.
|
||||
- Set **watsonx API Key** 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 "<username>:<apikey>" | base64`, replacing `<username>` with your CPD username and `<apikey>` with the API Key you just created.
|
||||
2. _Option 2_: using `username/password` authentication:
|
||||
- Set **watsonx URL** to your watsonx software endpoint, e.g. `https://cpd-watsonx.apps.example.com`.
|
||||
- Set **watsonx Project ID** to your watsonx project ID.
|
||||
- Set **watsonx API Key** to your watsonx Username and Password using `username:password` as format.
|
||||
|
||||
## Configuration
|
||||
|
||||
Add the following configuration to your `config.json` file to use the watsonx provider. Fill in the `watsonxCreds` with the authentication details you obtained in the setup step.
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"model": "model ID",
|
||||
"title": "watsonx - Model Name",
|
||||
"watsonxUrl": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com",
|
||||
"watsonxProjectId": "PROJECT_ID",
|
||||
"watsonxCreds": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD",
|
||||
"watsonxApiVersion": "2023-05-29",
|
||||
"provider": "watsonx"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
`watsonxAPIVersion` is optional and defaults to the latest version.
|
||||
|
||||
### Configuration Options
|
||||
|
||||
Add the full watsonx URL to `watsonxFullUrl` if you are using a custom endpoint. When `watsonxFullUrl` is set, `watsonxUrl` and `watsonxApiVersion` are ignored.
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"model": "model ID",
|
||||
"title": "watsonx - Model Name",
|
||||
"watsonxUrl": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com",
|
||||
"watsonxProjectId": "PROJECT_ID",
|
||||
"watsonxCreds": "API_KEY",
|
||||
"watsonxApiVersion": "2023-05-29",
|
||||
"provider": "watsonx",
|
||||
"watsonxFullUrl": "https://us-south.ml.cloud.ibm.com/m1/v1/text/generation"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||

|
||||
66
docs/docs/customize/model-providers/top-level/anthropic.md
Normal file
66
docs/docs/customize/model-providers/top-level/anthropic.md
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
---
|
||||
title: Anthropic
|
||||
slug: ../anthropic
|
||||
---
|
||||
|
||||
:::info
|
||||
|
||||
You can get an API key from the [Anthropic console](https://console.anthropic.com/account/keys).
|
||||
|
||||
:::
|
||||
|
||||
## Chat model
|
||||
|
||||
We recommend configuring **Claude 3.5 Sonnet** as your chat model.
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"title": "Claude 3.5 Sonnet",
|
||||
"provider": "anthropic",
|
||||
"model": "claude-3-5-sonnet-20240620",
|
||||
"apiKey": "[API_KEY]"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Autocomplete model
|
||||
|
||||
Anthropic currently does not offer any autocomplete models.
|
||||
|
||||
[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers.
|
||||
|
||||
## Embeddings model
|
||||
|
||||
Anthropic currently does not offer any embeddings models.
|
||||
|
||||
[Click here](../../model-types/embeddings.md) to see a list of embeddings model providers.
|
||||
|
||||
## Reranking model
|
||||
|
||||
Anthropic currently does not offer any reranking models.
|
||||
|
||||
[Click here](../../model-types/reranking.md) 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).
|
||||
|
||||
Currently, we only allow caching of the system message. To enable this feature, update your your model configuration with `"cacheSystemMessage": true`:
|
||||
|
||||
```json
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
// Enable prompt caching
|
||||
"cacheSystemMessage": true,
|
||||
"title": "Anthropic",
|
||||
"provider": "anthropic",
|
||||
"model": "claude-3-5-sonnet-20240620",
|
||||
"apiKey": "[API_KEY]"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
83
docs/docs/customize/model-providers/top-level/azure.md
Normal file
83
docs/docs/customize/model-providers/top-level/azure.md
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
---
|
||||
title: Azure OpenAI
|
||||
slug: ../azure
|
||||
---
|
||||
|
||||
## Chat model
|
||||
|
||||
We recommend configuring **GPT-4o** as your chat model.
|
||||
|
||||
```json title="config.json"
|
||||
"models": [{
|
||||
"title": "GPT-4o",
|
||||
"provider": "azure",
|
||||
"model": "gpt-4o",
|
||||
"apiBase": "<YOUR_DEPLOYMENT_BASE>",
|
||||
"engine": "<YOUR_ENGINE>",
|
||||
"apiVersion": "<YOUR_API_VERSION>",
|
||||
"apiType": "openai",
|
||||
"apiKey": "<MY_API_KEY>"
|
||||
}]
|
||||
```
|
||||
|
||||
## Autocomplete model
|
||||
|
||||
We recommend configuring **Codestral** as your autocomplete model.
|
||||
|
||||
```json title="config.json"
|
||||
"tabAutocompleteModel": [{
|
||||
"title": "Codestral",
|
||||
"provider": "azure",
|
||||
"model": "codestral-latest",
|
||||
"apiBase": "<YOUR_DEPLOYMENT_BASE>",
|
||||
"engine": "<YOUR_ENGINE>",
|
||||
"apiVersion": "<YOUR_API_VERSION>",
|
||||
"apiType": "openai",
|
||||
"apiKey": "<MY_API_KEY>"
|
||||
}]
|
||||
```
|
||||
|
||||
## Embeddings model
|
||||
|
||||
We recommend configuring **text-embedding-3-large** as your embeddings model.
|
||||
|
||||
```json title="config.json"
|
||||
"embeddingsProvider": [{
|
||||
"provider": "azure",
|
||||
"model": "text-embedding-3-large",
|
||||
"apiBase": "<YOUR_DEPLOYMENT_BASE>",
|
||||
"engine": "<YOUR_ENGINE>",
|
||||
"apiVersion": "<YOUR_API_VERSION>",
|
||||
"apiType": "openai",
|
||||
"apiKey": "<MY_API_KEY>"
|
||||
}]
|
||||
```
|
||||
|
||||
## Reranking model
|
||||
|
||||
Azure OpenAI currently does not offer any reranking models.
|
||||
|
||||
[Click here](../../model-types/reranking.md) 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]
|
||||
You need to apply for access to the Azure OpenAI service. Response times are typically within a few days.
|
||||
|
||||
**[Click here to apply for access to the Azure OpenAI service](https://azure.microsoft.com/en-us/products/ai-services/openai-service)**
|
||||
:::
|
||||
|
||||
## General model configuration
|
||||
|
||||
Azure OpenAI requires a handful of additional parameters to be configured, such as a model engine and API version.
|
||||
|
||||
To find this information in _Azure AI Studio_, 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/chat/completions?api-version=2023-13-15-preview>` would map to the following:
|
||||
|
||||
- model = gpt-4o
|
||||
- engine = gpt-4o
|
||||
- apiVersion = 2023-13-15-preview
|
||||
- apiBase = just-an-example.openai.azure.com
|
||||
90
docs/docs/customize/model-providers/top-level/bedrock.md
Normal file
90
docs/docs/customize/model-providers/top-level/bedrock.md
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
---
|
||||
title: Amazon Bedrock
|
||||
slug: ../bedrock
|
||||
---
|
||||
|
||||
## Chat model
|
||||
|
||||
We recommend configuring **Claude 3.5 Sonnet** as your chat model.
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"title": "Claude 3.5 Sonnet",
|
||||
"provider": "bedrock",
|
||||
"model": "anthropic.claude-3-5-sonnet-20240620-v1:0",
|
||||
"region": "us-east-1",
|
||||
"profile": "bedrock"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Autocomplete model
|
||||
|
||||
Bedrock currently does not offer any autocomplete models.
|
||||
|
||||
[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers.
|
||||
|
||||
## 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.
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
"title": "Embeddings Model",
|
||||
"provider": "bedrock",
|
||||
"model": "amazon.titan-embed-text-v2:0",
|
||||
"region": "us-west-2"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Reranking model
|
||||
|
||||
Bedrock currently does not offer any reranking models.
|
||||
|
||||
[Click here](../../model-types/reranking.md) to see a list of reranking model providers.
|
||||
|
||||
## 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.json` file:
|
||||
|
||||
```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.
|
||||
```
|
||||
53
docs/docs/customize/model-providers/top-level/deepseek.md
Normal file
53
docs/docs/customize/model-providers/top-level/deepseek.md
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
---
|
||||
title: DeepSeek
|
||||
slug: ../deepseek
|
||||
---
|
||||
|
||||
:::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.
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"title": "DeepSeek Chat",
|
||||
"provider": "deepseek",
|
||||
"model": "deepseek-chat",
|
||||
"apiKey": "[API_KEY]"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Autocomplete model
|
||||
|
||||
We recommend configuring **DeepSeek Coder** as your autocomplete model.
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"tabAutocompleteModel": {
|
||||
"title": "DeepSeek Coder",
|
||||
"provider": "deepseek",
|
||||
"model": "deepseek-coder"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Embeddings model
|
||||
|
||||
DeepSeek currently does not offer any embeddings models.
|
||||
|
||||
[Click here](../../model-types/embeddings.md) to see a list of embeddings model providers.
|
||||
|
||||
## Reranking model
|
||||
|
||||
DeepSeek currently does not offer any reranking models.
|
||||
|
||||
[Click here](../../model-types/reranking.md) to see a list of reranking model providers.
|
||||
55
docs/docs/customize/model-providers/top-level/gemini.md
Normal file
55
docs/docs/customize/model-providers/top-level/gemini.md
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
title: Gemini
|
||||
slug: ../gemini
|
||||
---
|
||||
|
||||
:::info
|
||||
|
||||
You can get an API key from the [Google AI Studio](https://aistudio.google.com/).
|
||||
|
||||
:::
|
||||
|
||||
## Chat model
|
||||
|
||||
We recommend configuring **Gemini 1.5 Pro** as your chat model.
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"title": "Gemini 1.5 Pro",
|
||||
"provider": "gemini",
|
||||
"model": "gemini-1.5-pro-latest",
|
||||
"apiKey": "[API_KEY]"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Autocomplete model
|
||||
|
||||
Gemini currently does not offer any autocomplete models.
|
||||
|
||||
[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers.
|
||||
|
||||
## Embeddings model
|
||||
|
||||
We recommend configuring **text-embedding-004** as your embeddings model.
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": [
|
||||
{
|
||||
"provider": "gemini",
|
||||
"model": "models/text-embedding-004",
|
||||
"apiKey": "[API_KEY]"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Reranking model
|
||||
|
||||
Gemini currently does not offer any reranking models.
|
||||
|
||||
[Click here](../../model-types/reranking.md) to see a list of reranking model providers.
|
||||
64
docs/docs/customize/model-providers/top-level/mistral.md
Normal file
64
docs/docs/customize/model-providers/top-level/mistral.md
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
---
|
||||
title: Mistral
|
||||
slug: ../mistral
|
||||
---
|
||||
|
||||
:::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).
|
||||
|
||||
:::
|
||||
|
||||
## Chat model
|
||||
|
||||
We recommend configuring **Mistral Large** as your chat model.
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"title": "Mistral Large",
|
||||
"provider": "mistral",
|
||||
"model": "mistral-large-latest",
|
||||
"apiKey": "[API_KEY]"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Autocomplete model
|
||||
|
||||
We recommend configuring **Codestral** as your autocomplete model.
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"tabAutocompleteModel": {
|
||||
"title": "Codestral",
|
||||
"provider": "mistral",
|
||||
"model": "codestral-latest"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Embeddings model
|
||||
|
||||
We recommend configuring **Mistral Embed** as your embeddings model.
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": [
|
||||
{
|
||||
"provider": "mistral",
|
||||
"model": "mistral-embed",
|
||||
"apiKey": "[API_KEY]",
|
||||
"apiBase": "https://api.mistral.ai/v1"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Reranking model
|
||||
|
||||
Mistral currently does not offer any reranking models.
|
||||
|
||||
[Click here](../../model-types/reranking.md) to see a list of reranking model providers.
|
||||
53
docs/docs/customize/model-providers/top-level/ollama.md
Normal file
53
docs/docs/customize/model-providers/top-level/ollama.md
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
---
|
||||
title: Ollama
|
||||
slug: ../ollama
|
||||
---
|
||||
|
||||
## Chat model
|
||||
|
||||
We recommend configuring **Llama3.1 8B** as your chat model.
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"title": "Llama3.1 8B",
|
||||
"provider": "ollama",
|
||||
"model": "llama3.1:8b"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Autocomplete model
|
||||
|
||||
We recommend configuring **StarCoder2 3B** as your autocomplete model.
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"tabAutocompleteModel": {
|
||||
"title": "StarCoder2 3B",
|
||||
"provider": "ollama",
|
||||
"model": "starcoder2:3b"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Embeddings model
|
||||
|
||||
We recommend configuring **Nomic Embed Text** as your embeddings model.
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
"provider": "ollama",
|
||||
"model": "nomic-embed-text"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Reranking model
|
||||
|
||||
Ollama currently does not offer any reranking models.
|
||||
|
||||
[Click here](../../model-types/reranking.md) to see a list of reranking model providers.
|
||||
|
|
@ -1,6 +1,58 @@
|
|||
# OpenAI
|
||||
---
|
||||
title: OpenAI
|
||||
slug: ../openai
|
||||
---
|
||||
|
||||
The OpenAI class can be used to access OpenAI models like GPT-4, GPT-4 Turbo, and GPT-3.5 Turbo.
|
||||
:::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.
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"title": "GPT-4o",
|
||||
"provider": "openai",
|
||||
"model": "gpt-4o",
|
||||
"apiKey": "[API_KEY]"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Autocomplete model
|
||||
|
||||
OpenAI currently does not offer any autocomplete models.
|
||||
|
||||
[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers.
|
||||
|
||||
## Embeddings model
|
||||
|
||||
We recommend configuring **text-embedding-3-large** as your embeddings model.
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": [
|
||||
{
|
||||
"provider": "openai",
|
||||
"model": "text-embedding-3-large",
|
||||
"apiKey": "[API_KEY]"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Reranking model
|
||||
|
||||
OpenAI currently does not offer any reranking models.
|
||||
|
||||
[Click here](../../model-types/reranking.md) to see a list of reranking model providers.
|
||||
|
||||
## OpenAI compatible servers / APIs
|
||||
|
||||
|
|
@ -12,16 +64,16 @@ OpenAI compatible servers
|
|||
- [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) [^1]
|
||||
- [vLLM](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html)
|
||||
|
||||
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](../../setup/model-providers.md#local), you can change the `apiBase` like this:
|
||||
If you are using an OpenAI compatible server / API, you can change the `apiBase` like this:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -40,7 +92,3 @@ To force usage of `chat/completions` instead of `completions` endpoint you can s
|
|||
```json
|
||||
"useLegacyCompletionsEndpoint": false
|
||||
```
|
||||
|
||||
[^1]: Use the [Vllm Model Provider](./vllm.md) instead.
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/OpenAI.ts)
|
||||
16
docs/docs/customize/model-types/autocomplete.md
Normal file
16
docs/docs/customize/model-types/autocomplete.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: Autocomplete model
|
||||
description: Autocomplete model
|
||||
keywords: [autocomplete]
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
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 perform poorly.
|
||||
|
||||
In Continue, these models are used to display inline [Autocomplete](../../docs/chat/how-to-use-it.md) suggestions as you type.
|
||||
|
||||
## Recommended Autocomplete models
|
||||
|
||||
If you have the ability to use any model, we recommend [Codestral](../model-providers/top-level/mistral.md) from Mistral.
|
||||
|
||||
If you want to run a model locally, we recommend [Starcoder2-3B] with [Ollama](../model-providers/top-level/ollama.md).
|
||||
18
docs/docs/customize/model-types/chat.md
Normal file
18
docs/docs/customize/model-types/chat.md
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
title: Chat model
|
||||
description: Chat model
|
||||
keywords: [chat]
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
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 [Chat](../../docs/chat/how-to-use-it.md), [Edit](../../docs/edit/how-to-use-it.md), and [Actions](../../docs/actions/how-to-use-it.md).
|
||||
|
||||
## Recommended Chat models
|
||||
|
||||
If you have the ability to use any model, we recommend [Claude 3.5 Sonnet](../model-providers/top-level/anthropic.md).
|
||||
|
||||
Otherwise, some of the next best options are:
|
||||
|
||||
- [GPT-4o](../model-providers/top-level/openai.md)
|
||||
- [Gemini 1.5 Pro](../model-providers/top-level/gemini.md)
|
||||
- [Llama3.1 405B](../tutorials/llama3.1.md)
|
||||
71
docs/docs/customize/model-types/embeddings.md
Normal file
71
docs/docs/customize/model-types/embeddings.md
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
---
|
||||
title: Embeddings model
|
||||
description: Embeddings model
|
||||
keywords: [embedding]
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
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.md) to perform similarity search over your codebase.
|
||||
|
||||
## Recommended reranking models
|
||||
|
||||
If you have the ability to use any model, we recommend `voyage-code-2`, 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.md#embeddings-model).
|
||||
|
||||
### Voyage AI
|
||||
|
||||
After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this:
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
"provider": "voyage",
|
||||
"model": "voyage-code-2",
|
||||
"apiKey": "<VOYAGE_API_KEY>"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Ollama
|
||||
|
||||
See [here](../model-providers/top-level/ollama.md#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 and used as the default when you have not explicitly configured an embeddings provider.
|
||||
|
||||
```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:
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
"provider": "huggingface-tei",
|
||||
"apiBase": "http://localhost:8080"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### OpenAI
|
||||
|
||||
See [here](../model-providers/top-level/openai.md#embeddings-model) for instructions on how to use OpenAI for embeddings.
|
||||
|
||||
### Cohere
|
||||
|
||||
See [here](../model-providers/more/cohere.md#embeddings-model) for instructions on how to use Cohere for embeddings.
|
||||
|
||||
### Gemini
|
||||
|
||||
See [here](../model-providers/top-level/gemini.md#embeddings-model) for instructions on how to use Gemini for embeddings.
|
||||
92
docs/docs/customize/model-types/reranking.md
Normal file
92
docs/docs/customize/model-types/reranking.md
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
---
|
||||
title: Reranking model
|
||||
description: Reranking model
|
||||
keywords: [rerank]
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
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, reranking is used by [@codebase](../deep-dives/codebase.md) 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-1` 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-1` model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this:
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"reranker": {
|
||||
"name": "voyage",
|
||||
"params": {
|
||||
"model": "rerank-lite-1",
|
||||
"apiKey": "<VOYAGE_API_KEY>"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Cohere
|
||||
|
||||
See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rerank-2).
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"reranker": {
|
||||
"name": "cohere",
|
||||
"params": {
|
||||
"model": "rerank-english-v3.0",
|
||||
"apiKey": "<COHERE_API_KEY>"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 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.
|
||||
|
||||
```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:
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"reranker": {
|
||||
"name": "huggingface-tei",
|
||||
"params": {
|
||||
"apiBase": "http://localhost:8080",
|
||||
"truncate": true,
|
||||
"truncation_direction": "Right"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Free Trial (Voyage AI)
|
||||
|
||||
Continue offers a free trial of Voyage AI's reranking model.
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"reranker": {
|
||||
"name": "free-trial"
|
||||
}
|
||||
}
|
||||
```
|
||||
23
docs/docs/customize/overview.md
Normal file
23
docs/docs/customize/overview.md
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
title: Overview
|
||||
description: Introduction to customizing Continue
|
||||
keywords: [customize, configure, config]
|
||||
---
|
||||
|
||||
Continue can be deeply customized. This is primarily accomplished by editing a local file located at `~/.continue/config.json` (MacOS / Linux) or `%USERPROFILE%\.continue\config.json` (Windows). `config.json` is created the first time you use Continue.
|
||||
|
||||
## Getting started
|
||||
|
||||
To open `config.json`, click the "gear" icon in the bottom right corner of the Continue Chat sidebar. When editing this file, you can use IntelliSense to see the available options as you type, or you can check the [full reference](./config.mdx).
|
||||
|
||||
When you save `config.json`, Continue will automatically refresh to take into account your changes.
|
||||
|
||||
## Per-workspace configuration
|
||||
|
||||
If you'd like to scope certain settings to a particular workspace, you can add a `.continuerc.json` to the root of your project. It has the same [definition](./config.mdx) as `config.json`, and will automatically be applied on top of the local config.json.
|
||||
|
||||
## Programmatic configuration
|
||||
|
||||
`config.json` can handle the vast majority of necessary configuration, so we recommend using it whenever possible. However, if you need to programmatically configure Continue, you can use `config.ts`, which is located at `~/.continue/config.ts` (MacOS / Linux) or `%USERPROFILE%\.continue\config.ts` (Windows).
|
||||
|
||||
For examples of how to use `config.ts`, see [writing custom slash commands](./tutorials/build-your-own-slash-command.md#custom-slash-commands) or [writing custom context providers](./tutorials/build-your-own-context-provider.md).
|
||||
117
docs/docs/customize/slash-commands.md
Normal file
117
docs/docs/customize/slash-commands.md
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
---
|
||||
title: Slash commands
|
||||
description: Shortcuts that can be activated by prefacing your input with '/'
|
||||
keywords: [slash command, custom commands, step]
|
||||
---
|
||||
|
||||
Slash commands are shortcuts that can be activated by typing '/' and selecting from the dropdown. For example, the built-in '/edit' slash command lets you stream edits directly into your editor.
|
||||
|
||||

|
||||
|
||||
## Built-in Slash Commands
|
||||
|
||||
To use any of the built-in slash commands, open `~/.continue/config.json` and add it to the `slashCommands` list.
|
||||
|
||||
### `/edit`
|
||||
|
||||
Select code with ctrl/cmd + L (VS Code) or ctrl/cmd + J (JetBrains), and then type "/edit", followed by instructions for the edit. Continue will stream the changes into a side-by-side diff editor.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "edit",
|
||||
"description": "Edit highlighted code"
|
||||
}
|
||||
```
|
||||
|
||||
### `/comment`
|
||||
|
||||
Comment works just like /edit, except it will automatically prompt the LLM to comment the code.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "comment",
|
||||
"description": "Write comments for the highlighted code"
|
||||
}
|
||||
```
|
||||
|
||||
### `/share`
|
||||
|
||||
Type "/share" to generate a shareable markdown transcript of your current chat history.
|
||||
|
||||
```json
|
||||
{
|
||||
"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
|
||||
{
|
||||
"name": "cmd",
|
||||
"description": "Generate a shell command"
|
||||
}
|
||||
```
|
||||
|
||||
### `/commit`
|
||||
|
||||
Shows the LLM your current git diff and asks it to generate a commit message.
|
||||
|
||||
```json
|
||||
{
|
||||
"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
|
||||
{
|
||||
"name": "http",
|
||||
"description": "Does something custom",
|
||||
"params": { "url": "<my server endpoint>" }
|
||||
}
|
||||
```
|
||||
|
||||
### `/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
|
||||
{
|
||||
"name": "issue",
|
||||
"description": "Generate a link to a drafted GitHub issue",
|
||||
"params": { "repositoryUrl": "https://github.com/continuedev/continue" }
|
||||
}
|
||||
```
|
||||
|
||||
### `/so`
|
||||
|
||||
The StackOverflow slash command will automatically pull results from StackOverflow to answer your question, quoting links along with its answer.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "so",
|
||||
"description": "Reference StackOverflow to answer the question"
|
||||
}
|
||||
```
|
||||
|
||||
### `/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
|
||||
{
|
||||
"name": "onboard",
|
||||
"description": "Familiarize yourself with the codebase"
|
||||
}
|
||||
```
|
||||
249
docs/docs/customize/tutorials/build-your-own-context-provider.md
Normal file
249
docs/docs/customize/tutorials/build-your-own-context-provider.md
Normal file
|
|
@ -0,0 +1,249 @@
|
|||
---
|
||||
title: Build your own context provider
|
||||
---
|
||||
|
||||
## Introductory Example
|
||||
|
||||
To write your own context provider, you just have to implement the `CustomContextProvider`
|
||||
interface:
|
||||
|
||||
```typescript
|
||||
interface CustomContextProvider {
|
||||
title: string;
|
||||
displayTitle?: string;
|
||||
description?: string;
|
||||
renderInlineAs?: string;
|
||||
type?: ContextProviderType;
|
||||
getContextItems(
|
||||
query: string,
|
||||
extras: ContextProviderExtras,
|
||||
): Promise<ContextItem[]>;
|
||||
loadSubmenuItems?: (
|
||||
args: LoadSubmenuItemsArgs,
|
||||
) => Promise<ContextSubmenuItem[]>;
|
||||
}
|
||||
```
|
||||
|
||||
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<ContextItem[]> => {
|
||||
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;
|
||||
}
|
||||
```
|
||||
|
||||
No modification in `config.json` is necessary.
|
||||
|
||||
## 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<ContextItem[]> => {
|
||||
// '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<ContextSubmenuItem[]> => {
|
||||
// Filter all workspace files for READMEs
|
||||
const allFiles = await args.ide.listWorkspaceContents();
|
||||
const readmes = allFiles.filter((filepath) =>
|
||||
filepath.endsWith("README.md"),
|
||||
);
|
||||
|
||||
// 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 <module_name>` 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`.
|
||||
|
||||
## Writing Context Providers in Other Languages
|
||||
|
||||
If you'd like to write a context provider in a language other than TypeScript, you can use the "http" context provider to call a server that hosts your own code. Add the context provider to `config.json` like this:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "http",
|
||||
"params": {
|
||||
"url": "https://myserver.com/context-provider",
|
||||
"title": "http",
|
||||
"description": "Custom HTTP Context Provider",
|
||||
"displayTitle": "My Custom Context"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- Then, create a server that responds to requests as are made from [HttpContextProvider.ts](../../../core/context/providers/HttpContextProvider.ts). See the `hello` endpoint in [context_provider_server.py](../../../core/context/providers/context_provider_server.py) for an example that uses FastAPI. -->
|
||||
|
||||
## 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
|
||||
{
|
||||
"extensionDependencies": ["continue.continue"]
|
||||
}
|
||||
```
|
||||
|
||||
Or copy `~/.continue/type/core/index.d.ts` to your extension repository.
|
||||
|
||||
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
|
||||
import * as vscode from "vscode";
|
||||
|
||||
class MyCustomProvider implements IContextProvider {
|
||||
get description(): ContextProviderDescription {
|
||||
return {
|
||||
title: "custom",
|
||||
displayTitle: "Custom",
|
||||
description: "Custom description",
|
||||
type: "normal",
|
||||
};
|
||||
}
|
||||
|
||||
async getContextItems(
|
||||
query: string,
|
||||
extras: ContextProviderExtras,
|
||||
): Promise<ContextItem[]> {
|
||||
return [
|
||||
{
|
||||
name: "Custom",
|
||||
description: "Custom description",
|
||||
content: "Custom content",
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
async loadSubmenuItems(
|
||||
args: LoadSubmenuItemsArgs,
|
||||
): Promise<ContextSubmenuItem[]> {
|
||||
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);
|
||||
```
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
---
|
||||
title: Build your own slash command
|
||||
---
|
||||
|
||||
There are two ways to add custom slash commands:
|
||||
|
||||
1. With natural language prompts - this is simpler and only requires writing a string or string template.
|
||||
2. With a custom function - this gives you full access to the Continue SDK and allows you to write arbitrary Typescript code.
|
||||
|
||||
### "Custom Commands" (Use Natural Language)
|
||||
|
||||
You can add custom slash commands by adding to the `customCommands` property in `config.json`.
|
||||
|
||||
- `name`: the name of the command, which will be invoked with `/name`
|
||||
- `description`: a short description of the command, which will appear in the dropdown
|
||||
- `prompt`: a templated prompt to send to the LLM
|
||||
|
||||
Custom commands are great when you are frequently reusing a prompt. For example, if you've crafted a great prompt and frequently ask the LLM to check for mistakes in your code, you could add a command like this:
|
||||
|
||||
```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."
|
||||
}]
|
||||
```
|
||||
|
||||
#### Templating
|
||||
|
||||
The `prompt` property supports templating with Handlebars syntax. You can use the following variables:
|
||||
|
||||
- `input` (used in the example above): any additional input entered with the slash command. For example, if you type `/test only write one test`, `input` will be `only write one test`. This will also include highlighted code blocks.
|
||||
- File names: You can reference any file by providing an absolute path or a path relative to the current working directory.
|
||||
|
||||
### Custom Slash Commands
|
||||
|
||||
If you want to go a step further than writing custom commands with natural language, you can write a custom function that returns the response. This requires using `config.ts` instead of `config.json`.
|
||||
|
||||
To do this, push a new `SlashCommand` object to the `slashCommands` list. This object contains "name", the name that you will type to invoke the slash command, "description", the description seen in the dropdown menu, and "run". The `run` function is any async generator that should yield strings as you want them to be streamed to the UI. As an argument to the function, you have access to a `ContinueSDK` object with utilities such as access to certain information/actions within the IDE, the current language model, and a few other utilities. For example, here is a slash command that generates a commit message:
|
||||
|
||||
```typescript title="~/.continue/config.ts"
|
||||
export function modifyConfig(config: Config): Config {
|
||||
config.slashCommands?.push({
|
||||
name: "commit",
|
||||
description: "Write a commit message",
|
||||
run: async function* (sdk) {
|
||||
const diff = await sdk.ide.getDiff();
|
||||
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'):`,
|
||||
{
|
||||
maxTokens: 20,
|
||||
},
|
||||
)) {
|
||||
yield message;
|
||||
}
|
||||
},
|
||||
});
|
||||
return config;
|
||||
}
|
||||
```
|
||||
148
docs/docs/customize/tutorials/custom-code-rag.md
Normal file
148
docs/docs/customize/tutorials/custom-code-rag.md
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
# Custom code RAG
|
||||
|
||||
While Continue comes with [@codebase](../deep-dives/codebase.md) 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-2`](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-2`, 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 you 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-2",
|
||||
base_url="https://api.voyageai.com/v1/",
|
||||
api_key=os.environ["VOYAGE_API_KEY"],
|
||||
)
|
||||
|
||||
class CodeChunks(LanceModel):
|
||||
filename: str
|
||||
text: str = func.SourceField()
|
||||
vector: Vector(func.ndims()) = 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, a full 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 `config.json`:
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"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-1` model from Voyage AI, which has examples of usage [here](https://docs.voyageai.com/docs/reranker).
|
||||
76
docs/docs/customize/tutorials/how-to-self-host-a-model.md
Normal file
76
docs/docs/customize/tutorials/how-to-self-host-a-model.md
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
---
|
||||
title: How to self-host a model
|
||||
---
|
||||
|
||||
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:
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"title": "Ollama",
|
||||
"provider": "ollama",
|
||||
"model": "llama2-7b",
|
||||
"apiKey": "xxx"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
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:
|
||||
|
||||
```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:
|
||||
|
||||
```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"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
|
@ -4,11 +4,9 @@ description: How to use Llama 3.1 with Continue
|
|||
keywords: [llama, meta, togetherai, ollama, replicate]
|
||||
---
|
||||
|
||||
# Using Llama 3.1 with Continue
|
||||
|
||||
Continue makes it easy to code with the latest open-source models, including the entire Llama 3.1 family of models.
|
||||
|
||||
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](../customization/overview.md).
|
||||
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.
|
||||
|
||||
|
|
@ -20,7 +18,7 @@ Ollama is the fastest way to get up and running with local language models. We r
|
|||
2. Open a terminal and run `ollama run llama3.1:8b`
|
||||
3. Change your Continue config file like this:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -39,7 +37,7 @@ Groq provides the fastest available inference for open-source language models, i
|
|||
1. Obtain an API key [here](https://console.groq.com/keys)
|
||||
2. Update your Continue config file like this:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -60,7 +58,7 @@ Together AI provides fast and reliable inference of open-source models. You'll b
|
|||
2. Copy your API key that appears on the welcome screen
|
||||
3. Update your Continue config file like this:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -80,7 +78,7 @@ 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:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -4,11 +4,9 @@ description: How to run Continue without Internet
|
|||
keywords: [no internet, air-gapped, local model]
|
||||
---
|
||||
|
||||
# Running Continue without Internet
|
||||
|
||||
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 `~/.continue/config.json` and set `"allowAnonymousTelemetry": false`. 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 read about the available options [here](../setup/select-model.md).
|
||||
2. Open `~/.continue/config.json` and set `"allowAnonymousTelemetry": false`. This will stop Continue from attempting requests to PostHog for [anonymous telemetry](../../docs/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` take effect.
|
||||
|
|
@ -4,13 +4,11 @@ description: How to set up Codestral
|
|||
keywords: [codestral, mistral, model setup]
|
||||
---
|
||||
|
||||
# How to set up Codestral with Continue
|
||||
|
||||

|
||||

|
||||
|
||||
**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](../quickstart.md)
|
||||
1. Install the Continue VS Code or JetBrains extension following the instructions [here](../../docs/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)
|
||||
|
||||
|
|
@ -18,7 +16,7 @@ keywords: [codestral, mistral, model setup]
|
|||
|
||||
4. To use Codestral as your model for both `autocomplete` and `chat`, replace `[API_KEY]` with your Mistral API key below and add it to your `config.json` file:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -43,9 +41,9 @@ keywords: [codestral, mistral, model setup]
|
|||
|
||||
### Temporary workaround for JetBrains
|
||||
|
||||
Mistral AI recently changed the API endpoint to `codestral.mistral.ai` instead of `api.mistral.ai`, and our updated JetBrains extension is waiting on approval from the store. In the meantime, you will have to specify apiBase as "https://codestral.mistral.ai/v1" in the config.json like this:
|
||||
Mistral AI recently changed the API endpoint to `codestral.mistral.ai` instead of `api.mistral.ai`, and our updated JetBrains extension is waiting on approval from the store. In the meantime, you will have to specify apiBase as `https://codestral.mistral.ai/v1` in the config.json like this:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
---
|
||||
title: Development Data
|
||||
description: Collecting data on how you build software
|
||||
keywords: [development data, dev data, LLM-aided development, software development, coding feedback]
|
||||
---
|
||||
|
||||
# Development Data
|
||||
|
||||
## Why You Need Development Data
|
||||
|
||||
Development data is essential for any organization aiming to optimize its software development process. It provides crucial insights into how software is built by capturing the detailed workflow, context behind decisions, and natural language reasoning used during coding. Collecting and utilizing this data helps in:
|
||||
|
||||
- **Improving LLMs**: Enhancing the performance and relevance of Large Language Models (LLMs) that assist in coding, making them more accurate and helpful.
|
||||
- **Understanding Developer Challenges**: Identifying what frustrates developers and how they overcome challenges.
|
||||
- **Demonstrating ROI**: Calculating the return on investment (ROI) of using LLMs within your organization.
|
||||
- **Continual Improvement**: Establishing a continuous feedback loop to keep LLMs updated with the latest information, code, and preferred styles.
|
||||
|
||||
## Understanding Development Data
|
||||
|
||||
### Data Components
|
||||
|
||||
- **Step-by-Step Process**: Detailed record of each step taken while completing a task.
|
||||
- **Context Capture**: Information used to make decisions, such as code snippets, documentation, and logs.
|
||||
- **Natural Language Reasoning**: Explanations and decisions made in natural language during coding.
|
||||
|
||||
### Data Storage
|
||||
|
||||
By default, the development data collected by Continue is stored locally on your machine in the directory `~/.continue/dev_data`.
|
||||
|
||||
The data remains within your control on your local machine. If you choose to share your data with Continue for improving LLMs or other services, you must give explicit consent. If you are interested in working with us, please email us at [data@continue.dev](mailto:data@continue.dev).
|
||||
|
||||
## Utilizing Development Data
|
||||
|
||||
When combined with the code you commit, the development data can significantly improve the performance and relevance of LLMs. This results in more accurate suggestions and assistance during coding. Continue helps establish a continuous feedback loop to ensure LLMs always have fresh information, code, and preferred styles.
|
||||
|
||||
Continue plays a critical role in leveraging development data for enhancing LLMs:
|
||||
|
||||
- **Automatic Data Collection**: Continue automatically collects development data, including the step-by-step process, context, and natural language reasoning.
|
||||
|
||||
- **Improvement of LLMs**: The collected data is used to create a continuous feedback loop, ensuring the LLMs are constantly updated with fresh and relevant information, thus improving their performance and accuracy.
|
||||
|
||||
- **Development Data Engine**: Continue aids organizations in setting up development data engines. These engines offer visibility into how developers interact with LLMs, help calculate the ROI, identify frustrations, and enhance the models to overcome challenges.
|
||||
|
||||
- **Open-Source Coding Autopilot**: Continue is building an open-source coding autopilot that enables the automatic collection and utilization of development data, providing flexibility, customization, and better privacy and security.
|
||||
|
||||
- **Customized Improvement**: Continue allows teams to track and improve the metrics that matter most to their specific definitions of "great" software.
|
||||
|
||||
- **Addressing Budget and Data Staleness**: Continue supports organizations in justifying their LLM budgets and managing data staleness by helping them extract, load, and transform their data effectively.
|
||||
|
||||
## Privacy, Security, and Additional Resources
|
||||
|
||||
Understanding the privacy and security implications of development data collection is crucial. Ensure that sensitive information is safeguarded and that data collection aligns with your organization's privacy policies. For more detailed insights and guidelines, refer to the following:
|
||||
|
||||
- [Privacy Policy](https://continue.dev/privacy)
|
||||
- [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) (Article)
|
||||
36
docs/docs/docs/actions/context-selection.md
Normal file
36
docs/docs/docs/actions/context-selection.md
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
title: Context selection
|
||||
description: Actions \-context selection
|
||||
keywords: [context, slash, debug, quick fix, right click]
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
## Slash commands
|
||||
|
||||
Slash commands can be combined with additional instructions, including [context providers](../chat/context-selection.md) or [highlighted code](../chat/context-selection.md).
|
||||
|
||||
For example, with the “/edit” slash command you should describe the edit that you want the LLM to perform.
|
||||
|
||||
Some slash commands will not acknowledge your input; for example, the “/share” slash command just creates a markdown copy of the current conversation, regardless of what else you may request it to do.
|
||||
|
||||
## Quick actions
|
||||
|
||||
Quick actions are always displayed above a class or function and will edit that class or function, but nothing outside of it.
|
||||
|
||||
## Right click actions
|
||||
|
||||
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.
|
||||
|
||||
## Debug action
|
||||
|
||||
The debug action selects the most recently run terminal command and its output and then injects the following prompt into the chat window. 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
|
||||
|
||||
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]”.
|
||||
12
docs/docs/docs/actions/how-it-works.md
Normal file
12
docs/docs/docs/actions/how-it-works.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
title: How it works
|
||||
description: How Actions work
|
||||
keywords: [how, slash, commands, prompt, right click, quick fix, debug, action]
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
While many Actions are based on templated prompts and can be customized with .prompt files, there are a number that execute more complex code under the hood.
|
||||
|
||||
Actions that generate inline diffs, like “/edit”, “/comment”, or right click actions, use the same prompt and response processing logic as [Edit](../edit/how-it-works.md).
|
||||
|
||||
To learn how other slash commands work, see the full reference [here](../../customize/slash-commands.md).
|
||||
58
docs/docs/docs/actions/how-to-customize.md
Normal file
58
docs/docs/docs/actions/how-to-customize.md
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
title: How to customize
|
||||
description: How to customize Actions
|
||||
keywords: [customize, actions]
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
## Built-in slash commands
|
||||
|
||||
Continue has a large library of built-in slash commands, but when you first install we only display the most commonly used ones, like “/edit”, “/comment”, and “/share”. To add more actions, you can open [config.json](../../customize/config.mdx) and add them to the `slashCommands` array.
|
||||
|
||||
## Custom slash commands
|
||||
|
||||
There are two ways to add custom slash commands:
|
||||
|
||||
1. With `.prompt` files - this is recommended in most cases. See the full reference [here](../../customize/deep-dives/prompt-files.md).
|
||||
2. With `config.ts` - this gives you full programmatic access to the LLM, IDE, and other important entities by writing a JavaScript/TypeScript function
|
||||
|
||||
### Custom Slash Commands with `config.ts`
|
||||
|
||||
<!-- TODO: We need a config.ts reference -->
|
||||
<!-- :::tip[config.ts]
|
||||
Before adding a custom slash command, we recommend reading the [introduction to `config.ts`](../../customize/config.mdx).
|
||||
::: -->
|
||||
|
||||
If you want to go a step further than writing custom commands with natural language, you can write a custom function that returns the response. This requires using `config.ts` instead of `config.json`.
|
||||
|
||||
To do this, push a new `SlashCommand` object to the `slashCommands` list. This object contains "name", the name that you will type to invoke the slash command, "description", the description seen in the dropdown menu, and "run". The `run` function is any async generator that should yield strings as you want them to be streamed to the UI. As an argument to the function, you have access to a `ContinueSDK` object with utilities such as access to certain information/actions within the IDE, the current language model, and a few other utilities. For example, here is a slash command that generates a commit message:
|
||||
|
||||
```typescript title="config.ts"
|
||||
export function modifyConfig(config: Config): Config {
|
||||
config.slashCommands?.push({
|
||||
name: "commit",
|
||||
description: "Write a commit message",
|
||||
run: async function* (sdk) {
|
||||
const diff = await sdk.ide.getDiff();
|
||||
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'):`,
|
||||
{
|
||||
maxTokens: 20,
|
||||
},
|
||||
)) {
|
||||
yield message;
|
||||
}
|
||||
},
|
||||
});
|
||||
return config;
|
||||
}
|
||||
```
|
||||
|
||||
<!-- TODO: We need a config.ts reference -->
|
||||
<!-- For full `config.ts` reference, see [here](../reference/config-ts.md). -->
|
||||
|
||||
## Other custom actions
|
||||
|
||||
Currently the other action triggers are not open for configuration, but we plan to allow this via .prompt files in the future.
|
||||
|
||||
<!-- For any actions defined in a .prompt file, you can [configure a specific model](TODO). -->
|
||||
85
docs/docs/docs/actions/how-to-use-it.md
Normal file
85
docs/docs/docs/actions/how-to-use-it.md
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
---
|
||||
title: Actions
|
||||
description: How to use Actions
|
||||
sidebar_label: How to use it
|
||||
keywords: [how, slash, commands, prompt, right click, quick fix, debug, action]
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||

|
||||
|
||||
## How to use it
|
||||
|
||||
Actions are shortcuts for common use cases. For example, you might want to review code, write tests, or add a docstring.
|
||||
|
||||
### Slash commands
|
||||
|
||||
The most common way to invoke an action is with a slash command. These are shortcuts that can be activated by typing '/' and selecting from the dropdown. For example, the built-in '/edit' slash command lets you stream edits directly into your editor.
|
||||
|
||||

|
||||
|
||||
A few of the most useful slash commands are available by default, like “/edit”, “/comment”, and “/share”, but Continue has a large built-in library of other options. To enable these, learn more [here](../../customize/slash-commands.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.
|
||||
|
||||
The full .prompt file reference can be found [here](../../customize/deep-dives/prompt-files.md).
|
||||
|
||||
:::tip[Prompt library]
|
||||
To assist you in getting started, [we've curated a small library of `.prompt` files](https://github.com/continuedev/prompt-file-examples). We encourage community contributions to this repository, so please consider opening up a pull request with your own prompts!
|
||||
:::
|
||||
|
||||
Below is a quick example of setting up a prompt file to write unit tests using Jest.
|
||||
|
||||
1. Create a folder called `.prompts/` at the top level of your workspace.
|
||||
2. Add a file called `test.prompt` to this folder. The name of this file will be the name of the slash command you will use to generate your prompt.
|
||||
3. Write the following contents to `test.prompt` and save.
|
||||
|
||||
```
|
||||
{{{ input }}}
|
||||
|
||||
Write unit tests for the above selected code, following each of these instructions:
|
||||
- Use `jest`
|
||||
- Properly set up and tear down
|
||||
- Include important edge cases
|
||||
- The tests should be complete and sophisticated
|
||||
- Give the tests just as chat output, don't edit any file
|
||||
- Don't explain how to set up `jest`
|
||||
```
|
||||
|
||||
Now to use this prompt, you can highlight code and use `cmd/ctrl+L` to select it in the Continue sidebar.
|
||||
|
||||
Then, type "/" to see the list of slash commands and choose the one called "test". Press enter and the LLM will respond given the instructions from your prompt file.
|
||||
|
||||
### 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.
|
||||
|
||||
#### 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 can also be customized with .prompt files to perform custom actions.
|
||||
|
||||

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

|
||||
|
||||
#### 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 current terminal into the chat sidebar and get debugging advice.
|
||||
|
||||
#### 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.
|
||||
|
||||

|
||||
8
docs/docs/docs/actions/model-setup.md
Normal file
8
docs/docs/docs/actions/model-setup.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
title: Model setup
|
||||
description: Actions model setup
|
||||
keywords: [model]
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
By default, Actions uses the same model as [Chat](../chat/model-setup.mdx) since we recommend a similar, 400B+ parameter model or one of the frontier models for the complex instructions that will be carried out.
|
||||
24
docs/docs/docs/autocomplete/context-selection.md
Normal file
24
docs/docs/docs/autocomplete/context-selection.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
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.
|
||||
31
docs/docs/docs/autocomplete/how-it-works.md
Normal file
31
docs/docs/docs/autocomplete/how-it-works.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
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](../../customize/deep-dives/autocomplete.md).
|
||||
24
docs/docs/docs/autocomplete/how-to-customize.md
Normal file
24
docs/docs/docs/autocomplete/how-to-customize.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
title: How to customize
|
||||
description: How to customize Autocomplete
|
||||
keywords: [customize]
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
Continue offers a handful of parameters in [`config.json`](../../customize/config.mdx) that can be tuned to find the perfect balance between suggestion quality and system performance for your specific needs and hardware capabilities:
|
||||
|
||||
```json title="config.json"
|
||||
"tabAutocompleteOptions": {
|
||||
"useCopyBuffer": false,
|
||||
"maxPromptTokens": 400,
|
||||
"prefixPercentage": 0.5,
|
||||
"multilineCompletions": "always"
|
||||
}
|
||||
```
|
||||
|
||||
- `useCopyBuffer`: Determines if the clipboard content should be considered in prompt construction.
|
||||
- `maxPromptTokens`: Sets the maximum number of tokens for the prompt, balancing context and speed.
|
||||
- `prefixPercentage`: Defines the proportion of the prompt dedicated to the code before the cursor.
|
||||
- `multilineCompletions`: Controls whether suggestions can span multiple lines ("always", "never", or "auto").
|
||||
|
||||
For a comprehensive guide on all configuration options and their impacts, see the [Autocomplete deep dive](../../customize/deep-dives/autocomplete.md).
|
||||
25
docs/docs/docs/autocomplete/how-to-use-it.md
Normal file
25
docs/docs/docs/autocomplete/how-to-use-it.md
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
title: Autocomplete
|
||||
description: Autocomplete \- how to use it
|
||||
sidebar_label: How to use it
|
||||
keywords: [how]
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||

|
||||
|
||||
## 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.
|
||||
54
docs/docs/docs/autocomplete/model-setup.md
Normal file
54
docs/docs/docs/autocomplete/model-setup.md
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
---
|
||||
title: Model setup
|
||||
description: Autocomplete \-model setup
|
||||
keywords: [model, autocomplete]
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
## Best overall experience
|
||||
|
||||
For the best Autocomplete experience, we recommend using Codestral through the [Mistral API](https://console.mistral.ai/). This model offers high-quality completions with an excellent understanding of code context:
|
||||
|
||||
```json title="config.json""
|
||||
{
|
||||
"tabAutocompleteModel": {
|
||||
"title": "Codestral",
|
||||
"provider": "mistral",
|
||||
"model": "codestral-latest",
|
||||
"apiKey": "YOUR_API_KEY"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
:::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`.
|
||||
:::
|
||||
|
||||
## Local, offline / self-hosted experience
|
||||
|
||||
For those preferring local execution or self-hosting,`StarCoder2-3b` offers a good balance of performance and quality for most users:
|
||||
|
||||
```json title="config.json""
|
||||
{
|
||||
"tabAutocompleteModel": {
|
||||
"title": "StarCoder2-3b",
|
||||
"model": "starcoder2:3b",
|
||||
"provider": "ollama"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Alternative experiences
|
||||
|
||||
- Completions too slow? Try `deepseek-coder:1.3b-base` for quicker completions on less powerful hardware
|
||||
- Have more compute? Use `deepseek-coder:6.7b-base` for potentially higher-quality suggestions
|
||||
|
||||
:::note
|
||||
|
||||
For LM Studio users, navigate to the "My Models" section, find your desired model, and copy the path (e.g., second-state/StarCoder2-3B-GGUF/starcoder2-3b-Q8_0.gguf). Use this path as the `model` value in your configuration.
|
||||
|
||||
:::
|
||||
|
||||
## Other experiences
|
||||
|
||||
There are many more models and providers you can use with Autocomplete. Check them out [here](../../customize/model-types/autocomplete.md).
|
||||
46
docs/docs/docs/chat/context-selection.md
Normal file
46
docs/docs/docs/chat/context-selection.md
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
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 `cmd/ctrl + opt + enter` when you send your request.
|
||||
|
||||
## Specific file
|
||||
|
||||
You can include a specific file in your current workspace as context by typing [`@files`](../../customize/context-providers.md#files) and selecting the file.
|
||||
|
||||
## Specific folder
|
||||
|
||||
You can include a folder in your current workspace as context by typing [`@directory`](../../customize/context-providers.md#folders) and selecting the directory. It [works like `@codebase`](../../customize/deep-dives/codebase.md) but only includes the files in the selected directory.
|
||||
|
||||
## Entire codebase
|
||||
|
||||
You can include your entire codebase as context by typing [`@codebase`](../../customize/context-providers.md#codebase-retrieval). You can learn about how @codebase works [here](../../customize/deep-dives/codebase.md).
|
||||
|
||||
## Documentation site
|
||||
|
||||
You can include a documentation site as context by typing [`@docs`](../../customize/context-providers.md#documentation) and selecting the documentation site. You can learn about how @docs works [here](../../customize/deep-dives/docs.md).
|
||||
|
||||
## Terminal contents
|
||||
|
||||
You can include the contents of the terminal in your IDE as context by typing [`@terminal`](../../customize/context-providers.md#terminal).
|
||||
|
||||
## Git diff
|
||||
|
||||
You can include all of the changes you've made to your current branch by typing [`@diff`](../../customize/context-providers.md#git-diff).
|
||||
|
||||
## Other context
|
||||
|
||||
You can see a full list of built-in context providers [here](../../customize/context-providers.md) and how to create your own custom context provider [here](../../customize/tutorials/build-your-own-context-provider.md).
|
||||
14
docs/docs/docs/chat/how-it-works.md
Normal file
14
docs/docs/docs/chat/how-it-works.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
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](../troubleshooting.md#llm-prompt-logs).
|
||||
|
||||
You can learn more about how `@codebase` works [here](../../customize/deep-dives/codebase.md) and `@docs` [here](../../customize/deep-dives/docs.md).
|
||||
12
docs/docs/docs/chat/how-to-customize.md
Normal file
12
docs/docs/docs/chat/how-to-customize.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
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 configure [`@codebase`](../../customize/deep-dives/codebase.md)
|
||||
- You can create your own [custom code RAG](../../customize/tutorials/custom-code-rag.md)
|
||||
- You can configure [`@docs`](../../customize/deep-dives/docs.md)
|
||||
- You can [build your own context provider](../../customize/tutorials/build-your-own-context-provider.md)
|
||||
39
docs/docs/docs/chat/how-to-use-it.md
Normal file
39
docs/docs/docs/chat/how-to-use-it.md
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
title: Chat
|
||||
description: How to use Chat
|
||||
sidebar_label: How to use it
|
||||
keywords: [how, use, chat]
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||

|
||||
|
||||
## 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 want 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 code, you can hover over the top right of the code block and select “Apply to current file” to update the existing code in the editor to this new version.
|
||||
|
||||
## 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 + ’`
|
||||
184
docs/docs/docs/chat/model-setup.mdx
Normal file
184
docs/docs/docs/chat/model-setup.mdx
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
---
|
||||
title: Model setup
|
||||
description: How to set up a Chat model
|
||||
keywords: [model]
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
:::info
|
||||
This page recommends models and providers for Chat. Read more about how to set up your `config.json` [here](../../customize/config.mdx).
|
||||
:::
|
||||
|
||||
## 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.5 from Anthropic
|
||||
|
||||
Our current top recommendation is Claude Sonnet 3.5 from [Anthropic](../../customize/model-providers/top-level/anthropic.md).
|
||||
|
||||
```json title="config.json"
|
||||
"models": [
|
||||
{
|
||||
"title": "Claude 3.5 Sonnet",
|
||||
"provider": "anthropic",
|
||||
"model": "claude-3-5-sonnet-20240620",
|
||||
"apiKey": "[ANTHROPIC_API_KEY]"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Llama 3.1 405B from Meta
|
||||
|
||||
If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your best option right now. You will need to decide if you use it through a SaaS model provider (e.g. [Together](../../customize/model-providers/more/together.md) or [Groq](../../customize/model-providers/more/groq.md)) or self-host it (e.g. using [vLLM](../../customize/model-providers//more/vllm.md) or [Ollama](../../customize/model-providers/top-level/ollama.md)).
|
||||
|
||||
<Tabs groupId="providers">
|
||||
<TabItem value="Together">
|
||||
```json title="config.json"
|
||||
"models": [
|
||||
{
|
||||
"title": "Llama 3.1 405B",
|
||||
"provider": "together",
|
||||
"model": "llama3.1-405b",
|
||||
"apiKey": "[TOGETHER_API_KEY]"
|
||||
}
|
||||
]
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="Groq">
|
||||
```json title="config.json"
|
||||
"models": [
|
||||
{
|
||||
"title": "Llama 3.1 405B",
|
||||
"provider": "groq",
|
||||
"model": "llama3.1-405b",
|
||||
"apiKey": "[GROQ_API_KEY]"
|
||||
}
|
||||
]
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="vLLM">
|
||||
```json title="config.json"
|
||||
"models": [
|
||||
{
|
||||
"title": "Llama 3.1 405B",
|
||||
"provider": "vllm",
|
||||
"model": "llama3.1-405b"
|
||||
}
|
||||
]
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="Ollama">
|
||||
```json title="config.json"
|
||||
"models": [
|
||||
{
|
||||
"title": "Llama 3.1 405B",
|
||||
"provider": "ollama",
|
||||
"model": "llama3.1-405b"
|
||||
}
|
||||
]
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
### GPT-4o from OpenAI
|
||||
|
||||
If you prefer to use a model from [OpenAI](../../customize/model-providers/top-level/openai.md), then we recommend GPT-4o.
|
||||
|
||||
```json title="config.json"
|
||||
"models": [
|
||||
{
|
||||
"title": "GPT-4o",
|
||||
"provider": "openai",
|
||||
"model": "",
|
||||
"apiKey": "[OPENAI_API_KEY]"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Gemini 1.5 Pro from Google
|
||||
|
||||
If you prefer to use a model from [Google](../../customize/model-providers/top-level/gemini.md), then we recommend Gemini 1.5 Pro.
|
||||
|
||||
```json title="config.json"
|
||||
"models": [
|
||||
{
|
||||
"title": "Gemini 1.5 Pro",
|
||||
"provider": "gemini",
|
||||
"model": "gemini-1.5-pro-latest",
|
||||
"apiKey": "[GEMINI_API_KEY]"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## 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](../../customize/model-providers/top-level/ollama.md) or [LM Studio](../../customize/model-providers/more/lmstudio.md)).
|
||||
|
||||
<Tabs groupId="providers">
|
||||
<TabItem value="Ollama">
|
||||
```json title="config.json"
|
||||
"models": [
|
||||
{
|
||||
"title": "Llama 3.1 8B",
|
||||
"provider": "ollama",
|
||||
"model": "llama3.1-8b"
|
||||
}
|
||||
]
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="LM Studio">
|
||||
```json title="config.json"
|
||||
"models": [
|
||||
{
|
||||
"title": "Llama 3.1 8B",
|
||||
"provider": "lmstudio",
|
||||
"model": "llama3.1-8b"
|
||||
}
|
||||
]
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
### 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](../../customize/model-providers/top-level/ollama.md) or [LM Studio](../../customize/model-providers/more/lmstudio.md)).
|
||||
|
||||
<Tabs groupId="providers">
|
||||
<TabItem value="Ollama">
|
||||
```json title="config.json"
|
||||
"models": [
|
||||
{
|
||||
"title": "DeepSeek Coder 2 16B",
|
||||
"provider": "ollama",
|
||||
"model": "deepseek-coder-v2:16b"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="LM Studio">
|
||||
|
||||
```json title="config.json"
|
||||
"models": [
|
||||
{
|
||||
"title": "DeepSeek Coder 2 16B",
|
||||
"provider": "lmstudio",
|
||||
"model": "deepseek-coder-v2:16b"
|
||||
}
|
||||
]
|
||||
```
|
||||
</TabItem>
|
||||
|
||||
</Tabs>
|
||||
|
||||
## Other experiences
|
||||
|
||||
There are many more models and providers you can use with Chat beyond those mentioned above. Read more [here](../../customize/model-types/chat.md)
|
||||
18
docs/docs/docs/edit/context-selection.md
Normal file
18
docs/docs/docs/edit/context-selection.md
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
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.
|
||||
|
||||
## Highlighted code
|
||||
|
||||
The highlighted code you’ve selected is included in the prompt. This is the only section of code that the model will attempt to edit.
|
||||
|
||||
## Current file
|
||||
|
||||
The entire contents of the file containing your highlighted code selection are included as additional context. This gives the model a broader understanding of the code's environment. If the file is too large to fit within the context window, we will trim the file's contents to fit.
|
||||
14
docs/docs/docs/edit/how-it-works.md
Normal file
14
docs/docs/docs/edit/how-it-works.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: How Edit works
|
||||
sidebar_position: 4
|
||||
description: How Edit works
|
||||
keywords: [edit, cmd l, works]
|
||||
---
|
||||
|
||||
Using the highlighted code, the contents of the 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 [view this in the prompt logs](../troubleshooting.md#check-the-logs).
|
||||
16
docs/docs/docs/edit/how-to-customize.md
Normal file
16
docs/docs/docs/edit/how-to-customize.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: How to customize
|
||||
sidebar_position: 5
|
||||
description: How to customize Edit
|
||||
keywords: [edit, cmd i, works]
|
||||
---
|
||||
|
||||
You can configure a particular model to be used for Edit using the `inlineEdit` property.
|
||||
|
||||
```json title="config.json"
|
||||
"experimental": {
|
||||
"modelRoles": {
|
||||
"inlineEdit": "MODEL_TITLE",
|
||||
}
|
||||
}
|
||||
```
|
||||
38
docs/docs/docs/edit/how-to-use-it.md
Normal file
38
docs/docs/docs/edit/how-to-use-it.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
title: Edit
|
||||
sidebar_position: 1
|
||||
sidebar_label: How to use it
|
||||
description: How to use Edit
|
||||
keywords: [edit, cmd l, use]
|
||||
slug: /docs/edit
|
||||
---
|
||||
|
||||

|
||||
|
||||
## How to use it
|
||||
|
||||
Edit is a convenient way to modify code without leaving your current file. Highlight a block of code, describe your code changes, and a diff will be streamed inline to your file which you can accept or reject.
|
||||
|
||||
Edit is best used for small, quick 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 activate the edit input.
|
||||
|
||||
## 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` (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.
|
||||
10
docs/docs/docs/edit/model-setup.md
Normal file
10
docs/docs/docs/edit/model-setup.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
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) since we recommend a similar, 400B+ parameter model or one of the frontier model for code edits.
|
||||
|
||||
You can configure a different model to be used for edits by updating your [`config.json`](../../customize/config.mdx).
|
||||
33
docs/docs/docs/getting-started/install.md
Normal file
33
docs/docs/docs/getting-started/install.md
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
title: Install
|
||||
description: The open-source AI code assistant for developers
|
||||
keywords: [install, installation, getting started, vs code, jetbrains]
|
||||
---
|
||||
|
||||
## VS Code
|
||||
|
||||
1. Click `Install` on the [Continue extension page in the Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=Continue.continue)
|
||||
|
||||
2. This will open the Continue extension page in VS Code, where you will need to click `Install` again
|
||||
|
||||
3. The Continue logo will appear on the left sidebar. For a better experience, move Continue to the right sidebar
|
||||
|
||||

|
||||
|
||||
:::info[Troubleshooting]
|
||||
If you have any problems, see the [troubleshooting guide](../troubleshooting.md) or ask for help in [our Discord](https://discord.gg/NWtdYexhMs)
|
||||
:::
|
||||
|
||||
## JetBrains
|
||||
|
||||
1. Open your JetBrains IDE and open **Settings** using `cmd/ctrl + ,`
|
||||
|
||||
2. Select **Plugins** on the sidebar and search for "Continue" in the marketplace
|
||||
|
||||
3. Click `Install`, which will cause the Continue logo to show up on the right toolbar
|
||||
|
||||

|
||||
|
||||
:::info[Troubleshooting]
|
||||
If you have any problems, see the [troubleshooting guide](../troubleshooting.md) or ask for help in [our Discord](https://discord.com/invite/EfJEfdFnDQ)
|
||||
:::
|
||||
58
docs/docs/docs/getting-started/overview.mdx
Normal file
58
docs/docs/docs/getting-started/overview.mdx
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
title: Overview
|
||||
description: Getting started with Continue
|
||||
keywords: [quickstart, start, overview, chat, autocomplete, edit, actions]
|
||||
---
|
||||
|
||||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
import Admonition from "@theme/Admonition";
|
||||
|
||||
To quickly understand what you can do with Continue, check out each tab below.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="chat" label="Chat">
|
||||
|
||||
[Chat](../chat/how-to-use-it.md#how-to-use-it) makes it easy to ask for help from an LLM without needing to leave the IDE
|
||||
|
||||

|
||||
|
||||
<Admonition type="info" title="Learn more" icon="📚">
|
||||
Learn more about [Chat](../chat/how-to-use-it.md#how-to-use-it)
|
||||
</Admonition>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="autocomplete" label="Autocomplete">
|
||||
|
||||
[Autocomplete](../autocomplete/how-to-use-it.md#how-to-use-it) provides inline code suggestions as you type
|
||||
|
||||

|
||||
|
||||
<Admonition type="info" title="Learn more" icon="📚">
|
||||
Learn more about [Autocomplete](../autocomplete/how-to-use-it.md#how-to-use-it)
|
||||
</Admonition>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="edit" label="Edit">
|
||||
|
||||
[Edit](../edit/how-to-use-it.md#how-to-use-it) is a convenient way to modify code without leaving your current file
|
||||
|
||||

|
||||
|
||||
<Admonition type="info" title="Learn more" icon="📚">
|
||||
Learn more about [Edit](../edit/how-to-use-it.md#how-to-use-it)
|
||||
</Admonition>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="s" label="Actions">
|
||||
|
||||
[Actions](../actions/how-to-use-it.md#how-to-use-it) are shortcuts for common use cases
|
||||
|
||||

|
||||
|
||||
<Admonition type="info" title="Learn more" icon="📚">
|
||||
Learn more about how to use [Actions](../actions/how-to-use-it.md#how-to-use-it)
|
||||
</Admonition>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
25
docs/docs/docs/introduction.md
Normal file
25
docs/docs/docs/introduction.md
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
title: Introduction
|
||||
description: The open-source AI code assistant for developers
|
||||
slug: /docs
|
||||
keywords:
|
||||
[
|
||||
continue,
|
||||
AI,
|
||||
code assistant,
|
||||
autocomplete,
|
||||
chat,
|
||||
VS Code,
|
||||
JetBrains,
|
||||
introduction,
|
||||
]
|
||||
---
|
||||
|
||||

|
||||
|
||||
**Continue is the leading open-source AI code assistant inside of [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension)**
|
||||
|
||||
- [Chat](./chat/how-to-use-it.md) to understand and iterate on code in the sidebar
|
||||
- [Autocomplete](./autocomplete/how-to-use-it.md) to recieve inline code suggestions as you type
|
||||
- [Edit](./edit/how-to-use-it.md) to modify code without leaving your current file
|
||||
- [Actions](./actions/how-to-use-it.md) to establish shortcuts for common use cases
|
||||
|
|
@ -4,8 +4,6 @@ description: Learn how Continue collects anonymous usage information and how you
|
|||
keywords: [telemetry, anonymous, usage info, opt out]
|
||||
---
|
||||
|
||||
# Telemetry
|
||||
|
||||
## Overview
|
||||
|
||||
Continue collects and reports **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.
|
||||
|
|
@ -30,9 +28,9 @@ The following usage information is collected and reported:
|
|||
|
||||
You can disable anonymous telemetry by modifying the `config.json` file located in the `~/.continue` directory. This file typically includes the following entry:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
```json title="config.json"
|
||||
{
|
||||
"allowAnonymousTelemetry": true,
|
||||
"allowAnonymousTelemetry": true
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -48,6 +46,6 @@ To opt out, change the value of `allowAnonymousTelemetry` to `false`. Alternativ
|
|||
### Steps to Disable Telemetry via VS Code Settings
|
||||
|
||||
1. Open VS Code.
|
||||
2. Navigate to `File` > `Preferences` > `Settings` (or use the keyboard shortcut `Ctrl+,` on Windows/Linux or `Cmd+,` on macOS).
|
||||
2. Navigate to `File` > `Preferences` > `Settings` (or use the keyboard shortcut `Ctrl + ,` on Windows/Linux or `Cmd + ,` on macOS).
|
||||
3. In the search bar, type "Continue: Telemetry Enabled".
|
||||
4. Uncheck the "Continue: Telemetry Enabled" checkbox.
|
||||
|
|
@ -48,16 +48,16 @@ Open `~/.continue/logs/core.log`. The most recent logs are found at the bottom o
|
|||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
### 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"
|
||||
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
|
||||
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
|
||||
|
|
@ -1,350 +0,0 @@
|
|||
---
|
||||
title: Codebase Retrieval
|
||||
description: Talk to your codebase
|
||||
keywords: [talk, embeddings, reranker, codebase, experimental]
|
||||
---
|
||||
|
||||
# Codebase retrieval
|
||||
|
||||
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 with `all-MiniLM-L6-v2` and stored locally in `~/.continue/index`.
|
||||
|
||||
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. These can be set in `config.json`, and are the same for the codebase and folder context providers:
|
||||
|
||||
```json title="~/.continue/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)
|
||||
|
||||
## Embeddings providers
|
||||
|
||||
We also support other methods of generating embeddings, which can be configured with the `"embeddingsProvider"` property in `config.json`. We currently have built-in support for the following providers:
|
||||
|
||||
### NVIDIA
|
||||
NVIDIA provides text embedding models as NIMs (NVIDIA Inference Models) that generate semantically meaningful vector representations of text.
|
||||
Sample configuration for the `nvidia/nv-embedqa-mistral-7b-v2` model. This is the default model for the nvidia provider.
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
"provider": "nvidia",
|
||||
"model": "nvidia/nv-embedqa-mistral-7b-v2",
|
||||
"apiKey": "YOUR_API_KEY"
|
||||
}
|
||||
}
|
||||
```
|
||||
Some of the other key NVIDIA embedding NIMs are: `nvidia/nv-embedqa-e5-v5` and `baai/bge-m3`. See Nvidia's [catalog](https://build.nvidia.com/search?term=embeddings) for more available models.
|
||||
|
||||
### 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 locally in the browser (or in this case inside of the sidebar of your IDE). The model used is `all-MiniLM-L6-v2`, which is shipped alongside the Continue extension and generates embeddings of size 384.
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
"provider": "transformers.js"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Ollama
|
||||
|
||||
[Ollama](https://ollama.ai) is the easiest way to get up and running with open-source language models. It provides an entirely local REST API for working with LLMs, including generating embeddings. We recommend using an embeddings model like `nomic-embed-text`:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
"provider": "ollama",
|
||||
"model": "nomic-embed-text",
|
||||
"apiBase": "http://localhost:11434" // optional, defaults to http://localhost:11434
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 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:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
"provider": "huggingface-tei",
|
||||
"apiBase": "http://localhost:8080"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Voyage AI
|
||||
|
||||
Voyage AI offers the best embeddings for code with their voyage-code-2 model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
"provider": "openai",
|
||||
"model": "voyage-code-2",
|
||||
"apiBase": "https://api.voyageai.com/v1/",
|
||||
"apiKey": "<VOYAGE_API_KEY>"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### OpenAI
|
||||
|
||||
OpenAI's [embeddings](https://platform.openai.com/docs/guides/embeddings) are high dimensional embeddings that give great performance on both text and code.
|
||||
|
||||
#### Configuration for the `text-embedding-3-small` model
|
||||
|
||||
This is default. The `text-embedding-3-small` model offers an outstanding balance between performance and efficiency, suitable for a versatile range of applications.
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
"provider": "openai",
|
||||
"model": "text-embedding-3-small",
|
||||
"apiBase": "<your custom OpenAI-compatible endpoint>", // optional, defaults to OpenAI's API
|
||||
"apiKey": "<OPENAI_API_KEY>"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Configuration for the `text-embedding-3-large` model
|
||||
|
||||
For those requiring the highest level of embedding detail and precision, the `text-embedding-3-large` model is the better choice.
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
"provider": "openai",
|
||||
"model": "text-embedding-3-large",
|
||||
"apiBase": "<your custom OpenAI-compatible endpoint>", // optional, defaults to OpenAI's API
|
||||
"apiKey": "<OPENAI_API_KEY>"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Legacy Model Configuration
|
||||
|
||||
For certain scenarios, you may still find the `text-embedding-ada-002` model relevant. Below is the configuration example:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
"provider": "openai",
|
||||
"model": "text-embedding-ada-002",
|
||||
"apiBase": "<your custom OpenAI-compatible endpoint>", // optional, defaults to OpenAI's API
|
||||
"apiKey": "<OPENAI_API_KEY>"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Cohere
|
||||
|
||||
Configuration for the `embed-english-v3.0` model. This is the default.
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
"provider": "cohere",
|
||||
"model": "embed-english-v3.0",
|
||||
"apiKey": "<COHERE_API_KEY>"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
See Cohere's [embeddings](https://docs.cohere.com/docs/embed-2) for available models. Only embedding models v3 and higher are supported.
|
||||
|
||||
### Gemini
|
||||
|
||||
Gemini's _Text Embedding_ model is optimized for creating embeddings with 768 dimensions for text of up to 2,048 tokens.
|
||||
|
||||
As of May 2024, the only available embedding model from Gemini is [`text-embedding-004`](https://ai.google.dev/gemini-api/docs/models/gemini#text-embedding-and-embedding).
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
"provider": "gemini",
|
||||
"apiKey": "<GEMINI_API_KEY>"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### AWS Bedrock
|
||||
|
||||
As of August 30, 2024 the only tested model is [`amazon.titan-embed-text-v2:0`](https://docs.aws.amazon.com/bedrock/latest/devguide/models.html#amazon.titan-embed-text-v2-0).
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
"title": "Embeddings Model",
|
||||
"provider": "bedrock",
|
||||
"model": "amazon.titan-embed-text-v2:0",
|
||||
"region": "us-west-2"
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
### Writing a custom `EmbeddingsProvider`
|
||||
|
||||
If you have your own API capable of generating embeddings, Continue makes it easy to write a custom `EmbeddingsProvider`. All you have to do is write a function that converts strings to arrays of numbers, and add this to your config in `config.ts`. Here's an example:
|
||||
|
||||
```ts title="~/.continue/config.ts"
|
||||
export function modifyConfig(config: Config): Config {
|
||||
config.embeddingsProvider = {
|
||||
embed: (chunks: string[]) => {
|
||||
return Promise.all(
|
||||
chunks.map(async (chunk) => {
|
||||
const response = await fetch("https://example.com/embeddings", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ text: chunk }),
|
||||
});
|
||||
const data = await response.json();
|
||||
return data.embedding;
|
||||
}),
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
return config;
|
||||
}
|
||||
```
|
||||
|
||||
## Reranking providers
|
||||
|
||||
The reranker plays a crucial role in refining the results retrieved from your codebase. It processes the initial set of results obtained through embeddings-based retrieval, improving their relevance and accuracy for your queries.
|
||||
|
||||
Continue offers several reranking options: `cohere`, `voyage`, `llm`, `hugginface-tei`, and `free-trial`, which can be configured in `config.json`.
|
||||
|
||||
### Voyage AI
|
||||
|
||||
Voyage AI offers the best reranking model for code with their rerank-lite-1 model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"reranker": {
|
||||
"name": "voyage",
|
||||
"params": {
|
||||
"model": "rerank-lite-1",
|
||||
"apiKey": "<VOYAGE_API_KEY>"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Cohere
|
||||
|
||||
See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rerank-2).
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"reranker": {
|
||||
"name": "cohere",
|
||||
"params": {
|
||||
"model": "rerank-english-v3.0",
|
||||
"apiKey": "<COHERE_API_KEY>"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 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.
|
||||
|
||||
```json title="~/.continue/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:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"reranker": {
|
||||
"name": "huggingface-tei",
|
||||
"params": {
|
||||
"apiBase": "http://localhost:8080",
|
||||
"truncate": true,
|
||||
"truncation_direction": "Right"
|
||||
}
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
### Free Trial (Voyage AI)
|
||||
|
||||
Continue offers a free trial of Voyage AI's reranking model.
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"reranker": {
|
||||
"name": "free-trial"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 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`.
|
||||
|
||||
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".
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
---
|
||||
title: Quick Actions (experimental, VS Code only)
|
||||
description: Quick Actions streamline your development workflow by allowing quick edits on selected classes or functions
|
||||
keywords: [experimental, automate, configuration]
|
||||
toc_max_heading_level: 5
|
||||
---
|
||||
|
||||
Quick Actions streamline your development workflow by providing a tool to quickly select an entire class or function to perform a quick edit on. Configure custom actions to execute complex operations with a single click.
|
||||
|
||||

|
||||
|
||||
## How It Works
|
||||
|
||||
:::info[Note]
|
||||
For the language of the file you have open, you must have the Language Server Protocol extension installed.
|
||||
:::
|
||||
|
||||
Quick Actions use a CodeLens provider to add interactive elements above functions and classes in your code.
|
||||
|
||||
By default, Quick Actions include a single predefined action:
|
||||
|
||||
- `Continue`: This action allows you to perform a quick edit on the selected class or function.
|
||||
|
||||
## How to disable Quick Actions
|
||||
|
||||
Quick Actions are enabled by default _for pre-release versions of Contine_.
|
||||
|
||||
To disable Quick Actions, open the settings menu (`⌘ + ,`), search for `"continue.enableQuickActions"`, and toggle the checkbox to disable.
|
||||
|
||||
## Custom Quick Actions
|
||||
|
||||
Custom Quick Actions allow you to tailor functionality to your specific needs, extending beyond the default actions. You can easily configure these custom actions in your `~/.continue/config.json` file.
|
||||
|
||||
:::info
|
||||
[View the Configuration Options reference](../reference/config) for specific schema details.
|
||||
:::
|
||||
|
||||
### Example Use Cases
|
||||
|
||||
#### 1. Write an inline unit test
|
||||
|
||||
A quick action that generates and inserts a unit test above the selected code.
|
||||
|
||||
```json title=~/.continue/config.json
|
||||
"experimental": {
|
||||
"quickActions": [
|
||||
{
|
||||
"title": "Unit test",
|
||||
"prompt": "Write a unit test for this code. Do not change anything about the code itself.",
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
#### 2. Send code to chat panel to learn more about it
|
||||
|
||||
The default "Explain" aims to provide a brief overview of the code. This quick action sends the prompt and the code to the chat to provides a more detailed explanation.
|
||||
|
||||
```json title=~/.continue/config.json
|
||||
"experimental": {
|
||||
"quickActions": [
|
||||
{
|
||||
"title": "Detailed explanation",
|
||||
"prompt": "Explain the following code in detail, including all methods and properties.",
|
||||
"sendToChat": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
#### 3. Create a Typescript interface
|
||||
|
||||
A quick action that generates and inserts a Typescript interface above the selected code.
|
||||
|
||||
```json title=~/.continue/config.json
|
||||
"experimental": {
|
||||
"quickActions": [
|
||||
{
|
||||
"title": "Create Interface",
|
||||
"prompt": "Create a new Typescript interface for the following code.",
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Share your feedback
|
||||
|
||||
We'd love to hear your thoughts on Quick Actions! Share your feedback and help us improve.
|
||||
|
||||
<!-- Discord Feedback channel -->
|
||||
|
||||
<a href="https://discord.com/channels/1108621136150929458/1156679146932535376" className="button button--primary">Give Feedback on Discord</a>
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
---
|
||||
title: How to Use Continue
|
||||
description: Utilizing LLMs (Large Language Models) as you code with Continue
|
||||
keywords: [how to, edit, refactor, boilerplate, context]
|
||||
---
|
||||
|
||||
Continue is an advanced tool designed to help you integrate the power of Large Language Models (LLMs) seamlessly into your coding environment, providing assistance with understanding code, generating boilerplate, refactoring, and much more. Below are detailed instructions on how you can make the most out of Continue across different integrated development environments (IDEs) like VS Code and JetBrains.
|
||||
|
||||
## Easily Understand Code Sections
|
||||
|
||||
If you ever find yourself puzzled by a piece of code, Continue can help break it down for you. This feature gives you a clear and concise explanation which can significantly speed up the debugging and understanding process.
|
||||
|
||||
- **VS Code**: Press `cmd+L` (MacOS) or `ctrl+L` (Windows) to get insights into the current code section you are working on.
|
||||
- **JetBrains**: Utilize the same feature with `cmd+J` (MacOS) or `ctrl+J` (Windows).
|
||||
|
||||

|
||||
|
||||
## Tab to Autocomplete Code Suggestions
|
||||
|
||||
Autocomplete can save you time by predicting and inserting code snippets. Continue enhances this feature by using AI to offer smarter autocomplete suggestions tailored to your context.
|
||||
|
||||
- **VS Code**: Simply press `tab` (MacOS) or `tab` (Windows) to autocomplete code suggestions.
|
||||
- **JetBrains**: Similar functionality is available with the `tab` key on both MacOS and Windows.
|
||||
|
||||

|
||||
|
||||
## Refactor Functions Where You are Coding
|
||||
|
||||
Refactoring is a crucial part of maintaining and improving your code. With Continue, you can refactor functions right where you are coding, ensuring seamless transitions and minimal interruptions.
|
||||
|
||||
- **VS Code**: Press `cmd+I` (MacOS) or `ctrl+I` (Windows) to refactor in place.
|
||||
- **JetBrains**: Trigger the same action using `cmd+I` (MacOS) or `ctrl+I` (Windows).
|
||||
|
||||

|
||||
|
||||
## Ask Questions About Your Codebase
|
||||
|
||||
Continue allows you to ask questions about your entire codebase, which can be extremely useful for getting quick answers and making informed decisions.
|
||||
|
||||
- **VS Code**: Type `@codebase` followed by your query, or use `cmd+Enter`
|
||||
- **JetBrains**: Type `@codebase` followed by your query, or use `cmd+Enter`
|
||||
|
||||

|
||||
|
||||
## Quickly Use Documentation as Context
|
||||
|
||||
Documentation can often be complex and time-consuming to scroll through. Continue can fetch the relevant sections for you, allowing you to use documentation as context efficiently.
|
||||
|
||||
- **VS Code**: Use the `@docs` command (available on both MacOS and Windows).
|
||||
- **JetBrains**: The same functionality is available using `@docs` on both MacOS and Windows.
|
||||
|
||||

|
||||
|
||||
## Kick Off Actions with Slash Commands
|
||||
|
||||
Slash commands in Continue enable you to perform various actions quickly and efficiently without having to leave your coding environment.
|
||||
|
||||
- **VS Code**: Start commands with a `/` (works on both MacOS and Windows) like `/edit`.
|
||||
- **JetBrains**: Support the use of slash commands by typing `/edit` on MacOS or Windows.
|
||||
|
||||

|
||||
|
||||
Learn more about slash commands [here](./customization/slash-commands.md).
|
||||
|
||||
## Add Classes, Files, and More to Context
|
||||
|
||||
Context switching can disrupt your workflow. Continue allows you to add classes, files, and more to your current context, allowing you to see everything you need in one place.
|
||||
|
||||
- **VS Code**: Use the `@files` command (available on both MacOS and Windows) for this purpose.
|
||||
- **JetBrains**: This feature can also be utilized using `@files` on MacOS and Windows.
|
||||
|
||||

|
||||
|
||||
Learn more about context providers [here](./customization/context-providers.md).
|
||||
|
||||
## Understand Terminal Errors Immediately
|
||||
|
||||
One of the most frustrating parts of coding is deciphering terminal errors. Continue can help you understand these errors instantly, reducing downtime and confusion.
|
||||
|
||||
- **VS Code**: Press `cmd+shift+R` (MacOS) or `ctrl+shift+R` (Windows) for instant error explanations.
|
||||
- **JetBrains**: This feature will be supported soon.
|
||||
|
||||

|
||||
|
||||
By following these extended and detailed instructions, you can significantly improve your coding efficiency and debug processes using Continue. Happy coding!
|
||||
|
|
@ -3,4 +3,6 @@ id: index
|
|||
slug: /
|
||||
---
|
||||
|
||||
This index page should automatically redirect to [/docs/intro](./intro.md)
|
||||
# Index
|
||||
|
||||
This index page should automatically redirect to [/docs](./docs/introduction.md)
|
||||
|
|
|
|||
|
|
@ -1,110 +0,0 @@
|
|||
---
|
||||
title: Installing Continue in JetBrains IDEs
|
||||
description: Instructions for installing the Continue extension in JetBrains IDEs
|
||||
keywords: [install, setup, jetbrains, plugin, continue, intellij, pycharm, webstorm]
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Ensure you have a compatible [JetBrains IDE](https://www.jetbrains.com/products/) installed. Continue is compatible with:
|
||||
|
||||
- IntelliJ IDEA (Ultimate, Community)
|
||||
- Android Studio
|
||||
- AppCode
|
||||
- Aqua
|
||||
- CLion
|
||||
- DataGrip
|
||||
- DataSpell
|
||||
- GoLand
|
||||
- PhpStorm
|
||||
- PyCharm (Professional, Community)
|
||||
- Rider
|
||||
- RubyMine
|
||||
- RustRover
|
||||
- WebStorm
|
||||
- Writerside
|
||||
|
||||
## Installation Options
|
||||
|
||||
There are three ways to install the Continue extension in JetBrains IDEs:
|
||||
|
||||
1. Install from JetBrains Marketplace within the IDE
|
||||
2. Manual Installation from JetBrains Marketplace website
|
||||
3. Manual Installation using ZIP from GitHub Releases
|
||||
|
||||
Choose the method that best suits your preference and setup. Each option is detailed below.
|
||||
|
||||
### Option 1: Install from JetBrains Marketplace within the IDE
|
||||
|
||||
1. Open your JetBrains IDE.
|
||||
2. Open the Settings/Preferences dialog (Ctrl+Alt+S on Windows/Linux, ⌘, on macOS).
|
||||
3. Navigate to "Plugins" in the left sidebar.
|
||||
4. Click on the "Marketplace" tab.
|
||||
5. Search for "Continue" in the search bar.
|
||||
6. Click the "Install" button next to the Continue plugin.
|
||||
7. Restart your IDE when prompted to complete the installation.
|
||||
|
||||
### Option 2: Manual Installation from JetBrains Marketplace website
|
||||
|
||||
1. Visit the [Continue plugin page on the JetBrains Marketplace](https://plugins.jetbrains.com/plugin/22707-continue).
|
||||
2. Click the "Get" button on the page.
|
||||
3. Select your IDE from the list and click "Download".
|
||||
4. Open your JetBrains IDE.
|
||||
5. Open the Settings/Preferences dialog (Ctrl+Alt+S on Windows/Linux, ⌘, on macOS).
|
||||
6. Navigate to "Plugins" in the left sidebar.
|
||||
7. Click the gear icon and select "Install Plugin from Disk...".
|
||||
8. Navigate to the downloaded plugin file and select it.
|
||||
9. Restart your IDE when prompted to complete the installation.
|
||||
|
||||
### Option 3: Manual Installation using ZIP from GitHub Releases
|
||||
|
||||
1. Visit the [Continue GitHub releases page](https://github.com/continuedev/continue/releases).
|
||||
2. Find the latest release and download the JetBrains ZIP file (e.g., `continue-jetbrains-[version].zip`).
|
||||
3. Open your JetBrains IDE.
|
||||
4. Open the Settings/Preferences dialog (Ctrl+Alt+S on Windows/Linux, ⌘, on macOS).
|
||||
5. Navigate to "Plugins" in the left sidebar.
|
||||
6. Click the gear icon and select "Install Plugin from Disk...".
|
||||
7. Navigate to the downloaded ZIP file and select it.
|
||||
8. Restart your IDE when prompted to complete the installation.
|
||||
|
||||
## Post-Installation Setup
|
||||
|
||||
1. After installation and IDE restart, you'll see the Continue icon in the right toolbar.
|
||||
2. Click it to open the Continue tool window.
|
||||
|
||||

|
||||
|
||||
## Getting Started with Continue
|
||||
|
||||
Now that you've successfully installed Continue, you're ready to enhance your coding experience. Here's a quick summary of what you can do:
|
||||
|
||||
1. **Open the Continue tool window**: Click the Continue icon in the right toolbar to access the extension's features.
|
||||
2. **Start a conversation**: Use the chat interface to ask questions, get code suggestions, or request explanations.
|
||||
3. **Explore features**: Familiarize yourself with Continue's features to streamline your workflow.
|
||||
4. **Customize settings**: Adjust the plugin's settings to suit your preferences and coding style.
|
||||
|
||||
For more detailed information on using Continue, check out our [user guide](../how-to-use-continue.md).
|
||||
|
||||
## Pre-release Version (Optional)
|
||||
|
||||
The Continue plugin for JetBrains IDEs offers a pre-release version through their Early Access Program (EAP) channel. To access the latest EAP version:
|
||||
|
||||
1. Open your JetBrains IDE.
|
||||
2. Open the Settings/Preferences dialog (Ctrl+Alt+S on Windows/Linux, ⌘, on macOS).
|
||||
3. Navigate to "Plugins" in the left sidebar.
|
||||
4. Click the gear icon at the top of the Plugins page.
|
||||
5. Select "Manage Plugin Repositories...".
|
||||
6. In the dialog that opens, add the URL to the list: `https://plugins.jetbrains.com/plugins/eap/list`
|
||||
7. Click "OK" to save the changes.
|
||||
|
||||
After adding the EAP channel, you'll be able to download the latest pre-release version of Continue from the marketplace. To install or update to the EAP version:
|
||||
|
||||
1. Go back to the Plugins page in Settings/Preferences.
|
||||
2. Search for "Continue" in the marketplace.
|
||||
3. You should see the EAP version available. Click "Install" or "Update" to get the latest pre-release version.
|
||||
|
||||
Remember that EAP versions may contain experimental features and could be less stable than the regular releases.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If you encounter any issues, please refer to our [troubleshooting guide](../troubleshooting.md) or ask for help in [our Discord community](https://discord.gg/NWtdYexhMs).
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
---
|
||||
title: Installing Continue in VS Code
|
||||
description: Instructions for installing the Continue extension in Visual Studio Code
|
||||
keywords: [install, setup, vscode, extension, continue, vsix]
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Ensure you have Visual Studio Code installed. If not, download and install it from the [Visual Studio Code download page](https://code.visualstudio.com/download).
|
||||
|
||||
## Installation Options
|
||||
|
||||
There are three ways to install the Continue extension in Visual Studio Code:
|
||||
|
||||
1. Install from VS Code Marketplace (Web)
|
||||
2. Install from VS Code Extensions Marketplace
|
||||
3. Manual Installation using VSIX
|
||||
|
||||
Choose the method that best suits your preference and setup. Each option is detailed below.
|
||||
|
||||
### Option 1: Install from VS Code Marketplace (Web)
|
||||
|
||||
1. Visit the [Continue extension page on the Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=Continue.continue).
|
||||
2. Click the `Install` button on the page.
|
||||
3. This will open VS Code (if it's not already open) and take you to the extension page within VS Code.
|
||||
4. Click `Install` in VS Code to complete the installation.
|
||||
|
||||
### Option 2: Install from VS Code Extensions Marketplace
|
||||
|
||||
1. Open Visual Studio Code.
|
||||
2. Navigate to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X).
|
||||
3. Search for "Continue" in the marketplace.
|
||||
4. Click `Install` next to the Continue extension.
|
||||
|
||||
### Option 3: Manual Installation using VSIX
|
||||
|
||||
1. Download the latest VSIX package from the [Continue GitHub repository](https://github.com/continuedev/continue/releases).
|
||||
2. In VS Code, go to Extensions view.
|
||||
3. Click on the "..." menu at the top of the Extensions sidebar.
|
||||
4. Select `Install from VSIX...`.
|
||||
5. Navigate to the downloaded VSIX file and select it.
|
||||
|
||||
## Post-Installation Setup
|
||||
|
||||
1. After installation, you'll see the Continue logo in the left sidebar.
|
||||
2. Click it to open the Continue extension.
|
||||
3. We recommend moving Continue to VS Code's right sidebar:
|
||||
|
||||

|
||||
|
||||
This keeps the file explorer accessible while using Continue.
|
||||
|
||||
## Getting Started with Continue
|
||||
|
||||
Now that you've successfully installed Continue, you're ready to enhance your coding experience. Here's a quick summary of what you can do:
|
||||
|
||||
1. **Open the Continue sidebar**: Click the Continue logo in the sidebar to access the extension's features.
|
||||
2. **Start a conversation**: Use the chat interface to ask questions, get code suggestions, or request explanations.
|
||||
3. **Explore commands**: Familiarize yourself with Continue's commands to streamline your workflow.
|
||||
4. **Customize settings**: Adjust the extension's settings to suit your preferences and coding style.
|
||||
|
||||
For more detailed information on using Continue, check out our [user guide](../how-to-use-continue.md).
|
||||
|
||||
## Pre-release Version (Optional)
|
||||
|
||||
The VS Code Continue extension is currently in beta. A pre-release version is available with the latest fixes and features. To install the pre-release version:
|
||||
|
||||
1. Open Visual Studio Code.
|
||||
2. Navigate to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X).
|
||||
3. Search for "Continue" in the installed extensions.
|
||||
4. Select `Switch to Pre-release Version` from the menu.
|
||||
|
||||

|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If you encounter any issues, please refer to our [troubleshooting guide](.././troubleshooting.md) or ask for help in [our Discord community](https://discord.gg/NWtdYexhMs).
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
---
|
||||
title: Introduction
|
||||
description: The open-source AI code assistant for developers
|
||||
keywords: [continue, AI, code assistant, autocomplete, chat, VS Code, JetBrains]
|
||||
---
|
||||
|
||||

|
||||
|
||||
## The Open-Source AI Code Assistant
|
||||
|
||||
Continue is the leading open-source AI code assistant, designed to enhance your development workflow. It seamlessly integrates with popular IDEs like [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension), providing custom autocomplete and chat experiences.
|
||||
|
||||
### Key Features
|
||||
|
||||
- **Flexible Model Integration**: Use any AI model, whether open-source or commercial, local or remote.
|
||||
- **Versatile Applications**: Ideal for chat, autocomplete, and embeddings.
|
||||
- **Highly Customizable**: Configure to fit your existing workflows.
|
||||
|
||||
### What You Can Do with Continue
|
||||
|
||||
1. [Understand code sections easily](how-to-use-continue.md#easily-understand-code-sections)
|
||||
2. [Autocomplete code with tab](how-to-use-continue.md#tab-to-autocomplete-code-suggestions)
|
||||
3. [Refactor functions in-place](how-to-use-continue.md#refactor-functions-where-you-are-coding)
|
||||
4. [Query your codebase](how-to-use-continue.md#ask-questions-about-your-codebase)
|
||||
5. [Leverage documentation as context](how-to-use-continue.md#quickly-use-documentation-as-context)
|
||||
6. [Use slash commands for quick actions](how-to-use-continue.md#kick-off-actions-with-slash-commands)
|
||||
7. [Add various elements to context](how-to-use-continue.md#add-classes-files-and-more-to-context)
|
||||
8. [Instantly understand terminal errors](how-to-use-continue.md#understand-terminal-errors-immediately)
|
||||
|
||||
Explore these features to supercharge your development process with Continue!
|
||||
|
||||
## See Continue in Action
|
||||
|
||||
<div style={{display: 'flex', justifyContent: 'center', margin: '20px 0'}}>
|
||||
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/V3Yq6w9QaxI?si=aCewfJHz8CIMTjcM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
|
||||
</div>
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
# Assembly
|
||||
|
||||
Assembly is the #20 most popular language according to the [2023 Stack Overflow Developer Survey](https://survey.stackoverflow.co/2023/#section-most-popular-technologies-programming-scripting-and-markup-languages).
|
||||
|
||||
## Benchmarks
|
||||
|
||||
❌ Assembly is not one of the 19 languages in the [MultiPL-E benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=couple%20notable%20mentions-,4.%20MultiPL%2DE,-Creator%3A%20Northeastern)
|
||||
|
||||
❌ Assembly is not one of the 16 languages in the [BabelCode / TP3 benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=amazon%2Dscience/mxeval-,12.%20BabelCode%20/%20TP3,-Creator%3A%20Google)
|
||||
|
||||
❌ Assembly is not one of the 13 languages in the [MBXP / Multilingual HumanEval benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=11.%20MBXP%20/%20Multilingual%20HumanEval)
|
||||
|
||||
❌ Assembly is not one of the 5 languages in the [HumanEval-X benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=Some%20multilingual%C2%A0benchmarks-,10.%20HumanEval%2DX,-Creator%3A%20Tsinghua)
|
||||
|
||||
## Datasets
|
||||
|
||||
✅ Assembly makes up 2.36 GB of [The Stack dataset](https://arxiv.org/abs/2211.15533)
|
||||
|
||||
✅ Assembly makes up 0.78 GB of the [CodeParrot dataset](https://huggingface.co/datasets/codeparrot/github-code)
|
||||
|
||||
❌ Assembly is not included in the [AlphaCode dataset](https://arxiv.org/abs/2203.07814)
|
||||
|
||||
❌ Assembly is not included in the [CodeGen dataset](https://arxiv.org/abs/2203.13474)
|
||||
|
||||
❌ Assembly is not included in the [PolyCoder dataset](https://arxiv.org/abs/2202.13169)
|
||||
|
||||
## Stack Overflow & GitHub presence
|
||||
|
||||
Assembly has 43,572 [tagged questions on Stack Overflow](https://stackoverflow.com/tags)
|
||||
|
||||
Assembly projects have had 14,301 [PRs on GitHub since 2014](https://madnight.github.io/githut/#/pull_requests/2023/3)
|
||||
|
||||
Assembly projects have had 10,605 [issues on GitHub since 2014](https://madnight.github.io/githut/#/issues/2023/3)
|
||||
|
||||
Assembly projects have had 119,341 [pushes on GitHub since 2014](https://madnight.github.io/githut/#/pushes/2023/3)
|
||||
|
||||
Assembly projects have had 50,063 [stars on GitHub since 2014](https://madnight.github.io/githut/#/stars/2023/3)
|
||||
|
||||
## Anecdotes from developers
|
||||
|
||||
[u/the_Demongod](https://www.reddit.com/r/asm/comments/14q5qi8/comment/jqlmfvn/?utm_source=share&utm_medium=web2x&context=3)
|
||||
> Assembly isn't one language, it's a general term for any human-readable representation of a processor's ISA. There are many assembly languages, and there are even different representations of the same ISA. I'm not sure what your book you're using but there are operand order differences between AT&T and Intel x86 (although your example looks like AT&T). You shouldn't be using ChatGPT for any subject you aren't already familiar with though, or you won't be able to recognize when it's hallucinating, or even when it's simply lacking context. Just use a normal, reputable resource like the book you're following. I recommend checking out this wikibook for free online: https://en.wikibooks.org/wiki/X86_Assembly
|
||||
|
||||
[u/brucehoult](https://www.reddit.com/r/asm/comments/14q5qi8/comment/jqp8rig/)
|
||||
> ChatGPT makes a good attempt, but it doesn't actually understand code — ESPECIALLY assembly language, where each instruction exists in a lot of context — and will usually have some kind of bugs in anything it writes.
|
||||
|
||||
[u/dvof](https://www.reddit.com/r/asm/comments/105vl0v/comment/j3hn8xp/?utm_source=share&utm_medium=web2x&context=3)
|
||||
> Idk why all the chatGPT comments are all downvoted, guys it is inevitable that it is going to be a standard part of our lives now. The sooner students start using it the sooner people will realize its limitations. It is a great learning tool and I use it when learning a new subject.
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
# Bash
|
||||
|
||||
Bash is the #7 most popular language according to the [2023 Stack Overflow Developer Survey](https://survey.stackoverflow.co/2023/#section-most-popular-technologies-programming-scripting-and-markup-languages).
|
||||
|
||||
## Benchmarks
|
||||
|
||||
✅ Bash is one of the 19 languages in the [MultiPL-E benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=couple%20notable%20mentions-,4.%20MultiPL%2DE,-Creator%3A%20Northeastern)
|
||||
|
||||
❌ Bash is not one of the 16 languages in the [BabelCode / TP3 benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=amazon%2Dscience/mxeval-,12.%20BabelCode%20/%20TP3,-Creator%3A%20Google)
|
||||
|
||||
❌ Bash is not one of the 13 languages in the [MBXP / Multilingual HumanEval benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=11.%20MBXP%20/%20Multilingual%20HumanEval)
|
||||
|
||||
❌ Bash is not one of the 5 languages in the [HumanEval-X benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=Some%20multilingual%C2%A0benchmarks-,10.%20HumanEval%2DX,-Creator%3A%20Tsinghua)
|
||||
|
||||
## Datasets
|
||||
|
||||
✅ Bash makes up 8.69 GB of [The Stack dataset](https://arxiv.org/abs/2211.15533)
|
||||
|
||||
✅ Bash makes up 3.01 GB of the [CodeParrot dataset](https://huggingface.co/datasets/codeparrot/github-code)
|
||||
|
||||
❌ Bash is not included in the [AlphaCode dataset](https://arxiv.org/abs/2203.07814)
|
||||
|
||||
❌ Bash is not included in the [CodeGen dataset](https://arxiv.org/abs/2203.13474)
|
||||
|
||||
❌ Bash is not included in the [PolyCoder dataset](https://arxiv.org/abs/2202.13169)
|
||||
|
||||
## Stack Overflow & GitHub presence
|
||||
|
||||
Bash has 154,693 [tagged questions on Stack Overflow](https://stackoverflow.com/tags)
|
||||
|
||||
Bash projects have had 866,313 [PRs on GitHub since 2014](https://madnight.github.io/githut/#/pull_requests/2023/3)
|
||||
|
||||
Bash projects have had 574,292 [issues on GitHub since 2014](https://madnight.github.io/githut/#/issues/2023/3)
|
||||
|
||||
Bash projects have had 3,605,350 [pushes on GitHub since 2014](https://madnight.github.io/githut/#/pushes/2023/3)
|
||||
|
||||
Bash projects have had 2,121,149 [stars on GitHub since 2014](https://madnight.github.io/githut/#/stars/2023/3)
|
||||
|
||||
## Anecdotes from developers
|
||||
|
||||
[u/[deleted]](https://www.reddit.com/r/bash/comments/124h7gj/comment/jdzbtvp/?utm_source=share&utm_medium=web2x&context=3)
|
||||
> chatgpt is very bad at bash. Every script that someone has posted here has had some really glaring errors, often data-destructive ones. In general for every single use-case of chatgpt (or any other generative model) unless you understand the correct output you should not trust it. You can use it to produce documents and reports or even scripts, but you should always read the output carefully and validate that what it says is correct.
|
||||
|
||||
[u/RandomXUsr](https://www.reddit.com/r/bash/comments/zix2am/comment/iztmsp3/?utm_source=share&utm_medium=web2x&context=3)
|
||||
> I've tried getting it to write some code. Very little is useful. It still very much requires education and experience with the tools you use in order to get effective, clean, and efficient code. I had tried some python scripts, but you need to specify libraries and tools to be used, and it doesn't do that well. As it learns more, it may become better at this, but for now it's a neat toy without real world benefits
|
||||
|
||||
[u/stepbroImstuck_in_SU](https://www.reddit.com/r/bash/comments/123buum/comment/jduund7/?utm_source=share&utm_medium=web2x&context=3)
|
||||
> This is more general advice for using chatGPT for generating bash scripts. chatGPT is a powerful tool, but it has both general and bash/linux related weaknesses. Never run script you don’t understand. That is a hard pill to shallow when learning bash, but thankfully you can ask chatGPT to explain its reasoning. To be sure, open a new conversation and ask for explanation of part of the code there. You can also ask another instance for a general explanation of a new syntax or command, and then cross-check the original code. After seeing what chatGPT knows about an individual command, it doesn’t hurt to quicklycheck the man-page anyway. ChatGPT is prone for using “general” syntax and flags even when some command doesn’t exist. Lastly, commands can change through years and environments. Your man-pages tell you what version you have. It’s a good strategy to ask if any tools already exist for the task or are build in, before asking for a bash script. For example you could script dropping your ssh-key in a remote machines .ssh-dir and then appending it to the trusted-keys file (or in folder) - or you can just use the ssh commands build in add-key option. There are a lot of tools build in to your average linux installation, and your distros repos are full of even more lightweight, trustworthy tools (as long as you stick to the official repos). If you aren’t exactly sure how a script behaves or if the syntax is robust, create your own test environments. You can create virtual (or real) directory structures, quickly fill them with very small files and run the script without touching your actual data. Ask chatGPT for more information (and use above steps to understand what it says). Related to the last point, pay attention to especially these aspects of any script chatGPT spews back: hardcoded paths (or less strictly, any path that isn’t declared as a variable on the start of the script). If instead of a robust test environment, you just use a directory with subdirectories, hardcoded paths can escape that environment, connections outside your machine/local network: While I feel it is unlikely that chatGPT will compromise your system by opening an unsafe connection to unsafe address, the risk is worth mitigating. What if the first guy who got that address noticed it’s not used, and bought it to distribute malware, hoping chatGPT offers it again? But more likely problem is that you can rapidly pull a lot of data from the internet. It just opens up more doors to make a mess, modifying files in /etc, or your bootloader. You can cause all kinds of damage, including permanently disabling rights to modify the files to fix it (misconfigured privileges), making your system unbootable (fstab, grub), and just generally messing up your system. Back it up before any changes, read the man-pages twice, make small tests (and remember you usually need to reload systemd or reboot before changes take effect)
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
# C++
|
||||
|
||||
C++ is the #10 most popular language according to the [2023 Stack Overflow Developer Survey](https://survey.stackoverflow.co/2023/#section-most-popular-technologies-programming-scripting-and-markup-languages).
|
||||
|
||||
## Benchmarks
|
||||
|
||||
✅ C++ is one of the 19 languages in the [MultiPL-E benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=couple%20notable%20mentions-,4.%20MultiPL%2DE,-Creator%3A%20Northeastern)
|
||||
|
||||
✅ C++ is one of the 16 languages in the [BabelCode / TP3 benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=amazon%2Dscience/mxeval-,12.%20BabelCode%20/%20TP3,-Creator%3A%20Google)
|
||||
|
||||
✅ C++ is one of the 13 languages in the [MBXP / Multilingual HumanEval benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=11.%20MBXP%20/%20Multilingual%20HumanEval)
|
||||
|
||||
✅ C++ is one of the 5 languages in the [HumanEval-X benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=Some%20multilingual%C2%A0benchmarks-,10.%20HumanEval%2DX,-Creator%3A%20Tsinghua)
|
||||
|
||||
## Datasets
|
||||
|
||||
✅ C++ makes up 192.84 GB of [The Stack dataset](https://arxiv.org/abs/2211.15533)
|
||||
|
||||
✅ C++ makes up 87.73 GB of the [CodeParrot dataset](https://huggingface.co/datasets/codeparrot/github-code)
|
||||
|
||||
✅ C++ makes up 290.5 GB of the [AlphaCode dataset](https://arxiv.org/abs/2203.07814)
|
||||
|
||||
✅ C++ makes up 69.9 GB of the [CodeGen dataset](https://arxiv.org/abs/2203.13474)
|
||||
|
||||
✅ C++ makes up 52 GB of the [PolyCoder dataset](https://arxiv.org/abs/2202.13169)
|
||||
|
||||
## Stack Overflow & GitHub presence
|
||||
|
||||
C++ has 801,823 [tagged questions on Stack Overflow](https://stackoverflow.com/tags)
|
||||
|
||||
C++ projects have had 2,767,540 [PRs on GitHub since 2014](https://madnight.github.io/githut/#/pull_requests/2023/3)
|
||||
|
||||
C++ projects have had 2,255,179 [issues on GitHub since 2014](https://madnight.github.io/githut/#/issues/2023/3)
|
||||
|
||||
C++ projects have had 9,245,881 [pushes on GitHub since 2014](https://madnight.github.io/githut/#/pushes/2023/3)
|
||||
|
||||
C++ projects have had 5,192,579 [stars on GitHub since 2014](https://madnight.github.io/githut/#/stars/2023/3)
|
||||
|
||||
## Anecdotes from developers
|
||||
|
||||
[u/RainbowWarfare](https://www.reddit.com/r/cpp/comments/172vc4q/comment/k3z07sj/?utm_source=share&utm_medium=web2x&context=3)
|
||||
> I use ChatGPT for tools and libs where the documentation is horrendous and it’s a coin toss as to whether it confidently talks truth or nonsense. I don’t think it’s a good idea for beginners to be leaning on it as a teaching aid.
|
||||
|
||||
[u/TheBrainStone](https://www.reddit.com/r/cpp/comments/172vc4q/comment/k3z96kd/?utm_source=share&utm_medium=web2x&context=3)
|
||||
> My experience with ChatGPT is that it sucks ass with C++. Anything beyond basic syntax and programming it just gets wrong. My typical interaction is to ask it something specific, then spend the next 3 queries clarifying and then the next few pointing out issues in the code or methodology. I cannot recommend.
|
||||
|
||||
[u/Asleep-Dress-3578](https://www.reddit.com/r/cpp/comments/172vc4q/comment/k3zprne/?utm_source=share&utm_medium=web2x&context=3)
|
||||
> I have github copilot enabled in my ide, so whatever it suggests I can either use it or ignore. I find it helpful in writing docstrings and filling out somewhat repetitive rows (e.g. pattern matching cases). But otherwise it is not that clever. I also use chatgpt in some rare cases when I am curious how would chatgpt solve this or that problem. It is good to write some simple, short functions; but it is not reliable enough to write medium to very complex algorithms.
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
# C
|
||||
|
||||
C is the #11 most popular language according to the [2023 Stack Overflow Developer Survey](https://survey.stackoverflow.co/2023/#section-most-popular-technologies-programming-scripting-and-markup-languages).
|
||||
|
||||
## Benchmarks
|
||||
|
||||
❌ C is not one of the 19 languages in the [MultiPL-E benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=couple%20notable%20mentions-,4.%20MultiPL%2DE,-Creator%3A%20Northeastern)
|
||||
|
||||
❌ C is not one of the 16 languages in the [BabelCode / TP3 benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=amazon%2Dscience/mxeval-,12.%20BabelCode%20/%20TP3,-Creator%3A%20Google)
|
||||
|
||||
❌ C is not one of the 13 languages in the [MBXP / Multilingual HumanEval benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=11.%20MBXP%20/%20Multilingual%20HumanEval)
|
||||
|
||||
❌ C is not one of the 5 languages in the [HumanEval-X benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=Some%20multilingual%C2%A0benchmarks-,10.%20HumanEval%2DX,-Creator%3A%20Tsinghua)
|
||||
|
||||
## Datasets
|
||||
|
||||
✅ C makes up 222.88 GB of [The Stack dataset](https://arxiv.org/abs/2211.15533)
|
||||
|
||||
✅ C makes up 183.83 GB of the [CodeParrot dataset](https://huggingface.co/datasets/codeparrot/github-code)
|
||||
|
||||
✅ C makes up 48.9 GB of the [AlphaCode dataset](https://arxiv.org/abs/2203.07814)
|
||||
|
||||
❌ C is not included in the [CodeGen dataset](https://arxiv.org/abs/2203.13474)
|
||||
|
||||
✅ C makes up 55 GB of the [PolyCoder dataset](https://arxiv.org/abs/2202.13169)
|
||||
|
||||
## Stack Overflow & GitHub presence
|
||||
|
||||
C has 400,941 [tagged questions on Stack Overflow](https://stackoverflow.com/tags)
|
||||
|
||||
C projects have had 1,300,955 [PRs on GitHub since 2014](https://madnight.github.io/githut/#/pull_requests/2023/3)
|
||||
|
||||
C projects have had 1,285,709 [issues on GitHub since 2014](https://madnight.github.io/githut/#/issues/2023/3)
|
||||
|
||||
C projects have had 5,240,188 [pushes on GitHub since 2014](https://madnight.github.io/githut/#/pushes/2023/3)
|
||||
|
||||
C projects have had 3,741,913 [stars on GitHub since 2014](https://madnight.github.io/githut/#/stars/2023/3)
|
||||
|
||||
## Anecdotes from developers
|
||||
|
||||
[u/MyuuDio](https://www.reddit.com/r/C_Programming/comments/17rzzy9/comment/k8mqxv5/)
|
||||
> Hard agree with the last part. ChatGPT & other AI tools can be pretty awful for non-trivial C code. It often spits out things that might work in other syntactically similar C-style, such as using string literals as switch cases, or concatenating string literals with the + operator. It's the worst nightmare for someone who's actively learning to code; it will confidently answer your question incorrectly, while sounding completely reasonable.
|
||||
|
||||
[u/aghast_nj](https://www.reddit.com/r/C_Programming/comments/178cc4l/comment/k4z9cby/?utm_source=share&utm_medium=web2x&context=3)
|
||||
> ChatGPT is failing you twice. First, because it's telling you about a bogus problem. Second, because it is not telling you about a real problem. The bogus problem is the redeclaration issue. It's technically correct that you will get a diagnostic if you try to define the same local variable twice in the same scope. But the solution there is trivial: don't define it, just re-use it. The more pernicious problem is handling or not handling the failure of realloc. When you overwrite the list variable with the result of realloc there is the possibility that the result is NULL. In that case, you have "lost" your original pointer.
|
||||
|
||||
[u/Meatball_Subzero](https://www.reddit.com/r/C_Programming/comments/16geaal/comment/k078frr/?utm_source=share&utm_medium=web2x&context=3)
|
||||
> I've been using copilot for nearly two years now. For me it's just a nice auto complete. I don't think it ever solves anything for me. It just makes me faster, especially with repetitive shit.
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
# Clojure
|
||||
|
||||
Clojure is the #36 most popular language according to the [2023 Stack Overflow Developer Survey](https://survey.stackoverflow.co/2023/#section-most-popular-technologies-programming-scripting-and-markup-languages).
|
||||
|
||||
## Benchmarks
|
||||
|
||||
❌ Clojure is not one of the 19 languages in the [MultiPL-E benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=couple%20notable%20mentions-,4.%20MultiPL%2DE,-Creator%3A%20Northeastern)
|
||||
|
||||
❌ Clojure is not one of the 16 languages in the [BabelCode / TP3 benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=amazon%2Dscience/mxeval-,12.%20BabelCode%20/%20TP3,-Creator%3A%20Google)
|
||||
|
||||
❌ Clojure is not one of the 13 languages in the [MBXP / Multilingual HumanEval benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=11.%20MBXP%20/%20Multilingual%20HumanEval)
|
||||
|
||||
❌ Clojure is not one of the 5 languages in the [HumanEval-X benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=Some%20multilingual%C2%A0benchmarks-,10.%20HumanEval%2DX,-Creator%3A%20Tsinghua)
|
||||
|
||||
## Datasets
|
||||
|
||||
✅ Clojure is included in [The Stack dataset](https://arxiv.org/abs/2211.15533)
|
||||
|
||||
❌ Clojure is not included in the [CodeParrot dataset](https://huggingface.co/datasets/codeparrot/github-code)
|
||||
|
||||
❌ Clojure is not included in the [AlphaCode dataset](https://arxiv.org/abs/2203.07814)
|
||||
|
||||
❌ Clojure is not included in the [CodeGen dataset](https://arxiv.org/abs/2203.13474)
|
||||
|
||||
❌ Clojure is not included in the [PolyCoder dataset](https://arxiv.org/abs/2202.13169)
|
||||
|
||||
## Stack Overflow & GitHub presence
|
||||
|
||||
Clojure has 17,630 [tagged questions on Stack Overflow](https://stackoverflow.com/tags)
|
||||
|
||||
Clojure projects have had 112,757 [PRs on GitHub since 2014](https://madnight.github.io/githut/#/pull_requests/2023/3)
|
||||
|
||||
Clojure projects have had 84,128 [issues on GitHub since 2014](https://madnight.github.io/githut/#/issues/2023/3)
|
||||
|
||||
Clojure projects have had 518,359 [pushes on GitHub since 2014](https://madnight.github.io/githut/#/pushes/2023/3)
|
||||
|
||||
Clojure projects have had 272,970 [stars on GitHub since 2014](https://madnight.github.io/githut/#/stars/2023/3)
|
||||
|
||||
## Anecdotes from developers
|
||||
|
||||
[u/noprompt](https://www.reddit.com/r/Clojure/comments/148nhuj/comment/jo2z2n8)
|
||||
> I've been using Copilot since December 2022. It sucks for Clojure but can be great for other languages like Python, JavaScript, SQL, etc. if you know how to prompt it. As other have mentioned, Copilot excels at reducing boilerplate and picking up on patterns. For example, lets say there is a table of data in a markdown document and you want to convert it to a vector of maps. You can copy/paste the markdown table into your buffer as a comment and just start writing the data structure you want it to be, Copilot will figure it out and complete it. Its also useful for generating random utility functions. Recently in JavaScript, I typed `function lerp` (linear interpolation) and it pretty quickly filled it in. I had an array of hex color values that I wanted to be RGB and I wanted to double the number of values by interpolating between them. All I had to do was type that in a comment and wait a second before it gave me a working rough draft of the function. Copilot can actually do a lot of these things for Clojure but when I was trying to use it I found myself consistently having to fix issues with delimiters, typically round braces. Eventually, I just gave up on it. Maybe I'll give it another shot when Copilot-X releases. ChatGPT is much more useful for Clojure than Copilot. It does hallucinate and get some things wrong but overall its awesome for generating documentation, explaining code, translating diffs into PR notes, and exploring ideas. I've found it very useful for random Java questions and then translating the answers into mostly working Clojure code. These things are handy tools and have quirks but they're going to get better. It's a great time to be a cosmopolitan (polyglot) programmer.
|
||||
|
||||
[waffletower](https://news.ycombinator.com/item?id=35803856)
|
||||
> No Clojure. No Julia. No Haskell. No Racket. No Scheme. No Common Lisp. No OCaml. And, as much as I despise Microsoft, No C#. No F#. No Swift. No Objective-C. No Perl. No Datalog. A glaringly lacking choice of languages.
|
||||
|
||||
[@EricTheTurner](https://x.com/EricTheTurner/status/1600344406166380544?s=20)
|
||||
> FizzBuzz was once a common programming exercise used for screening software developers (maybe it still is?) I told chatGPT to "Write an efficient fizz buzz function in Clojure".
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
# C#
|
||||
|
||||
C# is the #9 most popular language according to the [2023 Stack Overflow Developer Survey](https://survey.stackoverflow.co/2023/#section-most-popular-technologies-programming-scripting-and-markup-languages).
|
||||
|
||||
## Benchmarks
|
||||
|
||||
✅ C# is one of the 19 languages in the [MultiPL-E benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=couple%20notable%20mentions-,4.%20MultiPL%2DE,-Creator%3A%20Northeastern)
|
||||
|
||||
✅ C# is one of the 16 languages in the [BabelCode / TP3 benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=amazon%2Dscience/mxeval-,12.%20BabelCode%20/%20TP3,-Creator%3A%20Google)
|
||||
|
||||
✅ C# is one of the 13 languages in the [MBXP / Multilingual HumanEval benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=11.%20MBXP%20/%20Multilingual%20HumanEval)
|
||||
|
||||
❌ C# is not one of the 5 languages in the [HumanEval-X benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=Some%20multilingual%C2%A0benchmarks-,10.%20HumanEval%2DX,-Creator%3A%20Tsinghua)
|
||||
|
||||
## Datasets
|
||||
|
||||
✅ C# makes up 128.37 GB of [The Stack dataset](https://arxiv.org/abs/2211.15533)
|
||||
|
||||
✅ C# makes up 36.83 GB of the [CodeParrot dataset](https://huggingface.co/datasets/codeparrot/github-code)
|
||||
|
||||
✅ C# makes up 38.4 GB of the [AlphaCode dataset](https://arxiv.org/abs/2203.07814)
|
||||
|
||||
❌ C# is not included in the [CodeGen dataset](https://arxiv.org/abs/2203.13474)
|
||||
|
||||
✅ C# makes up 21 GB of the [PolyCoder dataset](https://arxiv.org/abs/2202.13169)
|
||||
|
||||
## Stack Overflow & GitHub presence
|
||||
|
||||
C# has 1,606,619 [tagged questions on Stack Overflow](https://stackoverflow.com/tags)
|
||||
|
||||
C# projects have had 1,191,927 [PRs on GitHub since 2014](https://madnight.github.io/githut/#/pull_requests/2023/3)
|
||||
|
||||
C# projects have had 1,489,756 [issues on GitHub since 2014](https://madnight.github.io/githut/#/issues/2023/3)
|
||||
|
||||
C# projects have had 4,581,919 [pushes on GitHub since 2014](https://madnight.github.io/githut/#/pushes/2023/3)
|
||||
|
||||
C# projects have had 2,521,561 [stars on GitHub since 2014](https://madnight.github.io/githut/#/stars/2023/3)
|
||||
|
||||
## Anecdotes from developers
|
||||
|
||||
[u/Slypenslyde](https://www.reddit.com/r/csharp/comments/1768d7o/comment/k4kguvf/?utm_source=share&utm_medium=web2x&context=3)
|
||||
> AI tools give me the code I need maybe 20% to 40% of the time. Another 30% or so I have to tweak it to make it work. For the remaining percentages what it spits out needs so many changes it's easier to write it myself than expect that I tweaked it without mistakes. Sometimes it feels like CoPilot might slow me down since now I tend to hit a new line and wait 2-3 seconds to see what it suggests.
|
||||
|
||||
[u/telewebb](https://www.reddit.com/r/csharp/comments/1768d7o/comment/k4kod5z/?utm_source=share&utm_medium=web2x&context=3)
|
||||
> I haven't found any in IDE plug-in that's been all that great. I've used copilot in conjunction with chatGPT and find myself using chatGPT way more than copilot. Keep in mind I use LLMs more as an enhanced search engine than a code writer. For code, I find it helpful to get a second opinion on a refactor, handing over error messages, writing one liners for some logic, and handing over a file to act as a second pair of eyes for what I can't see. Outside of code, I use it as a rubber ducky that can talk back when trying to think through some problems. Though tbh, the act of thinking about my problem and structuring it out to a prompt often solves my problem before I even hit send. Actually, now that I think about it. The damn thing has been a God send for writing and debugging terraform.
|
||||
|
||||
[u/quebecbassman](https://www.reddit.com/r/csharp/comments/1768d7o/comment/k4kgylh/?utm_source=share&utm_medium=web2x&context=3)
|
||||
> Call me old, but I prefer to code things myself. AI is good to give you hints and steer you in the right direction. It can also write a lot of bullshit that looks like legit code. Then, debugging code that you didn't write gets very difficult. Remember that you write code once, but will read it many, many times. Have your boss pay for training.
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
# CSS
|
||||
|
||||
CSS is the #2 most popular language according to the [2023 Stack Overflow Developer Survey](https://survey.stackoverflow.co/2023/#section-most-popular-technologies-programming-scripting-and-markup-languages).
|
||||
|
||||
## Benchmarks
|
||||
|
||||
❌ CSS is not one of the 19 languages in the [MultiPL-E benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=couple%20notable%20mentions-,4.%20MultiPL%2DE,-Creator%3A%20Northeastern)
|
||||
|
||||
❌ CSS is not one of the 16 languages in the [BabelCode / TP3 benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=amazon%2Dscience/mxeval-,12.%20BabelCode%20/%20TP3,-Creator%3A%20Google)
|
||||
|
||||
❌ CSS is not one of the 13 languages in the [MBXP / Multilingual HumanEval benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=11.%20MBXP%20/%20Multilingual%20HumanEval)
|
||||
|
||||
❌ CSS is not one of the 5 languages in the [HumanEval-X benchmark](https://blog.continue.dev/an-introduction-to-code-llm-benchmarks-for-software-engineers/#:~:text=Some%20multilingual%C2%A0benchmarks-,10.%20HumanEval%2DX,-Creator%3A%20Tsinghua)
|
||||
|
||||
## Datasets
|
||||
|
||||
✅ CSS makes up 145.33 GB of [The Stack dataset](https://arxiv.org/abs/2211.15533)
|
||||
|
||||
✅ CSS makes up 22.67 GB of the [CodeParrot dataset](https://huggingface.co/datasets/codeparrot/github-code)
|
||||
|
||||
❌ CSS is not included in the [AlphaCode dataset](https://arxiv.org/abs/2203.07814)
|
||||
|
||||
❌ CSS is not included in the [CodeGen dataset](https://arxiv.org/abs/2203.13474)
|
||||
|
||||
❌ CSS is not included in the [PolyCoder dataset](https://arxiv.org/abs/2202.13169)
|
||||
|
||||
## Stack Overflow & GitHub presence
|
||||
|
||||
CSS has 800,588 [tagged questions on Stack Overflow](https://stackoverflow.com/tags)
|
||||
|
||||
CSS projects have had 443,082 [PRs on GitHub since 2014](https://madnight.github.io/githut/#/pull_requests/2023/3)
|
||||
|
||||
CSS projects have had 436,767 [issues on GitHub since 2014](https://madnight.github.io/githut/#/issues/2023/3)
|
||||
|
||||
CSS projects have had 4,314,244 [pushes on GitHub since 2014](https://madnight.github.io/githut/#/pushes/2023/3)
|
||||
|
||||
CSS projects have had 1,673,966 [stars on GitHub since 2014](https://madnight.github.io/githut/#/stars/2023/3)
|
||||
|
||||
## Anecdotes from developers
|
||||
|
||||
[u/Kthulu666](https://www.reddit.com/r/css/comments/zudl9x/comment/j1ikchb/?utm_source=share&utm_medium=web2x&context=3)
|
||||
> I'm not sure how it could help learn. I spent a little while messing with it and trying to generate some html/css/js for a simple responsive hamburger menu. Results were mixed. It got me most of the way there, but had trouble really putting it all together into one menu that worked as intended. I could have spent more time trying to manipulate it, but that would've taken more time that it would have to make the thing by hand. On some level it's just google with extra steps since you need to check and verify everything it outputs. I found that Lucas from LTT had a good assessment of it: it's usually pretty good, but when it's wrong, it's confidently wrong. I think it would be a crappy teaching aid since the student doesn't immediately recognize when the bot is wrong or why the code it produced doesn't work.
|
||||
|
||||
[u/ipromiseimnotakiller](https://www.reddit.com/r/css/comments/17gcln8/comment/k6g1esr/?utm_source=share&utm_medium=web2x&context=3)
|
||||
> I use chatgpt daily and it works wonders, if you know what you're reading. Otherwise, if you don't know something as a complete beginner and take chatgpt response as gospel, you're gonna be in a world of hurt when it starts lying to you giving 3 year old outdated information..
|
||||
|
||||
[u/cryothic](https://www.reddit.com/r/css/comments/16owij3/comment/k1tjfqg/?utm_source=share&utm_medium=web2x&context=3)
|
||||
> In that case it's great. And I like ChatGPT too. But a complete beginner doesn't see possible flaws in the solution. So there is the possibility they learn a bad practice. I use ChatGPT too sometimes, but you will need to look at the code. Don't just copy and paste.
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue