@@ -503,8 +503,8 @@ def as_tuple(self):
503503
504504
505505class SpanSelection (BaseModel ):
506- start : Union [int , str ]
507- end : Union [int , str ]
506+ start : Union [float , int , str ]
507+ end : Union [float , int , str ]
508508
509509
510510class SpanSelectionOffsets (SpanSelection ):
@@ -561,6 +561,7 @@ class LabelsTag(ControlTag):
561561 _label_attr_name : str = "labels"
562562 _value_class : Type [LabelsValue ] = LabelsValue
563563
564+
564565 def to_json_schema (self ):
565566 """
566567 Converts the current LabelsTag instance into a JSON Schema.
@@ -572,16 +573,20 @@ def to_json_schema(self):
572573 "type" : "array" ,
573574 "items" : {
574575 "type" : "object" ,
575- "required" : ["start" , "end" , " labels" ],
576+ "required" : ["labels" ],
576577 "properties" : {
577578 "start" : {
578- "type" : "integer" ,
579+ "oneOf" : [
580+ {"type" : "integer" , "minimum" : 0 },
581+ {"type" : "number" , "minimum" : 0 }
582+ ],
579583 # TODO: this is incompatible with the OpenAI API using PredictedOutputs
580- "minimum" : 0
581584 },
582585 "end" : {
583- "type" : "integer" ,
584- "minimum" : 0
586+ "oneOf" : [
587+ {"type" : "integer" , "minimum" : 0 },
588+ {"type" : "number" , "minimum" : 0 }
589+ ]
585590 },
586591 "labels" : {
587592 "type" : "array" ,
0 commit comments