mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-23 12:31:22 +00:00
Fix for remote model templates when messages contain xml. (#3318)
Signed-off-by: Adam Treat <treat.adam@gmail.com> Signed-off-by: AT <manyoso@users.noreply.github.com> Co-authored-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
@@ -62,15 +62,15 @@ static const QString RMODEL_CHAT_TEMPLATE = uR"(<chat>
|
||||
{%- if loop.first %}
|
||||
{{- '### Context:\n' }}
|
||||
{%- endif %}
|
||||
{{- 'Collection: ' + source.collection + '\n' +
|
||||
'Path: ' + source.path + '\n' +
|
||||
'Excerpt: ' + source.text + '\n\n' }}
|
||||
{{- ('Collection: ' + source.collection + '\n' +
|
||||
'Path: ' + source.path + '\n' +
|
||||
'Excerpt: ' + source.text + '\n\n') | escape }}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{%- for attachment in message.prompt_attachments %}
|
||||
{{- attachment.processed_content + '\n\n' }}
|
||||
{{- (attachment.processed_content + '\n\n') | escape }}
|
||||
{%- endfor %}
|
||||
{{- message.content }}
|
||||
{{- message.content | escape }}
|
||||
{{- '</' + message['role'] + '>' }}
|
||||
{%- endfor %}
|
||||
</chat>)"_s;
|
||||
|
Reference in New Issue
Block a user