Close httplib2 connections.
create(parent, body=None, evaluationExpectationId=None, x__xgafv=None)
Creates an evaluation expectation.
delete(name, etag=None, x__xgafv=None)
Deletes an evaluation expectation.
Gets details of the specified evaluation expectation.
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists all evaluation expectations in the given app.
Retrieves the next page of results.
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates an evaluation expectation.
close()
Close httplib2 connections.
create(parent, body=None, evaluationExpectationId=None, x__xgafv=None)
Creates an evaluation expectation.
Args:
parent: string, Required. The app to create the evaluation expectation for. Format: `projects/{project}/locations/{location}/apps/{app}` (required)
body: object, The request body.
The object takes the form of:
{ # An evaluation expectation represents a specific criteria to evaluate against.
"createTime": "A String", # Output only. Timestamp when the evaluation expectation was created.
"displayName": "A String", # Required. User-defined display name. Must be unique within the app.
"etag": "A String", # Output only. Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
"llmCriteria": { # Configuration for LLM-based evaluation criteria. # Optional. Evaluation criteria based on an LLM prompt.
"prompt": "A String", # Required. The prompt/instructions provided to the LLM judge.
},
"name": "A String", # Identifier. The unique identifier of this evaluation expectation. Format: `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}`
"tags": [ # Optional. User-defined tags for expectations. Can be used to filter expectations.
"A String",
],
"updateTime": "A String", # Output only. Timestamp when the evaluation expectation was last updated.
}
evaluationExpectationId: string, Optional. The ID to use for the evaluation expectation, which will become the final component of the evaluation expectation's resource name. If not provided, a unique ID will be automatically assigned for the evaluation expectation.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # An evaluation expectation represents a specific criteria to evaluate against.
"createTime": "A String", # Output only. Timestamp when the evaluation expectation was created.
"displayName": "A String", # Required. User-defined display name. Must be unique within the app.
"etag": "A String", # Output only. Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
"llmCriteria": { # Configuration for LLM-based evaluation criteria. # Optional. Evaluation criteria based on an LLM prompt.
"prompt": "A String", # Required. The prompt/instructions provided to the LLM judge.
},
"name": "A String", # Identifier. The unique identifier of this evaluation expectation. Format: `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}`
"tags": [ # Optional. User-defined tags for expectations. Can be used to filter expectations.
"A String",
],
"updateTime": "A String", # Output only. Timestamp when the evaluation expectation was last updated.
}
delete(name, etag=None, x__xgafv=None)
Deletes an evaluation expectation.
Args:
name: string, Required. The resource name of the evaluation expectation to delete. (required)
etag: string, Optional. The current etag of the evaluation expectation. If an etag is not provided, the deletion will overwrite any concurrent changes. If an etag is provided and does not match the current etag of the evaluation expectation, deletion will be blocked and an ABORTED error will be returned.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}
get(name, x__xgafv=None)
Gets details of the specified evaluation expectation.
Args:
name: string, Required. The resource name of the evaluation expectation to retrieve. (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # An evaluation expectation represents a specific criteria to evaluate against.
"createTime": "A String", # Output only. Timestamp when the evaluation expectation was created.
"displayName": "A String", # Required. User-defined display name. Must be unique within the app.
"etag": "A String", # Output only. Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
"llmCriteria": { # Configuration for LLM-based evaluation criteria. # Optional. Evaluation criteria based on an LLM prompt.
"prompt": "A String", # Required. The prompt/instructions provided to the LLM judge.
},
"name": "A String", # Identifier. The unique identifier of this evaluation expectation. Format: `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}`
"tags": [ # Optional. User-defined tags for expectations. Can be used to filter expectations.
"A String",
],
"updateTime": "A String", # Output only. Timestamp when the evaluation expectation was last updated.
}
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists all evaluation expectations in the given app.
Args:
parent: string, Required. The resource name of the app to list evaluation expectations from. (required)
filter: string, Optional. Filter to be applied when listing the evaluation expectations. See https://google.aip.dev/160 for more details.
orderBy: string, Optional. Field to sort by. Only "name" and "create_time", and "update_time" are supported. Time fields are ordered in descending order, and the name field is ordered in ascending order. If not included, "update_time" will be the default. See https://google.aip.dev/132#ordering for more details.
pageSize: integer, Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
pageToken: string, Optional. The next_page_token value returned from a previous list EvaluationService.ListEvaluationExpectations call.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message for EvaluationService.ListEvaluationExpectations.
"evaluationExpectations": [ # The list of evaluation expectations.
{ # An evaluation expectation represents a specific criteria to evaluate against.
"createTime": "A String", # Output only. Timestamp when the evaluation expectation was created.
"displayName": "A String", # Required. User-defined display name. Must be unique within the app.
"etag": "A String", # Output only. Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
"llmCriteria": { # Configuration for LLM-based evaluation criteria. # Optional. Evaluation criteria based on an LLM prompt.
"prompt": "A String", # Required. The prompt/instructions provided to the LLM judge.
},
"name": "A String", # Identifier. The unique identifier of this evaluation expectation. Format: `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}`
"tags": [ # Optional. User-defined tags for expectations. Can be used to filter expectations.
"A String",
],
"updateTime": "A String", # Output only. Timestamp when the evaluation expectation was last updated.
},
],
"nextPageToken": "A String", # A token that can be sent as ListEvaluationExpectationsRequest.page_token to retrieve the next page. Absence of this field indicates there are no subsequent pages.
}
list_next()
Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call 'execute()' on to request the next
page. Returns None if there are no more items in the collection.
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates an evaluation expectation.
Args:
name: string, Identifier. The unique identifier of this evaluation expectation. Format: `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}` (required)
body: object, The request body.
The object takes the form of:
{ # An evaluation expectation represents a specific criteria to evaluate against.
"createTime": "A String", # Output only. Timestamp when the evaluation expectation was created.
"displayName": "A String", # Required. User-defined display name. Must be unique within the app.
"etag": "A String", # Output only. Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
"llmCriteria": { # Configuration for LLM-based evaluation criteria. # Optional. Evaluation criteria based on an LLM prompt.
"prompt": "A String", # Required. The prompt/instructions provided to the LLM judge.
},
"name": "A String", # Identifier. The unique identifier of this evaluation expectation. Format: `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}`
"tags": [ # Optional. User-defined tags for expectations. Can be used to filter expectations.
"A String",
],
"updateTime": "A String", # Output only. Timestamp when the evaluation expectation was last updated.
}
updateMask: string, Optional. Field mask is used to control which fields get updated. If the mask is not present, all fields will be updated.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # An evaluation expectation represents a specific criteria to evaluate against.
"createTime": "A String", # Output only. Timestamp when the evaluation expectation was created.
"displayName": "A String", # Required. User-defined display name. Must be unique within the app.
"etag": "A String", # Output only. Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
"llmCriteria": { # Configuration for LLM-based evaluation criteria. # Optional. Evaluation criteria based on an LLM prompt.
"prompt": "A String", # Required. The prompt/instructions provided to the LLM judge.
},
"name": "A String", # Identifier. The unique identifier of this evaluation expectation. Format: `projects/{project}/locations/{location}/apps/{app}/evaluationExpectations/{evaluation_expectation}`
"tags": [ # Optional. User-defined tags for expectations. Can be used to filter expectations.
"A String",
],
"updateTime": "A String", # Output only. Timestamp when the evaluation expectation was last updated.
}