From 327eedbfe16d950fc32d6e7a5573fd7f81cbbc74 Mon Sep 17 00:00:00 2001 From: Don Mahurin <@> Date: Mon, 22 May 2023 23:56:25 -0700 Subject: [PATCH] fix "from_bytes() missing required argument 'byteorder'" --- examples/low_level_api/low_level_api_chat_cpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/low_level_api/low_level_api_chat_cpp.py b/examples/low_level_api/low_level_api_chat_cpp.py index 8773cb1..0e7cbe9 100644 --- a/examples/low_level_api/low_level_api_chat_cpp.py +++ b/examples/low_level_api/low_level_api_chat_cpp.py @@ -493,7 +493,7 @@ n_keep = {self.params.n_keep} # Contains multi-byte UTF8 for num, pattern in [(2, 192), (3, 224), (4, 240)]: # Bitwise AND check - if pattern & int.from_bytes(cur_char) == pattern: + if pattern & int.from_bytes(cur_char, 'little') == pattern: self.multibyte_fix = [cur_char] + ([None] * (num-1)) # Stop incomplete bytes from passing