import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..','..','..')))
from agensight.eval.metrics import MultimodalContextualRelevancyMetric
from agensight.eval.test_case import MLLMTestCase
from agensight.eval.test_case import MLLMImage

input_data = ["What is in the image?"]
actual_output = ["A cat is sitting on a windowsill."]
retrieval_context = ["A photo of a cat on a windowsill.", "A dog in a park."]

metric = MultimodalContextualRelevancyMetric(model="gpt-4o", threshold=0.5)
test_case = MLLMTestCase(input=input_data, actual_output=actual_output,retrieval_context=retrieval_context)
metric.measure(test_case)
print(f"Score: {metric.score}")
print(f"Reason: {metric.reason}") 