Skip to content

Commit 9c8f4dc

Browse files
authored
fixed Llama._create_completion suffix check, it can be either None or str instance (abetlen#854)
1 parent 5f8f369 commit 9c8f4dc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llama_cpp/llama.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,7 @@ def _create_completion(
921921
grammar: Optional[LlamaGrammar] = None,
922922
) -> Union[Iterator[Completion], Iterator[CompletionChunk]]:
923923
assert self.ctx is not None
924+
assert suffix is None or suffix.__class__ is str
924925

925926
completion_id: str = f"cmpl-{str(uuid.uuid4())}"
926927
created: int = int(time.time())

0 commit comments

Comments
 (0)