Skip to content

Commit

Permalink
fix when keep_alive -1
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmacarthy committed May 13, 2024
1 parent ef4e5dc commit df8b5fd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/extension/provider-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export function createStreamRequestBody(
model: options.model,
stream: true,
messages: options.messages,
keep_alive: options.keepAlive,
keep_alive: options.keepAlive === '-1'
? -1
: options.keepAlive,
options: {
temperature: options.temperature,
num_predict: options.numPredictChat
Expand Down Expand Up @@ -59,7 +61,9 @@ export function createStreamRequestBodyFim(
model: options.model,
prompt,
stream: true,
keep_alive: options.keepAlive,
keep_alive: options.keepAlive === '-1'
? -1
: options.keepAlive,
options: {
temperature: options.temperature,
num_predict: options.numPredictFim
Expand Down

0 comments on commit df8b5fd

Please sign in to comment.