Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
681f3c4c
Commit
681f3c4c
authored
Sep 03, 2023
by
Michael Yang
Browse files
fix num_keep
parent
5d3f314b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
server/routes.go
server/routes.go
+2
-1
No files found.
server/routes.go
View file @
681f3c4c
...
...
@@ -117,12 +117,13 @@ func load(ctx context.Context, model *Model, reqOpts map[string]interface{}, ses
if
err
!=
nil
{
return
err
}
tokensNoSystem
,
err
:=
llmModel
.
Encode
(
ctx
,
promptNoSystem
)
if
err
!=
nil
{
return
err
}
opts
.
NumKeep
=
len
(
tokensWithSystem
)
-
len
(
tokensNoSystem
)
+
1
opts
.
NumKeep
=
len
(
tokensWithSystem
)
-
len
(
tokensNoSystem
)
llmModel
.
SetOptions
(
opts
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment