RaiInvocationModeration Class

  • java.lang.Object
    • com.azure.ai.agents.models.RaiInvocationModeration

Implements

public final class RaiInvocationModeration
implements JsonSerializable<RaiInvocationModeration>

Declares where request/response text lives so content-safety guardrails can extract it.

Constructor Summary

Constructor Description
RaiInvocationModeration(RaiInvocationResponseMode responseMode)

Creates an instance of RaiInvocationModeration class.

Method Summary

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

Reads an instance of RaiInvocationModeration from the JsonReader.

RaiInvocationContentType getInputContentType()

Get the inputContentType property: How the REQUEST body is parsed.

List<String> getInputPaths()

Get the inputPaths property: Path(s) to user text in the REQUEST body.

RaiInvocationContentType getOutputContentType()

Get the outputContentType property: How the RESPONSE body is parsed.

List<String> getOutputPaths()

Get the outputPaths property: Path(s) to agent text in a NON-STREAMING response body.

RaiInvocationResponseMode getResponseMode()

Get the responseMode property: Author-declared response shape; drives which output gate runs and which fields are required.

List<RaiSseTextSelector> getStreamSelectors()

Get the streamSelectors property: One SSE event->field selector per event type carrying text.

RaiInvocationModeration setInputContentType(RaiInvocationContentType inputContentType)

Set the inputContentType property: How the REQUEST body is parsed.

RaiInvocationModeration setInputPaths(List<String> inputPaths)

Set the inputPaths property: Path(s) to user text in the REQUEST body.

RaiInvocationModeration setOutputContentType(RaiInvocationContentType outputContentType)

Set the outputContentType property: How the RESPONSE body is parsed.

RaiInvocationModeration setOutputPaths(List<String> outputPaths)

Set the outputPaths property: Path(s) to agent text in a NON-STREAMING response body.

RaiInvocationModeration setStreamSelectors(List<RaiSseTextSelector> streamSelectors)

Set the streamSelectors property: One SSE event->field selector per event type carrying text.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

RaiInvocationModeration

public RaiInvocationModeration(RaiInvocationResponseMode responseMode)

Creates an instance of RaiInvocationModeration class.

Parameters:

responseMode - the responseMode value to set.

Method Details

fromJson

public static RaiInvocationModeration fromJson(JsonReader jsonReader)

Reads an instance of RaiInvocationModeration from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of RaiInvocationModeration 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.

getInputContentType

public RaiInvocationContentType getInputContentType()

Get the inputContentType property: How the REQUEST body is parsed. When omitted, the service defaults to `json`.

Returns:

the inputContentType value.

getInputPaths

public List<String> getInputPaths()

Get the inputPaths property: Path(s) to user text in the REQUEST body. Required when input_content_type is `json`.

Returns:

the inputPaths value.

getOutputContentType

public RaiInvocationContentType getOutputContentType()

Get the outputContentType property: How the RESPONSE body is parsed. When omitted, the service defaults to `json`.

Returns:

the outputContentType value.

getOutputPaths

public List<String> getOutputPaths()

Get the outputPaths property: Path(s) to agent text in a NON-STREAMING response body. Required when response_mode is non_streaming/both and output_content_type is `json`.

Returns:

the outputPaths value.

getResponseMode

public RaiInvocationResponseMode getResponseMode()

Get the responseMode property: Author-declared response shape; drives which output gate runs and which fields are required.

Returns:

the responseMode value.

getStreamSelectors

public List<RaiSseTextSelector> getStreamSelectors()

Get the streamSelectors property: One SSE event->field selector per event type carrying text. Required when response_mode is streaming/both and output_content_type is `json`.

Returns:

the streamSelectors value.

setInputContentType

public RaiInvocationModeration setInputContentType(RaiInvocationContentType inputContentType)

Set the inputContentType property: How the REQUEST body is parsed. When omitted, the service defaults to `json`.

Parameters:

inputContentType - the inputContentType value to set.

Returns:

the RaiInvocationModeration object itself.

setInputPaths

public RaiInvocationModeration setInputPaths(List<String> inputPaths)

Set the inputPaths property: Path(s) to user text in the REQUEST body. Required when input_content_type is `json`.

Parameters:

inputPaths - the inputPaths value to set.

Returns:

the RaiInvocationModeration object itself.

setOutputContentType

public RaiInvocationModeration setOutputContentType(RaiInvocationContentType outputContentType)

Set the outputContentType property: How the RESPONSE body is parsed. When omitted, the service defaults to `json`.

Parameters:

outputContentType - the outputContentType value to set.

Returns:

the RaiInvocationModeration object itself.

setOutputPaths

public RaiInvocationModeration setOutputPaths(List<String> outputPaths)

Set the outputPaths property: Path(s) to agent text in a NON-STREAMING response body. Required when response_mode is non_streaming/both and output_content_type is `json`.

Parameters:

outputPaths - the outputPaths value to set.

Returns:

the RaiInvocationModeration object itself.

setStreamSelectors

public RaiInvocationModeration setStreamSelectors(List<RaiSseTextSelector> streamSelectors)

Set the streamSelectors property: One SSE event->field selector per event type carrying text. Required when response_mode is streaming/both and output_content_type is `json`.

Parameters:

streamSelectors - the streamSelectors value to set.

Returns:

the RaiInvocationModeration object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to