Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chatglm.cpp:152 check failed (messages.size() % 2 == 1) invalid chat messages size 2 #295

Closed
zhuwensi opened this issue Apr 25, 2024 · 2 comments

Comments

@zhuwensi
Copy link

./build/bin/main -m chatglm-ggml.bin --top_p 0.8 --temp 0.8 --sp examples/system/code_interpreter.txt -i
System   > 你是一位智能AI助手,你叫ChatGLM,你连接着一台电脑,但请注意不能联网。.......
Prompt   > 列出100以内的所有质数
ChatGLM2 > /root/ai2/chatglm.cpp/chatglm.cpp:152 check failed (messages.size() % 2 == 1) invalid chat messages size 2

Is this a bug? I tried example function and code_interpreter, and they both gave above errors.

@li-plus
Copy link
Owner

li-plus commented Apr 25, 2024

ChatGLM2 doesn't support system prompt. Please use ChatGLM3 for system prompt. Will fix this.

@li-plus
Copy link
Owner

li-plus commented Apr 30, 2024

Fixed in #292. Now system prompt is ignored for models without system prompt support. Will not throw an error.

@li-plus li-plus closed this as completed Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants