8000 Update moondream prompt · surtweig/llama-cpp-python@fd55c29 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fd55c29

Browse files
committed
Update moondream prompt
1 parent 1705893 commit fd55c29

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

llama_cpp/llama_chat_format.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2485,6 +2485,8 @@ class MoondreamChatHanlder(Llava15ChatHandler):
24852485
"{% if message.role == 'user' %}"
24862486
"{% if message.content is iterable %}"
24872487
"{% for content in message.content %}"
2488+
2489+
# <image>
24882490
"{% if content.type == 'image_url' %}"
24892491
"{% if content.image_url is string %}"
24902492
"{{ content.image_url }}\n\n"
@@ -2493,16 +2495,28 @@ class MoondreamChatHanlder(Llava15ChatHandler):
24932495
"{{ content.image_url.url }}\n\n"
24942496
"{% endif %}"
24952497
"{% endif %}"
2498+
2499+
# Question:
24962500
"{% if content.type == 'text' %}"
24972501
"Question: {{ content.text }}\n\n"
24982502
"{% endif %}"
24992503
"{% endfor %}"
25002504
"{% endif %}"
2505+
2506+
# Question:
2507+
"{% if message.content is string %}"
2508+
"Question: {{ message.content }}\n\n"
2509+
"{% endif %}"
2510+
25012511
"{% endif %}"
2512+
2513+
# Answer:
25022514
"{% if message.role == 'assistant' %}"
25032515
"Answer:{{ message.content }}\n\n"
25042516
"{% endif %}"
25052517
"{% endfor %}"
2518+
2519+
# Generation prompt
25062520
"{% if add_generation_prompt %}"
25072521
"Answer:"
25082522
"{% endif %}"

0 commit comments

Comments
 (0)
0