in src/open-r1-multimodal/local_scripts/create_vision_cot_data.py [0:0]
def process_single_item(example):
try:
image_path = example["image_path"]
formatted_prompt = PROMPT_FORMAT.format(
original_question=example["question"], original_answer=example["answer"]
)
response = gpt4o_query(image_path, formatted_prompt)
example["gpt4o_response"] = response
return example
except Exception as e:
print(f"Error processing item: {str(e)}")
example["gpt4o_response"] = None
return example