Skip to content

Home > llm-ops > TypeScriptChain

TypeScriptChain class

Creates an object that can translate natural language requests into JSON objects of the given type. The specified type argument T must be the same type as typeName in the given schema. The function creates a TypeChatJsonValidator<T> and stores it in the validator property of the returned instance.

Signature:

typescript
export declare class TypeScriptChain
export declare class TypeScriptChain

Constructors

ConstructorModifiersDescription
(constructor)(llm)Constructs a new instance of the TypeScriptChain class

Properties

PropertyModifiersTypeDescription
attemptRepairboolean
llmLLM

Methods

MethodModifiersDescription
call(params)
createRepairPrompt(validationError)
createRequestPrompt(validator)
exportHistory()

Released under the MIT License.