File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
vllm_detector_adapter/generative_detectors Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,6 @@ class GraniteGuardian(ChatCompletionDetectionBase):
3535 PROMPT_CONTEXT_ANALYSIS_RISKS = ["context_relevance" ]
3636 RESPONSE_CONTEXT_ANALYSIS_RISKS = ["groundedness" ]
3737
38- def __init__ (self , * args , ** kwargs ):
39- super ().__init__ (* args , ** kwargs )
40-
4138 ##### Private / Internal functions ###################################################
4239
4340 def __preprocess (
@@ -149,6 +146,11 @@ def _request_to_chat_completion_request(
149146
150147 @detector_dispatcher (types = [DetectorType .TEXT_CONTENT ])
151148 def preprocess_request (self , * args , ** kwargs ):
149+ # FIXME: This function delcaration is temporary and should be removed once we fix following
150+ # issue with decorator:
151+ # ISSUE: Because of inheritance, the base class function with same name gets overriden by the function
152+ # declared below for preprocessing TEXT_CHAT type detectors. This fails the validation inside
153+ # the detector_dispatcher decorator.
152154 return super ().preprocess_request (
153155 * args , ** kwargs , fn_type = DetectorType .TEXT_CONTENT
154156 )
You can’t perform that action at this time.
0 commit comments