diff --git a/core/llm/llms/NCompass.ts b/core/llm/llms/NCompass.ts new file mode 100644 index 000000000..fbae847a8 --- /dev/null +++ b/core/llm/llms/NCompass.ts @@ -0,0 +1,21 @@ +import { LLMOptions } from "../../index.js"; + +import OpenAI from "./OpenAI.js"; + +class NCompass extends OpenAI { + static providerName = "ncompass"; + static defaultOptions: Partial = { + apiBase: "https://api.ncompass.tech/v1", + }; + + private static modelConversion: { [key: string]: string } = { + "qwen2.5-coder-32b": "Qwen/Qwen2.5-Coder-32B-Instruct", + "qwen2.5-72b": "Qwen/Qwen2.5-72B-Instruct", + "llama3.3-70b": "meta-llama/Meta-Llama-3.3-70B-Instruct", + }; + protected _convertModelName(model: string): string { + return NCompass.modelConversion[model] ?? model; + } +} + +export default NCompass; diff --git a/core/llm/llms/index.ts b/core/llm/llms/index.ts index 20bc8b710..32cda4aec 100644 --- a/core/llm/llms/index.ts +++ b/core/llm/llms/index.ts @@ -19,6 +19,7 @@ import Cohere from "./Cohere"; import DeepInfra from "./DeepInfra"; import Deepseek from "./Deepseek"; import Fireworks from "./Fireworks"; +import NCompass from "./NCompass"; import Flowise from "./Flowise"; import FreeTrial from "./FreeTrial"; import FunctionNetwork from "./FunctionNetwork"; @@ -81,6 +82,7 @@ export const LLMClasses = [ Flowise, Groq, Fireworks, + NCompass, ContinueProxy, Cloudflare, Deepseek, diff --git a/docs/docs/customize/model-providers/more/ncompass.mdx b/docs/docs/customize/model-providers/more/ncompass.mdx new file mode 100644 index 000000000..dda4eeb24 --- /dev/null +++ b/docs/docs/customize/model-providers/more/ncompass.mdx @@ -0,0 +1,34 @@ +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +# nCompass + +The nCompass Technologies API exposes an extremely fast inference engine for open-source language models. You can sign up [here](https://app.ncompass.tech/api-settings), copy your API key on the initial welcome screen, and then hit the play button on any model from the [nCompass Models list](https://docs.ncompass.tech/docs/ncompass_api/models). Change `~/.continue/config.json` to look like this: + + + + ```yaml title="Package or config.yaml" + models: + - name: Ncompass Qwen2.5 Coder + provider: ncompass + model: Qwen/Qwen2.5-Coder-32B-Instruct + apiKey: + ``` + + + ```json title="config.json" + { + "models": [ + { + "title": "Ncompass Qwen2.5 Coder", + "provider": "ncompass", + "model": "Qwen/Qwen2.5-Coder-32B-Instruct", + "apiKey": "" + } + ] + } + ``` + + + +[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/NCompass.ts) diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 259d3e7c8..c91c56e6d 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -193,6 +193,7 @@ "deepinfra", "groq", "fireworks", + "ncompass", "cloudflare", "deepseek", "azure", @@ -238,6 +239,7 @@ "### DeepInfra\n\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/deepinfra)", "### Groq\nGroq provides extremely fast inference of open-source language models. To get started, obtain an API key from [their console](https://console.groq.com/keys).", "### Fireworks\nFireworks is a fast inference engine for open-source language models. To get started, obtain an API key from [their console](https://fireworks.ai/api-keys).", + "### Ncompass\nnCompass is an extremely fast inference engine for open-source language models. To get started, obtain an API key from [their console](https://app.ncompass.tech/api-settings).", "### Cloudflare Workers AI\n\n[Reference](https://developers.cloudflare.com/workers-ai/)", "### Deepseek\n Deepseek's API provides the best pricing for their state-of-the-art Deepseek Coder models. To get started, obtain an API key from [their console](https://platform.deepseek.com/api_keys)", "### Azure OpenAI\n Azure OpenAI lets you securely run OpenAI's models on Azure. To get started, follow the steps [here](https://docs.continue.dev/reference/Model%20Providers/azure)", @@ -264,7 +266,7 @@ }, "apiKey": { "title": "Api Key", - "description": "OpenAI, Anthropic, Cohere, Together, Novita AI, or other API key", + "description": "OpenAI, Anthropic, Cohere, Together, Novita AI, nCompass, or other API key", "type": "string" }, "apiBase": { @@ -481,6 +483,7 @@ "huggingface-inference-api", "replicate", "together", + "ncompass", "novita", "cloudflare", "sambanova", @@ -1369,6 +1372,23 @@ } } }, + { + "if": { + "properties": { + "provider": { + "enum": ["ncompass"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "model": { + "enum": ["qwen2.5-coder-32b", "qwen2.5-72b", "llama3.3-70b"] + } + } + } + }, { "if": { "properties": {