8000 Merge pull request #265 from dmahurin/fix-from-bytes-byteorder · off-by-some/llama-cpp-python@2adf6f3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2adf6f3

Browse files
authored
Merge pull request abetlen#265 from dmahurin/fix-from-bytes-byteorder
fix "from_bytes() missing required argument 'byteorder'"
2 parents 34ad71f + 327eedb commit 2adf6f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/low_level_api/low_level_api_chat_cpp.py

Lines changed: 1 addition & 1 deletion
< 3E60 td data-grid-cell-id="diff-fb1e57b7703dab0c8a2c5b292873af745683af62838864f8bf56bc05799c7df1-501-501-2" data-line-anchor="diff-fb1e57b7703dab0c8a2c5b292873af745683af62838864f8bf56bc05799c7df1R501" data-selected="false" role="gridcell" style="background-color:var(--bgColor-default);padding-right:24px" tabindex="-1" valign="top" class="focusable-grid-cell diff-text-cell right-side-diff-cell left-side">

Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ def output(self):
496496
# Contains multi-byte UTF8
497497
for num, pattern in [(2, 192), (3, 224), (4, 240)]:
498498
# Bitwise AND check
499-
if pattern & int.from_bytes(cur_char) == pattern:
499+
if pattern & int.from_bytes(cur_char, 'little') == pattern:
500500
self.multibyte_fix = [cur_char] + ([None] * (num-1))
501501
502502
# Stop incomplete bytes from passing

0 commit comments

Comments
 (0)
0