Merge branch 'main' into winarm64
This commit is contained in:
commit
591e8468c7
594 changed files with 16484 additions and 26262 deletions
11
.continue/mcpServers/continue-docs-mcp.yaml
Normal file
11
.continue/mcpServers/continue-docs-mcp.yaml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
name: Continue Documentation MCP
|
||||
version: 0.0.1
|
||||
schema: v1
|
||||
mcpServers:
|
||||
- name: Continue Docs Search
|
||||
type: stdio
|
||||
command: npx
|
||||
args:
|
||||
- mint-mcp
|
||||
- add
|
||||
- continue-docs
|
||||
200
.continue/rules/dev-data-guide.md
Normal file
200
.continue/rules/dev-data-guide.md
Normal file
|
|
@ -0,0 +1,200 @@
|
|||
---
|
||||
alwaysApply: false
|
||||
---
|
||||
|
||||
# Continue Development Data (Dev Data) Guide
|
||||
|
||||
## Overview
|
||||
|
||||
Development data (dev data) captures detailed information about how developers interact with LLM-aided development tools. Unlike basic telemetry, dev data includes lots of details into the complete software development workflow, including code context, user interactions, and development patterns.
|
||||
|
||||
## Core Architecture
|
||||
|
||||
### Primary Implementation Files
|
||||
|
||||
- **`/core/data/log.ts`**: Main `DataLogger` class - singleton for event logging and remote transmission
|
||||
- **`/packages/config-yaml/src/schemas/data/`**: Schema definitions for all event types
|
||||
|
||||
### Storage Locations
|
||||
|
||||
- **Default storage**: `~/.continue/dev_data/`
|
||||
- **Event files**: `~/.continue/dev_data/{version}/{eventName}.jsonl`
|
||||
|
||||
## Event Types and Schemas
|
||||
|
||||
### Core Event Types
|
||||
|
||||
1. **`tokensGenerated`**: LLM token usage tracking
|
||||
2. **`autocomplete`**: Code completion interactions
|
||||
3. **`chatInteraction`**: Chat-based development assistance
|
||||
4. **`editInteraction`**: Code editing sessions
|
||||
5. **`editOutcome`**: Results of edit operations
|
||||
6. **`nextEditOutcome`**: Next Edit feature outcomes
|
||||
7. **`chatFeedback`**: User feedback on AI responses
|
||||
8. **`toolUsage`**: Tool interaction statistics
|
||||
9. **`quickEdit`**: Quick edit functionality usage
|
||||
|
||||
### Schema Versioning
|
||||
|
||||
- **Version 0.1.0**: Initial schema implementation
|
||||
- **Version 0.2.0**: Current schema with expanded fields and metadata
|
||||
- **Schema files**: Located in `/packages/config-yaml/src/schemas/data/`
|
||||
|
||||
### Base Schema Structure
|
||||
|
||||
All events inherit from a base schema (`/packages/config-yaml/src/schemas/data/base.ts`):
|
||||
|
||||
```typescript
|
||||
{
|
||||
eventName: string,
|
||||
schema: string,
|
||||
timestamp: string,
|
||||
userId: string,
|
||||
userAgent: string,
|
||||
selectedProfileId: string
|
||||
}
|
||||
```
|
||||
|
||||
## Key Integration Points
|
||||
|
||||
### Autocomplete System
|
||||
|
||||
- **File**: `/core/autocomplete/util/AutocompleteLoggingService.ts`
|
||||
- **Purpose**: Tracks code completion acceptance/rejection, timing, and cache hits
|
||||
- **Integration**: Called from autocomplete engine when completions are shown/accepted
|
||||
|
||||
### Chat Interface
|
||||
|
||||
- **Integration**: Chat interactions logged through `DataLogger.logDevData()`
|
||||
- **Data**: Includes prompts, responses, context, and user feedback
|
||||
- **Privacy**: Can be configured to exclude code content
|
||||
|
||||
### Edit Features
|
||||
|
||||
- **Files**: `/extensions/vscode/src/extension/EditOutcomeTracker.ts`, `/core/nextEdit/NextEditLoggingService.ts`
|
||||
- **Purpose**: Track edit suggestions, acceptance rates, and outcomes
|
||||
- **Integration**: Embedded in edit workflow to capture user decisions
|
||||
|
||||
### LLM Token Tracking
|
||||
|
||||
- **File**: `/core/llm/index.ts`
|
||||
- **Purpose**: Track token usage across all LLM providers
|
||||
- **Storage**: SQLite database for efficient querying and reporting
|
||||
|
||||
## Configuration and Customization
|
||||
|
||||
### Configuration Structure
|
||||
|
||||
Dev data is configured through `data` blocks in your Continue config:
|
||||
|
||||
```yaml
|
||||
data:
|
||||
- name: "Local Development Data"
|
||||
destination: "file:///Users/developer/.continue/dev_data"
|
||||
schema: "0.2.0"
|
||||
level: "all"
|
||||
events: ["autocomplete", "chatInteraction", "editOutcome"]
|
||||
|
||||
- name: "Team Analytics"
|
||||
destination: "https://analytics.yourcompany.com/api/events"
|
||||
schema: "0.2.0"
|
||||
level: "noCode"
|
||||
apiKey: "your-api-key-here"
|
||||
events: ["tokensGenerated", "toolUsage"]
|
||||
```
|
||||
|
||||
### Configuration Options
|
||||
|
||||
- **`destination`**: Where to send data (`file://` for local, `http://`/`https://` for remote)
|
||||
- **`schema`**: Schema version to use (`"0.1.0"` or `"0.2.0"`)
|
||||
- **`level`**: Data detail level (`"all"` includes code, `"noCode"` excludes code content)
|
||||
- **`events`**: Array of event types to collect
|
||||
- **`apiKey`**: Authentication for remote endpoints
|
||||
|
||||
### Privacy Controls
|
||||
|
||||
- **`"all"` level**: Includes code content (prefixes, suffixes, completions)
|
||||
- **`"noCode"` level**: Excludes code content, only metadata and metrics
|
||||
- **Local-first**: Data is always stored locally, remote transmission is optional
|
||||
|
||||
## Making Changes to Dev Data
|
||||
|
||||
### Adding New Event Types
|
||||
|
||||
1. **Create schema**: Add new event schema in `/packages/config-yaml/src/schemas/data/`
|
||||
2. **Update index**: Add to schema aggregator in `/packages/config-yaml/src/schemas/data/index.ts`
|
||||
3. **Implement logging**: Add logging calls in relevant service files
|
||||
4. **Update version**: Consider schema version bump if breaking changes
|
||||
|
||||
### Modifying Existing Events
|
||||
|
||||
1. **Schema changes**: Update schema files in `/packages/config-yaml/src/schemas/data/`
|
||||
2. **Backward compatibility**: Ensure changes don't break existing data consumers
|
||||
3. **Version management**: Increment schema version for breaking changes
|
||||
4. **Test thoroughly**: Validate schema changes with existing data
|
||||
|
||||
### Adding New Logging Points
|
||||
|
||||
1. **Import DataLogger**: `import { DataLogger } from "core/data/log"`
|
||||
2. **Log events**: Call `DataLogger.getInstance().logDevData(eventName, data)`
|
||||
3. **Follow patterns**: Use existing logging services as examples
|
||||
4. **Validate data**: Ensure logged data matches schema requirements
|
||||
|
||||
### Debugging Dev Data Issues
|
||||
|
||||
1. **Check local storage**: Verify files are being created in `~/.continue/dev_data/`
|
||||
2. **Validate schemas**: Ensure event data matches expected schema format
|
||||
3. **Review configuration**: Check `data` blocks in Continue config
|
||||
4. **Test endpoints**: Verify remote endpoints are reachable and accepting data
|
||||
|
||||
## Best Practices
|
||||
|
||||
### When Adding New Events
|
||||
|
||||
- Follow existing naming conventions for event types
|
||||
- Include sufficient context for analysis without oversharing sensitive data
|
||||
- Consider privacy implications and respect user configuration levels
|
||||
- Add appropriate error handling and logging
|
||||
|
||||
### When Modifying Schemas
|
||||
|
||||
- Maintain backward compatibility when possible
|
||||
- Document schema changes thoroughly
|
||||
- Consider impact on existing data consumers
|
||||
- Test with real development data
|
||||
|
||||
### When Integrating Logging
|
||||
|
||||
- Use the singleton pattern: `DataLogger.getInstance()`
|
||||
- Log events at appropriate points in user workflow
|
||||
- Respect user privacy settings and configuration
|
||||
- Handle errors gracefully without disrupting user experience
|
||||
|
||||
## Common Patterns
|
||||
|
||||
### Service-Based Logging
|
||||
|
||||
Most dev data logging follows a service pattern:
|
||||
|
||||
```typescript
|
||||
export class FeatureLoggingService {
|
||||
private dataLogger = DataLogger.getInstance();
|
||||
|
||||
logFeatureUsage(data: FeatureUsageData) {
|
||||
this.dataLogger.logDevData("featureUsage", data);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Event-Driven Logging
|
||||
|
||||
Events are typically logged at key interaction points:
|
||||
|
||||
```typescript
|
||||
// When user accepts autocomplete
|
||||
onAutocompleteAccepted(completion: CompletionData) {
|
||||
AutocompleteLoggingService.getInstance().logAutocompleteAccepted(completion);
|
||||
}
|
||||
```
|
||||
|
||||
This guide provides the foundation for understanding and working with Continue's dev data system. Always prioritize user privacy and follow established patterns when making changes.
|
||||
32
.github/workflows/docs.yml
vendored
Normal file
32
.github/workflows/docs.yml
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
name: Docs Check
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'docs2/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'docs2/**'
|
||||
|
||||
jobs:
|
||||
check-broken-links:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: docs2/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: ./docs2
|
||||
run: npm ci
|
||||
|
||||
- name: Check for broken links
|
||||
working-directory: ./docs2
|
||||
run: npx mintlify broken-links
|
||||
2
.github/workflows/jetbrains-release.yaml
vendored
2
.github/workflows/jetbrains-release.yaml
vendored
|
|
@ -168,7 +168,7 @@ jobs:
|
|||
key: ${{ runner.os }}-node-${{ hashFiles('gui/package-lock.json') }}
|
||||
|
||||
- name: Build packages (Unix)
|
||||
run: ./scripts/build-packages.sh
|
||||
run: cd ../.. && ./scripts/build-packages.sh
|
||||
|
||||
# npm install core
|
||||
- name: Install core node_modules
|
||||
|
|
|
|||
1
.vscode/launch.json
vendored
1
.vscode/launch.json
vendored
|
|
@ -19,7 +19,6 @@
|
|||
"pauseForSourceMap": false,
|
||||
"outFiles": ["${workspaceFolder}/extensions/vscode/out/extension.js"],
|
||||
"preLaunchTask": "vscode-extension:build",
|
||||
"postDebugTask": "Terminate All Tasks",
|
||||
"env": {
|
||||
// "CONTROL_PLANE_ENV": "local",
|
||||
"CONTINUE_GLOBAL_DIR": "${workspaceFolder}/extensions/.continue-debug"
|
||||
|
|
|
|||
13
.vscode/tasks.json
vendored
13
.vscode/tasks.json
vendored
|
|
@ -223,19 +223,6 @@
|
|||
],
|
||||
"type": "shell",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Terminate All Tasks",
|
||||
"command": "${input:terminate}",
|
||||
"type": "shell"
|
||||
}
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
"id": "terminate",
|
||||
"type": "command",
|
||||
"command": "workbench.action.tasks.terminate",
|
||||
"args": "terminateAll"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
1
binary/.gitignore
vendored
1
binary/.gitignore
vendored
|
|
@ -3,3 +3,4 @@ bin
|
|||
data
|
||||
out
|
||||
tmp
|
||||
tree-sitter
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ function cleanSlate() {
|
|||
rimrafSync(out);
|
||||
rimrafSync(build);
|
||||
rimrafSync(path.join(__dirname, "tmp"));
|
||||
rimrafSync(path.join(__dirname, "tree-sitter"));
|
||||
fs.mkdirSync(bin);
|
||||
fs.mkdirSync(out);
|
||||
fs.mkdirSync(build);
|
||||
|
|
@ -142,6 +143,25 @@ async function buildWithEsbuild() {
|
|||
);
|
||||
});
|
||||
|
||||
// copy tree-sitter colder to binary folder to make it available when running in intellij debug mode
|
||||
const treeSitterDir = path.join(__dirname, "tree-sitter");
|
||||
fs.mkdirSync(treeSitterDir);
|
||||
await new Promise((resolve, reject) => {
|
||||
ncp(
|
||||
path.join(__dirname, "..", "extensions", "vscode", "tree-sitter"),
|
||||
treeSitterDir,
|
||||
{ dereference: true },
|
||||
(error) => {
|
||||
if (error) {
|
||||
console.warn("[error] Error copying tree-sitter files", error);
|
||||
reject(error);
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
const filesToCopy = [
|
||||
"../core/vendor/tree-sitter.wasm",
|
||||
"../core/llm/llamaTokenizerWorkerPool.mjs",
|
||||
|
|
|
|||
2
binary/package-lock.json
generated
2
binary/package-lock.json
generated
|
|
@ -121,6 +121,8 @@
|
|||
"@babel/preset-env": "^7.24.7",
|
||||
"@biomejs/biome": "1.6.4",
|
||||
"@google/generative-ai": "^0.11.4",
|
||||
"@shikijs/colorized-brackets": "^3.7.0",
|
||||
"@shikijs/transformers": "^3.7.0",
|
||||
"@types/diff": "^7.0.1",
|
||||
"@types/follow-redirects": "^1.14.4",
|
||||
"@types/jest": "^29.5.12",
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
"../../../core/node_modules/sqlite3/**/*",
|
||||
"../../out/tree-sitter.wasm",
|
||||
"../../out/tree-sitter-wasms/*",
|
||||
"../../tree-sitter/**/*",
|
||||
"../../out/llamaTokenizer.mjs",
|
||||
"../../out/llamaTokenizerWorkerPool.mjs",
|
||||
"../../out/tiktokenWorkerPool.mjs",
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
"../../../core/node_modules/sqlite3/**/*",
|
||||
"../../out/tree-sitter.wasm",
|
||||
"../../out/tree-sitter-wasms/*",
|
||||
"../../tree-sitter/**/*",
|
||||
"../../out/llamaTokenizer.mjs",
|
||||
"../../out/llamaTokenizerWorkerPool.mjs",
|
||||
"../../out/tiktokenWorkerPool.mjs",
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
"../../../core/node_modules/sqlite3/**/*",
|
||||
"../../out/tree-sitter.wasm",
|
||||
"../../out/tree-sitter-wasms/*",
|
||||
"../../tree-sitter/**/*",
|
||||
"../../out/llamaTokenizer.mjs",
|
||||
"../../out/llamaTokenizerWorkerPool.mjs",
|
||||
"../../out/tiktokenWorkerPool.mjs",
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
"../../../core/node_modules/sqlite3/**/*",
|
||||
"../../out/tree-sitter.wasm",
|
||||
"../../out/tree-sitter-wasms/*",
|
||||
"../../tree-sitter/**/*",
|
||||
"../../out/llamaTokenizer.mjs",
|
||||
"../../out/llamaTokenizerWorkerPool.mjs",
|
||||
"../../out/tiktokenWorkerPool.mjs",
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
"../../../core/node_modules/sqlite3/**/*",
|
||||
"../../out/tree-sitter.wasm",
|
||||
"../../out/tree-sitter-wasms/*",
|
||||
"../../tree-sitter/**/*",
|
||||
"../../node_modules/win-ca/lib/crypt32-ia32.node",
|
||||
"../../node_modules/win-ca/lib/crypt32-x64.node",
|
||||
"../../node_modules/win-ca/lib/roots.exe",
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
"../../../core/node_modules/sqlite3/**/*",
|
||||
"../../out/tree-sitter.wasm",
|
||||
"../../out/tree-sitter-wasms/*",
|
||||
"../../tree-sitter/**/*",
|
||||
"../../node_modules/win-ca/lib/crypt32-ia32.node",
|
||||
"../../node_modules/win-ca/lib/crypt32-x64.node",
|
||||
"../../node_modules/win-ca/lib/roots.exe",
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ export class CompletionProvider {
|
|||
completionId: helper.input.completionId,
|
||||
gitRepo: await this.ide.getRepoName(helper.filepath),
|
||||
uniqueId: await this.ide.getUniqueId(),
|
||||
timestamp: Date.now(),
|
||||
timestamp: new Date().toISOString(),
|
||||
...helper.options,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -41,5 +41,5 @@ export interface AutocompleteOutcome extends TabAutocompleteOptions {
|
|||
gitRepo?: string;
|
||||
completionId: string;
|
||||
uniqueId: string;
|
||||
timestamp: number;
|
||||
timestamp: string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ class MCPConnection {
|
|||
};
|
||||
|
||||
constructor(public options: MCPOptions) {
|
||||
this.transport = this.constructTransport(options);
|
||||
// Don't construct transport in constructor to avoid blocking
|
||||
this.transport = {} as Transport; // Will be set in connectClient
|
||||
|
||||
this.client = new Client(
|
||||
{
|
||||
|
|
@ -132,7 +133,8 @@ class MCPConnection {
|
|||
});
|
||||
}),
|
||||
(async () => {
|
||||
this.transport = this.constructTransport(this.options);
|
||||
this.transport = await this.constructTransportAsync(this.options);
|
||||
|
||||
try {
|
||||
await this.client.connect(this.transport);
|
||||
} catch (error) {
|
||||
|
|
@ -295,7 +297,9 @@ class MCPConnection {
|
|||
};
|
||||
}
|
||||
|
||||
private constructTransport(options: MCPOptions): Transport {
|
||||
private async constructTransportAsync(
|
||||
options: MCPOptions,
|
||||
): Promise<Transport> {
|
||||
switch (options.transport.type) {
|
||||
case "stdio":
|
||||
const env: Record<string, string> = options.transport.env
|
||||
|
|
@ -309,7 +313,7 @@ class MCPConnection {
|
|||
// For non-Windows platforms, try to get the PATH from user shell
|
||||
if (process.platform !== "win32") {
|
||||
try {
|
||||
const shellEnvPath = getEnvPathFromUserShell();
|
||||
const shellEnvPath = await getEnvPathFromUserShell();
|
||||
if (shellEnvPath && shellEnvPath !== process.env.PATH) {
|
||||
env.PATH = shellEnvPath;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,13 @@ import { beforeEach, describe, expect, it, vi } from "vitest";
|
|||
import MCPConnection from "./MCPConnection";
|
||||
import { StdioOptions } from "../../index.d.js";
|
||||
|
||||
// Mock the shell path utility
|
||||
vi.mock("../../util/shellPath", () => ({
|
||||
getEnvPathFromUserShell: vi
|
||||
.fn()
|
||||
.mockResolvedValue("/usr/local/bin:/usr/bin:/bin"),
|
||||
}));
|
||||
|
||||
describe("MCPConnection", () => {
|
||||
beforeEach(() => {
|
||||
vi.restoreAllMocks();
|
||||
|
|
@ -98,7 +105,7 @@ describe("MCPConnection", () => {
|
|||
expect(conn.status).toBe("not-connected");
|
||||
});
|
||||
|
||||
it("should throw on invalid transport type", () => {
|
||||
it("should throw on invalid transport type", async () => {
|
||||
const options = {
|
||||
name: "test-mcp",
|
||||
id: "test-id",
|
||||
|
|
@ -107,9 +114,14 @@ describe("MCPConnection", () => {
|
|||
} as any,
|
||||
};
|
||||
|
||||
expect(() => new MCPConnection(options)).toThrow(
|
||||
"Unsupported transport type: invalid",
|
||||
);
|
||||
const conn = new MCPConnection(options);
|
||||
const abortController = new AbortController();
|
||||
|
||||
// The validation now happens during connectClient, not constructor
|
||||
await conn.connectClient(false, abortController.signal);
|
||||
|
||||
expect(conn.status).toBe("error");
|
||||
expect(conn.errors[0]).toContain("Unsupported transport type: invalid");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -203,6 +215,15 @@ describe("MCPConnection", () => {
|
|||
() => new Promise((resolve) => setTimeout(resolve, 1000)),
|
||||
);
|
||||
|
||||
// Mock the required methods for successful connection
|
||||
const mockGetServerCapabilities = vi
|
||||
.spyOn(Client.prototype, "getServerCapabilities")
|
||||
.mockReturnValue({
|
||||
resources: {},
|
||||
tools: {},
|
||||
prompts: {},
|
||||
});
|
||||
|
||||
const abortController = new AbortController();
|
||||
await conn.connectClient(false, abortController.signal);
|
||||
|
||||
|
|
@ -211,7 +232,7 @@ describe("MCPConnection", () => {
|
|||
});
|
||||
|
||||
it("should handle connection timeout", async () => {
|
||||
const conn = new MCPConnection({ ...options, timeout: 1 });
|
||||
const conn = new MCPConnection({ ...options, timeout: 50 });
|
||||
const mockConnect = vi
|
||||
.spyOn(Client.prototype, "connect")
|
||||
.mockImplementation(
|
||||
|
|
@ -223,7 +244,9 @@ describe("MCPConnection", () => {
|
|||
|
||||
expect(conn.status).toBe("error");
|
||||
expect(conn.errors[0]).toContain("Failed to connect");
|
||||
expect(mockConnect).toHaveBeenCalled();
|
||||
// The connection should timeout before connect is called due to transport construction
|
||||
// Since transport construction happens first, and we're not mocking that,
|
||||
// the timeout will happen during transport construction or connect attempt
|
||||
});
|
||||
|
||||
it("should handle already connected state", async () => {
|
||||
|
|
|
|||
|
|
@ -145,6 +145,11 @@ class DocsContextProvider extends BaseContextProvider {
|
|||
async loadSubmenuItems(
|
||||
args: LoadSubmenuItemsArgs,
|
||||
): Promise<ContextSubmenuItem[]> {
|
||||
const { config } = args;
|
||||
// This set is used to filter out the docs that is not in docs config but exist in sqlite metadata
|
||||
const configDocsSet = new Set(
|
||||
config.docs?.map((doc) => doc.startUrl) || [],
|
||||
);
|
||||
// Get docs service
|
||||
const docsService = DocsService.getSingleton();
|
||||
if (!docsService) {
|
||||
|
|
@ -159,12 +164,14 @@ class DocsContextProvider extends BaseContextProvider {
|
|||
// Get all indexed docs from the database
|
||||
const docs = (await docsService.listMetadata()) ?? [];
|
||||
for (const { startUrl, title, favicon } of docs) {
|
||||
submenuItems.push({
|
||||
title,
|
||||
id: startUrl,
|
||||
description: new URL(startUrl).hostname,
|
||||
icon: favicon,
|
||||
});
|
||||
if (configDocsSet.has(startUrl)) {
|
||||
submenuItems.push({
|
||||
title,
|
||||
id: startUrl,
|
||||
description: new URL(startUrl).hostname,
|
||||
icon: favicon,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Sort alphabetically
|
||||
|
|
|
|||
|
|
@ -72,6 +72,10 @@ class HttpContextProvider extends BaseContextProvider {
|
|||
description: item.description ?? "HTTP Context Item",
|
||||
content: item.content ?? "",
|
||||
name: item.name ?? this.options.title ?? "HTTP",
|
||||
uri: {
|
||||
type: item.uri.type,
|
||||
value: item.uri.value,
|
||||
},
|
||||
});
|
||||
|
||||
return Array.isArray(json)
|
||||
|
|
|
|||
|
|
@ -107,6 +107,17 @@ const siteIndexingConfigsAreEqual = (
|
|||
);
|
||||
};
|
||||
|
||||
const siteIndexingConfigsAreEqualExceptTitleAndFavicon = (
|
||||
config1: SiteIndexingConfig,
|
||||
config2: SiteIndexingConfig,
|
||||
) => {
|
||||
return (
|
||||
config1.startUrl === config2.startUrl &&
|
||||
config1.maxDepth === config2.maxDepth &&
|
||||
config1.useLocalCrawling === config2.useLocalCrawling
|
||||
);
|
||||
};
|
||||
|
||||
/*
|
||||
General process:
|
||||
- On config update:
|
||||
|
|
@ -395,6 +406,21 @@ export default class DocsService {
|
|||
siteIndexingConfig: SiteIndexingConfig,
|
||||
): Promise<boolean> {
|
||||
try {
|
||||
// Set a initial status when retrieving cache
|
||||
this.handleStatusUpdate({
|
||||
type: "docs",
|
||||
id: startUrl,
|
||||
embeddingsProviderId: embeddingId,
|
||||
isReindexing: false,
|
||||
title: siteIndexingConfig.title,
|
||||
debugInfo: "Loaded from cache",
|
||||
icon: siteIndexingConfig.faviconUrl,
|
||||
url: startUrl,
|
||||
progress: 0,
|
||||
description: "Try to retrieve cache",
|
||||
status: "indexing",
|
||||
});
|
||||
|
||||
const cacheHit = await this.tryFetchFromCache(startUrl, embeddingId);
|
||||
|
||||
if (cacheHit) {
|
||||
|
|
@ -429,7 +455,8 @@ export default class DocsService {
|
|||
siteIndexingConfig: SiteIndexingConfig,
|
||||
forceReindex: boolean = false,
|
||||
): Promise<void> {
|
||||
const { startUrl, useLocalCrawling, maxDepth } = siteIndexingConfig;
|
||||
const { startUrl, useLocalCrawling, maxDepth, faviconUrl } =
|
||||
siteIndexingConfig;
|
||||
|
||||
// First, if indexing is already in process, don't attempt
|
||||
// This queue is necessary because indexAndAdd is invoked circularly by config edits
|
||||
|
|
@ -685,7 +712,9 @@ export default class DocsService {
|
|||
await this.deleteIndexes(startUrl);
|
||||
}
|
||||
|
||||
const favicon = await fetchFavicon(new URL(siteIndexingConfig.startUrl));
|
||||
const favicon =
|
||||
faviconUrl ||
|
||||
(await fetchFavicon(new URL(siteIndexingConfig.startUrl)));
|
||||
|
||||
if (this.shouldCancel(startUrl, startedWithEmbedder)) {
|
||||
return;
|
||||
|
|
@ -718,10 +747,6 @@ export default class DocsService {
|
|||
void this.ide.showToast("info", `Successfully indexed ${startUrl}`);
|
||||
}
|
||||
|
||||
this.messenger?.send("refreshSubmenuItems", {
|
||||
providers: ["docs"],
|
||||
});
|
||||
|
||||
removeFromFailedGlobalContext(siteIndexingConfig);
|
||||
} catch (e) {
|
||||
console.error(
|
||||
|
|
@ -766,14 +791,22 @@ export default class DocsService {
|
|||
const siteEmbeddings = JSON.parse(data) as SiteIndexingResults;
|
||||
|
||||
// Try to get a favicon for the site
|
||||
const favicon = await fetchFavicon(new URL(startUrl));
|
||||
const favicon =
|
||||
this.statuses.get(startUrl)?.icon ||
|
||||
(await fetchFavicon(new URL(startUrl)));
|
||||
|
||||
// Always try to make the title match what users set in the config
|
||||
const title =
|
||||
this.statuses.get(startUrl)?.title ||
|
||||
siteEmbeddings.title ||
|
||||
new URL(startUrl).hostname;
|
||||
|
||||
// Add the cached embeddings to our database
|
||||
await this.add({
|
||||
favicon,
|
||||
siteIndexingConfig: {
|
||||
startUrl,
|
||||
title: siteEmbeddings.title || new URL(startUrl).hostname,
|
||||
title,
|
||||
},
|
||||
chunks: siteEmbeddings.chunks,
|
||||
embeddings: siteEmbeddings.chunks.map((c) => c.embedding),
|
||||
|
|
@ -910,6 +943,10 @@ export default class DocsService {
|
|||
);
|
||||
|
||||
if (cacheHit) {
|
||||
// If cache hit, refresh the submenu items for docs
|
||||
this.messenger?.send("refreshSubmenuItems", {
|
||||
providers: ["docs"],
|
||||
});
|
||||
// If cache hit, retry the search once
|
||||
return await this.retrieveChunks(startUrl, vector, nRetrieve, true);
|
||||
}
|
||||
|
|
@ -987,8 +1024,7 @@ export default class DocsService {
|
|||
const currentStartUrls = currentlyIndexedDocs.map((doc) => doc.startUrl);
|
||||
|
||||
// Anything found in old config, new config, AND sqlite that doesn't match should be reindexed
|
||||
// TODO if only favicon and title change, only update, don't embed
|
||||
// Otherwise anything found in new config that isn't in sqlite should be added/indexed
|
||||
// Anything found in new config that isn't in sqlite should be added/indexed
|
||||
const addedDocs: SiteIndexingConfig[] = [];
|
||||
const changedDocs: SiteIndexingConfig[] = [];
|
||||
for (const doc of newConfigDocs) {
|
||||
|
|
@ -999,12 +1035,26 @@ export default class DocsService {
|
|||
(d) => d.startUrl === doc.startUrl,
|
||||
);
|
||||
|
||||
// TODO: Changes to the docs config made while Continue isn't running won't be caught
|
||||
if (oldConfigDoc && !siteIndexingConfigsAreEqual(oldConfigDoc, doc)) {
|
||||
changedDocs.push(doc);
|
||||
// When only the title or faviconUrl changed, Update the sqlite metadate instead of reindexing
|
||||
if (
|
||||
siteIndexingConfigsAreEqualExceptTitleAndFavicon(
|
||||
oldConfigDoc,
|
||||
doc,
|
||||
)
|
||||
) {
|
||||
await this.updateMetadataInSqlite(doc);
|
||||
} else {
|
||||
changedDocs.push(doc);
|
||||
}
|
||||
} else {
|
||||
if (forceReindex) {
|
||||
changedDocs.push(doc);
|
||||
} else {
|
||||
// This is a temperary fix to catch the changes to the docs config that were made when Continue isn't running
|
||||
// We only update title and faviconUrl here
|
||||
await this.updateMetadataInSqlite(doc);
|
||||
// if get's here, not changed, no update needed, mark as complete
|
||||
this.handleStatusUpdate({
|
||||
type: "docs",
|
||||
|
|
@ -1036,6 +1086,10 @@ export default class DocsService {
|
|||
console.error("Error syncing docs index on config update", e);
|
||||
} finally {
|
||||
this.isSyncing = false;
|
||||
// Refresh the submenu items for docs
|
||||
this.messenger?.send("refreshSubmenuItems", {
|
||||
providers: ["docs"],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1182,6 +1236,27 @@ export default class DocsService {
|
|||
);
|
||||
}
|
||||
|
||||
private async updateMetadataInSqlite(siteIndexingConfig: SiteIndexingConfig) {
|
||||
const { startUrl, title, faviconUrl } = siteIndexingConfig;
|
||||
const favicon = faviconUrl || (await fetchFavicon(new URL(startUrl)));
|
||||
if (!this.config.selectedModelByRole.embed) {
|
||||
console.warn(
|
||||
`Attempting to add metadata for ${startUrl} without embeddings provider specified`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const db = await this.getOrCreateSqliteDb();
|
||||
|
||||
await db.run(
|
||||
`UPDATE ${DocsService.sqlitebTableName} SET title = ?, favicon = ? WHERE startUrl = ? AND embeddingsProviderId = ?`,
|
||||
title,
|
||||
favicon,
|
||||
startUrl,
|
||||
this.config.selectedModelByRole.embed.embeddingId,
|
||||
);
|
||||
}
|
||||
|
||||
private addToConfig(siteIndexingConfig: SiteIndexingConfig) {
|
||||
// Handles the case where a user has manually added the doc to config.json
|
||||
// so it already exists in the file
|
||||
|
|
@ -1286,5 +1361,6 @@ export default class DocsService {
|
|||
this.messenger?.send("refreshSubmenuItems", {
|
||||
providers: ["docs"],
|
||||
});
|
||||
this.statuses.delete(startUrl);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ import { PROVIDER_TOOL_SUPPORT } from "./toolSupport.js";
|
|||
const PROVIDER_HANDLES_TEMPLATING: string[] = [
|
||||
"lmstudio",
|
||||
"openai",
|
||||
"nvidia",
|
||||
"ollama",
|
||||
"together",
|
||||
"novita",
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ export const DEFAULT_CHAT_SYSTEM_MESSAGE = `\
|
|||
You are in chat mode.
|
||||
|
||||
If the user asks to make changes to files offer that they can use the Apply Button on the code block, or switch to Agent Mode to make the suggested updates automatically.
|
||||
If needed consisely explain to the user they can switch to agent mode using the Mode Selector dropdown and provide no other details.
|
||||
If needed concisely explain to the user they can switch to agent mode using the Mode Selector dropdown and provide no other details.
|
||||
|
||||
${CODEBLOCK_FORMATTING_INSTRUCTIONS}
|
||||
${EDIT_CODE_INSTRUCTIONS}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { GoogleAuth } from "google-auth-library";
|
||||
import { AuthClient, GoogleAuth, JWT, auth } from "google-auth-library";
|
||||
|
||||
import { streamResponse, streamSse } from "@continuedev/fetch";
|
||||
import { ChatMessage, CompletionOptions, LLMOptions } from "../../index.js";
|
||||
|
|
@ -14,30 +14,40 @@ class VertexAI extends BaseLLM {
|
|||
declare vertexProvider: "mistral" | "anthropic" | "gemini" | "unknown";
|
||||
declare anthropicInstance: Anthropic;
|
||||
declare geminiInstance: Gemini;
|
||||
static AUTH_SCOPES = "https://www.googleapis.com/auth/cloud-platform";
|
||||
|
||||
static defaultOptions: Partial<LLMOptions> | undefined = {
|
||||
maxEmbeddingBatchSize: 250,
|
||||
region: "us-central1",
|
||||
};
|
||||
|
||||
private clientPromise = new GoogleAuth({
|
||||
scopes: "https://www.googleapis.com/auth/cloud-platform",
|
||||
})
|
||||
.getClient()
|
||||
.catch((e) => {
|
||||
console.warn(`Failed to load credentials for Vertex AI: ${e.message}`);
|
||||
});
|
||||
private clientPromise: Promise<AuthClient | void>;
|
||||
|
||||
private static getDefaultApiBaseFrom(options: LLMOptions) {
|
||||
const { region, projectId } = options;
|
||||
if (!region || !projectId) {
|
||||
throw new Error(
|
||||
"region and projectId must be defined if apiBase is not provided",
|
||||
);
|
||||
}
|
||||
return `https://${region}-aiplatform.googleapis.com/v1/projects/${projectId}/locations/${region}/`;
|
||||
}
|
||||
/*
|
||||
Vertex Supports 3 different URL formats
|
||||
1. Standard VertexAI: e.g. https://{location}-aiplatform.googleapis.com/v1/projects/{project}/locations/{location}/publishers/google/models/{model}:streamGenerateContent
|
||||
2. Tuned model: e.g. https://{location}-aiplatform.googleapis.com/v1/projects/{project}/locations/{location}/endpoints/{endpoint}:streamGenerateContent
|
||||
3. Express mode: e.g. https://aiplatform.googleapis.com/v1/publishers/google/models/{model}:streamGenerateContent?key={API_KEY} // see https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview
|
||||
|
||||
Authentication can be done using the following
|
||||
2. Access token obtained using Google Auth client, passed to endpoint that includes full model path with project id and region
|
||||
1. API Key (express mode), region and projectId will be ignored
|
||||
|
||||
In all cases we have defined apiBase to be up to everything including the location.
|
||||
Standard api base: https://{location}-aiplatform.googleapis.com/v1/projects/{project}/locations/{location}/
|
||||
Express api base: https://aiplatform.googleapis.com/v1/
|
||||
TODO endpoints is not currently supported (api base is same as standard but we don't have a way to add endpoint name yet
|
||||
|
||||
Note that VertexAI uses the term "service endpoint" and "model", like:
|
||||
{service-endpoint}/v1/{model}:streamGenerateContent
|
||||
So "model" includes the project, location, publisher, etc
|
||||
|
||||
Express mode has limited support
|
||||
and CRITICALLY is only available to NEW users who had NOT used cloud services before.
|
||||
However it is pretty common as gemini becomes more popular.
|
||||
Only Gemini models are supported for now
|
||||
https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview#models
|
||||
*/
|
||||
constructor(_options: LLMOptions) {
|
||||
if (_options.region !== "us-central1") {
|
||||
// Any region outside of us-central1 has a max batch size of 5.
|
||||
|
|
@ -47,7 +57,7 @@ class VertexAI extends BaseLLM {
|
|||
);
|
||||
}
|
||||
super(_options);
|
||||
this.apiBase ??= VertexAI.getDefaultApiBaseFrom(_options);
|
||||
|
||||
this.vertexProvider =
|
||||
_options.model.includes("mistral") ||
|
||||
_options.model.includes("codestral") ||
|
||||
|
|
@ -58,24 +68,130 @@ class VertexAI extends BaseLLM {
|
|||
: _options.model.includes("gemini")
|
||||
? "gemini"
|
||||
: "unknown";
|
||||
|
||||
// Set client authentication promise
|
||||
const { apiKey, region, projectId, env } = _options;
|
||||
const keyFile = env?.keyFile;
|
||||
const keyJson = env?.keyJson;
|
||||
|
||||
// Acceptable authentication methods:
|
||||
// apiKey only
|
||||
// region and projectId AND (keyFile OR keyJson OR nothing)
|
||||
|
||||
if (apiKey) {
|
||||
// Consider warning here instead of throwing error
|
||||
if (region || projectId || keyFile || keyJson) {
|
||||
throw new Error(
|
||||
"Vertex in express mode (api key only) cannot be configured with region, projectId, keyFile, or keyJson",
|
||||
);
|
||||
// console.warn(
|
||||
// "Region, projectId, and key path/file are ignored when apiKey is set. See VertexAI Express Mode docs https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview",
|
||||
// );
|
||||
}
|
||||
if (this.vertexProvider !== "gemini") {
|
||||
throw new Error(
|
||||
"VertexAI: only gemini models are supported in express (apiKey) mode. See https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview#models",
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if (!region && !projectId) {
|
||||
throw new Error(
|
||||
"region and projectId are required for VertexAI (when not using express/apiKey mode)",
|
||||
);
|
||||
}
|
||||
if (keyFile && keyJson) {
|
||||
throw new Error(
|
||||
"VertexAI credentials can be configured with either keyFile or keyJson but not both",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (keyJson) {
|
||||
// Loading keys from manually set JSON
|
||||
if (typeof keyJson !== "string") {
|
||||
throw new Error("VertexAI: keyJson must be a JSON string");
|
||||
}
|
||||
try {
|
||||
const parsed = JSON.parse(keyJson);
|
||||
if (!parsed?.private_key) {
|
||||
throw new Error("VertexAI: keyJson must contain a valid private key");
|
||||
}
|
||||
parsed.private_key = parsed.private_key.replace(/\\n/g, "\n");
|
||||
const jsonClient = auth.fromJSON(parsed);
|
||||
if (jsonClient instanceof JWT) {
|
||||
jsonClient.scopes = [VertexAI.AUTH_SCOPES];
|
||||
} else {
|
||||
throw new Error("VertexAI: keyJson must be a valid JWT");
|
||||
}
|
||||
this.clientPromise = Promise.resolve(jsonClient);
|
||||
} catch (e) {
|
||||
throw new Error("VertexAI: Failed to parse keyJson");
|
||||
}
|
||||
} else if (keyFile) {
|
||||
// Loading keys from manually set file path
|
||||
if (typeof keyFile !== "string") {
|
||||
throw new Error("VertexAI: keyFile must be a string");
|
||||
}
|
||||
this.clientPromise = new GoogleAuth({
|
||||
scopes: VertexAI.AUTH_SCOPES,
|
||||
keyFile,
|
||||
})
|
||||
.getClient()
|
||||
.catch((e) => {
|
||||
console.warn(
|
||||
`Failed to load credentials for Vertex AI: ${e.message}`,
|
||||
);
|
||||
});
|
||||
} else {
|
||||
// Loading keys from local credentials or environment variable
|
||||
this.clientPromise = new GoogleAuth({
|
||||
scopes: VertexAI.AUTH_SCOPES,
|
||||
})
|
||||
.getClient()
|
||||
.catch((e) => {
|
||||
console.warn(
|
||||
`Failed to load credentials for Vertex AI: ${e.message}`,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
// Set api base
|
||||
if (!this.apiBase) {
|
||||
if (apiKey) {
|
||||
// Express mode
|
||||
this.apiBase = `https://aiplatform.googleapis.com/v1/`;
|
||||
} else {
|
||||
this.apiBase = `https://${region}-aiplatform.googleapis.com/v1/projects/${projectId}/locations/${region}/`;
|
||||
}
|
||||
}
|
||||
|
||||
// Uses instances of other LLMs since underlying functionality is the same
|
||||
this.anthropicInstance = new Anthropic(_options);
|
||||
this.geminiInstance = new Gemini(_options);
|
||||
}
|
||||
|
||||
async fetch(url: RequestInfo | URL, init?: RequestInit) {
|
||||
const client = await this.clientPromise;
|
||||
const result = await client?.getAccessToken();
|
||||
if (!result?.token) {
|
||||
throw new Error(
|
||||
"Could not get an access token. Set up your Google Application Default Credentials.",
|
||||
);
|
||||
async fetch(url: URL, init?: RequestInit) {
|
||||
const headers: Record<string, string> = {
|
||||
"Content-Type": "application/json",
|
||||
};
|
||||
if (this.apiKey) {
|
||||
url.searchParams.set("key", this.apiKey);
|
||||
} else {
|
||||
const client = await this.clientPromise;
|
||||
const result = await client?.getAccessToken();
|
||||
if (!result?.token) {
|
||||
throw new Error(
|
||||
"Could not get an access token. Set up your Google Application Default Credentials.",
|
||||
);
|
||||
}
|
||||
headers.Authorization = `Bearer ${result.token}`;
|
||||
}
|
||||
|
||||
return await super.fetch(url, {
|
||||
...init,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${result.token}`,
|
||||
...init?.headers,
|
||||
...headers,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
@ -85,6 +201,10 @@ class VertexAI extends BaseLLM {
|
|||
const convertedArgs = this.anthropicInstance.convertArgs(options);
|
||||
|
||||
// Remove the `model` property and add `anthropic_version`
|
||||
// For claude 4 models
|
||||
// anthropic_version is a required parameter and must be set to "vertex-2024-10-22".
|
||||
|
||||
// const
|
||||
const { model, ...finalOptions } = convertedArgs;
|
||||
return {
|
||||
...finalOptions,
|
||||
|
|
@ -104,6 +224,8 @@ class VertexAI extends BaseLLM {
|
|||
this.cacheBehavior?.cacheSystemMessage && systemMessage
|
||||
);
|
||||
|
||||
// <code>/v1/publishers/anthropic/models/claude-3-5-sonnet-20240620:streamRawPredict
|
||||
|
||||
const apiURL = new URL(
|
||||
`publishers/anthropic/models/${options.model}:streamRawPredict`,
|
||||
this.apiBase,
|
||||
|
|
|
|||
|
|
@ -324,6 +324,10 @@ export const getApplicableRules = (
|
|||
return applicableRules;
|
||||
};
|
||||
|
||||
export function getRuleId(rule: RuleWithSource): string {
|
||||
return rule.slug ?? rule.ruleFile ?? rule.name ?? rule.source;
|
||||
}
|
||||
|
||||
export const getSystemMessageWithRules = ({
|
||||
baseSystemMessage,
|
||||
userMessage,
|
||||
|
|
|
|||
|
|
@ -482,12 +482,13 @@ export class EditAggregator {
|
|||
return;
|
||||
}
|
||||
|
||||
const diff = createDiff(
|
||||
beforeContent,
|
||||
afterContent,
|
||||
filePath,
|
||||
DiffFormatType.Unified,
|
||||
); // Used for checks, not for final output
|
||||
const diff = createDiff({
|
||||
beforeContent: beforeContent,
|
||||
afterContent: afterContent,
|
||||
filePath: filePath,
|
||||
diffType: DiffFormatType.Unified,
|
||||
contextLines: 3,
|
||||
}); // Used for checks, not for final output
|
||||
|
||||
// Skip diffs with too many changed lines
|
||||
const changedLineCount = this.countChangedLines(diff);
|
||||
|
|
|
|||
|
|
@ -12,15 +12,29 @@ export type BeforeAfterDiff = {
|
|||
afterContent: string;
|
||||
};
|
||||
|
||||
export const createDiff = (
|
||||
beforeContent: string,
|
||||
afterContent: string,
|
||||
filePath: string,
|
||||
diffType: DiffFormatType,
|
||||
) => {
|
||||
export interface CreateDiffArgs {
|
||||
beforeContent: string;
|
||||
afterContent: string;
|
||||
filePath: string;
|
||||
diffType: DiffFormatType;
|
||||
contextLines: number;
|
||||
}
|
||||
|
||||
export const createDiff = ({
|
||||
beforeContent,
|
||||
afterContent,
|
||||
filePath,
|
||||
diffType,
|
||||
contextLines,
|
||||
}: CreateDiffArgs) => {
|
||||
switch (diffType) {
|
||||
case DiffFormatType.Unified:
|
||||
return createUnifiedDiff(beforeContent, afterContent, filePath);
|
||||
return createUnifiedDiff(
|
||||
beforeContent,
|
||||
afterContent,
|
||||
filePath,
|
||||
contextLines,
|
||||
);
|
||||
case DiffFormatType.TokenLineDiff:
|
||||
return createTokenLineDiff(beforeContent, afterContent, filePath);
|
||||
}
|
||||
|
|
@ -31,6 +45,7 @@ const createUnifiedDiff = (
|
|||
beforeContent: string,
|
||||
afterContent: string,
|
||||
filePath: string,
|
||||
contextLines: number,
|
||||
) => {
|
||||
const normalizedBefore = beforeContent.endsWith("\n")
|
||||
? beforeContent
|
||||
|
|
@ -45,7 +60,7 @@ const createUnifiedDiff = (
|
|||
normalizedAfter,
|
||||
"before",
|
||||
"after",
|
||||
{ context: 3 },
|
||||
{ context: contextLines },
|
||||
);
|
||||
|
||||
return patch;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { IDE, Position } from "../..";
|
|||
import { AutocompleteCodeSnippet } from "../../autocomplete/snippets/types";
|
||||
import { GetLspDefinitionsFunction } from "../../autocomplete/types";
|
||||
import { ConfigHandler } from "../../config/ConfigHandler";
|
||||
// import { DataLogger } from "../../data/log";
|
||||
import { DataLogger } from "../../data/log";
|
||||
import { RecentlyEditedRange } from "../types";
|
||||
import { getAutocompleteContext } from "./autocompleteContextFetching";
|
||||
import { createDiff, DiffFormatType } from "./diffFormatting";
|
||||
|
|
@ -108,31 +108,32 @@ export const processNextEditData = async ({
|
|||
);
|
||||
}
|
||||
|
||||
// if (filenamesAndDiffs.length > 0) {
|
||||
// // if there are previous edits, log
|
||||
// void DataLogger.getInstance().logDevData({
|
||||
// name: "nextEditWithHistory",
|
||||
// data: {
|
||||
// previousEdits: filenamesAndDiffs,
|
||||
// fileURI: filePath,
|
||||
// workspaceDirURI: workspaceDir,
|
||||
// beforeContent,
|
||||
// afterContent,
|
||||
// beforeCursorPos: cursorPosBeforeEdit,
|
||||
// afterCursorPos: cursorPosAfterPrevEdit,
|
||||
// context: autocompleteContext,
|
||||
// },
|
||||
// });
|
||||
// }
|
||||
if (filenamesAndDiffs.length > 0) {
|
||||
// if there are previous edits, log
|
||||
void DataLogger.getInstance().logDevData({
|
||||
name: "nextEditWithHistory",
|
||||
data: {
|
||||
previousEdits: filenamesAndDiffs,
|
||||
fileURI: filePath,
|
||||
workspaceDirURI: workspaceDir,
|
||||
beforeContent,
|
||||
afterContent,
|
||||
beforeCursorPos: cursorPosBeforeEdit,
|
||||
afterCursorPos: cursorPosAfterPrevEdit,
|
||||
context: autocompleteContext,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// add current edit to history
|
||||
const thisEdit: prevEdit = {
|
||||
unidiff: createDiff(
|
||||
beforeContent,
|
||||
afterContent,
|
||||
filePath,
|
||||
DiffFormatType.Unified,
|
||||
),
|
||||
unidiff: createDiff({
|
||||
beforeContent: beforeContent,
|
||||
afterContent: afterContent,
|
||||
filePath: filePath,
|
||||
diffType: DiffFormatType.Unified,
|
||||
contextLines: 25, // storing many context lines for downstream trimming
|
||||
}),
|
||||
fileUri: filePath,
|
||||
workspaceUri: workspaceDir,
|
||||
timestamp: timestamp,
|
||||
|
|
|
|||
|
|
@ -15,12 +15,13 @@ export const processSmallEdit = async (
|
|||
ide: IDE,
|
||||
) => {
|
||||
NextEditProvider.getInstance().addDiffToContext(
|
||||
createDiff(
|
||||
beforeAfterdiff.beforeContent,
|
||||
beforeAfterdiff.afterContent,
|
||||
beforeAfterdiff.filePath,
|
||||
DiffFormatType.Unified,
|
||||
),
|
||||
createDiff({
|
||||
beforeContent: beforeAfterdiff.beforeContent,
|
||||
afterContent: beforeAfterdiff.afterContent,
|
||||
filePath: beforeAfterdiff.filePath,
|
||||
diffType: DiffFormatType.Unified,
|
||||
contextLines: 3, // NOTE: This can change depending on experiments!
|
||||
}),
|
||||
);
|
||||
|
||||
// Get the current context data from the most recent message
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ export function safeParseToolCallArgs(
|
|||
try {
|
||||
return JSON.parse(toolCall.function?.arguments?.trim() || "{}");
|
||||
} catch (e) {
|
||||
console.error(
|
||||
`Failed to parse tool call arguments:\nTool call: ${toolCall.function?.name + " " + toolCall.id}\nArgs:${toolCall.function?.arguments}\n`,
|
||||
);
|
||||
//console.error(
|
||||
// `Failed to parse tool call arguments:\nTool call: ${toolCall.function?.name + " " + toolCall.id}\nArgs:${toolCall.function?.arguments}\n`,
|
||||
//);
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import * as fs from "fs";
|
||||
import * as os from "os";
|
||||
import * as path from "path";
|
||||
import * as URI from "uri-js";
|
||||
import * as YAML from "yaml";
|
||||
|
||||
import { ConfigYaml, DevEventName } from "@continuedev/config-yaml";
|
||||
|
|
@ -466,3 +467,38 @@ export function getDiffsDirectoryPath(): string {
|
|||
}
|
||||
return diffsPath;
|
||||
}
|
||||
|
||||
export const isFileWithinFolder = (
|
||||
fileUri: string,
|
||||
folderPath: string,
|
||||
): boolean => {
|
||||
try {
|
||||
if (!fileUri || !folderPath) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const fileUriParsed = URI.parse(fileUri);
|
||||
const fileScheme = fileUriParsed.scheme || "file";
|
||||
let filePath = fileUriParsed.path || "";
|
||||
filePath = decodeURIComponent(filePath);
|
||||
|
||||
let folderWithScheme = folderPath;
|
||||
if (!folderPath.includes("://")) {
|
||||
folderWithScheme = `${fileScheme}://${folderPath.startsWith("/") ? "" : "/"}${folderPath}`;
|
||||
}
|
||||
const folderUriParsed = URI.parse(folderWithScheme);
|
||||
|
||||
let folderPathClean = folderUriParsed.path || "";
|
||||
folderPathClean = decodeURIComponent(folderPathClean);
|
||||
|
||||
filePath = filePath.replace(/\/$/, "");
|
||||
folderPathClean = folderPathClean.replace(/\/$/, "");
|
||||
|
||||
return (
|
||||
filePath === folderPathClean || filePath.startsWith(`${folderPathClean}/`)
|
||||
);
|
||||
} catch (error) {
|
||||
console.error("Error in isFileWithinFolder:", error);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { execSync } from "child_process";
|
||||
import { homedir } from "os";
|
||||
import { exec } from "child_process";
|
||||
import { promisify } from "util";
|
||||
|
||||
export function getEnvPathFromUserShell(): string | undefined {
|
||||
const execAsync = promisify(exec);
|
||||
export async function getEnvPathFromUserShell(): Promise<string | undefined> {
|
||||
if (process.platform === "win32") {
|
||||
console.warn(`${getEnvPathFromUserShell.name} not implemented for Windows`);
|
||||
return undefined;
|
||||
|
|
@ -15,7 +16,7 @@ export function getEnvPathFromUserShell(): string | undefined {
|
|||
// Source common profile files
|
||||
const command = `${process.env.SHELL} -l -c 'for f in ~/.zprofile ~/.zshrc ~/.bash_profile ~/.bashrc; do [ -f "$f" ] && source "$f" 2>/dev/null; done; echo $PATH'`;
|
||||
|
||||
const stdout = execSync(command, {
|
||||
const { stdout } = await execAsync(command, {
|
||||
encoding: "utf8",
|
||||
});
|
||||
|
||||
|
|
|
|||
20
docs/.gitignore
vendored
20
docs/.gitignore
vendored
|
|
@ -1,20 +0,0 @@
|
|||
# Dependencies
|
||||
/node_modules
|
||||
|
||||
# Production
|
||||
/build
|
||||
|
||||
# Generated files
|
||||
.docusaurus
|
||||
.cache-loader
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
2
docs/.prettierignore
Normal file
2
docs/.prettierignore
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
*.md
|
||||
*.mdx
|
||||
|
|
@ -1,3 +1,32 @@
|
|||
# Continue Docs
|
||||
# Mintlify Starter Kit
|
||||
|
||||
Markdown content exists in the `docs/` folder, nested as it will be shown in the sidebar. `docusaurus.config.js` defines important footer, sidebar, and title content for the site.
|
||||
Click on `Use this template` to copy the Mintlify starter kit. The starter kit contains examples including
|
||||
|
||||
- Guide pages
|
||||
- Navigation
|
||||
- Customizations
|
||||
- API Reference pages
|
||||
- Use of popular components
|
||||
|
||||
### Development
|
||||
|
||||
Install the [Mintlify CLI](https://www.npmjs.com/package/mint) to preview the documentation changes locally. To install, use the following command
|
||||
|
||||
```
|
||||
npm i -g mint
|
||||
```
|
||||
|
||||
Run the following command at the root of your documentation (where docs.json is)
|
||||
|
||||
```
|
||||
mint dev
|
||||
```
|
||||
|
||||
### Publishing Changes
|
||||
|
||||
Install our Github App to auto propagate changes from your repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard.
|
||||
|
||||
#### Troubleshooting
|
||||
|
||||
- If the dev environment isn't running - Run `mint update` to ensure you have the most recent version of the CLI.
|
||||
- Page loads as a 404 - Make sure you are running in a folder with `docs.json`
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
---
|
||||
title: Quick Start
|
||||
description: Get started with Continue's autocomplete feature
|
||||
keywords: [autocomplete, quick start, getting started, code completion]
|
||||
title: "Autocomplete"
|
||||
sidebarTitle: "How To Use It"
|
||||
icon: "circle-question"
|
||||
---
|
||||
|
||||

|
||||
<Frame>
|
||||
<img src="/images/autocomplete-9d4e3f7658d3e65b8e8b20f2de939675.gif" />
|
||||
</Frame>
|
||||
|
||||
## How to use it
|
||||
|
||||
|
|
@ -12,16 +14,16 @@ Autocomplete provides inline code suggestions as you type. To enable it, simply
|
|||
|
||||
### Accepting a full suggestion
|
||||
|
||||
Accept a full suggestion by pressing <kbd>Tab</kbd>
|
||||
Accept a full suggestion by pressing `Tab`
|
||||
|
||||
### Rejecting a full suggestion
|
||||
|
||||
Reject a full suggestion with <kbd>Esc</kbd>
|
||||
Reject a full suggestion with `Esc`
|
||||
|
||||
### Partially accepting a suggestion
|
||||
|
||||
For more granular control, use <kbd>cmd/ctrl</kbd> + <kbd>→</kbd> to accept parts of the suggestion word-by-word.
|
||||
For more granular control, use `cmd/ctrl` + `→` to accept parts of the suggestion word-by-word.
|
||||
|
||||
### Forcing a suggestion (VS Code)
|
||||
|
||||
If you want to trigger a suggestion immediately without waiting, or if you've dismissed a suggestion and want a new one, you can force it by using the keyboard shortcut **<kbd>cmd/ctrl</kbd> + <kbd>alt</kbd> + <kbd>space</kbd>**.
|
||||
If you want to trigger a suggestion immediately without waiting, or if you've dismissed a suggestion and want a new one, you can force it by using the keyboard shortcut **`cmd/ctrl` + `alt` + `space`**.
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
module.exports = {
|
||||
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
|
||||
};
|
||||
39
docs/chat/how-to-use-it.mdx
Normal file
39
docs/chat/how-to-use-it.mdx
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
title: "Chat"
|
||||
sidebarTitle: "How To Use It"
|
||||
icon: "circle-question"
|
||||
---
|
||||
|
||||
<Frame>
|
||||
<img src="/images/chat-489b68d156be2aafe09ee7cedf233fba.gif" />
|
||||
</Frame>
|
||||
|
||||
## How to use it
|
||||
|
||||
Chat makes it easy to ask for help from an LLM without needing to leave the IDE. You send it a task, including any relevant information, and it replies with the text / code most likely to complete the task. If it does not give you what you want, then you can send follow up messages to clarify and adjust its approach until the task is completed.
|
||||
|
||||
Chat is best used to understand and iterate on code or as a replacement for search engine queries.
|
||||
|
||||
## Type a request and press enter
|
||||
|
||||
You send it a question, and it replies with an answer. You tell it to solve a problem, and it provides you a solution. You ask for some code, and it generates it.
|
||||
|
||||
## Highlight a code section to include as context
|
||||
|
||||
You select a code section with your mouse, press `cmd/ctrl` + `L` (VS Code) or `cmd/ctrl` + `J` (JetBrains) to send it to the LLM, and then ask for it to be explained to you or request it to be refactored in some way.
|
||||
|
||||
## Reference context with the @ symbol
|
||||
|
||||
If there is information from the codebase, documentation, IDE, or other tools that you want to include as context, you can type @ to select and include it as context. You can learn more about how to use this in [Chat context selection](/features/chat/quick-start#3-use--for-additional-context).
|
||||
|
||||
## Apply generated code to your file
|
||||
|
||||
When the LLM replies with edits to a file, you can click the “Apply” button. This will update the existing code in the editor to reflect the suggested changes.
|
||||
|
||||
## Start a fresh session for a new task
|
||||
|
||||
Once you complete a task and want to start a new one, press `cmd/ctrl` + `L` (VS Code) or `cmd/ctrl` + `J` (JetBrains) to begin a new session, ensuring only relevant context for the next task is provided to the LLM.
|
||||
|
||||
## Switch between different models
|
||||
|
||||
If you have configured multiple models, you can switch between models using the dropdown or by pressing `cmd/ctrl` + `’`
|
||||
16
docs/customization/mcp-tools.mdx
Normal file
16
docs/customization/mcp-tools.mdx
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: "MCP Blocks"
|
||||
description: "Model Context Protocol servers provide specialized functionality:"
|
||||
---
|
||||
|
||||
- **Enable integration** with external tools and systems
|
||||
- **Create extensible interfaces** for custom capabilities
|
||||
- **Support complex interactions** with your development environment
|
||||
- **Allow partners** to contribute specialized functionality
|
||||
- **Connect to databases** to understand schema and data models during development
|
||||
|
||||

|
||||
|
||||
## Learn More[](#learn-more "Direct link to Learn More")
|
||||
|
||||
Learn more in the [MCP deep dive](/customization/mcp-tools), and view [`mcpServers`](/reference#mcpservers) in the YAML Reference for more details.
|
||||
19
docs/customization/models.mdx
Normal file
19
docs/customization/models.mdx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
title: "Model Blocks"
|
||||
description: "These blocks form the foundation of the entire assistant experience, offering different specialized capabilities:"
|
||||
---
|
||||
|
||||
- **[Chat](/customize/model-roles/chat)**: Power conversational interactions about code and provide detailed guidance
|
||||
- **[Edit](/customize/model-roles/edit)**: Handle complex code transformations and refactoring tasks
|
||||
- **[Apply](/customize/model-roles/apply)**: Execute targeted code modifications with high accuracy
|
||||
- **[Autocomplete](/customize/model-roles/autocomplete)**: Provide real-time suggestions as developers type
|
||||
- **[Embedding](/customize/model-roles/embeddings)**: Transform code into vector representations for semantic search
|
||||
- **[Reranker](/customize/model-roles/reranking)**: Improve search relevance by ordering results based on semantic meaning
|
||||
|
||||

|
||||
|
||||
## Learn More[](#learn-more "Direct link to Learn More")
|
||||
|
||||
Continue supports [many model providers](/customization/models#openai), including Anthropic, OpenAI, Gemini, Ollama, Amazon Bedrock, Azure, xAI, DeepSeek, and more. Models can have various roles like `chat`, `edit`, `apply`, `autocomplete`, `embed`, and `rerank`.
|
||||
|
||||
Read more about roles [here](/customize/model-roles) and view [`models`](/reference#models) in the YAML Reference.
|
||||
|
|
@ -1,24 +1,21 @@
|
|||
---
|
||||
title: Overview
|
||||
description: Introduction to customizing Continue
|
||||
keywords: [customize, configure, config]
|
||||
title: "Overview"
|
||||
description: "Continue can be deeply customized. For example you might:"
|
||||
---
|
||||
|
||||
Continue can be deeply customized. For example you might:
|
||||
|
||||
- **Change your Model Provider**. Continue allows you to choose your favorite or even add multiple model providers. This allows you to use different models for different tasks, or to try another model if you're not happy with the results from your current model. Continue supports all of the popular model providers, including OpenAI, Anthropic, Microsoft/Azure, Mistral, and more. You can even self host your own model provider if you'd like. Learn more about [model providers](../customize/model-providers/top-level/openai.mdx).
|
||||
- **Select different models for specific tasks**. Different Continue features can use different models. We call these _model roles_. For example, you can use a different model for chat than you do for autocomplete. Learn more about [model roles](../customize/model-roles/00-intro.mdx).
|
||||
- **Add a Context Provider**. Context providers allow you to add information to your prompts, giving your LLM additional context to work with. Context providers allow you to reference snippets from your codebase, or lookup relevant documentation, or use a search engine to find information and much more. Learn more about [context providers](../customize/custom-providers.mdx).
|
||||
- **Create a Slash Command**. Slash commands allow you to easily add custom functionality to Continue. You can use a slash command that allows you to generate a shell command from natural language, or perhaps generate a commit message, or create your own custom command to do whatever you want. Learn more about [slash commands](../customize/deep-dives/slash-commands.mdx).
|
||||
- **Call external tools and functions**. Unchain your LLM with the power of tools using [Agent](../features/agent/quick-start.mdx). Add custom tools using [MCP Servers](../customize/deep-dives/mcp.mdx)
|
||||
- **Change your Model Provider**. Continue allows you to choose your favorite or even add multiple model providers. This allows you to use different models for different tasks, or to try another model if you're not happy with the results from your current model. Continue supports all of the popular model providers, including OpenAI, Anthropic, Microsoft/Azure, Mistral, and more. You can even self host your own model provider if you'd like. Learn more about [model providers](/customization/models#openai).
|
||||
- **Select different models for specific tasks**. Different Continue features can use different models. We call these _model roles_. For example, you can use a different model for chat than you do for autocomplete. Learn more about [model roles](/customize/model-roles).
|
||||
- **Add a Context Provider**. Context providers allow you to add information to your prompts, giving your LLM additional context to work with. Context providers allow you to reference snippets from your codebase, or lookup relevant documentation, or use a search engine to find information and much more. Learn more about [context providers](/customize/custom-providers).
|
||||
- **Create a Slash Command**. Slash commands allow you to easily add custom functionality to Continue. You can use a slash command that allows you to generate a shell command from natural language, or perhaps generate a commit message, or create your own custom command to do whatever you want. Learn more about [slash commands](/customization/overview#slash-commands).
|
||||
- **Call external tools and functions**. Unchain your LLM with the power of tools using [Agent](/features/agent/quick-start). Add custom tools using [MCP Servers](/customization/mcp-tools)
|
||||
|
||||
Whatever you choose, you'll probably start by editing your Assistant.
|
||||
|
||||
## Editing your assistant
|
||||
## Editing your assistant[](#editing-your-assistant "Direct link to Editing your assistant")
|
||||
|
||||
You can easily access your assistant configuration from the Continue Chat sidebar. Open the sidebar by pressing <kbd>cmd/ctrl</kbd> + <kbd>L</kbd> (VS Code) or <kbd>cmd/ctrl</kbd> + <kbd>J</kbd> (JetBrains) and click the Assistant selector above the main chat input. Then, you can hover over an assistant and click the `new window` (hub assistants) or `gear` (local assistants) icon.
|
||||
You can easily access your assistant configuration from the Continue Chat sidebar. Open the sidebar by pressing `cmd/ctrl` + `L` (VS Code) or `cmd/ctrl` + `J` (JetBrains) and click the Assistant selector above the main chat input. Then, you can hover over an assistant and click the `new window` (hub assistants) or `gear` (local assistants) icon.
|
||||
|
||||

|
||||

|
||||
|
||||
- See [Editing Hub Assistants](../hub/assistants/edit-an-assistant.md) for more details on managing your hub assistant
|
||||
- See the [Config Deep Dive](../customize/deep-dives/configuration.md) for more details on configuring local assistants.
|
||||
- See [Editing Hub Assistants](/hub/assistants/edit-an-assistant) for more details on managing your hub assistant
|
||||
- See the [Config Deep Dive](/customization/overview#configuration) for more details on configuring local assistants.
|
||||
16
docs/customization/prompts.mdx
Normal file
16
docs/customization/prompts.mdx
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: "Prompt Blocks"
|
||||
description: "These are the specialized instructions that shape how models respond:"
|
||||
---
|
||||
|
||||
- **Define interaction patterns** for specific tasks or frameworks
|
||||
- **Encode domain expertise** for particular technologies
|
||||
- **Ensure consistent guidance** aligned with organizational practices
|
||||
- **Can be shared and reused** across multiple assistants
|
||||
- **Act as automated code reviewers** that ensure consistency across teams
|
||||
|
||||

|
||||
|
||||
## Learn More[](#learn-more "Direct link to Learn More")
|
||||
|
||||
Prompt blocks have the same syntax as [prompt files](/customization/prompts). The `config.yaml` spec for `prompts` can be found [here](/reference#prompts).
|
||||
20
docs/customization/rules.mdx
Normal file
20
docs/customization/rules.mdx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
title: "Rules Blocks"
|
||||
description: "Rules allow you to provide specific instructions that guide how the AI assistant behaves when working with your code. Instead of the AI making assumptions about your coding standards, architecture patterns, or project-specific requirements, you can explicitly define guidelines that ensure consistent, contextually appropriate responses."
|
||||
---
|
||||
|
||||
Think of these as the guardrails for your AI coding assistants:
|
||||
|
||||
- **Enforce company-specific coding standards** and security practices
|
||||
- **Implement quality checks** that match your engineering culture
|
||||
- **Create paved paths** for developers to follow organizational best practices
|
||||
|
||||
By implementing rules, you transform the AI from a generic coding assistant into a knowledgeable team member that understands your project's unique requirements and constraints.
|
||||
|
||||
### How Rules Work[](#how-rules-work "Direct link to How Rules Work")
|
||||
|
||||
Your assistant detects rule blocks and applies the specified rules while in [Agent](/features/agent/quick-start), [Chat](/features/chat/quick-start), and [Edit](/features/edit/quick-start) modes.
|
||||
|
||||
## Learn More[](#learn-more "Direct link to Learn More")
|
||||
|
||||
Learn more in the [rules deep dive](/customization/rules), and view [`rules`](/reference#rules) in the YAML Reference for more details.
|
||||
|
|
@ -1,18 +1,18 @@
|
|||
---
|
||||
title: "@Codebase"
|
||||
description: Talk to your codebase
|
||||
keywords: [talk, embeddings, reranker, codebase, experimental]
|
||||
---
|
||||
|
||||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# @Codebase
|
||||
|
||||
Continue indexes your codebase so that it can later automatically pull in the most relevant context from throughout your workspace. This is done via a combination of embeddings-based retrieval and keyword search. By default, all embeddings are calculated locally using `transformers.js` and stored locally in `~/.continue/index`.
|
||||
|
||||
:::info[`transformers.js cannot be used in JetBrains`]
|
||||
Currently, `transformers.js` cannot be used in JetBrains IDEs. However, you can select a differet embeddings model from [the list here](../model-roles/embeddings.mdx).
|
||||
:::
|
||||
<Info>
|
||||
**Note:** `transformers.js` cannot be used in JetBrains IDEs. However, you can
|
||||
select a different embeddings model from [the list
|
||||
here](../model-roles/embeddings.mdx).
|
||||
</Info>
|
||||
|
||||
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.
|
||||
|
||||
|
|
@ -43,8 +43,8 @@ Here are use cases where it is not useful:
|
|||
|
||||
There are a few options that let you configure the behavior of the `@codebase` context provider, which are the same for the `@folder` context provider:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
context:
|
||||
- provider: codebase
|
||||
|
|
@ -53,8 +53,8 @@ There are a few options that let you configure the behavior of the `@codebase` c
|
|||
nFinal: 5
|
||||
useReranking: true
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"contextProviders": [
|
||||
|
|
@ -69,7 +69,7 @@ There are a few options that let you configure the behavior of the `@codebase` c
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
### `nRetrieve`
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
---
|
||||
title: "@Docs"
|
||||
description: Learn how to access and search your project's documentation directly within Continue
|
||||
keywords:
|
||||
[
|
||||
|
|
@ -14,9 +15,6 @@ keywords:
|
|||
toc_max_heading_level: 5
|
||||
---
|
||||
|
||||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# @Docs
|
||||
|
||||
The [`@Docs` context provider](../custom-providers#docs) allows you to efficiently reference documentation directly within Continue.
|
||||
|
|
@ -25,14 +23,14 @@ The [`@Docs` context provider](../custom-providers#docs) allows you to efficient
|
|||
|
||||
To enable the `@Docs` context provider, add it to the list of context providers in your `config.json` file.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
context:
|
||||
- provider: docs
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"contextProviders": [
|
||||
|
|
@ -42,7 +40,7 @@ To enable the `@Docs` context provider, add it to the list of context providers
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## How It Works
|
||||
|
|
@ -87,16 +85,16 @@ Documentation sources may be suggested based on package files in your repo. This
|
|||
|
||||
For bulk documentation site adds or edits, we recommend editing your global configuration file directly. Documentation sites are stored in an array within `docs` in your global configuration, as follows:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
docs:
|
||||
- title: Nest.js
|
||||
startUrl: https://docs.nestjs.com/
|
||||
faviconUrl: https://docs.nestjs.com/favicon.ico
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"docs": [
|
||||
|
|
@ -108,7 +106,7 @@ For bulk documentation site adds or edits, we recommend editing your global conf
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
See [the config reference](/reference) for all documentation site configuration options.
|
||||
|
|
@ -125,8 +123,8 @@ If you have set up an [embeddings provider](../model-roles/embeddings.mdx), @doc
|
|||
|
||||
As with [@Codebase context provider configuration](./codebase#configuration), you can adjust the reranking behavior of the `@Docs` context provider with the `nRetrieve`, `nFinal`, and `useReranking`.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
context:
|
||||
- provider: docs
|
||||
|
|
@ -135,8 +133,8 @@ As with [@Codebase context provider configuration](./codebase#configuration), yo
|
|||
nFinal: 5 # The number of docs chunks to return IF reranking
|
||||
useReranking: true # use reranking if a reranker is configured (defaults to true)
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"contextProviders": [
|
||||
|
|
@ -151,23 +149,23 @@ As with [@Codebase context provider configuration](./codebase#configuration), yo
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
### GitHub
|
||||
|
||||
The GitHub API rate limits public requests to 60 per hour. If you want to reliably index GitHub repos, you can add a github token to your config file:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
context:
|
||||
- provider: docs
|
||||
params:
|
||||
githubToken: <GITHUB_TOKEN>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"contextProviders": [
|
||||
|
|
@ -180,7 +178,7 @@ The GitHub API rate limits public requests to 60 per hour. If you want to reliab
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
### Local Crawling
|
||||
|
|
@ -189,8 +187,8 @@ By default, Continue crawls documentation sites using a specialized crawling ser
|
|||
|
||||
If your documentation is private, you can skip the default crawler and use a local crawler instead by setting `useLocalCrawling` to `true`.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
docs:
|
||||
- title: My Private Docs
|
||||
|
|
@ -198,8 +196,8 @@ If your documentation is private, you can skip the default crawler and use a loc
|
|||
faviconUrl: http://10.2.1.2/docs/assets/favicon.ico,
|
||||
useLocalCrawling: true
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"docs": [
|
||||
|
|
@ -212,13 +210,13 @@ If your documentation is private, you can skip the default crawler and use a loc
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
:::info
|
||||
Chromium crawling has been deprecated
|
||||
{/* The default local crawler is a lightweight tool that cannot render sites that are dynamically generated using JavaScript. If your sites need to be rendered, you can enable the experimental `Use Chromium for Docs Crawling` feature from your [User Settings Page](../deep-dives/settings.md) This will download and install Chromium to `~/.continue/.utils`, and use it as the local crawler. */}
|
||||
:::
|
||||
<Info>
|
||||
Chromium crawling has been deprecated
|
||||
{/* The default local crawler is a lightweight tool that cannot render sites that are dynamically generated using JavaScript. If your sites need to be rendered, you can enable the experimental `Use Chromium for Docs Crawling` feature from your [User Settings Page](../deep-dives/settings.md) This will download and install Chromium to `~/.continue/.utils`, and use it as the local crawler. */}
|
||||
</Info>
|
||||
|
||||
Further notes:
|
||||
|
||||
|
|
@ -248,8 +246,8 @@ You can also use the following IDE command to force a re-index of all docs: `Con
|
|||
|
||||
The following configuration example works out of the box for VS Code. This uses the built-in embeddings provider with no reranking.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
context:
|
||||
- provider: docs
|
||||
|
|
@ -258,8 +256,8 @@ The following configuration example works out of the box for VS Code. This uses
|
|||
- title: Nest.js
|
||||
startUrl: https://docs.nestjs.com/
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"contextProviders": [
|
||||
|
|
@ -275,15 +273,15 @@ The following configuration example works out of the box for VS Code. This uses
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
### Jetbrains minimal setup
|
||||
|
||||
Here is the equivalent minimal example for Jetbrains, which requires setting up an [embeddings provider](../model-roles/embeddings.mdx).
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: LMStudio embedder
|
||||
|
|
@ -297,8 +295,8 @@ Here is the equivalent minimal example for Jetbrains, which requires setting up
|
|||
- title: Nest.js
|
||||
startUrl: https://docs.nestjs.com/
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"contextProviders": [
|
||||
|
|
@ -318,7 +316,7 @@ Here is the equivalent minimal example for Jetbrains, which requires setting up
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
### Full-power setup (VS Code or Jetbrains)
|
||||
|
|
@ -330,8 +328,8 @@ The following configuration example includes:
|
|||
- A reranker model available, with reranking parameters customized
|
||||
- A GitHub token to enable GitHub crawling
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: LMStudio Nomic Text
|
||||
|
|
@ -361,8 +359,8 @@ The following configuration example includes:
|
|||
maxDepth: 4
|
||||
useLocalCrawling: true
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"contextProviders": [
|
||||
|
|
@ -402,7 +400,7 @@ The following configuration example includes:
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
{/* This could also involve enabling Chromium as a backup for local documentation the [User Settings Page](../deep-dives/settings.md). */}
|
||||
816
docs/customize/custom-providers.mdx
Normal file
816
docs/customize/custom-providers.mdx
Normal file
|
|
@ -0,0 +1,816 @@
|
|||
---
|
||||
title: "Context Providers"
|
||||
description: "Context Providers allow you to type '@' and see a dropdown of content that can all be fed to the LLM as context. Every context provider is a plugin, which means if you want to reference some source of information that you don't see here, you can request (or build!) a new context provider."
|
||||
---
|
||||
|
||||
As an example, say you are working on solving a new GitHub Issue. You type '@Issue' and select the one you are working on. Continue can now see the issue title and contents. You also know that the issue is related to the files 'readme.md' and 'helloNested.py', so you type '@readme' and '@hello' to find and select them. Now these 3 "Context Items" are displayed inline with the rest of your input.
|
||||
|
||||

|
||||
|
||||
## Context blocks[](#context-blocks "Direct link to Context blocks")
|
||||
|
||||
You can add context providers to assistants using [`context` blocks](/hub/blocks/block-types#context). Explore available context blocks in [the hub](https://hub.continue.dev/explore/context).
|
||||
|
||||
## Built-in Context Providers[](#built-in-context-providers "Direct link to Built-in Context Providers")
|
||||
|
||||
You can add any built-in context-providers in your config file as shown below:
|
||||
|
||||
### `@File`[](#file "Direct link to file")
|
||||
|
||||
Reference any file in your current workspace.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: file
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [{ "name": "file" }] }
|
||||
```
|
||||
|
||||
### `@Code`[](#code "Direct link to code")
|
||||
|
||||
Reference specific functions or classes from throughout your project.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: code
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [{ "name": "code" }] }
|
||||
```
|
||||
|
||||
### `@Git Diff`[](#git-diff "Direct link to git-diff")
|
||||
|
||||
Reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: diff
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [{ "name": "diff" }] }
|
||||
```
|
||||
|
||||
### `@Current File`[](#current-file "Direct link to current-file")
|
||||
|
||||
Reference the currently open file.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: currentFile
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [{ "name": "currentFile" }] }
|
||||
```
|
||||
|
||||
### `@Terminal`[](#terminal "Direct link to terminal")
|
||||
|
||||
Reference the last command you ran in your IDE's terminal and its output.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: terminal
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [{ "name": "terminal" }] }
|
||||
```
|
||||
|
||||
### `@Docs`[](#docs "Direct link to docs")
|
||||
|
||||
Reference the contents from any documentation site.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: docs
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [{ "name": "docs" }] }
|
||||
```
|
||||
|
||||
Note that this will only enable the `@Docs` context provider.
|
||||
|
||||
To use it, you need to add a documentation site to your config file. See the [docs](/customization/overview#documentation-context) page for more information.
|
||||
|
||||
### `@Open`[](#open "Direct link to open")
|
||||
|
||||
Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: open params: onlyPinned: true
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [{ "name": "open", "params": { "onlyPinned": true } }] }
|
||||
```
|
||||
|
||||
### `@Web`[](#web "Direct link to web")
|
||||
|
||||
Reference relevant pages from across the web, automatically determined from your input.
|
||||
|
||||
Optionally, set `n` to limit the number of results returned (default 6).
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: web params: n: 5
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [{ "name": "web", "params": { "n": 5 } }] }
|
||||
```
|
||||
|
||||
### `@Codebase`[](#codebase "Direct link to codebase")
|
||||
|
||||
Reference the most relevant snippets from your codebase.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: codebase
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [{ "name": "codebase" }] }
|
||||
```
|
||||
|
||||
Read more about indexing and retrieval [here](/customization/overview#codebase-context).
|
||||
|
||||
### `@Folder`[](#folder "Direct link to folder")
|
||||
|
||||
Uses the same retrieval mechanism as `@Codebase`, but only on a single folder.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: folder
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [{ "name": "folder" }] }
|
||||
```
|
||||
|
||||
### `@Search`[](#search "Direct link to search")
|
||||
|
||||
Reference the results of codebase search, just like the results you would get from VS Code search.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: search params: maxResults: 100 # optional, defaults to 200
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [ { "name": "search", "params": { "maxResults": 100 // optional, defaults to 200 } } ]}
|
||||
```
|
||||
|
||||
This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep).
|
||||
|
||||
### `@Url`[](#url "Direct link to url")
|
||||
|
||||
Reference the markdown converted contents of a given URL.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: url
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [{ "name": "url" }] }
|
||||
```
|
||||
|
||||
### `@Clipboard`[](#clipboard "Direct link to clipboard")
|
||||
|
||||
Reference recent clipboard items
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: clipboard
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [{ "name": "clipboard" }] }
|
||||
```
|
||||
|
||||
### `@Tree`[](#tree "Direct link to tree")
|
||||
|
||||
Reference the structure of your current workspace.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: tree
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [{ "name": "tree" }] }
|
||||
```
|
||||
|
||||
### `@Problems`[](#problems "Direct link to problems")
|
||||
|
||||
Get Problems from the current file.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: problems
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [{ "name": "problems" }] }
|
||||
```
|
||||
|
||||
### `@Debugger`[](#debugger "Direct link to debugger")
|
||||
|
||||
Reference the contents of the local variables in the debugger. Currently only available in VS Code.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: debugger params: stackDepth: 3
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [{ "name": "debugger", "params": { "stackDepth": 3 } }] }
|
||||
```
|
||||
|
||||
Uses the top _n_ levels (defaulting to 3) of the call stack for that thread.
|
||||
|
||||
### `@Repository Map`[](#repository-map "Direct link to repository-map")
|
||||
|
||||
Reference the outline of your codebase. By default, signatures are included along with file in the repo map.
|
||||
|
||||
`includeSignatures` params can be set to false to exclude signatures. This could be necessary for large codebases and/or to reduce context size significantly. Signatures will not be included if indexing is disabled.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: repo-map params: includeSignatures: false # default true
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [ { "name": "repo-map", "params": { "includeSignatures": false // default true } } ]}
|
||||
```
|
||||
|
||||
Provides a list of files and the call signatures of top-level classes, functions, and methods in those files. This helps the model better understand how a particular piece of code relates to the rest of the codebase.
|
||||
|
||||
In the submenu that appears, you can select either `Entire codebase`, or specify a subfolder to generate the repostiory map from.
|
||||
|
||||
This context provider is inpsired by [Aider's repository map](https://aider.chat/2023/10/22/repomap.html).
|
||||
|
||||
### `@Operating System`[](#operating-system "Direct link to operating-system")
|
||||
|
||||
Reference the architecture and platform of your current operating system.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: os
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [{ "name": "os" }] }
|
||||
```
|
||||
|
||||
### Model Context Protocol[](#model-context-protocol "Direct link to Model Context Protocol")
|
||||
|
||||
The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then set up your configuration like this:
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
mcpServers: - name: My MCP Server command: uvx args: - mcp-server-sqlite - --db-path - /Users/NAME/test.db
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{
|
||||
"experimental": {
|
||||
"modelContextProtocolServers": [
|
||||
{
|
||||
"transport": {
|
||||
"type": "stdio",
|
||||
"command": "uvx",
|
||||
"args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You'll then be able to type "@" and see "MCP" in the context providers dropdown.
|
||||
|
||||
### `@Issue`[](#issue "Direct link to issue")
|
||||
|
||||
Reference the conversation in a GitHub issue.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: issue params: repos: - owner: continuedev repo: continue githubToken: ghp_xxx
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{
|
||||
"contextProviders": [
|
||||
{
|
||||
"name": "issue",
|
||||
"params": {
|
||||
"repos": [{ "owner": "continuedev", "repo": "continue" }],
|
||||
"githubToken": "ghp_xxx"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Make sure to include your own [GitHub personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) to avoid being rate-limited.
|
||||
|
||||
### `@Database`[](#database "Direct link to database")
|
||||
|
||||
Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: database params: connections: - name: examplePostgres connection_type: postgres connection: user: username host: localhost database: exampleDB password: yourPassword port: 5432 - name: exampleMssql connection_type: mssql connection: user: username server: localhost database: exampleDB password: yourPassword - name: exampleSqlite connection_type: sqlite connection: filename: /path/to/your/sqlite/database.db
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{
|
||||
"contextProviders": [
|
||||
{
|
||||
"name": "database",
|
||||
"params": {
|
||||
"connections": [
|
||||
{
|
||||
"name": "examplePostgres",
|
||||
"connection_type": "postgres",
|
||||
"connection": {
|
||||
"user": "username",
|
||||
"host": "localhost",
|
||||
"database": "exampleDB",
|
||||
"password": "yourPassword",
|
||||
"port": 5432
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "exampleMssql",
|
||||
"connection_type": "mssql",
|
||||
"connection": {
|
||||
"user": "username",
|
||||
"server": "localhost",
|
||||
"database": "exampleDB",
|
||||
"password": "yourPassword"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "exampleSqlite",
|
||||
"connection_type": "sqlite",
|
||||
"connection": { "filename": "/path/to/your/sqlite/database.db" }
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Each connection should include a unique name, the `connection_type`, and the necessary connection parameters specific to each database type.
|
||||
|
||||
Available connection types:
|
||||
|
||||
- `postgres`
|
||||
- `mysql`
|
||||
- `sqlite`
|
||||
|
||||
### `@Postgres`[](#postgres "Direct link to postgres")
|
||||
|
||||
Reference the schema of a table, and some sample rows
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: postgres params: host: localhost port: 5436 user: myuser password: catsarecool database: animals schema: public sampleRows: 3
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{
|
||||
"contextProviders": [
|
||||
{
|
||||
"name": "postgres",
|
||||
"params": {
|
||||
"host": "localhost",
|
||||
"port": 5436,
|
||||
"user": "myuser",
|
||||
"password": "catsarecool",
|
||||
"database": "animals",
|
||||
"schema": "public",
|
||||
"sampleRows": 3
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
The only required settings are those for creating the database connection: `host`, `port`, `user`, `password`, and `database`.
|
||||
|
||||
By default, the `schema` filter is set to `public`, and the `sampleRows` is set to 3. You may unset the schema if you want to include tables from all schemas.
|
||||
|
||||
[Here is a short demo.](https://github.com/continuedev/continue/pull/859)
|
||||
|
||||
### `@Google`[](#google "Direct link to google")
|
||||
|
||||
Reference the results of a Google search.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: google params: serperApiKey: <YOUR_SERPER.DEV_API_KEY>
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{
|
||||
"contextProviders": [
|
||||
{
|
||||
"name": "google",
|
||||
"params": { "serperApiKey": "<YOUR_SERPER.DEV_API_KEY>" }
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
For example, type "@Google python tutorial" if you want to search and discuss ways of learning Python.
|
||||
|
||||
Note: You can get an API key for free at [serper.dev](https://serper.dev).
|
||||
|
||||
### `@Gitlab Merge Request`[](#gitlab-merge-request "Direct link to gitlab-merge-request")
|
||||
|
||||
Reference an open MR for this branch on GitLab.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: gitlab-mr params: token: "..."
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [{ "name": "gitlab-mr", "params": { "token": "..." } }] }
|
||||
```
|
||||
|
||||
You will need to create a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with the `read_api` scope.
|
||||
|
||||
#### Using Self-Hosted GitLab[](#using-self-hosted-gitlab "Direct link to Using Self-Hosted GitLab")
|
||||
|
||||
You can specify the domain to communicate with by setting the `domain` parameter in your configurtion. By default this is set to `gitlab.com`.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: gitlab-mr params: token: "..." domain: "gitlab.example.com"
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{
|
||||
"contextProviders": [
|
||||
{
|
||||
"name": "gitlab-mr",
|
||||
"params": { "token": "...", "domain": "gitlab.example.com" }
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
#### Filtering Comments[](#filtering-comments "Direct link to 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`[](#jira "Direct link to jira")
|
||||
|
||||
Reference the conversation in a Jira issue.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: jira params: domain: company.atlassian.net token: ATATT...
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{
|
||||
"contextProviders": [
|
||||
{
|
||||
"name": "jira",
|
||||
"params": { "domain": "company.atlassian.net", "token": "ATATT..." }
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Make sure to include your own [Atlassian API Token](https://id.atlassian.com/manage-profile/security/api-tokens), or use your `email` and `token`, with token set to your password for basic authentication. If you use your own Atlassian API Token, don't configure your email.
|
||||
|
||||
#### Jira Datacenter Support[](#jira-datacenter-support "Direct link to Jira Datacenter Support")
|
||||
|
||||
This context provider supports both Jira API version 2 and 3. It will use version 3 by default since that's what the cloud version uses, but if you have the datacenter version of Jira, you'll need to set the API Version to 2 using the `apiVersion` property.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: jira params: apiVersion: "2"
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{ "contextProviders": [{ "name": "jira", "params": { "apiVersion": "2" } }] }
|
||||
```
|
||||
|
||||
#### Issue Query[](#issue-query "Direct link to Issue Query")
|
||||
|
||||
By default, the following query will be used to find issues:
|
||||
|
||||
```
|
||||
assignee = currentUser() AND resolution = Unresolved order by updated DESC
|
||||
```
|
||||
|
||||
You can override this query by setting the `issueQuery` parameter.
|
||||
|
||||
#### Max results[](#max-results "Direct link to Max results")
|
||||
|
||||
You can set the `maxResults` parameter to limit the number of results returned. The default is `50`.
|
||||
|
||||
### `@Discord`[](#discord "Direct link to discord")
|
||||
|
||||
Reference the messages in a Discord channel.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: discord params: discordKey: "bot token" guildId: "1234567890" channels: - id: "123456" name: "example-channel" - id: "678901" name: "example-channel-2"
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{
|
||||
"contextProviders": [
|
||||
{
|
||||
"name": "discord",
|
||||
"params": {
|
||||
"discordKey": "bot token",
|
||||
"guildId": "1234567890",
|
||||
"channels": [
|
||||
{ "id": "123456", "name": "example-channel" },
|
||||
{ "id": "678901", "name": "example-channel-2" }
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Make sure to include your own [Bot Token](https://discord.com/developers/applications), and join it to your related server . If you want more granular control over which channels are searched, you can specify a list of channel IDs to search in. If you don't want to specify any channels, just include the guild id(Server ID) and all channels will be included. The provider only reads text channels.
|
||||
|
||||
### `@HTTP`[](#http "Direct link to http")
|
||||
|
||||
The HttpContextProvider makes a POST request to the url passed in the configuration. The server must return 200 OK with a ContextItem object or an array of ContextItems.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: http params: url: "https://api.example.com/v1/users"
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{
|
||||
"contextProviders": [
|
||||
{ "name": "http", "params": { "url": "https://api.example.com/v1/users" } }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
The receiving URL should expect to receive the following parameters:
|
||||
|
||||
POST parameters
|
||||
|
||||
```json
|
||||
{ query: string, fullInput: string}
|
||||
```
|
||||
|
||||
The response 200 OK should be a JSON object with the following structure:
|
||||
|
||||
Response
|
||||
|
||||
```
|
||||
[ { "name": "", "description": "", "content": "" }]// OR{ "name": "", "description": "", "content": ""}
|
||||
```
|
||||
|
||||
### `@Commits`[](#commits "Direct link to commits")
|
||||
|
||||
Reference specific git commit metadata and diff or all of the recent commits.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: commit params: Depth: 50 LastXCommitsDepth: 10
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{
|
||||
"contextProviders": [
|
||||
{ "name": "commit", "params": { "Depth": 50, "LastXCommitsDepth": 10 } }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
The depth is how many commits will be loaded into the submenu, defaults to 50. The LastXCommitsDepth is how many recent commits will be included, defaults to 10.
|
||||
|
||||
### `@Greptile`[](#greptile "Direct link to greptile")
|
||||
|
||||
Query a [Greptile](https://www.greptile.com/) index of the current repo/branch.
|
||||
|
||||
- YAML
|
||||
- JSON
|
||||
|
||||
config.yaml
|
||||
|
||||
```
|
||||
context: - provider: greptile params: greptileToken: "..." githubToken: "..."
|
||||
```
|
||||
|
||||
config.json
|
||||
|
||||
```json
|
||||
{
|
||||
"contextProviders": [
|
||||
{
|
||||
"name": "greptile",
|
||||
"params": { "GreptileToken": "...", "GithubToken": "..." }
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Requesting Context Providers[](#requesting-context-providers "Direct link to Requesting Context Providers")
|
||||
|
||||
Not seeing what you want? Create an issue [here](https://github.com/continuedev/continue/issues/new?assignees=TyDunn&labels=enhancement&projects=&template=feature-request-%F0%9F%92%AA.md&title=) to request a new Context Provider.
|
||||
|
|
@ -4,7 +4,7 @@ keywords: [apply, speculative]
|
|||
toc_max_heading_level: 5
|
||||
---
|
||||
|
||||
<!-- This is a work in progress and excluded by prefixing the file name with an underscore -->
|
||||
{/* This is a work in progress and excluded by prefixing the file name with an underscore */}
|
||||
|
||||
# Apply
|
||||
|
||||
|
|
@ -1,20 +1,18 @@
|
|||
---
|
||||
title: Autocomplete
|
||||
title: "Autocomplete"
|
||||
description: "Deep dive into Continue's autocomplete functionality and configuration"
|
||||
keywords: [autocomplete]
|
||||
---
|
||||
|
||||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
### Setting up with Codestral (recommended)
|
||||
|
||||
If you want to have the best autocomplete experience, we recommend using Codestral, which is available through the [Mistral API](https://console.mistral.ai/). To do this, obtain an API key and add it to your config:
|
||||
|
||||
<Tabs groupId="hub-config-example">
|
||||
<TabItem value="hub" label="Hub">
|
||||
<Tabs>
|
||||
<Tab title="Hub">
|
||||
[Mistral Codestral model block](https://hub.continue.dev/mistral/codestral)
|
||||
</TabItem>
|
||||
<TabItem value="yaml" label="YAML">
|
||||
</Tab>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Codestral
|
||||
|
|
@ -24,8 +22,8 @@ If you want to have the best autocomplete experience, we recommend using Codestr
|
|||
roles:
|
||||
- autocomplete
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"tabAutocompleteModel": {
|
||||
|
|
@ -36,12 +34,16 @@ If you want to have the best autocomplete experience, we recommend using Codestr
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
:::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`.
|
||||
:::
|
||||
<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`.
|
||||
</Tip>
|
||||
|
||||
### Setting up with Ollama (default)
|
||||
|
||||
|
|
@ -53,11 +55,11 @@ ollama run qwen2.5-coder:1.5b
|
|||
|
||||
Then, add the model to your configuration:
|
||||
|
||||
<Tabs groupId="hub-config-example">
|
||||
<TabItem value="hub" label="Hub">
|
||||
<Tabs>
|
||||
<Tab title="Hub">
|
||||
[Ollama Qwen 2.5 Coder 1.5B model block](https://hub.continue.dev/ollama/qwen2.5-coder-1.5b)
|
||||
</TabItem>
|
||||
<TabItem value="yaml" label="YAML">
|
||||
</Tab>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Qwen 1.5b Autocomplete Model
|
||||
|
|
@ -66,8 +68,8 @@ Then, add the model to your configuration:
|
|||
roles:
|
||||
- autocomplete
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"tabAutocompleteModel": {
|
||||
|
|
@ -77,7 +79,7 @@ Then, add the model to your configuration:
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
Once the model has been downloaded, you should begin to see completions in VS Code.
|
||||
|
|
@ -1,13 +1,12 @@
|
|||
---
|
||||
title: "Configuration"
|
||||
description: Configuration
|
||||
keywords: [config, settings, customize]
|
||||
---
|
||||
|
||||
# Configuration
|
||||
|
||||
You can easily access your assistant configuration from the Continue Chat sidebar. Open the sidebar by pressing <kbd>cmd/ctrl</kbd> + <kbd>L</kbd> (VS Code) or <kbd>cmd/ctrl</kbd> + <kbd>J</kbd> (JetBrains) and click the Assistant selector above the main chat input. Then, you can hover over an assistant and click the `new window` (hub assistants) or `gear` (local assistants) icon.
|
||||
|
||||

|
||||

|
||||
|
||||
## Hub Assistants
|
||||
|
||||
|
|
@ -22,7 +21,7 @@ Local user-level configuration is stored and can be edited in your home director
|
|||
|
||||
To open this `config.yaml`, you need to open the assistants dropdown in the top-right portion of the chat input. On that dropdown beside the "Local Assistant" option, select the cog icon. It will open the local `config.yaml`.
|
||||
|
||||

|
||||

|
||||
|
||||
When editing this file, you can see the available options suggested as you type, or check the reference below. When you save a config file from the IDE, Continue will automatically refresh to take into account your changes. A config file is automatically created the first time you use Continue, and always automatically generated with default values if it doesn't exist.
|
||||
|
||||
|
|
@ -30,9 +29,9 @@ See the full reference for `config.yaml` [here](/reference).
|
|||
|
||||
## Deprecated configuration methods
|
||||
|
||||
:::info
|
||||
View the `config.json` migration guide [here](../yaml-migration.mdx)
|
||||
:::
|
||||
<Info>
|
||||
View the `config.json` migration guide [here](../yaml-migration.mdx)
|
||||
</Info>
|
||||
|
||||
- [`config.json`](/reference) - The original configuration format which is stored in a file at the same location as `config.yaml`
|
||||
- [`.continuerc.json`](#continuercjson) - Workspace-level configuration
|
||||
|
|
@ -4,8 +4,6 @@ description: Collecting data on how you build software
|
|||
keywords: [development data, dev data, LLM-aided development]
|
||||
---
|
||||
|
||||
# Development Data
|
||||
|
||||
When you use Continue, you automatically collect data on how you build software. By default, this development data is saved to `.continue/dev_data` on your local machine.
|
||||
|
||||
You can read more about how development data is generated as a byproduct of LLM-aided development and why we believe that you should start collecting it now: [It’s time to collect data on how you build software](https://blog.continue.dev/its-time-to-collect-data-on-how-you-build-software)
|
||||
|
|
@ -4,9 +4,6 @@ description: MCP use and customization
|
|||
keywords: [tool, use, function calling, claude, automatic]
|
||||
---
|
||||
|
||||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# MCP
|
||||
|
||||
As AI systems get better, they're still held back by their training data and
|
||||
|
|
@ -27,9 +24,7 @@ MCP Servers can be added to hub Assistants using `mcpServers` blocks. You can
|
|||
explore available MCP server blocks
|
||||
[here](https://hub.continue.dev/explore/mcp).
|
||||
|
||||
:::info
|
||||
MCP can only be used in the **agent** mode.
|
||||
:::
|
||||
<Info>MCP can only be used in the **agent** mode.</Info>
|
||||
|
||||
## Quick Start
|
||||
|
||||
|
|
@ -58,7 +53,47 @@ Open the browser and navigate Hacker News. Save the top 10 headlines in a hn.txt
|
|||
|
||||
The result will be a generated file called `hn.txt` in the current working directory.
|
||||
|
||||

|
||||

|
||||
|
||||
## Continue Documentation Search
|
||||
|
||||
You can set up an MCP server to search the Continue documentation directly from your agent. This is particularly useful for getting help with Continue configuration and features.
|
||||
|
||||
1. Create a folder called `.continue/mcpServers` at the top level of your workspace
|
||||
2. Add a file called `continue-docs-mcp.yaml` to this folder
|
||||
3. Write the following contents and save:
|
||||
|
||||
```yaml title=".continue/mcpServers/continue-docs-mcp.yaml"
|
||||
name: Continue Documentation MCP
|
||||
version: 0.0.1
|
||||
schema: v1
|
||||
mcpServers:
|
||||
- name: Continue Docs Search
|
||||
type: stdio
|
||||
command: npx
|
||||
args:
|
||||
- mint-mcp
|
||||
- add
|
||||
- continue-docs
|
||||
```
|
||||
|
||||
Now you can search the Continue documentation by asking questions like:
|
||||
|
||||
```
|
||||
Search for model setup instructions in the Continue docs
|
||||
```
|
||||
|
||||
```
|
||||
Find documentation about context providers
|
||||
```
|
||||
|
||||
```
|
||||
How do I configure autocomplete in Continue?
|
||||
```
|
||||
|
||||
The MCP server will search the Continue documentation and provide relevant information to help with your questions.
|
||||
|
||||
For detailed setup instructions and troubleshooting, see the [Continue MCP Reference](/reference/continue-mcp).
|
||||
|
||||
## Using MCP Servers
|
||||
|
||||
|
|
@ -68,8 +103,8 @@ quickstart](https://modelcontextprotocol.io/quickstart) and then [create an
|
|||
block](https://hub.continue.dev/new?type=block&blockType=mcpServers) or add a local MCP
|
||||
server block to your [config file](./configuration.md):
|
||||
|
||||
<Tabs groupId="config.yaml">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
mcpServers:
|
||||
- name: SQLite MCP
|
||||
|
|
@ -80,8 +115,8 @@ server block to your [config file](./configuration.md):
|
|||
- "/path/to/your/database.db"
|
||||
|
||||
````
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"experimental": {
|
||||
|
|
@ -98,7 +133,7 @@ server block to your [config file](./configuration.md):
|
|||
}
|
||||
````
|
||||
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
### Syntax
|
||||
|
|
@ -110,7 +145,6 @@ MCP blocks follow the established syntax for blocks, with a few additional prope
|
|||
- `type` (optional): The type of the MCP server: `sse`, `stdio`, `streamable-http`
|
||||
- `args` (optional): Arguments to pass to the command.
|
||||
- `env` (optional): Secrets to be injected into the command as environment variables.
|
||||
- `cwd` (optional): Working directory to run the command in. Can be absolute or relative path.
|
||||
|
||||
### Transport Types
|
||||
|
||||
|
|
@ -133,22 +167,12 @@ For local MCP servers that communicate via standard input and output:
|
|||
|
||||
```yaml
|
||||
mcpServers:
|
||||
- name: SQLite Server
|
||||
- name: Name
|
||||
type: stdio
|
||||
command: npx
|
||||
args:
|
||||
- "@modelcontextprotocol/server-sqlite"
|
||||
- "./database.db"
|
||||
cwd: "/path/to/project"
|
||||
|
||||
- name: Local Project Server
|
||||
command: npm
|
||||
args:
|
||||
- "run"
|
||||
- "mcp-server"
|
||||
cwd: "./my-project"
|
||||
env:
|
||||
NODE_ENV: "production"
|
||||
- "/path/to/your/database.db"
|
||||
```
|
||||
|
||||
#### Streamable HTTP Transport
|
||||
|
|
@ -4,9 +4,12 @@ title: Prompts
|
|||
|
||||
Prompts are reusable instructions that can be referenced at any time during chat. They are especially useful as context for repetitive and/or complex tasks.
|
||||
|
||||
:::info
|
||||
Prompts were previously defined in a `.prompt` file format, but for consistency we now recommend using the same Markdown format as [rules](./rules.mdx) and adding `alwaysApply: false` to the frontmatter so that they are manually triggered.
|
||||
:::
|
||||
<Info>
|
||||
Prompts were previously defined in a `.prompt` file format, but for
|
||||
consistency we now recommend using the same Markdown format as
|
||||
[rules](./rules.mdx) and adding `alwaysApply: false` to the frontmatter so
|
||||
that they are manually triggered.
|
||||
</Info>
|
||||
|
||||
### Quick Start
|
||||
|
||||
167
docs/customize/deep-dives/rules.mdx
Normal file
167
docs/customize/deep-dives/rules.mdx
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
---
|
||||
title: "Rules"
|
||||
description: "Rules are used to provide instructions to the model for Chat, Edit, and Agent requests."
|
||||
keywords: [rules, .continuerules, system, prompt, message]
|
||||
---
|
||||
|
||||
Rules provide instructions to the model for [Chat](../../features/chat/quick-start), [Edit](../../features/edit/quick-start), and [Agent](../../features/agent/quick-start) requests.
|
||||
|
||||
<Info>
|
||||
Rules are not included in [autocomplete](./autocomplete.mdx) or
|
||||
[apply](../model-roles/apply.mdx).
|
||||
</Info>
|
||||
|
||||
## How it works
|
||||
|
||||
You can view the current rules by clicking the pen icon above the main toolbar:
|
||||
|
||||

|
||||
|
||||
To form the system message, rules are joined with new lines, in the order they appear in the toolbar. This includes the base chat system message ([see below](#chat-system-message)).
|
||||
|
||||
## Quick Start
|
||||
|
||||
Below is a quick example of setting up a new rule file:
|
||||
|
||||
1. Create a folder called `.continue/rules` at the top level of your workspace
|
||||
2. Add a file called `pirates-rule.md` to this folder.
|
||||
3. Write the following contents to `pirates-rule.md` and save.
|
||||
|
||||
```md title=".continue/rules/pirates-rule.md"
|
||||
---
|
||||
name: Pirate rule
|
||||
---
|
||||
|
||||
- Talk like a pirate.
|
||||
```
|
||||
|
||||
Now test your rules by asking a question about a file in chat.
|
||||
|
||||

|
||||
|
||||
## Creating rules blocks
|
||||
|
||||
Rules can be added locally using the "Add Rules" button while viewing the Local Assistant's rules.
|
||||
|
||||

|
||||
|
||||
<Info>
|
||||
**Automatically create local rule blocks**: When in Agent mode, you can prompt the agent to create a rule for you using the `create_rule_block` tool if enabled.
|
||||
|
||||
For example, you can say "Create a rule for this", and a rule will be created for you in `.continue/rules` based on your conversation.
|
||||
|
||||
</Info>
|
||||
|
||||
Rules can also be added to an Assistant on the Continue Hub.
|
||||
|
||||
Explore available rules [here](https://hub.continue.dev), or [create your own](https://hub.continue.dev/new?type=block&blockType=rules) in the Hub.
|
||||
|
||||
### Syntax
|
||||
|
||||
<Info>
|
||||
Rules were originally defined in YAML format (demonstrated below), but we
|
||||
introduced Markdown for easier editing. While both are still supported, we
|
||||
recommend Markdown.
|
||||
</Info>
|
||||
|
||||
Rules blocks can be simple text, written in YAML configuration files, or as Markdown (`.md`) files. They can have the following properties:
|
||||
|
||||
- `name` (**required** for YAML): A display name/title for the rule
|
||||
- `globs` (optional): When files are provided as context that match this glob pattern, the rule will be included. This can be either a single pattern (e.g., `"**/*.{ts,tsx}"`) or an array of patterns (e.g., `["src/**/*.ts", "tests/**/*.ts"]`).
|
||||
- `regex` (optional): When files are provided as context and their content matches this regex pattern, the rule will be included. This can be either a single pattern (e.g., `"^import .* from '.*';$"`) or an array of patterns (e.g., `["^import .* from '.*';$", "^export .* from '.*';$"]`).
|
||||
- `description` (optional): A description for the rule. Agents may read this description when `alwaysApply` is false to determine whether the rule should be pulled into context.
|
||||
- `alwaysApply`: Determines whether the rule is always included. Behavior is described below:
|
||||
- `true`: Always included, regardless of file context
|
||||
- `false`: Included if globs exist AND match file context, or the agent decides to pull the rule into context based on its description
|
||||
- `undefined` (default behavior): Included if no globs exist OR globs exist and match
|
||||
|
||||
<Tabs>
|
||||
<Tab title="Markdown">
|
||||
```md title="doc-standards.md"
|
||||
---
|
||||
name: Documentation Standards
|
||||
globs: docs/**/*.{md,mdx}
|
||||
alwaysApply: false
|
||||
description: Standards for writing and maintaining Continue Docs
|
||||
---
|
||||
|
||||
# Continue Docs Standards
|
||||
|
||||
- Follow Docusaurus documentation standards
|
||||
- Include YAML frontmatter with title, description, and keywords
|
||||
- Use consistent heading hierarchy starting with h2 (##)
|
||||
- Include relevant Admonition components for tips, warnings, and info
|
||||
- Use descriptive alt text for images
|
||||
- Include cross-references to related documentation
|
||||
- Reference other docs with relative paths
|
||||
- Keep paragraphs concise and scannable
|
||||
- Use code blocks with appropriate language tags
|
||||
|
||||
````
|
||||
</Tab>
|
||||
|
||||
<Tab title="YAML">
|
||||
```yaml title="doc-standards.yaml"
|
||||
name: Documentation Standards
|
||||
version: 1.0.0
|
||||
schema: v1
|
||||
|
||||
rules:
|
||||
- name: Documentation Standards
|
||||
globs: docs/**/*.{md,mdx}
|
||||
alwaysApply: false
|
||||
rule: >
|
||||
- Follow Docusaurus documentation standards
|
||||
- Include YAML frontmatter with title, description, and keywords
|
||||
- Use consistent heading hierarchy starting with h2 (##)
|
||||
- Include relevant Admonition components for tips, warnings, and info
|
||||
- Use descriptive alt text for images
|
||||
- Include cross-references to related documentation
|
||||
- Reference other docs with relative paths
|
||||
- Keep paragraphs concise and scannable
|
||||
- Use code blocks with appropriate language tags
|
||||
````
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
### `.continue/rules` folder
|
||||
|
||||
You can create project-specific rules by adding a `.continue/rules` folder to the root of your project and adding new rule files.
|
||||
|
||||
Rules files are loaded in lexicographical order, so you can prefix them with numbers to control the order in which they are applied. For example: `01-general.md`, `02-frontend.md`, `03-backend.md`.
|
||||
|
||||
### Example: TypeScript Rules
|
||||
|
||||
```md title=".continue/rules/typescript.md"
|
||||
---
|
||||
name: TypeScript Best Practices
|
||||
globs: ["**/*.ts", "**/*.tsx"]
|
||||
---
|
||||
|
||||
# TypeScript Rules
|
||||
|
||||
- Always use TypeScript interfaces for object shapes
|
||||
- Use type aliases sparingly, prefer interfaces
|
||||
- Include proper JSDoc comments for public APIs
|
||||
- Use strict null checks
|
||||
- Prefer readonly arrays and properties where possible
|
||||
- modularize components into smaller, reusable pieces
|
||||
```
|
||||
|
||||
### Chat System Message
|
||||
|
||||
Continue includes a simple default system message for [Chat](../../features/chat/quick-start) and [Agent](../../features/agent/quick-start) requests, to help the model provide reliable codeblock formats in its output.
|
||||
|
||||
This can be viewed in the rules section of the toolbar (see above), or in the source code [here](https://github.com/continuedev/continue/blob/main/core/llm/constructMessages.ts#L4).
|
||||
|
||||
Advanced users can override this system message for a specific model if needed by using `chatOptions.baseSystemMessage`. See the [`config.yaml` reference](/reference#models).
|
||||
|
||||
### `.continuerules`
|
||||
|
||||
<Warning>
|
||||
`.continuerules` will be deprecated in a future release. Please use the
|
||||
`.continue/rules` folder instead.
|
||||
</Warning>
|
||||
|
||||
You can create project-specific rules by adding a `.continuerules` file to the root of your project. This file is raw text and its full contents will be used as rules.
|
||||
|
|
@ -1,23 +1,19 @@
|
|||
---
|
||||
title: "Rules"
|
||||
description: Rules are used to provide instructions to the model for Chat, Edit, and Agent requests.
|
||||
keywords: [rules, .continuerules, system, prompt, message]
|
||||
---
|
||||
|
||||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# Rules
|
||||
|
||||
Rules provide instructions to the model for [Chat](../../features/chat/quick-start), [Edit](../../features/edit/quick-start), and [Agent](../../features/agent/quick-start) requests.
|
||||
|
||||
:::info Rules are not included in [autocomplete](./autocomplete.mdx) or [apply](../model-roles/apply.mdx).
|
||||
:::
|
||||
<Info> Rules are not included in [autocomplete](./autocomplete.mdx) or [apply](../model-roles/apply.mdx).
|
||||
</Info>
|
||||
|
||||
## How it works
|
||||
|
||||
You can view the current rules by clicking the pen icon above the main toolbar:
|
||||
|
||||

|
||||

|
||||
|
||||
To form the system message, rules are joined with new lines, in the order they appear in the toolbar. This includes the base chat system message ([see below](#chat-system-message)).
|
||||
|
||||
|
|
@ -39,19 +35,19 @@ name: Pirate rule
|
|||
|
||||
Now test your rules by asking a question about a file in chat.
|
||||
|
||||

|
||||

|
||||
|
||||
## Creating `rules` blocks
|
||||
|
||||
Rules can be added locally using the "Add Rules" button while viewing the Local Assistant's rules.
|
||||
|
||||

|
||||

|
||||
|
||||
:::info Automatically create local rule blocks
|
||||
When in Agent mode, you can prompt the agent to create a rule for you using the `create_rule_block` tool if enabled.
|
||||
<Info>
|
||||
Automatically create local rule blocks: When in Agent mode, you can prompt the agent to create a rule for you using the `create_rule_block` tool if enabled.
|
||||
|
||||
For example, you can say "Create a rule for this", and a rule will be created for you in `.continue/rules` based on your conversation.
|
||||
:::
|
||||
</Info>
|
||||
|
||||
Rules can also be added to an Assistant on the Continue Hub.
|
||||
|
||||
|
|
@ -59,11 +55,11 @@ Explore available rules [here](https://hub.continue.dev), or [create your own](h
|
|||
|
||||
### Syntax
|
||||
|
||||
:::info
|
||||
<Info>
|
||||
|
||||
Rules were originally defined in YAML format (demonstrated below), but we introduced Markdown for easier editing. While both are still supported, we recommend Markdown.
|
||||
|
||||
:::
|
||||
</Info>
|
||||
|
||||
Rules blocks can be simple text, written in YAML configuration files, or as Markdown (`.md`) files. They can have the following properties:
|
||||
|
||||
|
|
@ -76,9 +72,9 @@ Rules blocks can be simple text, written in YAML configuration files, or as Mark
|
|||
- `false`: Included if globs exist AND match file context, or the agent decides to pull the rule into context based on it's description
|
||||
- `undefined` (default behavior): Included if no globs exist OR globs exist and match
|
||||
|
||||
<Tabs groupId="rules-example">
|
||||
<TabItem value="md" label="Markdown">
|
||||
```yaml title="doc-standards.md"
|
||||
<Tabs>
|
||||
<Tab title="Markdown">
|
||||
```md title="doc-standards.md"
|
||||
---
|
||||
name: Documentation Standards
|
||||
globs: docs/**/*.{md,mdx}
|
||||
|
|
@ -86,21 +82,20 @@ Rules blocks can be simple text, written in YAML configuration files, or as Mark
|
|||
description: Standards for writing and maintaining Continue Docs
|
||||
---
|
||||
|
||||
# Continue Docs Standards
|
||||
# Continue Docs Standards
|
||||
|
||||
- Follow Docusaurus documentation standards
|
||||
- Include YAML frontmatter with title, description, and keywords
|
||||
- Use consistent heading hierarchy starting with h2 (##)
|
||||
- Include relevant Admonition components for tips, warnings, and info
|
||||
- Use descriptive alt text for images
|
||||
- Include cross-references to related documentation
|
||||
- Reference other docs with relative paths
|
||||
- Keep paragraphs concise and scannable
|
||||
- Use code blocks with appropriate language tags
|
||||
|
||||
````
|
||||
</TabItem>
|
||||
<TabItem value="yaml" label="YAML">
|
||||
- Follow Docusaurus documentation standards
|
||||
- Include YAML frontmatter with title, description, and keywords
|
||||
- Use consistent heading hierarchy starting with h2 (##)
|
||||
- Include relevant Admonition components for tips, warnings, and info
|
||||
- Use descriptive alt text for images
|
||||
- Include cross-references to related documentation
|
||||
- Reference other docs with relative paths
|
||||
- Keep paragraphs concise and scannable
|
||||
- Use code blocks with appropriate language tags
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="YAML">
|
||||
|
||||
```yaml title="doc-standards.yaml"
|
||||
name: Documentation Standards
|
||||
|
|
@ -121,9 +116,8 @@ Rules blocks can be simple text, written in YAML configuration files, or as Mark
|
|||
- Reference other docs with relative paths
|
||||
- Keep paragraphs concise and scannable
|
||||
- Use code blocks with appropriate language tags
|
||||
````
|
||||
|
||||
</TabItem>
|
||||
```
|
||||
</Tab>
|
||||
|
||||
</Tabs>
|
||||
|
||||
|
|
@ -180,10 +174,8 @@ Advanced users can override this system message for a specific model if needed b
|
|||
|
||||
### `.continuerules`
|
||||
|
||||
:::warning
|
||||
|
||||
<Warning>
|
||||
`.continuerules` will be deprecated in a future release. Please use the `.continue/rules` folder instead.
|
||||
|
||||
:::
|
||||
</Warning>
|
||||
|
||||
You can create project-specific rules by adding a `.continuerules` file to the root of your project. This file is raw text and its full contents will be used as rules.
|
||||
|
|
@ -4,15 +4,12 @@ description: Shortcuts that can be activated by prefacing your input with '/'
|
|||
keywords: [slash command, custom commands, step]
|
||||
---
|
||||
|
||||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||

|
||||

|
||||
|
||||
## Slash commands
|
||||
|
||||
Slash commands are shortcuts that can be activated by typing '/' in a chat session (press <kbd>cmd/ctrl</kbd> + <kbd>L</kbd> (VS Code) or <kbd>cmd/ctrl</kbd> + <kbd>J</kbd> (JetBrains)), and selecting from the dropdown.
|
||||

|
||||

|
||||
|
||||
Slash commands can be combined with additional instructions, including [context providers](../custom-providers.mdx) or highlighted code.
|
||||
|
||||
|
|
@ -1,14 +1,11 @@
|
|||
---
|
||||
title: VS Code Actions
|
||||
description: VS Code Actions
|
||||
keywords: [vscode, quick actions, quick, actions]
|
||||
---
|
||||
|
||||
### Other triggers for Actions (VS Code)
|
||||
|
||||
:::info
|
||||
Currently all of these are only available in VS Code
|
||||
:::
|
||||
<Info>Currently all of these are only available in VS Code</Info>
|
||||
|
||||
To make common use cases even more accessible, we provide a handful of other ways to invoke actions in VS Code.
|
||||
|
||||
|
|
@ -16,7 +13,7 @@ To make common use cases even more accessible, we provide a handful of other way
|
|||
|
||||
Quick Actions are displayed as buttons above top-level classes and functions in your source code, letting you invoke actions with one click. They will edit that class or function, but nothing outside of it. They can also be customized with [.prompt files](./prompts.md) to perform custom actions.
|
||||
|
||||

|
||||

|
||||
|
||||
By default, quick actions are disabled, but can be enabled with the “Continue: Enable Quick Actions” in VS Code settings.
|
||||
|
||||
|
|
@ -28,7 +25,7 @@ The highlighted code you’ve selected will be included in your prompt alongside
|
|||
|
||||
Right click actions that generate inline diffs use the same prompt and response processing logic as [Edit](../../features/edit/how-it-works.mdx).
|
||||
|
||||

|
||||

|
||||
|
||||
## Debug action
|
||||
|
||||
|
|
@ -46,4 +43,4 @@ Whenever you see red/yellow underlines in your code indicating errors, you can p
|
|||
|
||||
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]”.
|
||||
|
||||

|
||||

|
||||
|
Before Width: | Height: | Size: 858 KiB After Width: | Height: | Size: 858 KiB |
|
|
@ -1,5 +1,8 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
---
|
||||
title: "Llama Stack"
|
||||
description: "Configure Llama Stack with Continue"
|
||||
keywords: [llama, stack, local, api, inference]
|
||||
---
|
||||
|
||||
# Llama Stack
|
||||
|
||||
|
|
@ -23,8 +26,8 @@ Learn more about how to get started with llama stack in this [guide](https://lla
|
|||
|
||||
We recommend configuring **Llama 4 Maverick** as your chat model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Llama4 Maverick
|
||||
|
|
@ -32,8 +35,8 @@ We recommend configuring **Llama 4 Maverick** as your chat model.
|
|||
model: meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8
|
||||
apiBase: http://<llama stack endpoint>/v1/openai/v1/
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -46,15 +49,15 @@ We recommend configuring **Llama 4 Maverick** as your chat model.
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Autocomplete model
|
||||
|
||||
We recommend configuring **CodeLlama 7B** as your autocomplete model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: CodeLlama 7B
|
||||
|
|
@ -64,8 +67,8 @@ We recommend configuring **CodeLlama 7B** as your autocomplete model.
|
|||
roles:
|
||||
- autocomplete
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"tabAutocompleteModel": {
|
||||
|
|
@ -76,15 +79,15 @@ We recommend configuring **CodeLlama 7B** as your autocomplete model.
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Embeddings model
|
||||
|
||||
By default, Llama Stack uses **all-MiniLM-L6-v2** as the embeddings model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: all-MiniLM-L6-v2
|
||||
|
|
@ -94,8 +97,8 @@ By default, Llama Stack uses **all-MiniLM-L6-v2** as the embeddings model.
|
|||
roles:
|
||||
- embed
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
|
|
@ -105,7 +108,7 @@ By default, Llama Stack uses **all-MiniLM-L6-v2** as the embeddings model.
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Reranking model
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# SambaNova Cloud
|
||||
---
|
||||
title: "SambaNova"
|
||||
---
|
||||
|
||||
The SambaNova Cloud is a cloud platform for running large AI models with the world record open source models performance. You can follow the instructions in [this blog post](https://sambanova.ai/blog/accelerating-coding-with-sambanova-cloud?ref=blog.continue.dev) to configure your setup.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: SambaNova Llama 4 Scout
|
||||
|
|
@ -14,8 +13,8 @@ The SambaNova Cloud is a cloud platform for running large AI models with the wor
|
|||
model: Llama-4-Scout-17B-16E-Instruct
|
||||
apiKey: <YOUR_SAMBANOVA_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -28,7 +27,7 @@ The SambaNova Cloud is a cloud platform for running large AI models with the wor
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/SambaNova.ts)
|
||||
|
|
@ -1,18 +1,20 @@
|
|||
# Ask Sage
|
||||
---
|
||||
title: "AskSage"
|
||||
---
|
||||
|
||||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
:::info
|
||||
To get an Ask Sage API key login to the Ask Sage platform (If you don't have an account, you can create one [here](https://chat.asksage.ai/)) and follow the instructions in the Ask Sage Docs: [Ask Sage API Key](https://docs.asksage.ai/docs/api-documentation/api-documentation.html)
|
||||
:::
|
||||
<Info>
|
||||
To get an Ask Sage API key login to the Ask Sage platform (If you don't have
|
||||
an account, you can create one [here](https://chat.asksage.ai/)) and follow
|
||||
the instructions in the Ask Sage Docs: [Ask Sage API
|
||||
Key](https://docs.asksage.ai/docs/api-documentation/api-documentation.html)
|
||||
</Info>
|
||||
|
||||
## Configuration
|
||||
|
||||
To use the Ask Sage models, you can use the following
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: GPT-4 gov
|
||||
|
|
@ -21,8 +23,8 @@ To use the Ask Sage models, you can use the following
|
|||
apiBase: https://api.asksage.ai/server/
|
||||
apiKey: <YOUR_ASK_SAGE_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -36,7 +38,7 @@ To use the Ask Sage models, you can use the following
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
The `apiBase` will be listed on the Ask Sage platform when you generate an `API key`. You will see context as shown below:
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
# Cerebras Inference
|
||||
|
||||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
---
|
||||
title: "Cerebras"
|
||||
---
|
||||
|
||||
Cerebras Inference uses specialized silicon to provides fast inference.
|
||||
|
||||
|
|
@ -9,8 +8,8 @@ Cerebras Inference uses specialized silicon to provides fast inference.
|
|||
2. Create and copy the API key for use in Continue.
|
||||
3. Update your Continue config file:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Cerebras Llama 3.1 70B
|
||||
|
|
@ -18,8 +17,8 @@ Cerebras Inference uses specialized silicon to provides fast inference.
|
|||
model: llama3.1-70b
|
||||
apiKey: <YOUR_CEREBRAS_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -32,5 +31,5 @@ Cerebras Inference uses specialized silicon to provides fast inference.
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# Cloudflare Workers AI
|
||||
---
|
||||
title: "Cloudflare"
|
||||
---
|
||||
|
||||
Cloudflare Workers AI can be used for both chat and tab autocompletion in Continue. Here is an example of Cloudflare Workers AI configuration:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Llama 3 8B
|
||||
|
|
@ -40,8 +39,8 @@ Cloudflare Workers AI can be used for both chat and tab autocompletion in Contin
|
|||
env:
|
||||
accountId: YOUR CLOUDFLARE ACCOUNT ID
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -77,7 +76,7 @@ Cloudflare Workers AI can be used for both chat and tab autocompletion in Contin
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
Visit the [Cloudflare dashboard](https://dash.cloudflare.com/) to [create an API key](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# Cohere
|
||||
---
|
||||
title: "Cohere"
|
||||
---
|
||||
|
||||
Before using Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/api-keys) to create an API key.
|
||||
|
||||
|
|
@ -9,8 +8,8 @@ Before using Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/a
|
|||
|
||||
We recommend configuring **Command A** as your chat model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Command A 03-2025
|
||||
|
|
@ -18,8 +17,8 @@ We recommend configuring **Command A** as your chat model.
|
|||
model: command-a-03-2025
|
||||
apiKey: <YOUR_COHERE_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -32,7 +31,7 @@ We recommend configuring **Command A** as your chat model.
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Autocomplete model
|
||||
|
|
@ -45,8 +44,8 @@ Cohere currently does not offer any autocomplete models.
|
|||
|
||||
We recommend configuring **embed-v4.0** as your embeddings model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Cohere Embed v4.0
|
||||
|
|
@ -56,8 +55,8 @@ We recommend configuring **embed-v4.0** as your embeddings model.
|
|||
roles:
|
||||
- embed
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
|
|
@ -67,15 +66,15 @@ We recommend configuring **embed-v4.0** as your embeddings model.
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Reranking model
|
||||
|
||||
We recommend configuring **rerank-v3.5** as your reranking model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Cohere Rerank v3.5
|
||||
|
|
@ -85,8 +84,8 @@ We recommend configuring **rerank-v3.5** as your reranking model.
|
|||
roles:
|
||||
- rerank
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"reranker": {
|
||||
|
|
@ -98,5 +97,5 @@ We recommend configuring **rerank-v3.5** as your reranking model.
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
# DeepInfra
|
||||
---
|
||||
title: "DeepInfra"
|
||||
---
|
||||
|
||||
[DeepInfra](https://deepinfra.com) provides inference for open-source models at very low cost. To get started with DeepInfra, obtain your API key [here](https://deepinfra.com/dash). Then, find the model you want to use [here](https://deepinfra.com/models?type=text-generation) and copy the name of the model. Continue can then be configured to use the `DeepInfra` LLM class, like the example here:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: DeepInfra
|
||||
|
|
@ -14,8 +13,8 @@ import TabItem from "@theme/TabItem";
|
|||
model: mistralai/Mixtral-8x7B-Instruct-v0.1
|
||||
apiKey: <YOUR_DEEP_INFRA_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -28,7 +27,7 @@ import TabItem from "@theme/TabItem";
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/DeepInfra.ts)
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# Flowise
|
||||
---
|
||||
title: "Flowise"
|
||||
---
|
||||
|
||||
[Flowise](https://flowiseai.com/) is a low-code/no-code drag & drop tool with the aim to make it easy for people to visualize and build LLM apps. Continue can then be configured to use the `Flowise` LLM class, like the example here:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Flowise
|
||||
|
|
@ -14,8 +13,8 @@ import Tabs from "@theme/Tabs";
|
|||
model: <MODEL>
|
||||
apiBase: <API_BASE>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -28,7 +27,7 @@ import Tabs from "@theme/Tabs";
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Flowise.ts)
|
||||
|
|
@ -1,27 +1,28 @@
|
|||
---
|
||||
title: "Function Network"
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
title: Function Network
|
||||
slug: ../function-network
|
||||
|
||||
---
|
||||
|
||||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# Function Network
|
||||
|
||||
> Private, Affordable User-Owned AI
|
||||
|
||||
:::info
|
||||
<Info>
|
||||
|
||||
To get an API key, login to the Function Network Developer Platform. If you don't have an account, you can create one [here](https://www.function.network/join-waitlist).
|
||||
|
||||
:::
|
||||
</Info>
|
||||
|
||||
## Chat model
|
||||
|
||||
Function Network supports a number of models for chat. We recommend using LLama 3.1 70b or Qwen2.5-Coder-32B-Instruct.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Llama 3.1 70b
|
||||
|
|
@ -31,8 +32,8 @@ Function Network supports a number of models for chat. We recommend using LLama
|
|||
roles:
|
||||
- chat
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -45,7 +46,7 @@ Function Network supports a number of models for chat. We recommend using LLama
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
[Click here](https://docs.function.network/models-supported/chat-and-code-completion) to see a list of chat model providers.
|
||||
|
|
@ -54,8 +55,8 @@ Function Network supports a number of models for chat. We recommend using LLama
|
|||
|
||||
Function Network supports a number of models for autocomplete. We recommend using Llama 3.1 8b or Qwen2.5-Coder-1.5B.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Deepseek Coder 6.7b
|
||||
|
|
@ -65,8 +66,8 @@ Function Network supports a number of models for autocomplete. We recommend usin
|
|||
roles:
|
||||
- autocomplete
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"tabAutocompleteModel": {
|
||||
|
|
@ -77,15 +78,15 @@ Function Network supports a number of models for autocomplete. We recommend usin
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Embeddings model
|
||||
|
||||
Function Network supports a number of models for embeddings. We recommend using baai/bge-base-en-v1.5.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: BGE Base En
|
||||
|
|
@ -95,8 +96,8 @@ Function Network supports a number of models for embeddings. We recommend using
|
|||
roles:
|
||||
- embed
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
|
|
@ -106,7 +107,7 @@ Function Network supports a number of models for embeddings. We recommend using
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
[Click here](https://docs.function.network/models-supported/embeddings) to see a list of embeddings model providers.
|
||||
|
|
@ -1,19 +1,20 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
---
|
||||
title: "Groq"
|
||||
---
|
||||
|
||||
# Groq
|
||||
|
||||
:::info
|
||||
Check if your chosen model is still supported by referring to the [model documentation](https://console.groq.com/docs/models). If a model has been deprecated, you may encounter a 404 error when attempting to use it.
|
||||
:::
|
||||
<Info>
|
||||
Check if your chosen model is still supported by referring to the [model
|
||||
documentation](https://console.groq.com/docs/models). If a model has been
|
||||
deprecated, you may encounter a 404 error when attempting to use it.
|
||||
</Info>
|
||||
|
||||
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:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Llama 3.3 70b Versatile
|
||||
|
|
@ -23,8 +24,8 @@ Groq provides the fastest available inference for open-source language models, i
|
|||
roles:
|
||||
- chat
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -37,5 +38,5 @@ Groq provides the fastest available inference for open-source language models, i
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
# HuggingFace Inference Endpoints
|
||||
---
|
||||
title: "HuggingFace Inference Endpoints"
|
||||
---
|
||||
|
||||
Hugging Face Inference Endpoints are an easy way to setup instances of open-source language models on any cloud. Sign up for an account and add billing [here](https://huggingface.co/settings/billing), access the Inference Endpoints [here](https://ui.endpoints.huggingface.co), click on “New endpoint”, and fill out the form (e.g. select a model like [WizardCoder-Python-34B-V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)), and then deploy your model by clicking “Create Endpoint”. Change `~/.continue/config.json` to look like this:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Hugging Face Inference API
|
||||
|
|
@ -15,8 +14,8 @@ Hugging Face Inference Endpoints are an easy way to setup instances of open-sour
|
|||
apiKey: <YOUR_HF_TOKEN>
|
||||
apiBase: <YOUR_HF_INFERENCE_API_ENDPOINT_URL>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -30,7 +29,7 @@ Hugging Face Inference Endpoints are an easy way to setup instances of open-sour
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/HuggingFaceInferenceAPI.ts)
|
||||
|
|
@ -1,24 +1,25 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
---
|
||||
title: "Intel Extension for PyTorch"
|
||||
---
|
||||
|
||||
# IPEX-LLM
|
||||
|
||||
:::info
|
||||
[**IPEX-LLM**](https://github.com/intel-analytics/ipex-llm) is a PyTorch library for running LLM on Intel CPU and GPU (e.g., local PC with iGPU, discrete GPU such as Arc A-Series, Flex and Max) with very low latency.
|
||||
:::
|
||||
<Info>
|
||||
[**IPEX-LLM**](https://github.com/intel-analytics/ipex-llm) is a PyTorch
|
||||
library for running LLM on Intel CPU and GPU (e.g., local PC with iGPU,
|
||||
discrete GPU such as Arc A-Series, Flex and Max) with very low latency.
|
||||
</Info>
|
||||
|
||||
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:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: IPEX-LLM
|
||||
provider: ollama
|
||||
model: AUTODETECT
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -30,13 +31,13 @@ IPEX-LLM supports accelerated Ollama backend to be hosted on Intel GPU. Refer to
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
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:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: IPEX-LLM
|
||||
|
|
@ -44,8 +45,8 @@ If you would like to reach the Ollama service from another machine, make sure yo
|
|||
model: AUTODETECT
|
||||
apiBase: http://your-ollama-service-ip:11434
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -58,9 +59,12 @@ If you would like to reach the Ollama service from another machine, make sure yo
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
:::tip
|
||||
If you would like to preload the model before your first conversation with that model in Continue, you could refer to [here](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/continue_quickstart.html#pull-and-prepare-the-model) for more information.
|
||||
:::
|
||||
<Tip>
|
||||
If you would like to preload the model before your first conversation with
|
||||
that model in Continue, you could refer to
|
||||
[here](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/continue_quickstart.html#pull-and-prepare-the-model)
|
||||
for more information.
|
||||
</Tip>
|
||||
|
|
@ -1,14 +1,13 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# Kindo
|
||||
---
|
||||
title: "Kindo"
|
||||
---
|
||||
|
||||
Kindo offers centralized control over your organization's AI operations, ensuring data protection and compliance with internal policies while supporting various commercial and open-source models. To get started, sign up [here](https://app.kindo.ai/), create an API key in [Settings > API > API Keys](https://app.kindo.ai/settings/api), and choose a model from the list of supported models in the "Available Models" tab or copy and paste the config in [Plugins > Your Configuration](https://app.kindo.ai/plugins).
|
||||
|
||||
## Config Example
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Claude 3.5 Sonnet
|
||||
|
|
@ -16,8 +15,8 @@ Kindo offers centralized control over your organization's AI operations, ensurin
|
|||
model: claude-3-5-sonnet
|
||||
apiKey: <YOUR_KINDO_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -30,13 +29,13 @@ Kindo offers centralized control over your organization's AI operations, ensurin
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Tab Autocomplete Config Example
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: WhiteRabbitNeo
|
||||
|
|
@ -46,8 +45,8 @@ Kindo offers centralized control over your organization's AI operations, ensurin
|
|||
roles:
|
||||
- autocomplete
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"tabAutocompleteModel": [
|
||||
|
|
@ -61,7 +60,7 @@ Kindo offers centralized control over your organization's AI operations, ensurin
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Security
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# LlamaCpp
|
||||
---
|
||||
title: "Llama.cpp"
|
||||
---
|
||||
|
||||
Run the llama.cpp server binary to start the API server. If running on a remote server, be sure to set host to 0.0.0.0:
|
||||
|
||||
|
|
@ -11,8 +10,8 @@ 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:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Llama CPP
|
||||
|
|
@ -20,8 +19,8 @@ After it's up and running, change `~/.continue/config.json` to look like this:
|
|||
model: MODEL_NAME
|
||||
apiBase: http://localhost:8080
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -34,7 +33,7 @@ After it's up and running, change `~/.continue/config.json` to look like this:
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/LlamaCpp.ts)
|
||||
|
|
@ -1,20 +1,19 @@
|
|||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
# Llamafile
|
||||
---
|
||||
title: "Llamafile"
|
||||
---
|
||||
|
||||
A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contained binary that can run an open-source LLM. You can configure this provider in your config.json as follows:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Llamafile
|
||||
provider: llamafile
|
||||
model: mistral-7b
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -26,7 +25,7 @@ A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contai
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Llamafile.ts)
|
||||
|
|
@ -1,20 +1,19 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# LM Studio
|
||||
---
|
||||
title: "LM Studio"
|
||||
---
|
||||
|
||||
[LM Studio](https://lmstudio.ai) is an application for Mac, Windows, and Linux that makes it easy to locally run open-source models and comes with a great UI. To get started with LM Studio, download from the website, use the UI to download a model, and then start the local inference server. Continue can then be configured to use the `LMStudio` LLM class:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: LM Studio
|
||||
provider: lmstudio
|
||||
model: llama2-7b
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -26,15 +25,15 @@ import Tabs from "@theme/Tabs";
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
### Embeddings model
|
||||
|
||||
LMStudio supports embeddings endpoints, and comes with the `nomic-ai/nomic-embed-text-v1.5-GGUF` model (as of Nov 2024, check your models)
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Nomic Embed Text
|
||||
|
|
@ -43,8 +42,8 @@ LMStudio supports embeddings endpoints, and comes with the `nomic-ai/nomic-embed
|
|||
roles:
|
||||
- embed
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
|
|
@ -53,15 +52,15 @@ LMStudio supports embeddings endpoints, and comes with the `nomic-ai/nomic-embed
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Setting up a remote instance
|
||||
|
||||
To configure a remote instance of LM Studio, add the `"apiBase"` property to your model in config.json:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Nomic Embed Text
|
||||
|
|
@ -70,8 +69,8 @@ To configure a remote instance of LM Studio, add the `"apiBase"` property to you
|
|||
roles:
|
||||
- embed
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
|
|
@ -80,7 +79,7 @@ To configure a remote instance of LM Studio, add the `"apiBase"` property to you
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
This `apiBase` will now be used instead of the default `http://localhost:1234/v1`.
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# Moonshot
|
||||
---
|
||||
title: "Moonshot AI"
|
||||
---
|
||||
|
||||
[Moonshot AI](https://platform.moonshot.cn/) provides high-quality large language model services with competitive pricing and excellent performance.
|
||||
|
||||
|
|
@ -12,8 +11,8 @@ To use Moonshot AI models, you need to:
|
|||
1. Get an API key from [Moonshot AI Platform](https://platform.moonshot.cn/)
|
||||
2. Add the following configuration:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Moonshot
|
||||
|
|
@ -21,8 +20,8 @@ To use Moonshot AI models, you need to:
|
|||
model: moonshot-v1-8k
|
||||
apiKey: <YOUR_MOONSHOT_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -35,7 +34,7 @@ To use Moonshot AI models, you need to:
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Available Models
|
||||
|
|
@ -58,8 +57,8 @@ Moonshot AI currently provides the following models:
|
|||
|
||||
Here's a complete configuration example:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Moonshot-8K
|
||||
|
|
@ -71,8 +70,8 @@ Here's a complete configuration example:
|
|||
topP: 0.95
|
||||
maxTokens: 2048
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -90,5 +89,5 @@ Here's a complete configuration example:
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
# Morph
|
||||
---
|
||||
title: "Morph"
|
||||
---
|
||||
|
||||
Morph provides a fast apply model that helps you quickly and accurately apply code changes from chat suggestions to your files. It's optimized for speed and precision when integrating generated code into your existing codebase. You can sign up for Morph's generous free tier [here](https://morphllm.com/dashboard). Then, update your configuration file as follows:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- uses: morphllm/morph-v0
|
||||
|
|
@ -25,8 +24,8 @@ or
|
|||
promptTemplates:
|
||||
apply: "<code>{{{ original_code }}}</code>\n<update>{{{ new_code }}}</update>"
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -44,15 +43,15 @@ or
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Embeddings model
|
||||
|
||||
We recommend configuring **morph-embedding-v2** as your embeddings model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Morph Embeddings
|
||||
|
|
@ -63,8 +62,8 @@ We recommend configuring **morph-embedding-v2** as your embeddings model.
|
|||
roles:
|
||||
- embed
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
|
|
@ -75,15 +74,15 @@ We recommend configuring **morph-embedding-v2** as your embeddings model.
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Reranking model
|
||||
|
||||
We recommend configuring **morph-rerank-v2** as your reranking model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Morph Reranker
|
||||
|
|
@ -94,8 +93,8 @@ We recommend configuring **morph-rerank-v2** as your reranking model.
|
|||
roles:
|
||||
- rerank
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"reranker": {
|
||||
|
|
@ -108,5 +107,5 @@ We recommend configuring **morph-rerank-v2** as your reranking model.
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
|
@ -1,20 +1,19 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# Msty
|
||||
---
|
||||
title: "Msty"
|
||||
---
|
||||
|
||||
[Msty](https://msty.app/) is an application for Windows, Mac, and Linux that makes it really easy to run online as well as local open-source models, including Llama-2, DeepSeek Coder, etc. No need to fidget with your terminal, run a command, or anything. Just download the app from the website, click a button, and you are up and running. Continue can then be configured to use the `Msty` LLM class:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Msty
|
||||
provider: msty
|
||||
model: deepseek-coder:6.7b
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -26,7 +25,7 @@ import Tabs from "@theme/Tabs";
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Completion Options
|
||||
|
|
@ -44,8 +43,8 @@ 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:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Msty
|
||||
|
|
@ -55,8 +54,8 @@ If you need to send custom headers for authentication, you may use the `requestO
|
|||
headers:
|
||||
Authorization: Bearer xxx
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -73,7 +72,7 @@ If you need to send custom headers for authentication, you may use the `requestO
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Msty.ts)
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
# nCompass
|
||||
---
|
||||
title: "NCompass"
|
||||
---
|
||||
|
||||
The nCompass Technologies API exposes an extremely fast inference engine for open-source language models. You can sign up [here](https://app.ncompass.tech/api-settings), copy your API key on the initial welcome screen, and then hit the play button on any model from the [nCompass Models list](https://ncompass.tech/models). Change `~/.continue/config.json` to look like this:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="Package or config.yaml"
|
||||
models:
|
||||
- name: Ncompass Gemma 3 Coder
|
||||
|
|
@ -14,8 +13,8 @@ The nCompass Technologies API exposes an extremely fast inference engine for ope
|
|||
model: google/gemma-3-27b-it
|
||||
apiKey: <YOUR_NCOMPASS_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -28,7 +27,7 @@ The nCompass Technologies API exposes an extremely fast inference engine for ope
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/NCompass.ts)
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# Nebius AI Studio
|
||||
---
|
||||
title: "Nebius"
|
||||
---
|
||||
|
||||
You can get an API key from the [Nebius AI Studio API keys page](https://studio.nebius.ai/settings/api-keys)
|
||||
|
||||
|
|
@ -11,8 +10,8 @@ Available models can be found on the [Nebius AI Studio models page](https://stud
|
|||
|
||||
## Chat model
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: DeepSeek R1
|
||||
|
|
@ -20,8 +19,8 @@ Available models can be found on the [Nebius AI Studio models page](https://stud
|
|||
model: deepseek-ai/DeepSeek-R1
|
||||
apiKey: <YOUR_NEBIUS_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -34,15 +33,15 @@ Available models can be found on the [Nebius AI Studio models page](https://stud
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Embeddings model
|
||||
|
||||
Available models can be found on the [Nebius AI Studio embeddings page](https://studio.nebius.ai/models/embedding)
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: BAAI Embedder
|
||||
|
|
@ -52,8 +51,8 @@ Available models can be found on the [Nebius AI Studio embeddings page](https://
|
|||
roles:
|
||||
- embed
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
|
|
@ -63,5 +62,5 @@ Available models can be found on the [Nebius AI Studio embeddings page](https://
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# Novita
|
||||
---
|
||||
title: "Novita"
|
||||
---
|
||||
|
||||
[Novita AI](https://novita.ai?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) offers an affordable, reliable, and simple inference platform with scalable [LLM API](https://novita.ai/docs/model-api/reference/introduction.html), empowering developers to build AI applications. Try the [Novita AI Llama 3 API Demo](https://novita.ai/model-api/product/llm-api/playground/meta-llama-llama-3.1-70b-instruct?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) today!. You can sign up [here](https://novita.ai/user/login?&redirect=/&utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), copy your API key on the [Key Management](https://novita.ai/settings/key-management?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), and then hit the play button on any model from the [Novita AI Models list](https://novita.ai/llm-api?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link). Change `~/.continue/config.json` to look like this:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Llama 3.1 8B
|
||||
|
|
@ -14,8 +13,8 @@ import Tabs from "@theme/Tabs";
|
|||
model: meta-llama/llama-3.1-8b-instruct
|
||||
apiKey: <YOUR_NOVITA_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -28,7 +27,7 @@ import Tabs from "@theme/Tabs";
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Novita.ts)
|
||||
|
|
@ -1,20 +1,23 @@
|
|||
---
|
||||
title: NVIDIA
|
||||
title: "NVIDIA"
|
||||
---
|
||||
|
||||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
---
|
||||
|
||||
:::info
|
||||
[View the docs](https://docs.nvidia.com/nim/large-language-models/latest/getting-started.html#option-1-from-api-catalog) to learn how to get an API key.
|
||||
:::
|
||||
## title: NVIDIA
|
||||
|
||||
<Info>
|
||||
[View the
|
||||
docs](https://docs.nvidia.com/nim/large-language-models/latest/getting-started.html#option-1-from-api-catalog)
|
||||
to learn how to get an API key.
|
||||
</Info>
|
||||
|
||||
## Chat model
|
||||
|
||||
We recommend configuring **Nemotron-4-340B-Instruct** as your chat model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Nemotron-4-340B-Instruct
|
||||
|
|
@ -22,8 +25,8 @@ We recommend configuring **Nemotron-4-340B-Instruct** as your chat model.
|
|||
model: nvidia-nemotron-4-340b-instruct
|
||||
apiKey: <YOUR_NVIDIA_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -36,7 +39,7 @@ We recommend configuring **Nemotron-4-340B-Instruct** as your chat model.
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Autocomplete model
|
||||
|
|
@ -49,8 +52,8 @@ NVIDIA currently does not offer any autocomplete models.
|
|||
|
||||
We recommend configuring **NVIDIA Retrieval QA Mistral 7B** as your embeddings model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Nvidia Embedder
|
||||
|
|
@ -60,8 +63,8 @@ We recommend configuring **NVIDIA Retrieval QA Mistral 7B** as your embeddings m
|
|||
roles:
|
||||
- embed
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
|
|
@ -71,7 +74,7 @@ We recommend configuring **NVIDIA Retrieval QA Mistral 7B** as your embeddings m
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Reranking model
|
||||
|
|
@ -1,14 +1,13 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# OpenRouter
|
||||
---
|
||||
title: "OpenRouter"
|
||||
---
|
||||
|
||||
OpenRouter is a unified interface for commercial and open-source models, giving you access to the best models at the best prices. You can sign up [here](https://openrouter.ai/signup), create your API key on the [keys page](https://openrouter.ai/keys), and then choose a model from the [list of supported models](https://openrouter.ai/models).
|
||||
|
||||
Change `~/.continue/config.json` to look like the following.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: OpenRouter LLaMA 70 8B
|
||||
|
|
@ -17,8 +16,8 @@ Change `~/.continue/config.json` to look like the following.
|
|||
apiBase: https://openrouter.ai/api/v1
|
||||
apiKey: <YOUR_OPEN_ROUTER_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -32,15 +31,15 @@ Change `~/.continue/config.json` to look like the following.
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
To utilize features such as provider preferences or model routing configuration, include these parameters inside the `models[].requestsOptions.extraBodyProperties` field of your plugin config.
|
||||
|
||||
For example, to prevent extra long prompts from being compressed, you can explicitly turn off the feature like so:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Example Model
|
||||
|
|
@ -50,8 +49,8 @@ For example, to prevent extra long prompts from being compressed, you can explic
|
|||
extraBodyProperties:
|
||||
transforms: []
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -68,7 +67,7 @@ For example, to prevent extra long prompts from being compressed, you can explic
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
Learn more about available settings [here](https://openrouter.ai/docs).
|
||||
|
|
@ -1,8 +1,12 @@
|
|||
# OpenVINO™ Model Server
|
||||
---
|
||||
title: "OpenVINO Model Server"
|
||||
---
|
||||
|
||||
:::info
|
||||
[**OpenVINO™ Mode Server**](https://github.com/openvinotoolkit/model_server) is scalable inference server for models optimized with OpenVINO™ for Intel CPU, iGPU, GPU and NPU.
|
||||
:::
|
||||
<Info>
|
||||
[**OpenVINO™ Mode Server**](https://github.com/openvinotoolkit/model_server)
|
||||
is scalable inference server for models optimized with OpenVINO™ for Intel
|
||||
CPU, iGPU, GPU and NPU.
|
||||
</Info>
|
||||
|
||||
OpenVINO™ Mode Server supports text generation via OpenAI Chat Completions API. Simply select OpenAI provider to point `apiBase` to running OVMS instance. Refer [to this demo](https://docs.openvino.ai/2025/model-server/ovms_demos_code_completion_vsc.html) on official OVMS documentation to easily set up your own local server.
|
||||
|
||||
|
|
@ -1,23 +1,27 @@
|
|||
---
|
||||
title: OVHcloud AI Endpoints
|
||||
title: "OVHcloud"
|
||||
---
|
||||
|
||||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
---
|
||||
|
||||
## title: OVHcloud AI Endpoints
|
||||
|
||||
OVHcloud AI Endpoints is a serverless inference API that provides access to a curated selection of models (e.g., Llama, Mistral, Qwen, Deepseek). It is designed with security and data privacy in mind and is compliant with GDPR.
|
||||
|
||||
:::info
|
||||
To get started, create an API key on the OVHcloud [AI Endpoints website](https://endpoints.ai.cloud.ovh.net/). For more information, including pricing, visit the OVHcloud [AI Endpoints product page](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/).
|
||||
:::
|
||||
<Info>
|
||||
To get started, create an API key on the OVHcloud [AI Endpoints
|
||||
website](https://endpoints.ai.cloud.ovh.net/). For more information, including
|
||||
pricing, visit the OVHcloud [AI Endpoints product
|
||||
page](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/).
|
||||
</Info>
|
||||
|
||||
## Chat model
|
||||
|
||||
We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model.
|
||||
Check our [catalog](https://endpoints.ai.cloud.ovh.net/catalog) to see all of our models hsoted on AI Endpoints.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Qwen2.5-Coder-32B-Instruct
|
||||
|
|
@ -25,8 +29,8 @@ Check our [catalog](https://endpoints.ai.cloud.ovh.net/catalog) to see all of ou
|
|||
model: qwen2.5-coder-32b
|
||||
apiKey: <YOUR_AIENDPOINTS_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -39,15 +43,15 @@ Check our [catalog](https://endpoints.ai.cloud.ovh.net/catalog) to see all of ou
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Embeddings model
|
||||
|
||||
We recommend configuring **bge-multilingual-gemma2** as your embeddings model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: BGE Multilingual Gemma2
|
||||
|
|
@ -57,8 +61,8 @@ We recommend configuring **bge-multilingual-gemma2** as your embeddings model.
|
|||
roles:
|
||||
- embed
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
|
|
@ -68,5 +72,5 @@ We recommend configuring **bge-multilingual-gemma2** as your embeddings model.
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
# Relace
|
||||
---
|
||||
title: "Relace"
|
||||
---
|
||||
|
||||
Relace provides a fast apply model through their API that helps you reliably and almost instantly apply chat suggestions to your codebase. You can sign up and obtain an API key [here](https://app.relace.ai/settings/api-keys). Then, change your configuration file to look like this:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="Package or config.yaml"
|
||||
models:
|
||||
- name: Relace Fast Apply
|
||||
|
|
@ -18,8 +17,8 @@ Relace provides a fast apply model through their API that helps you reliably and
|
|||
promptTemplates:
|
||||
apply: "{{{ new_code }}}"
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -32,7 +31,7 @@ Relace provides a fast apply model through their API that helps you reliably and
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Relace.ts)
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# ReplicateLLM
|
||||
---
|
||||
title: "Replicate"
|
||||
---
|
||||
|
||||
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:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Replicate CodeLLama
|
||||
|
|
@ -14,8 +13,8 @@ Replicate is a great option for newly released language models or models that yo
|
|||
model: codellama-13b
|
||||
apiKey: <YOUR_REPLICATE_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -28,7 +27,7 @@ Replicate is a great option for newly released language models or models that yo
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
If you don't specify the `model` parameter, it will default to `replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781`.
|
||||
|
|
@ -1,14 +1,13 @@
|
|||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
# AWS SageMaker
|
||||
---
|
||||
title: "Amazon SageMaker"
|
||||
---
|
||||
|
||||
SageMaker can be used for both chat and embedding models. Chat models are supported for endpoints deployed with [LMI](https://docs.djl.ai/docs/serving/serving/docs/lmi/index.html), and embedding models are supported for endpoints deployed with [HuggingFace TEI](https://huggingface.co/blog/sagemaker-huggingface-embedding)
|
||||
|
||||
Here is an example Sagemaker configuration setup:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: deepseek-6.7b-instruct
|
||||
|
|
@ -23,8 +22,8 @@ Here is an example Sagemaker configuration setup:
|
|||
roles:
|
||||
- embed
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -41,7 +40,7 @@ Here is an example Sagemaker configuration setup:
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
The value in model should be the SageMaker endpoint name you deployed.
|
||||
|
|
@ -1,23 +1,27 @@
|
|||
---
|
||||
title: Scaleway
|
||||
title: "Scaleway"
|
||||
---
|
||||
|
||||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
---
|
||||
|
||||
:::info
|
||||
Scaleway Generative APIs give you instant access to leading AI models hosted in European data centers, ideal for developers requiring low latency, full data privacy, and compliance with EU AI Act.
|
||||
You can generate your API key in [Scaleway's console](https://console.scaleway.com/generative-api/models).
|
||||
Read the [quickstart documentation here](https://www.scaleway.com/en/docs/ai-data/generative-apis/quickstart/).
|
||||
:::
|
||||
## title: Scaleway
|
||||
|
||||
<Info>
|
||||
Scaleway Generative APIs give you instant access to leading AI models hosted
|
||||
in European data centers, ideal for developers requiring low latency, full
|
||||
data privacy, and compliance with EU AI Act. You can generate your API key in
|
||||
[Scaleway's console](https://console.scaleway.com/generative-api/models). Read
|
||||
the [quickstart documentation
|
||||
here](https://www.scaleway.com/en/docs/ai-data/generative-apis/quickstart/).
|
||||
</Info>
|
||||
|
||||
## Chat model
|
||||
|
||||
We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model.
|
||||
[Click here](https://www.scaleway.com/en/docs/ai-data/generative-apis/reference-content/supported-models/) to see the list of available chat models.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Qwen2.5-Coder-32B-Instruct
|
||||
|
|
@ -25,8 +29,8 @@ We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model.
|
|||
model: qwen2.5-coder-32b-instruct
|
||||
apiKey: <YOUR_SCALEWAY_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -39,7 +43,7 @@ We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model.
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Autocomplete model
|
||||
|
|
@ -52,8 +56,8 @@ Scaleway currently does not offer any autocomplete models.
|
|||
|
||||
We recommend configuring **BGE-Multilingual-Gemma2** as your embeddings model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: BGE Multilingual Gemma2
|
||||
|
|
@ -63,8 +67,8 @@ We recommend configuring **BGE-Multilingual-Gemma2** as your embeddings model.
|
|||
roles:
|
||||
- embed
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
|
|
@ -74,5 +78,5 @@ We recommend configuring **BGE-Multilingual-Gemma2** as your embeddings model.
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
|
@ -1,20 +1,22 @@
|
|||
---
|
||||
title: SiliconFlow
|
||||
title: "SiliconFlow"
|
||||
---
|
||||
|
||||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
---
|
||||
|
||||
:::info
|
||||
You can get an API key from the [Silicon Cloud](https://cloud.siliconflow.cn/account/ak).
|
||||
:::
|
||||
## title: SiliconFlow
|
||||
|
||||
<Info>
|
||||
You can get an API key from the [Silicon
|
||||
Cloud](https://cloud.siliconflow.cn/account/ak).
|
||||
</Info>
|
||||
|
||||
## Chat model
|
||||
|
||||
We recommend configuring **Qwen/Qwen2.5-Coder-32B-Instruct** as your chat model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Qwen
|
||||
|
|
@ -24,8 +26,8 @@ We recommend configuring **Qwen/Qwen2.5-Coder-32B-Instruct** as your chat model.
|
|||
roles:
|
||||
- chat
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -38,15 +40,15 @@ We recommend configuring **Qwen/Qwen2.5-Coder-32B-Instruct** as your chat model.
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Autocomplete model
|
||||
|
||||
We recommend configuring **Qwen/Qwen2.5-Coder-7B-Instruct** as your autocomplete model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Qwen
|
||||
|
|
@ -56,8 +58,8 @@ We recommend configuring **Qwen/Qwen2.5-Coder-7B-Instruct** as your autocomplete
|
|||
roles:
|
||||
- autocomplete
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -76,7 +78,7 @@ We recommend configuring **Qwen/Qwen2.5-Coder-7B-Instruct** as your autocomplete
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Embeddings model
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# TextGenWebUI
|
||||
---
|
||||
title: "Text Generation WebUI"
|
||||
---
|
||||
|
||||
TextGenWebUI is a comprehensive, open-source language model UI and local server. You can set it up with an OpenAI-compatible server plugin, and then configure it like this:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Text Generation WebUI
|
||||
|
|
@ -14,8 +13,8 @@ TextGenWebUI is a comprehensive, open-source language model UI and local server.
|
|||
apiBase: http://localhost:5000/v1
|
||||
model: MODEL_NAME
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -28,5 +27,5 @@ TextGenWebUI is a comprehensive, open-source language model UI and local server.
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# Together
|
||||
---
|
||||
title: "Together AI"
|
||||
---
|
||||
|
||||
The Together API is a cloud platform for running large AI models. You can sign up [here](https://api.together.xyz/signup), copy your API key on the initial welcome screen, and then hit the play button on any model from the [Together Models list](https://docs.together.ai/docs/serverless-models). Change `~/.continue/config.json` to look like this:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Together Qwen2.5 Coder
|
||||
|
|
@ -14,8 +13,8 @@ The Together API is a cloud platform for running large AI models. You can sign u
|
|||
model: Qwen/Qwen2.5-Coder-32B-Instruct
|
||||
apiKey: <YOUR_TOGETHER_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -28,7 +27,7 @@ The Together API is a cloud platform for running large AI models. You can sign u
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Together.ts)
|
||||
|
|
@ -1,4 +1,10 @@
|
|||
# Venice
|
||||
---
|
||||
title: "Venice AI"
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
## title: "Venice AI"
|
||||
|
||||
Venice.AI is a privacy focused generative AI platform, allowing users to interact with open-source LLMs without storing any private user data. To get started with Venice's API, either purchase a pro account, stake $VVV to obtain daily inference allotments or fund your account with USD and head over to https://venice.ai/settings/api. Venice hosts state of the art open-source AI models and supports the OpenAI API standard, allowing users to easily interact with the platform. Learn more about the Venice API at https://venice.ai/api.
|
||||
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# vLLM
|
||||
---
|
||||
title: "vLLM"
|
||||
---
|
||||
|
||||
vLLM is an open-source library for fast LLM inference which typically is used to serve multiple users at the same time. It can also be used to run a large model on multiple GPU:s (e.g. when it doesn´t fit in a single GPU). Run their OpenAI-compatible server using `vllm serve`. See their [server documentation](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html) and the [engine arguments documentation](https://docs.vllm.ai/en/latest/usage/engine_args.html).
|
||||
|
||||
|
|
@ -13,8 +12,8 @@ vllm serve meta-llama/Meta-Llama-3.1-8B-Instruct
|
|||
|
||||
We recommend configuring **Llama3.1 8B** as your chat model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Llama3.1 8B Instruct
|
||||
|
|
@ -22,8 +21,8 @@ We recommend configuring **Llama3.1 8B** as your chat model.
|
|||
model: meta-llama/Meta-Llama-3.1-8B-Instruct
|
||||
apiBase: http://<vllm chat endpoint>/v1
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -36,15 +35,15 @@ We recommend configuring **Llama3.1 8B** as your chat model.
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Autocomplete model
|
||||
|
||||
We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Qwen2.5-Coder 1.5B
|
||||
|
|
@ -54,8 +53,8 @@ We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model.
|
|||
roles:
|
||||
- autocomplete
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"tabAutocompleteModel": {
|
||||
|
|
@ -66,15 +65,15 @@ We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model.
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Embeddings model
|
||||
|
||||
We recommend configuring **Nomic Embed Text** as your embeddings model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: VLLM Nomad Embed Text
|
||||
|
|
@ -84,8 +83,8 @@ We recommend configuring **Nomic Embed Text** as your embeddings model.
|
|||
roles:
|
||||
- embed
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
|
|
@ -95,7 +94,7 @@ We recommend configuring **Nomic Embed Text** as your embeddings model.
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Reranking model
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
# IBM watsonx
|
||||
---
|
||||
title: "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.
|
||||
|
||||
|
|
@ -43,8 +42,8 @@ To authenticate to your watsonx.ai Software instance with Continue, you can use
|
|||
|
||||
Add the following configuration:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: watsonx - Model Name
|
||||
|
|
@ -56,8 +55,8 @@ Add the following configuration:
|
|||
projectId: PROJECT_ID
|
||||
apiVersion: 2024-03-14
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -73,15 +72,15 @@ Add the following configuration:
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
`apiVersion` is optional and defaults to the latest version.
|
||||
|
||||
If you are using a custom deployment endpoint, set `deploymentID` to the model's deployment ID. You can find it in the watsonx.ai Prompt Lab UI by selecting the corresponding model and opening the `</>` tab on the right, which will display the endpoint's URL containing the deployment ID.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: watsonx - Model Name
|
||||
|
|
@ -93,8 +92,8 @@ If you are using a custom deployment endpoint, set `deploymentID` to the model's
|
|||
apiVersion: 2024-03-14
|
||||
deploymentId: DEPLOYMENT_ID
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -110,7 +109,7 @@ If you are using a custom deployment endpoint, set `deploymentID` to the model's
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
### Configuration Options
|
||||
|
|
@ -118,8 +117,8 @@ If you are using a custom deployment endpoint, set `deploymentID` to the model's
|
|||
Make sure to specify a template name, such as `granite` or `llama3`, and to set the `contextLength` to the model's context window size.
|
||||
You can also configure generation parameters, such as temperature, topP, topK, frequency penalty, and stop sequences:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Granite Code 20b
|
||||
|
|
@ -143,8 +142,8 @@ You can also configure generation parameters, such as temperature, topP, topK, f
|
|||
apiVersion: 2024-03-14
|
||||
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -170,15 +169,15 @@ You can also configure generation parameters, such as temperature, topP, topK, f
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Tab Auto Complete Model
|
||||
|
||||
Granite models are recommended for tab auto complete. The configuration is similar to that of the chat models:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Granite Code 8b
|
||||
|
|
@ -191,8 +190,8 @@ Granite models are recommended for tab auto complete. The configuration is simil
|
|||
roles:
|
||||
- autocomplete
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"tabAutocompleteModel": {
|
||||
|
|
@ -207,15 +206,15 @@ Granite models are recommended for tab auto complete. The configuration is simil
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Embeddings Model
|
||||
|
||||
To view the list of available embeddings models, visit [this page](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/fm-models-embed.html?context=wx&pos=2#ibm-provided).
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Watsonx Embedder
|
||||
|
|
@ -228,8 +227,8 @@ To view the list of available embeddings models, visit [this page](https://datap
|
|||
roles:
|
||||
- embed
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"embeddingsProvider": {
|
||||
|
|
@ -242,13 +241,13 @@ To view the list of available embeddings models, visit [this page](https://datap
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Reranker
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Watsonx Reranker
|
||||
|
|
@ -259,8 +258,8 @@ To view the list of available embeddings models, visit [this page](https://datap
|
|||
apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD
|
||||
apiVersion: 2024-03-14
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"reranker": {
|
||||
|
|
@ -275,5 +274,5 @@ To view the list of available embeddings models, visit [this page](https://datap
|
|||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
|
@ -3,19 +3,17 @@ title: Anthropic
|
|||
slug: ../anthropic
|
||||
---
|
||||
|
||||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
:::info
|
||||
You can get an API key from the [Anthropic console](https://console.anthropic.com/account/keys).
|
||||
:::
|
||||
<Info>
|
||||
You can get an API key from the [Anthropic
|
||||
console](https://console.anthropic.com/account/keys).
|
||||
</Info>
|
||||
|
||||
## Chat model
|
||||
|
||||
We recommend configuring **Claude 4 Sonnet** as your chat model.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Claude 4 Sonnet
|
||||
|
|
@ -23,8 +21,8 @@ We recommend configuring **Claude 4 Sonnet** as your chat model.
|
|||
model: claude-sonnet-4-20250514
|
||||
apiKey: <YOUR_ANTHROPIC_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -37,7 +35,7 @@ We recommend configuring **Claude 4 Sonnet** as your chat model.
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Autocomplete model
|
||||
|
|
@ -71,8 +69,8 @@ Prompt caching is generally available for:
|
|||
|
||||
To enable caching of the system message and the turn-by-turn conversation, update your model configuration as follows:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
<Tabs>
|
||||
<Tab title="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
- name: Anthropic
|
||||
|
|
@ -84,8 +82,8 @@ To enable caching of the system message and the turn-by-turn conversation, updat
|
|||
defaultCompletionOptions:
|
||||
promptCaching: true
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
</Tab>
|
||||
<Tab title="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
|
|
@ -105,5 +103,5 @@ To enable caching of the system message and the turn-by-turn conversation, updat
|
|||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue