feat(ollama): Add Ollama provider support with models and configuration, including API endpoints and UI updates.
This commit is contained in:
@@ -162,6 +162,7 @@ const PROVIDER_MODELS_CONFIG = {
|
||||
nebius: createOpenAIModelsConfig("https://api.studio.nebius.ai/v1/models"),
|
||||
siliconflow: createOpenAIModelsConfig("https://api.siliconflow.cn/v1/models"),
|
||||
hyperbolic: createOpenAIModelsConfig("https://api.hyperbolic.xyz/v1/models"),
|
||||
ollama: createOpenAIModelsConfig("https://ollama.com/api/tags"),
|
||||
nanobanana: createOpenAIModelsConfig("https://api.nanobananaapi.ai/v1/models"),
|
||||
chutes: createOpenAIModelsConfig("https://llm.chutes.ai/v1/models"),
|
||||
nvidia: createOpenAIModelsConfig("https://integrate.api.nvidia.com/v1/models"),
|
||||
|
||||
@@ -460,6 +460,10 @@ async function testApiKeyConnection(connection, effectiveProxy = null) {
|
||||
const res = await fetchWithConnectionProxy("https://api.hyperbolic.xyz/v1/models", { headers: { Authorization: `Bearer ${connection.apiKey}` } }, effectiveProxy);
|
||||
return { valid: res.ok, error: res.ok ? null : "Invalid API key" };
|
||||
}
|
||||
case "ollama": {
|
||||
const res = await fetch("https://ollama.com/api/tags", { headers: { Authorization: `Bearer ${connection.apiKey}` } });
|
||||
return { valid: res.ok, error: res.ok ? null : "Invalid API key" };
|
||||
}
|
||||
case "deepgram": {
|
||||
const res = await fetchWithConnectionProxy("https://api.deepgram.com/v1/projects", { headers: { Authorization: `Token ${connection.apiKey}` } }, effectiveProxy);
|
||||
return { valid: res.ok, error: res.ok ? null : "Invalid API key" };
|
||||
|
||||
@@ -163,6 +163,7 @@ export async function POST(request) {
|
||||
case "nebius":
|
||||
case "siliconflow":
|
||||
case "hyperbolic":
|
||||
case "ollama":
|
||||
case "assemblyai":
|
||||
case "nanobanana":
|
||||
case "chutes":
|
||||
@@ -180,6 +181,7 @@ export async function POST(request) {
|
||||
nebius: "https://api.studio.nebius.ai/v1/models",
|
||||
siliconflow: "https://api.siliconflow.cn/v1/models",
|
||||
hyperbolic: "https://api.hyperbolic.xyz/v1/models",
|
||||
ollama: "https://ollama.com/api/tags",
|
||||
assemblyai: "https://api.assemblyai.com/v1/account",
|
||||
nanobanana: "https://api.nanobananaapi.ai/v1/models",
|
||||
chutes: "https://llm.chutes.ai/v1/models",
|
||||
|
||||
Reference in New Issue
Block a user