We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46d67ef commit 210972bCopy full SHA for 210972b
1 file changed
src/modelgauge/annotator.py
@@ -44,3 +44,9 @@ def annotate(self, annotation_request):
44
def translate_response(self, request, response) -> SafetyAnnotation:
45
"""Convert the raw response into the standardized SafetyAnnotation."""
46
pass
47
+
48
+ def process(self, prompt: TextPrompt | ChatPrompt, response: SUTResponse) -> SafetyAnnotation:
49
+ """End-to-end processing of a single prompt+response pair."""
50
+ annotator_request = self.translate_prompt(prompt, response)
51
+ annotator_response = self.annotate(annotator_request)
52
+ return self.translate_response(annotator_request, annotator_response)
0 commit comments