fix: Ollama KEEP_ALIVE=-1 ve AbortError mesaj netliği, callAiModelRaw'a opsiyonel timeoutMs
KEEP_ALIVE '30m' -> -1: GPU'da bolca boş VRAM var, modeli sürekli bellekte tutmanın maliyeti yok, 30dk sınırı gereksiz soğuk-başlangıç gecikmelerine sebep oluyordu (bkz. 2026-08-14 log: 44GB boş / 17.5GB kullanılan).
This commit is contained in:
@@ -150,12 +150,12 @@ async function callAiModel(systemPrompt: string, userText: string): Promise<{ re
|
||||
return { resultJson, aiModel };
|
||||
}
|
||||
|
||||
export async function callAiModelRaw(systemPrompt: string, userText: string, numPredict = 1500): Promise<{ aiContent: string; aiModel: string }> {
|
||||
export async function callAiModelRaw(systemPrompt: string, userText: string, numPredict = 1500, timeoutMs?: number): Promise<{ aiContent: string; aiModel: string }> {
|
||||
const { aiModel } = getAiConfig();
|
||||
const aiContent = await callOllama([
|
||||
{ role: 'system', content: systemPrompt },
|
||||
{ role: 'user', content: userText.substring(0, 15000) },
|
||||
], { numPredict });
|
||||
], { numPredict, timeoutMs });
|
||||
return { aiContent, aiModel };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user