diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index fe2eb6d6a..fe5ab7f55 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -106,6 +106,10 @@ class Ollama extends BaseLLM { "starcoder-3b": "starcoder:3b", "starcoder2-3b": "starcoder2:3b", "stable-code-3b": "stable-code:3b", + "granite-code-3b": "granite-code:3b", + "granite-code-8b": "granite-code:8b", + "granite-code-20b": "granite-code:20b", + "granite-code-34b": "granite-code:34b", }[this.model] ?? this.model ); } diff --git a/docs/static/schemas/config.json b/docs/static/schemas/config.json index 7367e0ce2..107c72be3 100644 --- a/docs/static/schemas/config.json +++ b/docs/static/schemas/config.json @@ -187,7 +187,8 @@ "cloudflare", "deepseek", "azure", - "msty" + "msty", + "watsonx" ], "markdownEnumDescriptions": [ "### 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://docs.continue.dev/reference/Model%20Providers/openai)", @@ -211,7 +212,8 @@ "### 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)", - "### Msty\nMsty is the simplest way to get started with online or local LLMs on all desktop platforms - Windows, Mac, and Linux. No fussing around, one-click and you are up and running. To get started, follow these steps:\n1. Download from [Msty.app](https://msty.app/), open the application, and click 'Setup Local AI'.\n2. Go to the Local AI Module page and download a model of your choice.\n3. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/Msty)" + "### Msty\nMsty is the simplest way to get started with online or local LLMs on all desktop platforms - Windows, Mac, and Linux. No fussing around, one-click and you are up and running. To get started, follow these steps:\n1. Download from [Msty.app](https://msty.app/), open the application, and click 'Setup Local AI'.\n2. Go to the Local AI Module page and download a model of your choice.\n3. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/Msty)", + "### WatsonX\nWatsonx, 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." ], "type": "string" }, @@ -1185,6 +1187,48 @@ } } } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["watsonx"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "watsonxUrl": { + "type": "string" + }, + "watsonxApiKey": { + "type": "string" + }, + "watsonxZenApiKeyBase64": { + "type": "string" + }, + "watsonxUsername": { + "type": "string" + }, + "watsonxPassword": { + "type": "string" + }, + "watsonxProjectId": { + "type": "string" + }, + "model": { + "enum": [ + "ibm/granite-13b-chat-v2", + "ibm/granite-13b-instruct-v2", + "mistralai/mistral-large", + "meta-llama/llama-3-8b-instruct", + "meta-llama/llama-3-70b-instruct" + ] + } + }, + "required": ["watsonxUrl", "watsonxProjectId"] + } } ] }, diff --git a/extensions/intellij/src/main/resources/config_schema.json b/extensions/intellij/src/main/resources/config_schema.json index 7367e0ce2..107c72be3 100644 --- a/extensions/intellij/src/main/resources/config_schema.json +++ b/extensions/intellij/src/main/resources/config_schema.json @@ -187,7 +187,8 @@ "cloudflare", "deepseek", "azure", - "msty" + "msty", + "watsonx" ], "markdownEnumDescriptions": [ "### 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://docs.continue.dev/reference/Model%20Providers/openai)", @@ -211,7 +212,8 @@ "### 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)", - "### Msty\nMsty is the simplest way to get started with online or local LLMs on all desktop platforms - Windows, Mac, and Linux. No fussing around, one-click and you are up and running. To get started, follow these steps:\n1. Download from [Msty.app](https://msty.app/), open the application, and click 'Setup Local AI'.\n2. Go to the Local AI Module page and download a model of your choice.\n3. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/Msty)" + "### Msty\nMsty is the simplest way to get started with online or local LLMs on all desktop platforms - Windows, Mac, and Linux. No fussing around, one-click and you are up and running. To get started, follow these steps:\n1. Download from [Msty.app](https://msty.app/), open the application, and click 'Setup Local AI'.\n2. Go to the Local AI Module page and download a model of your choice.\n3. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/Msty)", + "### WatsonX\nWatsonx, 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." ], "type": "string" }, @@ -1185,6 +1187,48 @@ } } } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["watsonx"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "watsonxUrl": { + "type": "string" + }, + "watsonxApiKey": { + "type": "string" + }, + "watsonxZenApiKeyBase64": { + "type": "string" + }, + "watsonxUsername": { + "type": "string" + }, + "watsonxPassword": { + "type": "string" + }, + "watsonxProjectId": { + "type": "string" + }, + "model": { + "enum": [ + "ibm/granite-13b-chat-v2", + "ibm/granite-13b-instruct-v2", + "mistralai/mistral-large", + "meta-llama/llama-3-8b-instruct", + "meta-llama/llama-3-70b-instruct" + ] + } + }, + "required": ["watsonxUrl", "watsonxProjectId"] + } } ] }, diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index b6be9d37c..2260fa82f 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -190,7 +190,8 @@ "cloudflare", "deepseek", "azure", - "msty" + "msty", + "watsonx" ], "markdownEnumDescriptions": [ "### 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://docs.continue.dev/reference/Model%20Providers/openai)", @@ -214,7 +215,8 @@ "### 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)", - "### Msty\nMsty is the simplest way to get started with online or local LLMs on all desktop platforms - Windows, Mac, and Linux. No fussing around, one-click and you are up and running. To get started, follow these steps:\n1. Download from [Msty.app](https://msty.app/), open the application, and click 'Setup Local AI'.\n2. Go to the Local AI Module page and download a model of your choice.\n3. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/Msty)" + "### Msty\nMsty is the simplest way to get started with online or local LLMs on all desktop platforms - Windows, Mac, and Linux. No fussing around, one-click and you are up and running. To get started, follow these steps:\n1. Download from [Msty.app](https://msty.app/), open the application, and click 'Setup Local AI'.\n2. Go to the Local AI Module page and download a model of your choice.\n3. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/Msty)", + "### WatsonX\nWatsonx, 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." ], "type": "string" }, @@ -1312,6 +1314,55 @@ } } } + }, + { + "if": { + "properties": { + "provider": { + "enum": [ + "watsonx" + ] + } + }, + "required": [ + "provider" + ] + }, + "then": { + "properties": { + "watsonxUrl": { + "type": "string" + }, + "watsonxApiKey": { + "type": "string" + }, + "watsonxZenApiKeyBase64": { + "type": "string" + }, + "watsonxUsername": { + "type": "string" + }, + "watsonxPassword": { + "type": "string" + }, + "watsonxProjectId": { + "type": "string" + }, + "model": { + "enum": [ + "ibm/granite-13b-chat-v2", + "ibm/granite-13b-instruct-v2", + "mistralai/mistral-large", + "meta-llama/llama-3-8b-instruct", + "meta-llama/llama-3-70b-instruct" + ] + } + }, + "required": [ + "watsonxUrl", + "watsonxProjectId" + ] + } } ] }, diff --git a/gui/public/logos/ibm.png b/gui/public/logos/ibm.png new file mode 100644 index 000000000..be88ec2ed Binary files /dev/null and b/gui/public/logos/ibm.png differ diff --git a/gui/src/pages/AddNewModel/configs/models.ts b/gui/src/pages/AddNewModel/configs/models.ts index 2f5e75e12..21fddbb17 100644 --- a/gui/src/pages/AddNewModel/configs/models.ts +++ b/gui/src/pages/AddNewModel/configs/models.ts @@ -361,6 +361,44 @@ export const models: { [key: string]: ModelPackage } = { ], isOpenSource: true, }, + graniteCodeOpenSource: { + title: "Granite Code", + description: + "The Granite model series is a family of IBM-trained, dense decoder-only models, which are particularly well-suited for generative tasks.", + params: { + model: "granite-code", + contextLength: 20_000, + title: "Granite Code", + systemMessage: `You are Granite Chat, an AI language model developed by IBM. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior. You always respond to greetings (for example, hi, hello, g'day, morning, afternoon, evening, night, what's up, nice to meet you, sup, etc) with "Hello! I am Granite Chat, created by IBM. How can I help you today?". Please do not say anything else and do not start a conversation.`, + }, + providerOptions: ["ollama", "lmstudio", "llama.cpp", "replicate"], + icon: "ibm.png", + isOpenSource: true, + dimensions: [ + { + name: "Parameter Count", + description: "The number of parameters in the model", + options: { + "3b": { + model: "granite-code-3b", + title: "Granite Code 3B", + }, + "8b": { + model: "granite-code-8b", + title: "Granite Code 8B", + }, + "20b": { + model: "granite-code-20b", + title: "Granite Code 20B", + }, + "34b": { + model: "granite-code-34b", + title: "Granite Code 34B", + }, + }, + }, + ], + }, wizardCoder: { title: "WizardCoder", description: