Skip to content

Commit

Permalink
fix: Fixed data type for Ollama keep_alive parameter forever
Browse files Browse the repository at this point in the history
  • Loading branch information
lzskyline committed Jul 11, 2024
1 parent bd57554 commit 697f72c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/popup/sections/AdvancedPart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ function ApiParams({ config, updateConfig }) {
<input
type="radio"
name="keepAliveTime"
value={-1}
checked={config.keepAliveTime == -1}
value="-1"
checked={config.keepAliveTime === '-1'}
onChange={(e) => {
updateConfig({ keepAliveTime: e.target.value })
}}
Expand Down
2 changes: 1 addition & 1 deletion src/services/apis/ollama-api.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 697f72c

Please sign in to comment.