Interface: OutputConfig<T>
Defined in: packages/core/src/utils/output.ts:9
What the Output.* helpers return.
Type Parameters
T
T
Properties
_choices?
optional_choices?: readonlystring[]
Defined in: packages/core/src/utils/output.ts:14
Only for the choice type.
_jsonSchema?
optional_jsonSchema?:JSONSchema7
Defined in: packages/core/src/utils/output.ts:16
The JSON Schema as given (only for jsonSchema type).
_name?
optional_name?:string
Defined in: packages/core/src/utils/output.ts:18
The output's name for the provider (only for jsonSchema type).
_onInvalid?
optional_onInvalid?:"text"
Defined in: packages/core/src/utils/output.ts:25
What the bot answers when the reply does not parse or validate (json and
jsonSchema types). Unset: the turn fails. 'text': the model's text.
_type
_type:
"object"|"array"|"value"|"choice"|"json"|"jsonSchema"
Defined in: packages/core/src/utils/output.ts:12
_validate?
optional_validate?: (value) =>T
Defined in: packages/core/src/utils/output.ts:20
The caller's check, returning the value (only for jsonSchema type).
Parameters
value
unknown
Returns
T
schema
schema:
ZodType<T>
Defined in: packages/core/src/utils/output.ts:11
Transport schema: root for object/value, element for array, unused for choice.