feat: Add support for local Ollama Local provider
This commit is contained in:
1 parent
754a24d52a
commit
399adca63d
7 files changed
+14
No files matched your search
@@ -163,6 +163,7 @@ const PROVIDER_MODELS_CONFIG = {
|
||||
siliconflow: createOpenAIModelsConfig("https://api.siliconflow.cn/v1/models"),
|
||||
hyperbolic: createOpenAIModelsConfig("https://api.hyperbolic.xyz/v1/models"),
|
||||
ollama: createOpenAIModelsConfig("https://ollama.com/api/tags"),
|
||||
"ollama-local": createOpenAIModelsConfig("http://localhost:11434/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"),
|
||||
|
||||
@@ -464,6 +464,11 @@ async function testApiKeyConnection(connection, effectiveProxy = null) {
|
||||
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 "ollama-local": {
|
||||
// No auth required for local Ollama
|
||||
const res = await fetch("http://localhost:11434/api/tags");
|
||||
return { valid: res.ok, error: res.ok ? null : "Ollama not running on localhost:11434" };
|
||||
}
|
||||
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" };
|
||||
|
||||
Reference in new issue
Block a user