Merge pull request #4186 from HD787/venice
added venice provider support
This commit is contained in:
commit
79e5a7a3cd
7 changed files with 111 additions and 4 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
22
core/llm/llms/Venice.ts
Normal file
22
core/llm/llms/Venice.ts
Normal file
|
|
@ -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<LLMOptions> = {
|
||||
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;
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
35
docs/docs/customize/model-providers/more/venice.md
Normal file
35
docs/docs/customize/model-providers/more/venice.md
Normal file
|
|
@ -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).
|
||||
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
BIN
gui/public/logos/venice.png
Normal file
BIN
gui/public/logos/venice.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
|
|
@ -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"
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue