configured nCompass as an LLM provider
This commit is contained in:
parent
04cc2ccc2d
commit
ebf79a0236
4 changed files with 78 additions and 1 deletions
21
core/llm/llms/NCompass.ts
Normal file
21
core/llm/llms/NCompass.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { LLMOptions } from "../../index.js";
|
||||
|
||||
import OpenAI from "./OpenAI.js";
|
||||
|
||||
class NCompass extends OpenAI {
|
||||
static providerName = "ncompass";
|
||||
static defaultOptions: Partial<LLMOptions> = {
|
||||
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;
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
34
docs/docs/customize/model-providers/more/ncompass.mdx
Normal file
34
docs/docs/customize/model-providers/more/ncompass.mdx
Normal file
|
|
@ -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:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<TabItem value="yaml" label="YAML">
|
||||
```yaml title="Package or config.yaml"
|
||||
models:
|
||||
- name: Ncompass Qwen2.5 Coder
|
||||
provider: ncompass
|
||||
model: Qwen/Qwen2.5-Coder-32B-Instruct
|
||||
apiKey: <YOUR_NCOMPASS_API_KEY>
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
```json title="config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"title": "Ncompass Qwen2.5 Coder",
|
||||
"provider": "ncompass",
|
||||
"model": "Qwen/Qwen2.5-Coder-32B-Instruct",
|
||||
"apiKey": "<YOUR_NCOMPASS_API_KEY>"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/NCompass.ts)
|
||||
|
|
@ -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": {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue