Skip to content

Commit

Permalink
fix: context length is reset while creating a new thread
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan committed Dec 18, 2024
1 parent 0cd0ff0 commit b14c09d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions web/hooks/useCreateNewThread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,15 @@ export const useCreateNewThread = () => {
)

const overriddenSettings = {
ctx_len: !isLocalEngine(model?.engine) ? undefined : defaultContextLength,
ctx_len: !isLocalEngine(defaultModel?.engine)
? undefined
: defaultContextLength,
}

// Use ctx length by default
const overriddenParameters = {
max_tokens: !isLocalEngine(model?.engine)
? (model?.parameters.token_limit ?? 8192)
max_tokens: !isLocalEngine(defaultModel?.engine)
? (defaultModel?.parameters.token_limit ?? 8192)
: defaultContextLength,
}

Expand Down

0 comments on commit b14c09d

Please sign in to comment.