@@ -316,7 +316,7 @@ def _sample(
316
316
mirostat_tau : llama_cpp .c_float ,
317
317
mirostat_eta : llama_cpp .c_float ,
318
318
penalize_nl : bool = True ,
319
- logits_processors : List [Callable [[List [llama_cpp . c_int ], List [llama_cpp . c_float ]], List [float ]]] = None
319
+ logits_processors : List [Callable [[List [int ], List [float ]], List [float ]]] = None
320
320
):
321
321
assert self .ctx is not None
322
322
assert len (self .eval_logits ) > 0
@@ -444,7 +444,7 @@ def sample(
444
444
mirostat_eta : float = 0.1 ,
445
445
mirostat_tau : float = 5.0 ,
446
446
penalize_nl : bool = True ,
447
- logits_processors : List [Callable [[List [llama_cpp . c_int ], List [llama_cpp . c_float ]], List [float ]]] = None
447
+ logits_processors : List [Callable [[List [int ], List [float ]], List [float ]]] = None
448
448
449
449
):
450
450
"""Sample a token from the model.
@@ -496,7 +496,7 @@ def generate(
496
496
mirostat_mode : int = 0 ,
497
497
mirostat_tau : float = 5.0 ,
498
498
mirostat_eta : float = 0.1 ,
499
- logits_processors : List [Callable [[List [llama_cpp . c_int ], List [llama_cpp . c_float ]], List [float ]]] = None
499
+ logits_processors : List [Callable [[List [int ], List [float ]], List [float ]]] = None
500
500
) -> Generator [int , Optional [Sequence [int ]], None ]:
501
501
"""Create a generator of tokens from a prompt.
502
502
@@ -651,8 +651,8 @@ def _create_completion(
651
651
mirostat_tau : float = 5.0 ,
652
652
mirostat_eta : float = 0.1 ,
653
653
model : Optional [str ] = None ,
654
- logits_processors : List [Callable [[List [llama_cpp . c_int ], List [llama_cpp . c_float ]], List [float ]]] = None ,
655
- stopping_criterias : List [Callable [[List [int ], List [llama_cpp . c_float ]], bool ]] = None ,
654
+ logits_processors : List [Callable [[List [int ], List [float ]], List [float ]]] = None ,
655
+ stopping_criterias : List [Callable [[List [int ], List [float ]], bool ]] = None ,
656
656
) -> Union [Iterator [Completion ], Iterator [CompletionChunk ]]:
657
657
assert self .ctx is not None
658
658
@@ -1035,8 +1035,8 @@ def create_completion(
1035
1035
mirostat_tau : float = 5.0 ,
1036
1036
mirostat_eta : float = 0.1 ,
1037
1037
model : Optional [str ] = None ,
1038
- logits_processors : List [Callable [[List [llama_cpp . c_int ], List [llama_cpp . c_float ]], List [float ]]] = None ,
1039
- stopping_criterias : List [Callable [[List [int ], List [llama_cpp . c_float ]], bool ]] = None
1038
+ logits_processors : List [Callable [[List [int ], List [float ]], List [float ]]] = None ,
1039
+ stopping_criterias : List [Callable [[List [int ], List [float ]], bool ]] = None
1040
1040
) -> Union [Completion , Iterator [CompletionChunk ]]:
1041
1041
"""Generate text from a prompt.
1042
1042
0 commit comments