Skip to content

Commit 6f47f71

Browse files
authored
fix glm4 chat forward error
apply_chat_template returns a one-dimensional array, [0] got a value instead of an array, causing exceptions in subsequent len ​​operations.
1 parent 4909994 commit 6f47f71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/templates/glm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ def _convert_messages_to_ids(
493493
messages,
494494
add_generation_prompt=True,
495495
tokenize=True,
496-
)[0]
496+
)
497497

498498
def parse_assistant_response(
499499
self,

0 commit comments

Comments
 (0)