feat: fix version and address

This commit is contained in:
vercel 2024-12-24 14:19:48 +08:00
parent 94d8d39cfc
commit ad0fdb988b
8 changed files with 42 additions and 35 deletions

View file

@ -48,6 +48,7 @@
"@aws-sdk/client-sagemaker-runtime": "^3.621.0",
"@aws-sdk/credential-providers": "^3.620.1",
"@continuedev/config-types": "^1.0.13",
"@continuedev/config-yaml": "^1.0.0",
"@continuedev/fetch": "^1.0.4",
"@continuedev/llm-info": "^1.0.2",
"@continuedev/openai-adapters": "^1.0.10",

View file

@ -5,30 +5,15 @@ import type { CompletionOptions, LLMOptions } from "../../index.js";
class Novita extends OpenAI {
static providerName = "novita";
static defaultOptions: Partial<LLMOptions> = {
apiBase: "https://api.novita.ai/v3/",
apiBase: "https://api.novita.ai/v3/openai/",
};
private static MODEL_IDS: { [name: string]: string } = {
// todo: yexiu
"codellama-7b": "togethercomputer/CodeLlama-7b-Instruct",
"codellama-13b": "togethercomputer/CodeLlama-13b-Instruct",
"codellama-34b": "togethercomputer/CodeLlama-34b-Instruct",
"codellama-70b": "codellama/CodeLlama-70b-Instruct-hf",
"llama3-8b": "meta-llama/Llama-3-8b-chat-hf",
"llama3-70b": "meta-llama/Llama-3-70b-chat-hf",
"llama3.1-8b": "meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
"llama3.1-70b": "meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo",
"llama3.1-405b": "meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo",
"llama3.2-3b": "meta-llama/Llama-3.2-3B-Instruct-Turbo",
"llama3.2-11b": "meta-llama/Llama-3.2-11B-Vision-Instruct-Turbo",
"llama3.2-90b": "meta-llama/Llama-3.2-90B-Vision-Instruct-Turbo",
"llama2-7b": "togethercomputer/llama-2-7b-chat",
"llama2-13b": "togethercomputer/llama-2-13b-chat",
"llama2-70b": "togethercomputer/llama-2-70b-chat",
"mistral-7b": "mistralai/Mistral-7B-Instruct-v0.1",
"mistral-8x7b": "mistralai/Mixtral-8x7B-Instruct-v0.1",
"phind-codellama-34b": "Phind/Phind-CodeLlama-34B-v2",
"wizardcoder-34b": "WizardLM/WizardCoder-Python-34B-V1.0",
"llama3.1-8b": "meta-llama/llama-3.1-8b-instruct",
"llama3.1-70b": "meta-llama/llama-3.1-70b-instruct",
"llama3.1-405b": "meta-llama/llama-3.1-405b-instruct",
"llama3.2-3b": "meta-llama/llama-3.2-3b-instruct",
"llama3.2-11b": "meta-llama/llama-3.2-11b-vision-instruct",
};
protected _convertModelName(model: string) {

View file

@ -6,9 +6,9 @@ The Novita API is a cloud platform for running large AI models. You can sign up
{
"models": [
{
"title": "Novita Qwen2.5 Coder",
"title": "Llama 3.1 8B",
"provider": "novita",
"model": "Qwen/Qwen2.5-Coder-32B-Instruct",
"model": "meta-llama/llama-3.1-8b-instruct",
"apiKey": "YOUR_API_KEY"
}
]

View file

@ -1,12 +1,12 @@
{
"name": "continue",
"version": "0.9.244",
"version": "0.9.246",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "continue",
"version": "0.9.244",
"version": "0.9.246",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/fetch": "^1.0.3",

BIN
gui/public/logos/novita.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

@ -31,6 +31,33 @@ export interface ModelPackage {
}
export const models: { [key: string]: ModelPackage } = {
llama318BChat: {
title: "Llama 3.1 8B",
description: "A model from Meta, fine-tuned for chat",
refUrl: "",
params: {
title: "Llama3.1-8b",
model: "meta-llama/llama-3.1-8b-instruct",
contextLength: 8192,
},
icon: "meta.png",
dimensions: [
{
name: "Parameter Count",
description: "The number of parameters in the model",
options: {
"8b": {
model: "meta-llama/llama-3.1-8b-instruct",
title: "Llama3.1-8b",
}
},
},
],
providerOptions: [
"novita"
],
isOpenSource: true,
},
llama31Chat: {
title: "Llama3.1 Chat",
description: "A model from Meta, fine-tuned for chat",
@ -65,7 +92,6 @@ export const models: { [key: string]: ModelPackage } = {
"ollama",
"lmstudio",
"together",
"novita",
"llama.cpp",
"replicate",
"sambanova",
@ -254,7 +280,6 @@ export const models: { [key: string]: ModelPackage } = {
"ollama",
"lmstudio",
"together",
"novita",
"llama.cpp",
"replicate",
"nebius",
@ -300,7 +325,6 @@ export const models: { [key: string]: ModelPackage } = {
"ollama",
"lmstudio",
"together",
"novita",
"llama.cpp",
"replicate",
],
@ -448,7 +472,7 @@ export const models: { [key: string]: ModelPackage } = {
contextLength: 8192,
},
icon: "meta.png",
providerOptions: ["ollama", "groq", "llama.cpp", "sambanova", "together", "novita"],
providerOptions: ["ollama", "groq", "llama.cpp", "sambanova", "together"],
isOpenSource: false,
},
llama3211bChat: {
@ -461,7 +485,7 @@ export const models: { [key: string]: ModelPackage } = {
contextLength: 8192,
},
icon: "meta.png",
providerOptions: ["ollama", "groq", "llama.cpp", "together", "novita"],
providerOptions: ["ollama", "groq", "llama.cpp", "together"],
isOpenSource: false,
},
llama3290bChat: {
@ -507,7 +531,6 @@ export const models: { [key: string]: ModelPackage } = {
"ollama",
"lmstudio",
"together",
"novita",
"llama.cpp",
"replicate",
"nebius",

View file

@ -427,9 +427,7 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n
...completionParamsInputsConfigs,
],
packages: [
models.llama31Chat,
models.codeLlamaInstruct,
models.mistralOs,
models.llama318BChat,
].map((p) => {
p.params.contextLength = 4096;
return p;

View file

@ -74,7 +74,7 @@ export function constructLlmApi(config: LLMConfig): BaseLlmApi | undefined {
case "together":
return openAICompatible("https://api.together.xyz/v1/", config);
case "novita":
return openAICompatible("https://api.novita.ai/v3", config);
return openAICompatible("https://api.novita.ai/v3/openai", config);
case "nebius":
return openAICompatible("https://api.studio.nebius.ai/v1/", config);
case "function-network":