feat: Add Ollama model settings for tfsZ, numKeep, numThread, and useMlock

This commit is contained in:
n4ze3m
2025-01-05 15:11:43 +05:30
parent 0af69a3be8
commit 9674b842ef
10 changed files with 232 additions and 18 deletions

View File

@@ -20,7 +20,11 @@ export const pageAssistModel = async ({
useMMap,
minP,
repeatLastN,
repeatPenalty
repeatPenalty,
tfsZ,
numKeep,
numThread,
useMlock,
}: {
model: string
baseUrl: string
@@ -36,6 +40,10 @@ export const pageAssistModel = async ({
minP?: number
repeatPenalty?: number
repeatLastN?: number
tfsZ?: number,
numKeep?: number,
numThread?: number,
useMlock?: boolean,
}) => {
if (model === "chrome::gemini-nano::page-assist") {
return new ChatChromeAI({
@@ -80,7 +88,7 @@ export const pageAssistModel = async ({
}
}) as any
}
console.log('useMlock', useMlock)
return new ChatOllama({
baseUrl,
keepAlive,
@@ -96,5 +104,9 @@ export const pageAssistModel = async ({
minP: minP,
repeatPenalty: repeatPenalty,
repeatLastN: repeatLastN,
tfsZ,
numKeep,
numThread,
useMlock
})
}