Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add ValidationSummary model and update ValidationOutcome #25

Merged
merged 3 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions resources/py/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ bash ./py-build.sh
- [ValidationOutcome](https://github.com/guardrails-ai/guardrails-api-client/tree/main/resources/py/docs/ValidationOutcome.md);
- [ValidationOutcomeValidatedOutput](https://github.com/guardrails-ai/guardrails-api-client/tree/main/resources/py/docs/ValidationOutcomeValidatedOutput.md);
- [ValidationResult](https://github.com/guardrails-ai/guardrails-api-client/tree/main/resources/py/docs/ValidationResult.md);
- [ValidationSummary](https://github.com/guardrails-ai/guardrails-api-client/tree/main/resources/py/docs/ValidationSummary.md);
- [ValidationType](https://github.com/guardrails-ai/guardrails-api-client/tree/main/resources/py/docs/ValidationType.md);
- [ValidatorLog](https://github.com/guardrails-ai/guardrails-api-client/tree/main/resources/py/docs/ValidatorLog.md);
- [ValidatorLogInstanceId](https://github.com/guardrails-ai/guardrails-api-client/tree/main/resources/py/docs/ValidatorLogInstanceId.md);
Expand Down
1 change: 1 addition & 0 deletions resources/py/docs/ValidationOutcome.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**call_id** | **str** | Foreign key to the most recent Call this resulted from. |
**raw_llm_output** | **str** | The raw, unchanged string content from the LLM call. | [optional]
**validation_summaries** | [**List[ValidationSummary]**](ValidationSummary.md) | | [optional]
**validated_output** | [**ValidationOutcomeValidatedOutput**](ValidationOutcomeValidatedOutput.md) | | [optional]
**reask** | [**Reask**](Reask.md) | If validation continuously fails and all allocated reasks are used, this field will contain the final reask that would have been sent to the LLM if additional reasks were available. | [optional]
**validation_passed** | **bool** | A boolean to indicate whether or not the LLM output passed validation. If this is False, the validated_output may be invalid. | [optional]
Expand Down
33 changes: 33 additions & 0 deletions resources/py/docs/ValidationSummary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# ValidationSummary


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**validator_name** | **str** | The class name of the validator. |
**validator_status** | **str** | |
**property_path** | **str** | The JSON path to the property which was validated that produced this log. | [optional]
**failure_reason** | **str** | The error message indicating why validation failed. | [optional]
**error_spans** | [**List[ErrorSpan]**](ErrorSpan.md) | | [optional]

## Example

```python
from guardrails_api_client.models.validation_summary import ValidationSummary

# TODO update the JSON string below
json = "{}"
# create an instance of ValidationSummary from a JSON string
validation_summary_instance = ValidationSummary.from_json(json)
# print the JSON string representation of the object
print(ValidationSummary.to_json())

# convert the object into a dict
validation_summary_dict = validation_summary_instance.to_dict()
# create an instance of ValidationSummary from a dict
validation_summary_from_dict = ValidationSummary.from_dict(validation_summary_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


2 changes: 1 addition & 1 deletion resources/py/pyproject.toml.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "guardrails-api-client"
version = "0.3.12"
version = "0.3.13"
description = "Guardrails API Client."
authors = [
{name = "Guardrails AI", email = "[email protected]"}
Expand Down
27 changes: 21 additions & 6 deletions resources/ts/docs/interfaces/ValidationOutcome.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ ValidationOutcome
- [reask](ValidationOutcome.md#reask)
- [validatedOutput](ValidationOutcome.md#validatedoutput)
- [validationPassed](ValidationOutcome.md#validationpassed)
- [validationSummaries](ValidationOutcome.md#validationsummaries)

## Properties

Expand All @@ -33,7 +34,7 @@ ValidationOutcome

#### Defined in

src/models/ValidationOutcome.ts:33
src/models/ValidationOutcome.ts:38

___

Expand All @@ -49,7 +50,7 @@ ValidationOutcome

#### Defined in

src/models/ValidationOutcome.ts:63
src/models/ValidationOutcome.ts:74

___

Expand All @@ -65,7 +66,7 @@ ValidationOutcome

#### Defined in

src/models/ValidationOutcome.ts:39
src/models/ValidationOutcome.ts:44

___

Expand All @@ -81,7 +82,7 @@ ValidationOutcome

#### Defined in

src/models/ValidationOutcome.ts:51
src/models/ValidationOutcome.ts:62

___

Expand All @@ -95,7 +96,7 @@ ValidationOutcome

#### Defined in

src/models/ValidationOutcome.ts:45
src/models/ValidationOutcome.ts:56

___

Expand All @@ -111,4 +112,18 @@ ValidationOutcome

#### Defined in

src/models/ValidationOutcome.ts:57
src/models/ValidationOutcome.ts:68

___

### validationSummaries

• `Optional` **validationSummaries**: [`ValidationSummary`](ValidationSummary.md)[]

**`Memberof`**

ValidationOutcome

#### Defined in

src/models/ValidationOutcome.ts:50
93 changes: 93 additions & 0 deletions resources/ts/docs/interfaces/ValidationSummary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[@guardrails-ai/api-client](../README.md) / [Exports](../modules.md) / ValidationSummary

# Interface: ValidationSummary

**`Export`**

ValidationSummary

## Table of contents

### Properties

- [errorSpans](ValidationSummary.md#errorspans)
- [failureReason](ValidationSummary.md#failurereason)
- [propertyPath](ValidationSummary.md#propertypath)
- [validatorName](ValidationSummary.md#validatorname)
- [validatorStatus](ValidationSummary.md#validatorstatus)

## Properties

### errorSpans

• `Optional` **errorSpans**: [`ErrorSpan`](ErrorSpan.md)[]

**`Memberof`**

ValidationSummary

#### Defined in

src/models/ValidationSummary.ts:53

___

### failureReason

• `Optional` **failureReason**: `string`

The error message indicating why validation failed.

**`Memberof`**

ValidationSummary

#### Defined in

src/models/ValidationSummary.ts:47

___

### propertyPath

• `Optional` **propertyPath**: `string`

The JSON path to the property which was validated that produced this log.

**`Memberof`**

ValidationSummary

#### Defined in

src/models/ValidationSummary.ts:41

___

### validatorName

• **validatorName**: `string`

The class name of the validator.

**`Memberof`**

ValidationSummary

#### Defined in

src/models/ValidationSummary.ts:29

___

### validatorStatus

• **validatorStatus**: [`ValidationSummaryValidatorStatusEnum`](../modules.md#validationsummaryvalidatorstatusenum)

**`Memberof`**

ValidationSummary

#### Defined in

src/models/ValidationSummary.ts:35
Loading