Interface TransformChainFields<I, O>

Interface that extends the ChainInputs interface and defines the fields required for a transform chain. It includes the transform function, inputVariables, and outputVariables properties.

Deprecated

Switch to expression language: https://js.langchain.com/docs/expression_language/ Will be removed in 0.2.0

interface TransformChainFields<I, O> {
    inputVariables: (keyof I extends string
        ? keyof any
        : never)[];
    outputVariables: (keyof O extends string
        ? keyof any
        : never)[];
    transform: ((values, callbacks?) => O | Promise<O>);
    callbackManager?: CallbackManager;
    memory?: BaseMemory;
}

Type Parameters

  • I extends ChainValues

  • O extends ChainValues

Hierarchy (view full)

Properties

inputVariables: (keyof I extends string
    ? keyof any
    : never)[]
outputVariables: (keyof O extends string
    ? keyof any
    : never)[]
transform: ((values, callbacks?) => O | Promise<O>)

Type declaration

    • (values, callbacks?): O | Promise<O>
    • Parameters

      • values: I
      • Optional callbacks: CallbackManager | (BaseCallbackHandler | BaseCallbackHandlerMethodsClass)[]

      Returns O | Promise<O>

callbackManager?: CallbackManager

⚠️ Deprecated ⚠️

Use callbacks instead

This feature is deprecated and will be removed in the future.

It is not recommended for use.

memory?: BaseMemory

Generated using TypeDoc