Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9c8f4dc

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

File tree

Expand file treeCollapse file tree

1 file changed

+1
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-0
lines changed

‎llama_cpp/llama.py

Copy file name to clipboardExpand all lines: llama_cpp/llama.py
+1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.