@@ -125,9 +125,11 @@ class BlockManifest(WorkflowBlockManifest):
125125 }
126126 },
127127 )
128- model_type : Literal ["google-gemini" , "anthropic-claude" , "florence-2" ] = Field (
129- description = "Type of the model that generated prediction" ,
130- examples = [["google-gemini" , "anthropic-claude" , "florence-2" ]],
128+ model_type : Literal ["openai" , "google-gemini" , "anthropic-claude" , "florence-2" ] = (
129+ Field (
130+ description = "Type of the model that generated prediction" ,
131+ examples = [["google-gemini" , "anthropic-claude" , "florence-2" ]],
132+ )
131133 )
132134 task_type : Literal [tuple (SUPPORTED_TASKS )] = Field (
133135 description = "Task type to performed by model." ,
@@ -234,7 +236,7 @@ def try_parse_json(content: str) -> Tuple[bool, dict]:
234236 return True , {}
235237
236238
237- def parse_gemini_object_detection_response (
239+ def parse_llm_object_detection_response (
238240 image : WorkflowImageData ,
239241 parsed_data : dict ,
240242 classes : List [str ],
@@ -353,8 +355,11 @@ def get_4digit_from_md5(input_string):
353355
354356
355357REGISTERED_PARSERS = {
356- ("google-gemini" , "object-detection" ): parse_gemini_object_detection_response ,
357- ("anthropic-claude" , "object-detection" ): parse_gemini_object_detection_response ,
358+ # LLMs
359+ ("openai" , "object-detection" ): parse_llm_object_detection_response ,
360+ ("google-gemini" , "object-detection" ): parse_llm_object_detection_response ,
361+ ("anthropic-claude" , "object-detection" ): parse_llm_object_detection_response ,
362+ # Florence 2
358363 ("florence-2" , "object-detection" ): partial (
359364 parse_florence2_object_detection_response , florence_task_type = "<OD>"
360365 ),
0 commit comments