Failed to load model
Error rendering prompt with jinja template: "Error: Parser Error: Expected closing statement token. OpenSquareBracket !== CloseStatement.
at _0x57c827 (E:\Lmstudio\LM Studio\resources\app.webpack\lib\llmworker.js:111:224177)
at E:\Lmstudio\LM Studio\resources\app.webpack\lib\llmworker.js:111:224788
at _0x326633 (E:\Lmstudio\LM Studio\resources\app.webpack\lib\llmworker.js:111:227086)
at E:\Lmstudio\LM Studio\resources\app.webpack\lib\llmworker.js:111:226448
at E:\Lmstudio\LM Studio\resources\app.webpack\lib\llmworker.js:111:226801
at _0x326633 (E:\Lmstudio\LM Studio\resources\app.webpack\lib\llmworker.js:111:227086)
at _0x1ccdb4 (E:\Lmstudio\LM Studio\resources\app.webpack\lib\llmworker.js:111:236056)
at new _0x30bdb3 (E:\Lmstudio\LM Studio\resources\app.webpack\lib\llmworker.js:111:268511)
at E:\Lmstudio\LM Studio\resources\app.webpack\lib\llmworker.js:80:40121
at async _0x5bf788. (E:\Lmstudio\LM Studio\resources\app.webpack\lib\llmworker.js:80:35151)". This is usually an issue with the model's prompt template. If you are using a popular model, you can try to search the model under lmstudio-community, which will have fixed prompt templates. If you cannot find one, you are welcome to post this issue to our discord or issue tracker on GitHub. Alternatively, if you know how to write jinja templates, you can override the prompt template in My Models > model settings > Prompt Template.
[gMASK]{%- if tools -%}<|system|>你是一个名为 ChatGLM 的人工智能助手。你是基于智谱 AI 公司训练的语言模型 GLM-4 模型开发的,你的任务是针对用户的问题和要求提供适当的答复和支持。
可用工具
{% for tool in tools %}{%- set function = tool.function if tool.get("function") else tool %}
{{ function.name }}
{{ function | tojson(indent=4, ensure_ascii=False) }}
在调用上述函数时,请使用 Json 格式表示调用的参数。{%- endfor %}{%- endif -%}{%- for msg in messages %}{%- if msg.role == 'system' %}<|system|>
{{ msg.content }}{%- endif %}{%- endfor %}{%- for message in messages if message.role != 'system' %}{%- set role = message['role'] %}{%- set content = message['content'] %}{%- set visible = content.split('')[-1].strip() %}{%- set meta = message.get("metadata", "") %}{%- if role == 'user' %}<|user|>
{{ visible }}{%- elif role == 'assistant' and not meta %}<|assistant|>
{{ visible }}{%- elif role == 'assistant' and meta %}<|assistant|>{{ meta }}
{{ visible }}{%- elif role == 'observation' %}<|observation|>
{{ visible }}{%- endif %}{%- endfor %}{% if add_generation_prompt %}<|assistant|>{% endif %}
Failed to parse Jinja template: Parser Error: Expected closing statement token. OpenSquareBracket !== CloseStatement.