EvaluationRulesClient Class

  • java.lang.Object
    • com.azure.ai.projects.EvaluationRulesClient

public final class EvaluationRulesClient

Initializes a new instance of the synchronous AIProjectClient type.

Method Summary

Modifier and Type Method and Description
EvaluationRule createOrUpdateEvaluationRule(String id, EvaluationRule evaluationRule)

Create or update an evaluation rule Creates a new evaluation rule, or replaces the existing rule when the identifier matches.

Response<BinaryData> createOrUpdateEvaluationRuleWithResponse(String id, BinaryData evaluationRule, RequestOptions requestOptions)

Create or update an evaluation rule Creates a new evaluation rule, or replaces the existing rule when the identifier matches.

void deleteEvaluationRule(String id)

Delete an evaluation rule Removes the specified evaluation rule from the project.

Response<Void> deleteEvaluationRuleWithResponse(String id, RequestOptions requestOptions)

Delete an evaluation rule Removes the specified evaluation rule from the project.

EvaluationRule getEvaluationRule(String id)

Get an evaluation rule Retrieves the specified evaluation rule and its configuration.

Response<BinaryData> getEvaluationRuleWithResponse(String id, RequestOptions requestOptions)

Get an evaluation rule Retrieves the specified evaluation rule and its configuration.

PagedIterable<EvaluationRule> listEvaluationRules()

List evaluation rules Returns the evaluation rules configured for the project, optionally filtered by action type, agent name, or enabled state.

PagedIterable<EvaluationRule> listEvaluationRules(EvaluationRuleActionType actionType, String agentName, Boolean enabled)

List evaluation rules Returns the evaluation rules configured for the project, optionally filtered by action type, agent name, or enabled state.

PagedIterable<BinaryData> listEvaluationRules(RequestOptions requestOptions)

List evaluation rules Returns the evaluation rules configured for the project, optionally filtered by action type, agent name, or enabled state.

Methods inherited from java.lang.Object

Method Details

createOrUpdateEvaluationRule

public EvaluationRule createOrUpdateEvaluationRule(String id, EvaluationRule evaluationRule)

Create or update an evaluation rule Creates a new evaluation rule, or replaces the existing rule when the identifier matches.

Parameters:

id - Unique identifier for the evaluation rule.
evaluationRule - Evaluation rule resource.

Returns:

evaluation rule model.

createOrUpdateEvaluationRuleWithResponse

public Response<BinaryData> createOrUpdateEvaluationRuleWithResponse(String id, BinaryData evaluationRule, RequestOptions requestOptions)

Create or update an evaluation rule Creates a new evaluation rule, or replaces the existing rule when the identifier matches.

Request Body Schema

{
     id: String (Required)
     displayName: String (Optional)
     description: String (Optional)
     action (Required): {
         type: String(continuousEvaluation/humanEvaluationPreview) (Required)
     }
     filter (Optional): {
         agentName: String (Required)
     }
     eventType: String(responseCompleted/manual) (Required)
     enabled: boolean (Required)
     systemData (Required): {
         String: String (Required)
     }
 }

Response Body Schema

{
     id: String (Required)
     displayName: String (Optional)
     description: String (Optional)
     action (Required): {
         type: String(continuousEvaluation/humanEvaluationPreview) (Required)
     }
     filter (Optional): {
         agentName: String (Required)
     }
     eventType: String(responseCompleted/manual) (Required)
     enabled: boolean (Required)
     systemData (Required): {
         String: String (Required)
     }
 }

Parameters:

id - Unique identifier for the evaluation rule.
evaluationRule - Evaluation rule resource.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

evaluation rule model along with Response<T>.

deleteEvaluationRule

public void deleteEvaluationRule(String id)

Delete an evaluation rule Removes the specified evaluation rule from the project.

Parameters:

id - Unique identifier for the evaluation rule.

deleteEvaluationRuleWithResponse

public Response<Void> deleteEvaluationRuleWithResponse(String id, RequestOptions requestOptions)

Delete an evaluation rule Removes the specified evaluation rule from the project.

Parameters:

id - Unique identifier for the evaluation rule.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

getEvaluationRule

public EvaluationRule getEvaluationRule(String id)

Get an evaluation rule Retrieves the specified evaluation rule and its configuration.

Parameters:

id - Unique identifier for the evaluation rule.

Returns:

an evaluation rule Retrieves the specified evaluation rule and its configuration.

getEvaluationRuleWithResponse

public Response<BinaryData> getEvaluationRuleWithResponse(String id, RequestOptions requestOptions)

Get an evaluation rule Retrieves the specified evaluation rule and its configuration.

Response Body Schema

{
     id: String (Required)
     displayName: String (Optional)
     description: String (Optional)
     action (Required): {
         type: String(continuousEvaluation/humanEvaluationPreview) (Required)
     }
     filter (Optional): {
         agentName: String (Required)
     }
     eventType: String(responseCompleted/manual) (Required)
     enabled: boolean (Required)
     systemData (Required): {
         String: String (Required)
     }
 }

Parameters:

id - Unique identifier for the evaluation rule.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

an evaluation rule Retrieves the specified evaluation rule and its configuration along with Response<T>.

listEvaluationRules

public PagedIterable<EvaluationRule> listEvaluationRules()

List evaluation rules Returns the evaluation rules configured for the project, optionally filtered by action type, agent name, or enabled state.

Returns:

paged collection of EvaluationRule items as paginated response with PagedIterable<T>.

listEvaluationRules

public PagedIterable<EvaluationRule> listEvaluationRules(EvaluationRuleActionType actionType, String agentName, Boolean enabled)

List evaluation rules Returns the evaluation rules configured for the project, optionally filtered by action type, agent name, or enabled state.

Parameters:

actionType - Filter by the type of evaluation rule.
agentName - Filter by the agent name.
enabled - Filter by the enabled status.

Returns:

paged collection of EvaluationRule items as paginated response with PagedIterable<T>.

listEvaluationRules

public PagedIterable<BinaryData> listEvaluationRules(RequestOptions requestOptions)

List evaluation rules Returns the evaluation rules configured for the project, optionally filtered by action type, agent name, or enabled state.

Query Parameters

| ---------- | ------- | -------- | -------------------------------------------------------------------------------------------------------- |
| Name       | Type    | Required | Description                                                                                              |
| actionType | String  | No       | Filter by the type of evaluation rule. Allowed values: "continuousEvaluation", "humanEvaluationPreview". |
| agentName  | String  | No       | Filter by the agent name.                                                                                |
| enabled    | Boolean | No       | Filter by the enabled status.                                                                            |

You can add these to a request with RequestOptions#addQueryParam

Response Body Schema

{
     id: String (Required)
     displayName: String (Optional)
     description: String (Optional)
     action (Required): {
         type: String(continuousEvaluation/humanEvaluationPreview) (Required)
     }
     filter (Optional): {
         agentName: String (Required)
     }
     eventType: String(responseCompleted/manual) (Required)
     enabled: boolean (Required)
     systemData (Required): {
         String: String (Required)
     }
 }

Parameters:

requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

paged collection of EvaluationRule items as paginated response with PagedIterable<T>.

Applies to