Flipping prompt around to be before image, so we can cache on runtime

This commit is contained in:
Jake Poznanski 2025-07-30 17:36:53 +00:00
parent df52cb0e0e
commit 897668d21d
2 changed files with 2 additions and 2 deletions

View File

@ -129,8 +129,8 @@ async def build_page_query(local_pdf_path: str, page: int, target_longest_image_
{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image_base64}"}},
{"type": "text", "text": build_no_anchoring_yaml_prompt()},
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image_base64}"}},
],
}
],

View File

@ -417,8 +417,8 @@ class InstructUserMessages(PipelineStep):
messages = {
"role": "user",
"content": [
{"type": "image", "image": sample["image"]},
{"type": "text", "text": sample["instruction_prompt"]},
{"type": "image", "image": sample["image"]},
],
}