File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -2479,27 +2479,27 @@ def from_pretrained(
2479
2479
2480
2480
class MoondreamChatHanlder (Llava15ChatHandler ):
2481
2481
# Chat Format:
2482
- # <image>\n\nQuestion : {prompt }\n\nAnswer:
2482
+ # f" <image>\n\n{chat_history}Question : {question }\n\nAnswer:"
2483
2483
CHAT_FORMAT = (
2484
2484
"{% for message in messages %}"
2485
2485
"{% if message.role == 'user' %}"
2486
2486
"{% if message.content is iterable %}"
2487
2487
"{% for content in message.content %}"
2488
2488
"{% if content.type == 'image_url' %}"
2489
- "{{ content.image_url }}"
2489
+ "{{ content.image_url }}\n \n "
2490
2490
"{% endif %}"
2491
2491
"{% if content.type == 'text' %}"
2492
- "Question: {{ content.text }}"
2492
+ "Question: {{ content.text }}\n \n "
2493
2493
"{% endif %}"
2494
2494
"{% endfor %}"
2495
2495
"{% endif %}"
2496
2496
"{% endif %}"
2497
2497
"{% if message.role == 'assistant' %}"
2498
- "Answer: {{ message.content }}"
2498
+ "Answer:{{ message.content }}"
2499
2499
"{% endif %}"
2500
2500
"{% endfor %}"
2501
2501
"{% if add_generation_prompt %}"
2502
- "Answer: "
2502
+ "Answer:"
2503
2503
"{% endif %}"
2504
2504
)
2505
2505
You can’t perform that action at this time.
0 commit comments