Skip to content

Commit 559fb33

Browse files
committed
fix llama-cpp-python[server] breaks
1 parent 12c3bf8 commit 559fb33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llama_cpp/llama_chat_format.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,8 @@ def chat_completion_handler(
594594
tool_choice=tool_choice,
595595
)
596596
prompt = llama.tokenize(
597-
result.prompt.encode("utf-8"),
597+
vocab=llama.llama_model_get_vocab(model),
598+
text=result.prompt.encode("utf-8"),
598599
add_bos=not result.added_special,
599600
special=True,
600601
)

0 commit comments

Comments
 (0)