diff --git a/src/popup/sections/AdvancedPart.jsx b/src/popup/sections/AdvancedPart.jsx index c3913b79..4623fd75 100644 --- a/src/popup/sections/AdvancedPart.jsx +++ b/src/popup/sections/AdvancedPart.jsx @@ -90,8 +90,8 @@ function ApiParams({ config, updateConfig }) { { updateConfig({ keepAliveTime: e.target.value }) }} diff --git a/src/services/apis/ollama-api.mjs b/src/services/apis/ollama-api.mjs index 550d75e7..daa57ab1 100644 --- a/src/services/apis/ollama-api.mjs +++ b/src/services/apis/ollama-api.mjs @@ -49,7 +49,7 @@ export async function generateAnswersWithOllamaApi(port, question, session, apiK messages: prompt, model: modelName, stream: true, - keep_alive: config.keepAliveTime, + keep_alive: config.keepAliveTime === '-1' ? -1 : config.keepAliveTime, }), onMessage(message) { console.debug('sse message', message)