@guardrails-ai/core / Exports / History / Iteration
History.Iteration
Name |
---|
T |
- _completionTokensConsumed
- _error
- _exception
- _failedValidations
- _inputs
- _logs
- _outputs
- _parsedOutput
- _promptTokensConsumed
- _rawOutput
- _reasks
- _status
- _tokensConsumed
- _validatedOutput
- _validationOutput
- _validatorLogs
- completionTokensConsumed
- error
- exception
- failedValidations
- inputs
- logs
- outputs
- parsedOutput
- promptTokensConsumed
- rawOutput
- reasks
- status
- tokensConsumed
- validatedOutput
- validationOutput
- validatorLogs
• new Iteration<T
>(inputs?
, outputs?
, logs?
, tokensConsumed?
, promptTokensConsumed?
, completionTokensConsumed?
, rawOutput?
, parsedOutput?
, validationOutput?
, validatedOutput?
, reasks?
, validatorLogs?
, error?
, exception?
, failedValidations?
, status?
): Iteration
<T
>
Name |
---|
T |
Name | Type |
---|---|
inputs? |
Inputs |
outputs? |
Outputs <T > |
logs? |
Stack <string > |
tokensConsumed? |
number |
promptTokensConsumed? |
number |
completionTokensConsumed? |
number |
rawOutput? |
string |
parsedOutput? |
T |
validationOutput? |
ReAsk | T |
validatedOutput? |
T |
reasks? |
ReAsk [] |
validatorLogs? |
ValidatorLogs [] |
error? |
string |
exception? |
Error |
failedValidations? |
ValidatorLogs [] |
status? |
string |
Iteration
<T
>
• Private
Optional
_completionTokensConsumed: number
Returns the number of completion/output tokens consumed during this iteration.
• Private
Optional
_error: string
The error message from any exception that raised and interrupted this iteration.
• Private
Optional
_exception: Error
The exception that interrupted this iteration.
• Private
Optional
_failedValidations: ValidatorLogs
[]
The validator logs for any validations that failed during this iteration.
• Private
_inputs: Inputs
The inputs for the iteration/step.
• Private
_logs: Stack
<string
>
Returns the logs from this iteration as a stack.
• Private
_outputs: Outputs
<T
>
The outputs from the iteration/step.
• Private
Optional
_parsedOutput: T
The output from the LLM after undergoing parsing but before validation.
• Private
Optional
_promptTokensConsumed: number
Returns the number of prompt/input tokens consumed during this iteration.
• Private
Optional
_rawOutput: string
The exact output from the LLM.
• Private
Optional
_reasks: ReAsk
[]
Reasks generated during validation. These would be incorporated into the prompt or the next LLM call.
• Private
Optional
_status: string
Representation of the end state of this iteration. OneOf: pass, fail, error, not run
• Private
Optional
_tokensConsumed: number
Returns the total number of tokens consumed during this iteration.
• Private
Optional
_validatedOutput: T
The valid output from the LLM after undergoing validation. Could be only a partial structure if field level reasks occur. Could contain fixed values.
• Private
Optional
_validationOutput: ReAsk
| T
The output from the validation process. Could be a combination of valid output and ReAsks
• Private
Optional
_validatorLogs: ValidatorLogs
[]
The results of each individual validation performed on the LLM response during this iteration.
• get
completionTokensConsumed(): undefined
| number
undefined
| number
• get
error(): undefined
| string
undefined
| string
• get
exception(): undefined
| Error
undefined
| Error
• get
failedValidations(): undefined
| ValidatorLogs
[]
undefined
| ValidatorLogs
[]
• get
inputs(): undefined
| Inputs
undefined
| Inputs
• get
logs(): undefined
| Stack
<string
>
undefined
| Stack
<string
>
• get
outputs(): undefined
| Outputs
<T
>
undefined
| Outputs
<T
>
• get
parsedOutput(): undefined
| T
undefined
| T
• get
promptTokensConsumed(): undefined
| number
undefined
| number
• get
rawOutput(): undefined
| string
undefined
| string
• get
reasks(): undefined
| ReAsk
[]
undefined
| ReAsk
[]
• get
status(): undefined
| string
undefined
| string
• get
tokensConsumed(): undefined
| number
undefined
| number
• get
validatedOutput(): undefined
| T
undefined
| T
• get
validationOutput(): undefined
| ReAsk
| T
undefined
| ReAsk
| T
• get
validatorLogs(): undefined
| ValidatorLogs
[]
undefined
| ValidatorLogs
[]
▸ fromPyIteration<U
>(pyIteration
): Promise
<Iteration
<U
>>
Name |
---|
U |
Name | Type |
---|---|
pyIteration |
any |
Promise
<Iteration
<U
>>