File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -332,13 +332,15 @@ def _create_completion(
332
332
stream : bool = False ,
333
333
) -> Union [Iterator [Completion ], Iterator [CompletionChunk ]]:
334
334
assert self .ctx is not None
335
- completion_id = f"cmpl-{ str (uuid .uuid4 ())} "
336
- created = int (time .time ())
335
+ completion_id : str = f"cmpl-{ str (uuid .uuid4 ())} "
336
+ created : int = int (time .time ())
337
337
completion_tokens : List [llama_cpp .llama_token ] = []
338
338
# Add blank space to start of prompt to match OG llama tokenizer
339
- prompt_tokens = self .tokenize (b" " + prompt .encode ("utf-8" ))
340
- text = b""
341
- returned_characters = 0
339
+ prompt_tokens : List [llama_cpp .llama_token ] = self .tokenize (
340
+ b" " + prompt .encode ("utf-8" )
341
+ )
342
+ text : bytes = b""
343
+ returned_characters : int = 0
342
344
stop = stop if stop is not None else []
343
345
344
346
if self .verbose :
You can’t perform that action at this time.
0 commit comments