fixed Llama._create_completion suffix check, it can be either None or str instance (#854)
This commit is contained in:
parent
5f8f369d1b
commit
9c8f4dca5f
1 changed files with 1 additions and 0 deletions
|
@ -921,6 +921,7 @@ class Llama:
|
||||||
grammar: Optional[LlamaGrammar] = None,
|
grammar: Optional[LlamaGrammar] = None,
|
||||||
) -> Union[Iterator[Completion], Iterator[CompletionChunk]]:
|
) -> Union[Iterator[Completion], Iterator[CompletionChunk]]:
|
||||||
assert self.ctx is not None
|
assert self.ctx is not None
|
||||||
|
assert suffix is None or suffix.__class__ is str
|
||||||
|
|
||||||
completion_id: str = f"cmpl-{str(uuid.uuid4())}"
|
completion_id: str = f"cmpl-{str(uuid.uuid4())}"
|
||||||
created: int = int(time.time())
|
created: int = int(time.time())
|
||||||
|
|
Loading…
Reference in a new issue