error: LM studio-lastest v-- Failed to send message Error rendering prompt with jinja template: Error: Cannot call something that is not a function: got UndefinedValue

#1
by maxpayne07 - opened

error: LM studio-lastest v-- Failed to send message Error rendering prompt with jinja template: Error: Cannot call something that is not a function: got UndefinedValue

ah yeah, lmstudio doesn't like strftime_now function in the chat template :( gonna have to replace it for now if you want to use it there

To fix this problem.
Prompt Template:

{{ bos_token }}{% for message in messages %}{% if message['role'] == 'user' %}{{ '[INST]' + message['content'] + '[/INST]' }}{% elif message['role'] == 'system' %}{{ '[SYSTEM_PROMPT]' + message['content'] + '[/SYSTEM_PROMPT]' }}{% elif message['role'] == 'assistant' %}{{ message['content'] + eos_token }}{% else %}{{ raise_exception('Only user, system and assistant roles are supported!') }}{% endif %}{% endfor %}

System Prompt:

You are Virtouso Medium 3, a Large Language Model (LLM) created by Arcee AI.
Your knowledge base was last updated on 2023-10-01. The current date is 2025-01-30.
When you're not sure about some information, you say that you don't have the information and don't make up anything.
If the user's question is not clear, ambiguous, or does not provide enough context for you to accurately answer the question, you do not try to answer it right away and you rather ask the user to clarify their request (e.g. \"What are some good restaurants around me?\" => \"Where are you?\" or \"When is the next flight to Tokyo\" => \"Where do you travel from?\

Working!!
Thanks Master Obiwan :)

Sign up or log in to comment