Skip to content

Commit c08bef3

Browse files
Merge pull request #25 from guardrails-ai/feat/validation-summary
feat: Add ValidationSummary model and update ValidationOutcome
2 parents f8f026f + 98b3b40 commit c08bef3

File tree

9 files changed

+280
-14
lines changed

9 files changed

+280
-14
lines changed

resources/py/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ bash ./py-build.sh
6464
- [ValidationOutcome](https://github.com/guardrails-ai/guardrails-api-client/tree/main/resources/py/docs/ValidationOutcome.md);
6565
- [ValidationOutcomeValidatedOutput](https://github.com/guardrails-ai/guardrails-api-client/tree/main/resources/py/docs/ValidationOutcomeValidatedOutput.md);
6666
- [ValidationResult](https://github.com/guardrails-ai/guardrails-api-client/tree/main/resources/py/docs/ValidationResult.md);
67+
- [ValidationSummary](https://github.com/guardrails-ai/guardrails-api-client/tree/main/resources/py/docs/ValidationSummary.md);
6768
- [ValidationType](https://github.com/guardrails-ai/guardrails-api-client/tree/main/resources/py/docs/ValidationType.md);
6869
- [ValidatorLog](https://github.com/guardrails-ai/guardrails-api-client/tree/main/resources/py/docs/ValidatorLog.md);
6970
- [ValidatorLogInstanceId](https://github.com/guardrails-ai/guardrails-api-client/tree/main/resources/py/docs/ValidatorLogInstanceId.md);

resources/py/docs/ValidationOutcome.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
99
**call_id** | **str** | Foreign key to the most recent Call this resulted from. |
1010
**raw_llm_output** | **str** | The raw, unchanged string content from the LLM call. | [optional]
11+
**validation_summaries** | [**List[ValidationSummary]**](ValidationSummary.md) | | [optional]
1112
**validated_output** | [**ValidationOutcomeValidatedOutput**](ValidationOutcomeValidatedOutput.md) | | [optional]
1213
**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]
1314
**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]
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# ValidationSummary
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**validator_name** | **str** | The class name of the validator. |
9+
**validator_status** | **str** | |
10+
**property_path** | **str** | The JSON path to the property which was validated that produced this log. | [optional]
11+
**failure_reason** | **str** | The error message indicating why validation failed. | [optional]
12+
**error_spans** | [**List[ErrorSpan]**](ErrorSpan.md) | | [optional]
13+
14+
## Example
15+
16+
```python
17+
from guardrails_api_client.models.validation_summary import ValidationSummary
18+
19+
# TODO update the JSON string below
20+
json = "{}"
21+
# create an instance of ValidationSummary from a JSON string
22+
validation_summary_instance = ValidationSummary.from_json(json)
23+
# print the JSON string representation of the object
24+
print(ValidationSummary.to_json())
25+
26+
# convert the object into a dict
27+
validation_summary_dict = validation_summary_instance.to_dict()
28+
# create an instance of ValidationSummary from a dict
29+
validation_summary_from_dict = ValidationSummary.from_dict(validation_summary_dict)
30+
```
31+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
32+
33+

resources/py/pyproject.toml.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "guardrails-api-client"
3-
version = "0.3.12"
3+
version = "0.3.13"
44
description = "Guardrails API Client."
55
authors = [
66
{name = "Guardrails AI", email = "[email protected]"}

resources/ts/docs/interfaces/ValidationOutcome.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ ValidationOutcome
1818
- [reask](ValidationOutcome.md#reask)
1919
- [validatedOutput](ValidationOutcome.md#validatedoutput)
2020
- [validationPassed](ValidationOutcome.md#validationpassed)
21+
- [validationSummaries](ValidationOutcome.md#validationsummaries)
2122

2223
## Properties
2324

@@ -33,7 +34,7 @@ ValidationOutcome
3334

3435
#### Defined in
3536

36-
src/models/ValidationOutcome.ts:33
37+
src/models/ValidationOutcome.ts:38
3738

3839
___
3940

@@ -49,7 +50,7 @@ ValidationOutcome
4950

5051
#### Defined in
5152

52-
src/models/ValidationOutcome.ts:63
53+
src/models/ValidationOutcome.ts:74
5354

5455
___
5556

@@ -65,7 +66,7 @@ ValidationOutcome
6566

6667
#### Defined in
6768

68-
src/models/ValidationOutcome.ts:39
69+
src/models/ValidationOutcome.ts:44
6970

7071
___
7172

@@ -81,7 +82,7 @@ ValidationOutcome
8182

8283
#### Defined in
8384

84-
src/models/ValidationOutcome.ts:51
85+
src/models/ValidationOutcome.ts:62
8586

8687
___
8788

@@ -95,7 +96,7 @@ ValidationOutcome
9596

9697
#### Defined in
9798

98-
src/models/ValidationOutcome.ts:45
99+
src/models/ValidationOutcome.ts:56
99100

100101
___
101102

@@ -111,4 +112,18 @@ ValidationOutcome
111112

112113
#### Defined in
113114

114-
src/models/ValidationOutcome.ts:57
115+
src/models/ValidationOutcome.ts:68
116+
117+
___
118+
119+
### validationSummaries
120+
121+
`Optional` **validationSummaries**: [`ValidationSummary`](ValidationSummary.md)[]
122+
123+
**`Memberof`**
124+
125+
ValidationOutcome
126+
127+
#### Defined in
128+
129+
src/models/ValidationOutcome.ts:50
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
[@guardrails-ai/api-client](../README.md) / [Exports](../modules.md) / ValidationSummary
2+
3+
# Interface: ValidationSummary
4+
5+
**`Export`**
6+
7+
ValidationSummary
8+
9+
## Table of contents
10+
11+
### Properties
12+
13+
- [errorSpans](ValidationSummary.md#errorspans)
14+
- [failureReason](ValidationSummary.md#failurereason)
15+
- [propertyPath](ValidationSummary.md#propertypath)
16+
- [validatorName](ValidationSummary.md#validatorname)
17+
- [validatorStatus](ValidationSummary.md#validatorstatus)
18+
19+
## Properties
20+
21+
### errorSpans
22+
23+
`Optional` **errorSpans**: [`ErrorSpan`](ErrorSpan.md)[]
24+
25+
**`Memberof`**
26+
27+
ValidationSummary
28+
29+
#### Defined in
30+
31+
src/models/ValidationSummary.ts:53
32+
33+
___
34+
35+
### failureReason
36+
37+
`Optional` **failureReason**: `string`
38+
39+
The error message indicating why validation failed.
40+
41+
**`Memberof`**
42+
43+
ValidationSummary
44+
45+
#### Defined in
46+
47+
src/models/ValidationSummary.ts:47
48+
49+
___
50+
51+
### propertyPath
52+
53+
`Optional` **propertyPath**: `string`
54+
55+
The JSON path to the property which was validated that produced this log.
56+
57+
**`Memberof`**
58+
59+
ValidationSummary
60+
61+
#### Defined in
62+
63+
src/models/ValidationSummary.ts:41
64+
65+
___
66+
67+
### validatorName
68+
69+
**validatorName**: `string`
70+
71+
The class name of the validator.
72+
73+
**`Memberof`**
74+
75+
ValidationSummary
76+
77+
#### Defined in
78+
79+
src/models/ValidationSummary.ts:29
80+
81+
___
82+
83+
### validatorStatus
84+
85+
**validatorStatus**: [`ValidationSummaryValidatorStatusEnum`](../modules.md#validationsummaryvalidatorstatusenum)
86+
87+
**`Memberof`**
88+
89+
ValidationSummary
90+
91+
#### Defined in
92+
93+
src/models/ValidationSummary.ts:35

0 commit comments

Comments
 (0)