Skip to content

Latest commit

 

History

History
400 lines (222 loc) · 9.1 KB

History.Outputs.md

File metadata and controls

400 lines (222 loc) · 9.1 KB

@guardrails-ai/core / Exports / History / Outputs

Class: Outputs<T>

History.Outputs

Type parameters

Name
T

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Outputs<T>(llmResponseInfo?, rawOutput?, parsedOutput?, validationOutput?, validatedOutput?, reasks?, validatorLogs?, error?, exception?, failedValidations?, status?): Outputs<T>

Type parameters

Name
T

Parameters

Name Type
llmResponseInfo? LLMResponse
rawOutput? string
parsedOutput? T
validationOutput? ReAsk | T
validatedOutput? T
reasks? ReAsk[]
validatorLogs? ValidatorLogs[]
error? string
exception? Error
failedValidations? ValidatorLogs[]
status? string

Returns

Outputs<T>

Defined in

src/history/outputs.ts:56

Properties

_error

Private Optional _error: string

The error message from any exception that raised and interrupted the process.

Defined in

src/history/outputs.ts:41


_exception

Private Optional _exception: Error

The exception that interrupted the process.

Defined in

src/history/outputs.ts:45


_failedValidations

Private Optional _failedValidations: ValidatorLogs[]

A subset of validatorLogs for any validations that did not pass.

Defined in

src/history/outputs.ts:49


_llmResponseInfo

Private Optional _llmResponseInfo: LLMResponse

Information from the LLM response.

Defined in

src/history/outputs.ts:11


_parsedOutput

Private Optional _parsedOutput: T

The output parsed from the LLM response as it was passed into validation.

Defined in

src/history/outputs.ts:19


_rawOutput

Private Optional _rawOutput: string

The exact output from the LLM.

Defined in

src/history/outputs.ts:15


_reasks

Private Optional _reasks: ReAsk[]

Information from the validation process used to construct a ReAsk to the LLM on validation failure.

Defined in

src/history/outputs.ts:33


_status

Private Optional _status: string

Representation of the end state of the validation run OneOf: pass, fail, error, not run

Defined in

src/history/outputs.ts:54


_validatedOutput

Private Optional _validatedOutput: T

The valid output after validation. Could be only a partial structure if field level reasks occur. Could contain fixed values.

Defined in

src/history/outputs.ts:29


_validationOutput

Private Optional _validationOutput: ReAsk | T

The output from the validation process.

Defined in

src/history/outputs.ts:23


_validatorLogs

Private Optional _validatorLogs: ValidatorLogs[]

The results of each individual validation.

Defined in

src/history/outputs.ts:37

Accessors

error

get error(): undefined | string

Returns

undefined | string

Defined in

src/history/outputs.ts:158


exception

get exception(): undefined | Error

Returns

undefined | Error

Defined in

src/history/outputs.ts:161


failedValidations

get failedValidations(): undefined | ValidatorLogs[]

Returns

undefined | ValidatorLogs[]

Defined in

src/history/outputs.ts:164


llmResponseInfo

get llmResponseInfo(): undefined | LLMResponse

Returns

undefined | LLMResponse

Defined in

src/history/outputs.ts:137


parsedOutput

get parsedOutput(): undefined | T

Returns

undefined | T

Defined in

src/history/outputs.ts:143


rawOutput

get rawOutput(): undefined | string

Returns

undefined | string

Defined in

src/history/outputs.ts:140


reasks

get reasks(): undefined | ReAsk[]

Returns

undefined | ReAsk[]

Defined in

src/history/outputs.ts:152


status

get status(): undefined | string

Returns

undefined | string

Defined in

src/history/outputs.ts:167


validatedOutput

get validatedOutput(): undefined | T

Returns

undefined | T

Defined in

src/history/outputs.ts:149


validationOutput

get validationOutput(): undefined | ReAsk | T

Returns

undefined | ReAsk | T

Defined in

src/history/outputs.ts:146


validatorLogs

get validatorLogs(): undefined | ValidatorLogs[]

Returns

undefined | ValidatorLogs[]

Defined in

src/history/outputs.ts:155

Methods

fromPyOutputs

fromPyOutputs<U>(pyOutputs): Promise<Outputs<Awaited<U>>>

Type parameters

Name
U

Parameters

Name Type
pyOutputs any

Returns

Promise<Outputs<Awaited<U>>>

Defined in

src/history/outputs.ts:82