chore: update ollama ai provider

This commit is contained in:
Vyacheslav Scherbinin
2025-08-20 00:30:19 +07:00
parent 623fc26de5
commit 88c8fe4614
4 changed files with 87 additions and 118 deletions

View File

@@ -44,7 +44,8 @@
"@react-email/components": "^0.0.21",
"@trpc/server": "^10.45.2",
"adm-zip": "^0.5.16",
"ai": "^4.3.16",
"ai": "^5.0.17",
"ai-sdk-ollama": "^0.5.1",
"bcrypt": "5.1.1",
"better-auth": "v1.2.8-beta.7",
"bl": "6.0.11",
@@ -65,7 +66,6 @@
"node-schedule": "2.1.1",
"nodemailer": "6.9.14",
"octokit": "3.1.2",
"ollama-ai-provider": "^1.2.0",
"otpauth": "^9.4.0",
"pino": "9.4.0",
"pino-pretty": "11.2.2",

View File

@@ -5,7 +5,7 @@ import { createDeepInfra } from "@ai-sdk/deepinfra";
import { createMistral } from "@ai-sdk/mistral";
import { createOpenAI } from "@ai-sdk/openai";
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { createOllama } from "ollama-ai-provider";
import { createOllama } from "ai-sdk-ollama";
export function getProviderName(apiUrl: string) {
if (apiUrl.includes("api.openai.com")) return "openai";
@@ -59,7 +59,7 @@ export function selectAIProvider(config: { apiUrl: string; apiKey: string }) {
case "ollama":
return createOllama({
// optional settings, e.g.
baseURL: `${config.apiUrl}/api`,
baseURL: config.apiUrl,
});
case "deepinfra":
return createDeepInfra({