✨ add Cohere as Model Provider (#1119)
This commit is contained in:
parent
94b4460361
commit
e86854bc5f
13 changed files with 286 additions and 5 deletions
4
core/index.d.ts
vendored
4
core/index.d.ts
vendored
|
|
@ -495,6 +495,7 @@ type ModelProvider =
|
|||
| "openai"
|
||||
| "free-trial"
|
||||
| "anthropic"
|
||||
| "cohere"
|
||||
| "together"
|
||||
| "ollama"
|
||||
| "huggingface-tgi"
|
||||
|
|
@ -548,6 +549,9 @@ export type ModelName =
|
|||
| "claude-3-sonnet-20240229"
|
||||
| "claude-3-haiku-20240307"
|
||||
| "claude-2.1"
|
||||
// Cohere
|
||||
|"command-r"
|
||||
|"command-r-plus"
|
||||
// Gemini
|
||||
| "gemini-pro"
|
||||
| "gemini-1.5-pro-latest"
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ function autodetectTemplateType(model: string): TemplateType | undefined {
|
|||
|
||||
if (
|
||||
lower.includes("gpt") ||
|
||||
lower.includes("command") ||
|
||||
lower.includes("chat-bison") ||
|
||||
lower.includes("pplx") ||
|
||||
lower.includes("gemini")
|
||||
|
|
|
|||
92
core/llm/llms/Cohere.ts
Normal file
92
core/llm/llms/Cohere.ts
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
import { BaseLLM } from "..";
|
||||
import {
|
||||
ChatMessage,
|
||||
CompletionOptions,
|
||||
LLMOptions,
|
||||
ModelProvider,
|
||||
} from "../..";
|
||||
import { stripImages } from "../countTokens";
|
||||
import { streamJSON } from "../stream";
|
||||
|
||||
class Cohere extends BaseLLM {
|
||||
static providerName: ModelProvider = "cohere";
|
||||
static defaultOptions: Partial<LLMOptions> = {
|
||||
apiBase: "https://api.cohere.ai/v1",
|
||||
};
|
||||
static maxStopSequences = 5;
|
||||
|
||||
private _convertMessages(msgs: ChatMessage[]): any[] {
|
||||
const messages = [];
|
||||
for (const m of msgs) {
|
||||
if (m.role === "system" || !m.content) {
|
||||
continue;
|
||||
}
|
||||
messages.push({
|
||||
role: m.role === "assistant" ? "chatbot" : m.role,
|
||||
message: m.content,
|
||||
});
|
||||
}
|
||||
return messages;
|
||||
}
|
||||
|
||||
private _convertArgs(options: CompletionOptions) {
|
||||
return {
|
||||
model: options.model,
|
||||
stream: options.stream ?? true,
|
||||
temperature: options.temperature,
|
||||
max_tokens: options.maxTokens,
|
||||
k: options.topK,
|
||||
p: options.topP,
|
||||
stop_sequences: options.stop?.slice(0, Cohere.maxStopSequences),
|
||||
frequency_penalty: options.frequencyPenalty,
|
||||
presence_penalty: options.presencePenalty,
|
||||
raw_prompting: options.raw,
|
||||
};
|
||||
}
|
||||
|
||||
protected async *_streamComplete(
|
||||
prompt: string,
|
||||
options: CompletionOptions,
|
||||
): AsyncGenerator<string> {
|
||||
const messages = [{ role: "user" as const, content: prompt }];
|
||||
for await (const update of this._streamChat(messages, options)) {
|
||||
yield stripImages(update.content);
|
||||
}
|
||||
}
|
||||
|
||||
protected async *_streamChat(
|
||||
messages: ChatMessage[],
|
||||
options: CompletionOptions,
|
||||
): AsyncGenerator<ChatMessage> {
|
||||
const headers = {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${this.apiKey}`,
|
||||
...this.requestOptions?.headers,
|
||||
};
|
||||
|
||||
const resp = await this.fetch(new URL("chat", this.apiBase), {
|
||||
method: "POST",
|
||||
headers,
|
||||
body: JSON.stringify({
|
||||
...this._convertArgs(options),
|
||||
message: messages.pop()?.content,
|
||||
chat_history: this._convertMessages(messages),
|
||||
preamble: this.systemMessage,
|
||||
}),
|
||||
});
|
||||
|
||||
if (options.stream === false) {
|
||||
const data = await resp.json();
|
||||
yield { role: "assistant", content: data.text };
|
||||
return;
|
||||
}
|
||||
|
||||
for await (const value of streamJSON(resp)) {
|
||||
if (value.event_type === "text-generation") {
|
||||
yield { role: "assistant", content: value.text };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default Cohere;
|
||||
|
|
@ -8,6 +8,7 @@ import {
|
|||
} from "../..";
|
||||
import { DEFAULT_MAX_TOKENS } from "../constants";
|
||||
import Anthropic from "./Anthropic";
|
||||
import Cohere from "./Cohere";
|
||||
import Bedrock from "./Bedrock";
|
||||
import DeepInfra from "./DeepInfra";
|
||||
import Flowise from "./Flowise";
|
||||
|
|
@ -76,6 +77,7 @@ export async function renderTemplatedString(
|
|||
|
||||
const LLMs = [
|
||||
Anthropic,
|
||||
Cohere,
|
||||
FreeTrial,
|
||||
Gemini,
|
||||
Llamafile,
|
||||
|
|
|
|||
|
|
@ -73,3 +73,18 @@ export async function* streamSse(response: Response): AsyncGenerator<any> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function* streamJSON(response: Response): AsyncGenerator<any> {
|
||||
let buffer = "";
|
||||
for await (const value of streamResponse(response)) {
|
||||
buffer += value;
|
||||
|
||||
let position;
|
||||
while ((position = buffer.indexOf("\n")) >= 0) {
|
||||
const line = buffer.slice(0, position);
|
||||
const data = JSON.parse(line);
|
||||
yield data;
|
||||
buffer = buffer.slice(position + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
20
docs/docs/reference/Model Providers/cohere.md
Normal file
20
docs/docs/reference/Model Providers/cohere.md
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Cohere
|
||||
|
||||
To setup Cohere, add the following to your `config.json` file:
|
||||
|
||||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"title": "Cohere",
|
||||
"provider": "cohere",
|
||||
"model": "command-r-plus",
|
||||
"apiKey": "YOUR_API_KEY"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Visit the [Cohere dashboard](https://dashboard.cohere.com/api-keys) to create an API key.
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Cohere.ts)
|
||||
24
docs/static/schemas/config.json
vendored
24
docs/static/schemas/config.json
vendored
|
|
@ -134,6 +134,7 @@
|
|||
"openai",
|
||||
"free-trial",
|
||||
"anthropic",
|
||||
"cohere",
|
||||
"bedrock",
|
||||
"together",
|
||||
"ollama",
|
||||
|
|
@ -153,6 +154,7 @@
|
|||
"### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/openai)",
|
||||
"### Free Trial\nNew users can try out Continue for free using a proxy server that securely makes calls to OpenAI using our API key. If you are ready to use your own API key or have used all 250 free uses, you can enter your API key in config.py where it says `apiKey=\"\"` or select another model provider.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/freetrial)",
|
||||
"### Anthropic\nTo get started with Anthropic models, you first need to sign up for the open beta [here](https://claude.ai/login) to obtain an API key.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/anthropicllm)",
|
||||
"### Cohere\nTo use Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/api-keys) to create an API key.\n\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/cohere)",
|
||||
"### Bedrock\nTo get started with Bedrock you need to sign up on AWS [here](https://aws.amazon.com/bedrock/claude/)",
|
||||
"### Together\nTogether is a hosted service that provides extremely fast streaming of open-source language models. To get started with Together:\n1. Obtain an API key from [here](https://together.ai)\n2. Paste below\n3. Select a model preset\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/togetherllm)",
|
||||
"### Ollama\nTo get started with Ollama, follow these steps:\n1. Download from [ollama.ai](https://ollama.ai/) and open the application\n2. Open a terminal and run `ollama run <MODEL_NAME>`. Example model names are `codellama:7b-instruct` or `llama2:7b-text`. You can find the full list [here](https://ollama.ai/library).\n3. Make sure that the model name used in step 2 is the same as the one in config.py (e.g. `model=\"codellama:7b-instruct\"`)\n4. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/ollama)",
|
||||
|
|
@ -175,7 +177,7 @@
|
|||
},
|
||||
"apiKey": {
|
||||
"title": "Api Key",
|
||||
"description": "OpenAI, Anthropic, Together, or other API key",
|
||||
"description": "OpenAI, Anthropic, Cohere, Together, or other API key",
|
||||
"type": "string"
|
||||
},
|
||||
"apiBase": {
|
||||
|
|
@ -303,6 +305,7 @@
|
|||
"enum": [
|
||||
"openai",
|
||||
"anthropic",
|
||||
"cohere",
|
||||
"gemini",
|
||||
"huggingface-inference-api",
|
||||
"replicate",
|
||||
|
|
@ -540,6 +543,23 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"provider": {
|
||||
"enum": ["cohere"]
|
||||
}
|
||||
},
|
||||
"required": ["provider"]
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"model": {
|
||||
"enum": ["command-r", "command-r-plus"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
|
|
@ -930,6 +950,8 @@
|
|||
"claude-3-sonnet-20240229",
|
||||
"claude-3-haiku-20240307",
|
||||
"claude-2.1",
|
||||
"command-r",
|
||||
"command-r-plus",
|
||||
"chat-bison-001",
|
||||
"gemini-pro",
|
||||
"gemini-1.5-pro-latest",
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@
|
|||
"openai",
|
||||
"free-trial",
|
||||
"anthropic",
|
||||
"cohere",
|
||||
"bedrock",
|
||||
"together",
|
||||
"ollama",
|
||||
|
|
@ -153,6 +154,7 @@
|
|||
"### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/openai)",
|
||||
"### Free Trial\nNew users can try out Continue for free using a proxy server that securely makes calls to OpenAI using our API key. If you are ready to use your own API key or have used all 250 free uses, you can enter your API key in config.py where it says `apiKey=\"\"` or select another model provider.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/freetrial)",
|
||||
"### Anthropic\nTo get started with Anthropic models, you first need to sign up for the open beta [here](https://claude.ai/login) to obtain an API key.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/anthropicllm)",
|
||||
"### Cohere\nTo use Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/api-keys) to create an API key.\n\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/cohere)",
|
||||
"### Bedrock\nTo get started with Bedrock you need to sign up on AWS [here](https://aws.amazon.com/bedrock/claude/)",
|
||||
"### Together\nTogether is a hosted service that provides extremely fast streaming of open-source language models. To get started with Together:\n1. Obtain an API key from [here](https://together.ai)\n2. Paste below\n3. Select a model preset\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/togetherllm)",
|
||||
"### Ollama\nTo get started with Ollama, follow these steps:\n1. Download from [ollama.ai](https://ollama.ai/) and open the application\n2. Open a terminal and run `ollama run <MODEL_NAME>`. Example model names are `codellama:7b-instruct` or `llama2:7b-text`. You can find the full list [here](https://ollama.ai/library).\n3. Make sure that the model name used in step 2 is the same as the one in config.py (e.g. `model=\"codellama:7b-instruct\"`)\n4. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/ollama)",
|
||||
|
|
@ -175,7 +177,7 @@
|
|||
},
|
||||
"apiKey": {
|
||||
"title": "Api Key",
|
||||
"description": "OpenAI, Anthropic, Together, or other API key",
|
||||
"description": "OpenAI, Anthropic, Cohere, Together, or other API key",
|
||||
"type": "string"
|
||||
},
|
||||
"apiBase": {
|
||||
|
|
@ -303,6 +305,7 @@
|
|||
"enum": [
|
||||
"openai",
|
||||
"anthropic",
|
||||
"cohere",
|
||||
"gemini",
|
||||
"huggingface-inference-api",
|
||||
"replicate",
|
||||
|
|
@ -540,6 +543,23 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"provider": {
|
||||
"enum": ["cohere"]
|
||||
}
|
||||
},
|
||||
"required": ["provider"]
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"model": {
|
||||
"enum": ["command-r", "command-r-plus"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
|
|
@ -930,6 +950,8 @@
|
|||
"claude-3-sonnet-20240229",
|
||||
"claude-3-haiku-20240307",
|
||||
"claude-2.1",
|
||||
"command-r",
|
||||
"command-r-plus",
|
||||
"chat-bison-001",
|
||||
"gemini-pro",
|
||||
"gemini-1.5-pro-latest",
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@
|
|||
"openai",
|
||||
"free-trial",
|
||||
"anthropic",
|
||||
"cohere",
|
||||
"bedrock",
|
||||
"together",
|
||||
"ollama",
|
||||
|
|
@ -153,6 +154,7 @@
|
|||
"### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/openai)",
|
||||
"### Free Trial\nNew users can try out Continue for free using a proxy server that securely makes calls to OpenAI using our API key. If you are ready to use your own API key or have used all 250 free uses, you can enter your API key in config.py where it says `apiKey=\"\"` or select another model provider.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/freetrial)",
|
||||
"### Anthropic\nTo get started with Anthropic models, you first need to sign up for the open beta [here](https://claude.ai/login) to obtain an API key.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/anthropicllm)",
|
||||
"### Cohere\nTo use Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/api-keys) to create an API key.\n\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/cohere)",
|
||||
"### Bedrock\nTo get started with Bedrock you need to sign up on AWS [here](https://aws.amazon.com/bedrock/claude/)",
|
||||
"### Together\nTogether is a hosted service that provides extremely fast streaming of open-source language models. To get started with Together:\n1. Obtain an API key from [here](https://together.ai)\n2. Paste below\n3. Select a model preset\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/togetherllm)",
|
||||
"### Ollama\nTo get started with Ollama, follow these steps:\n1. Download from [ollama.ai](https://ollama.ai/) and open the application\n2. Open a terminal and run `ollama run <MODEL_NAME>`. Example model names are `codellama:7b-instruct` or `llama2:7b-text`. You can find the full list [here](https://ollama.ai/library).\n3. Make sure that the model name used in step 2 is the same as the one in config.py (e.g. `model=\"codellama:7b-instruct\"`)\n4. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/ollama)",
|
||||
|
|
@ -175,7 +177,7 @@
|
|||
},
|
||||
"apiKey": {
|
||||
"title": "Api Key",
|
||||
"description": "OpenAI, Anthropic, Together, or other API key",
|
||||
"description": "OpenAI, Anthropic, Cohere, Together, or other API key",
|
||||
"type": "string"
|
||||
},
|
||||
"apiBase": {
|
||||
|
|
@ -303,6 +305,7 @@
|
|||
"enum": [
|
||||
"openai",
|
||||
"anthropic",
|
||||
"cohere",
|
||||
"gemini",
|
||||
"huggingface-inference-api",
|
||||
"replicate",
|
||||
|
|
@ -540,6 +543,23 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"provider": {
|
||||
"enum": ["cohere"]
|
||||
}
|
||||
},
|
||||
"required": ["provider"]
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"model": {
|
||||
"enum": ["command-r", "command-r-plus"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
|
|
@ -930,6 +950,8 @@
|
|||
"claude-3-sonnet-20240229",
|
||||
"claude-3-haiku-20240307",
|
||||
"claude-2.1",
|
||||
"command-r",
|
||||
"command-r-plus",
|
||||
"chat-bison-001",
|
||||
"gemini-pro",
|
||||
"gemini-1.5-pro-latest",
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@
|
|||
"openai",
|
||||
"free-trial",
|
||||
"anthropic",
|
||||
"cohere",
|
||||
"bedrock",
|
||||
"together",
|
||||
"ollama",
|
||||
|
|
@ -153,6 +154,7 @@
|
|||
"### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/openai)",
|
||||
"### Free Trial\nNew users can try out Continue for free using a proxy server that securely makes calls to OpenAI using our API key. If you are ready to use your own API key or have used all 250 free uses, you can enter your API key in config.py where it says `apiKey=\"\"` or select another model provider.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/freetrial)",
|
||||
"### Anthropic\nTo get started with Anthropic models, you first need to sign up for the open beta [here](https://claude.ai/login) to obtain an API key.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/anthropicllm)",
|
||||
"### Cohere\nTo use Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/api-keys) to create an API key.\n\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/cohere)",
|
||||
"### Bedrock\nTo get started with Bedrock you need to sign up on AWS [here](https://aws.amazon.com/bedrock/claude/)",
|
||||
"### Together\nTogether is a hosted service that provides extremely fast streaming of open-source language models. To get started with Together:\n1. Obtain an API key from [here](https://together.ai)\n2. Paste below\n3. Select a model preset\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/togetherllm)",
|
||||
"### Ollama\nTo get started with Ollama, follow these steps:\n1. Download from [ollama.ai](https://ollama.ai/) and open the application\n2. Open a terminal and run `ollama run <MODEL_NAME>`. Example model names are `codellama:7b-instruct` or `llama2:7b-text`. You can find the full list [here](https://ollama.ai/library).\n3. Make sure that the model name used in step 2 is the same as the one in config.py (e.g. `model=\"codellama:7b-instruct\"`)\n4. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/ollama)",
|
||||
|
|
@ -175,7 +177,7 @@
|
|||
},
|
||||
"apiKey": {
|
||||
"title": "Api Key",
|
||||
"description": "OpenAI, Anthropic, Together, or other API key",
|
||||
"description": "OpenAI, Anthropic, Cohere, Together, or other API key",
|
||||
"type": "string"
|
||||
},
|
||||
"apiBase": {
|
||||
|
|
@ -312,6 +314,7 @@
|
|||
"enum": [
|
||||
"openai",
|
||||
"anthropic",
|
||||
"cohere",
|
||||
"gemini",
|
||||
"huggingface-inference-api",
|
||||
"replicate",
|
||||
|
|
@ -584,6 +587,30 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"provider": {
|
||||
"enum": [
|
||||
"cohere"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"provider"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"model": {
|
||||
"enum": [
|
||||
"command-r",
|
||||
"command-r-plus"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
|
|
@ -1038,6 +1065,8 @@
|
|||
"claude-3-sonnet-20240229",
|
||||
"claude-3-haiku-20240307",
|
||||
"claude-2.1",
|
||||
"command-r",
|
||||
"command-r-plus",
|
||||
"chat-bison-001",
|
||||
"gemini-pro",
|
||||
"gemini-1.5-pro-latest",
|
||||
|
|
|
|||
BIN
gui/public/logos/cohere.png
Normal file
BIN
gui/public/logos/cohere.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
|
|
@ -502,6 +502,34 @@ const neuralChat: ModelPackage = {
|
|||
providerOptions: ["ollama", "lmstudio", "llamacpp", "replicate"],
|
||||
};
|
||||
|
||||
const commandR: ModelPackage = {
|
||||
title: "Command R",
|
||||
description:
|
||||
"Command R is a scalable generative model targeting RAG and Tool Use to enable production-scale AI for enterprise.",
|
||||
params: {
|
||||
model: "command-r",
|
||||
contextLength: 128_000,
|
||||
title: "Command R",
|
||||
apiKey: "",
|
||||
},
|
||||
providerOptions: ["cohere"],
|
||||
icon: "cohere.png",
|
||||
};
|
||||
|
||||
const commandRPlus: ModelPackage = {
|
||||
title: "Command R+",
|
||||
description:
|
||||
"Command R+ is a state-of-the-art RAG-optimized model designed to tackle enterprise-grade workloads",
|
||||
params: {
|
||||
model: "command-r-plus",
|
||||
contextLength: 128_000,
|
||||
title: "Command R+",
|
||||
apiKey: "",
|
||||
},
|
||||
providerOptions: ["cohere"],
|
||||
icon: "cohere.png",
|
||||
};
|
||||
|
||||
const osModels = [
|
||||
deepseek,
|
||||
wizardCoder,
|
||||
|
|
@ -623,6 +651,8 @@ export const MODEL_INFO: ModelPackage[] = [
|
|||
claude3Opus,
|
||||
claude3Sonnet,
|
||||
claude3Haiku,
|
||||
commandR,
|
||||
commandRPlus,
|
||||
gemini15Pro,
|
||||
geminiPro,
|
||||
claude2,
|
||||
|
|
@ -695,6 +725,28 @@ export const PROVIDER_INFO: { [key: string]: ModelInfo } = {
|
|||
],
|
||||
packages: [claude3Opus, claude3Sonnet, claude3Haiku, claude2],
|
||||
},
|
||||
cohere: {
|
||||
title: "Cohere",
|
||||
provider: "cohere",
|
||||
refPage: "cohere",
|
||||
description:
|
||||
"Optimized for enterprise generative AI, search and discovery, and advanced retrieval.",
|
||||
icon: "cohere.png",
|
||||
tags: [ModelProviderTag["Requires API Key"]],
|
||||
longDescription:
|
||||
"To use Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/api-keys) to create an API key.",
|
||||
collectInputFor: [
|
||||
{
|
||||
inputType: CollectInputType.text,
|
||||
key: "apiKey",
|
||||
label: "API Key",
|
||||
placeholder: "Enter your Cohere API key",
|
||||
required: true,
|
||||
},
|
||||
...completionParamsInputs,
|
||||
],
|
||||
packages: [commandR, commandRPlus],
|
||||
},
|
||||
ollama: {
|
||||
title: "Ollama",
|
||||
provider: "ollama",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# This is used in a task in .vscode/tasks.json
|
||||
# Start developing with:
|
||||
# - Run Task -> Install Dependencies
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue