AzureGroundingEnhancementLineSpan Class

  • java.lang.Object
    • com.azure.ai.openai.models.AzureGroundingEnhancementLineSpan

Implements

public final class AzureGroundingEnhancementLineSpan
implements JsonSerializable<AzureGroundingEnhancementLineSpan>

A span object that represents a detected object and its bounding box information.

Method Summary

Modifier and Type Method and Description
static AzureGroundingEnhancementLineSpan fromJson(JsonReader jsonReader)

Reads an instance of AzureGroundingEnhancementLineSpan from the JsonReader.

int getLength()

Get the length property: The length of the span in characters, measured in Unicode codepoints.

int getOffset()

Get the offset property: The character offset within the text where the span begins.

List<AzureGroundingEnhancementCoordinatePoint> getPolygon()

Get the polygon property: An array of objects representing points in the polygon that encloses the detected object.

String getText()

Get the text property: The text content of the span that represents the detected object.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static AzureGroundingEnhancementLineSpan fromJson(JsonReader jsonReader)

Reads an instance of AzureGroundingEnhancementLineSpan from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of AzureGroundingEnhancementLineSpan if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getLength

public int getLength()

Get the length property: The length of the span in characters, measured in Unicode codepoints.

Returns:

the length value.

getOffset

public int getOffset()

Get the offset property: The character offset within the text where the span begins. This offset is defined as the position of the first character of the span, counting from the start of the text as Unicode codepoints.

Returns:

the offset value.

getPolygon

public List getPolygon()

Get the polygon property: An array of objects representing points in the polygon that encloses the detected object.

Returns:

the polygon value.

getText

public String getText()

Get the text property: The text content of the span that represents the detected object.

Returns:

the text value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to