diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index 145cb1ac6..1393ac44e 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -72,6 +72,7 @@ const PROVIDER_SUPPORTS_IMAGES: string[] = [ "sagemaker", "continue-proxy", "openrouter", + "venice", "sambanova", "vertexai", "azure", @@ -96,7 +97,7 @@ const MODEL_SUPPORTS_IMAGES: string[] = [ "pixtral", "llama3.2", "llama-3.2", - "llama4" + "llama4", ]; function modelSupportsTools(modelDescription: ModelDescription) { diff --git a/core/llm/llms/Venice.ts b/core/llm/llms/Venice.ts new file mode 100644 index 000000000..fd4c0ebfe --- /dev/null +++ b/core/llm/llms/Venice.ts @@ -0,0 +1,22 @@ +import { ChatCompletionCreateParams } from "@continuedev/openai-adapters"; +import { ChatMessage, CompletionOptions, LLMOptions } from "../../index.js"; + +import OpenAI from "./OpenAI"; + +class Venice extends OpenAI { + static providerName = "venice"; + static defaultOptions: Partial = { + apiBase: "https://api.venice.ai/api/v1", + }; + + protected _convertArgs(options: CompletionOptions, messages: ChatMessage[]): ChatCompletionCreateParams { + const finalOptions = super._convertArgs(options, messages) as ChatCompletionCreateParams & { venice_parameters?: any }; + if ("venice_parameters" in options && typeof options.venice_parameters === "object") { + finalOptions.venice_parameters = { ...options.venice_parameters }; + } + return finalOptions; + } + +} + +export default Venice; \ No newline at end of file diff --git a/core/llm/llms/index.ts b/core/llm/llms/index.ts index d04f02dfe..26fbe2cb2 100644 --- a/core/llm/llms/index.ts +++ b/core/llm/llms/index.ts @@ -57,6 +57,7 @@ import ContinueProxy from "./stubs/ContinueProxy"; import TestLLM from "./Test"; import TextGenWebUI from "./TextGenWebUI"; import Together from "./Together"; +import Venice from "./Venice"; import VertexAI from "./VertexAI"; import Vllm from "./Vllm"; import Voyage from "./Voyage"; @@ -109,6 +110,7 @@ export const LLMClasses = [ Cerebras, Asksage, Nebius, + Venice, VertexAI, xAI, SiliconFlow, diff --git a/docs/docs/customize/model-providers/more/venice.md b/docs/docs/customize/model-providers/more/venice.md new file mode 100644 index 000000000..b612189ae --- /dev/null +++ b/docs/docs/customize/model-providers/more/venice.md @@ -0,0 +1,35 @@ +# Venice + +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. + +Change `~/.continue/config.json` to look like the following. + +```json title="config.json" +{ + "models": [ + { + "provider": "venice", + "title": "Autodetect", + "model": "AUTODETECT", + "apiKey": "..." + } + ] +} +``` + +To utilize features offered by the venice API that are not apart of the standard OpenAI API schema, include these as `venice_parameters` + +For example, to use models with no system prompt, you can explicitly turn off the feature like so: + +```json title="config.json" +{ + "completionOptions": { + "venice_parameters": { + "include_venice_system_prompt" : false + }, + ... + } +} +``` + +Learn more about available settings [here](https://docs.venice.ai/api-reference/api-spec). \ No newline at end of file diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 64b65c525..583dbb60e 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -231,8 +231,9 @@ "function-network", "scaleway", "relace", + "morph", "ovhcloud", - "morph" + "venice" ], "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)", @@ -280,8 +281,9 @@ "### Function Network offers private, affordable user-owned AI\nTo get started with Function Network, obtain your API key from [Function Network](https://www.function.network/join-waitlist). Function Network provides a variety of models for chat, completion, and embeddings.", "### Scaleway\n Generative APIs are serverless endpoints for the most popular AI models.\nHosted in European data centers and priced competitively per million tokens used, models served by Scaleway are ideal for users requiring low latency, full data privacy, and 100% compliance with EU AI Act. To get access to the Scaleway Generative APIs, read the [Quickstart guide](https://www.scaleway.com/en/docs/ai-data/generative-apis/quickstart/) and get a [valid API key](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/).", "### Relace\n Relace provides a fast apply model. To get started, obtain an API key from [here](https://app.relace.ai/settings/api-keys).", + "### Morph\nMorph provides a fast apply model. To get started, obtain an API key from [here](https://morphllm.com/dashboard).", "### 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. 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/).", - "### Morph\nMorph provides a fast apply model. To get started, obtain an API key from [here](https://morphllm.com/dashboard)." + "### Venice\n Venice.AI is a privacy-focused generative AI platform, allowing users to interact with open-source LLMs without storing any private user data.\nHosted models support the OpenAI API standard, providing seamless integration for users seeking privacy and flexibility.\nTo get started with the Venice API, either purchase a pro account, stake $VVV for daily inference allotments, or fund your account with USD.\nVisit the [API settings page](https://venice.ai/settings/api) or learn more at the [Venice API documentation](https://venice.ai/api)." ], "type": "string" }, @@ -517,7 +519,8 @@ "xAI", "kindo", "scaleway", - "ovhcloud" + "ovhcloud", + "venice" ] } }, @@ -1764,6 +1767,30 @@ } } } + }, + { + "if": { + "properties": { + "provider": { + "enum": ["venice"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "model": { + "anyOf": [ + { + "enum": ["AUTODETECT"] + }, + { + "type": "string" + } + ] + } + } + } } ] }, diff --git a/gui/public/logos/venice.png b/gui/public/logos/venice.png new file mode 100644 index 000000000..be0d8eb5f Binary files /dev/null and b/gui/public/logos/venice.png differ diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index 5f0dc75b4..f56a6b210 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -996,4 +996,24 @@ To get started, [register](https://dataplatform.cloud.ibm.com/registration/stepo ], apiKeyUrl: "https://cloud.siliconflow.cn/account/ak", }, + venice: { + title: "Venice", + provider: "venice", + icon: "venice.png", + description: "Venice.", + tags: [ModelProviderTags.RequiresApiKey, ModelProviderTags.OpenSource], + collectInputFor: [ + { + inputType: "text", + key: "apiKey", + label: "API Key", + placeholder: "Enter your Venice API key", + required: true, + }, + ], + packages: [ + {...models.AUTODETECT} + ], + apiKeyUrl: "https://venice.ai/chat" + } };