RaiConfig Class

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

Implements

public final class RaiConfig
implements JsonSerializable<RaiConfig>

Configuration for Responsible AI (RAI) content filtering and safety features.

Constructor Summary

Constructor Description
RaiConfig(String raiPolicyName)

Creates an instance of RaiConfig class.

Method Summary

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

Reads an instance of RaiConfig from the JsonReader.

RaiInvocationModeration getInvocationsModeration()

Get the invocationsModeration property: Author-declared configuration telling the platform where user/agent text lives in the agent-defined invocations request/response bodies, so content-safety guardrails can extract and moderate it.

String getRaiPolicyName()

Get the raiPolicyName property: The name of the RAI policy to apply.

RaiConfig setInvocationsModeration(RaiInvocationModeration invocationsModeration)

Set the invocationsModeration property: Author-declared configuration telling the platform where user/agent text lives in the agent-defined invocations request/response bodies, so content-safety guardrails can extract and moderate it.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

RaiConfig

public RaiConfig(String raiPolicyName)

Creates an instance of RaiConfig class.

Parameters:

raiPolicyName - the raiPolicyName value to set.

Method Details

fromJson

public static RaiConfig fromJson(JsonReader jsonReader)

Reads an instance of RaiConfig from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

getInvocationsModeration

public RaiInvocationModeration getInvocationsModeration()

Get the invocationsModeration property: Author-declared configuration telling the platform where user/agent text lives in the agent-defined invocations request/response bodies, so content-safety guardrails can extract and moderate it. Optional; a rai_config without it leaves the invocations path without content-safety moderation.

Returns:

the invocationsModeration value.

getRaiPolicyName

public String getRaiPolicyName()

Get the raiPolicyName property: The name of the RAI policy to apply.

Returns:

the raiPolicyName value.

setInvocationsModeration

public RaiConfig setInvocationsModeration(RaiInvocationModeration invocationsModeration)

Set the invocationsModeration property: Author-declared configuration telling the platform where user/agent text lives in the agent-defined invocations request/response bodies, so content-safety guardrails can extract and moderate it. Optional; a rai_config without it leaves the invocations path without content-safety moderation.

Parameters:

invocationsModeration - the invocationsModeration value to set.

Returns:

the RaiConfig object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to