mirror of
https://github.com/tcsenpai/ollama.git
synced 2025-06-07 11:45:21 +00:00
runner: Initialize numPredict
numPredict is used to enforce a limit on the number of tokens to generate. Is it passed in from Ollama but it is never stored to be checked.
This commit is contained in:
parent
ebdf781397
commit
0c2f95f3de
@ -91,6 +91,7 @@ func (s *Server) NewSequence(prompt string, numPredict int, stop []string, param
|
|||||||
return &Sequence{
|
return &Sequence{
|
||||||
tokens: tokens,
|
tokens: tokens,
|
||||||
n_prompt_tokens: len(tokens),
|
n_prompt_tokens: len(tokens),
|
||||||
|
numPredict: numPredict,
|
||||||
responses: make(chan string, 1),
|
responses: make(chan string, 1),
|
||||||
embedding: make(chan []float32, 1),
|
embedding: make(chan []float32, 1),
|
||||||
samplingCtx: sc,
|
samplingCtx: sc,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user