Type alias CreateStructuredOutputRunnableConfig<RunInput, RunOutput>

CreateStructuredOutputRunnableConfig<RunInput, RunOutput>: {
    llm: RunnableInterface<BaseLanguageModelInput, BaseMessage, BaseFunctionCallOptions>;
    outputSchema: z.AnyZodObject | JsonSchema7Type;
    prompt: BasePromptTemplate<InputValues<Extract<keyof RunInput, string>>>;
    outputParser?: BaseOutputParser<RunOutput>;
}

Configuration params for the createStructuredOutputRunnable method.

Type Parameters

  • RunInput extends Record<string, any>

  • RunOutput

Type declaration

  • llm: RunnableInterface<BaseLanguageModelInput, BaseMessage, BaseFunctionCallOptions>

    Language model to use, assumed to support the OpenAI function-calling API.

  • outputSchema: z.AnyZodObject | JsonSchema7Type

    Schema to output. Must be either valid JSONSchema or a Zod schema.

  • prompt: BasePromptTemplate<InputValues<Extract<keyof RunInput, string>>>

    BasePromptTemplate to pass to the model.

  • Optional outputParser?: BaseOutputParser<RunOutput>

    BaseLLMOutputParser to use for parsing model outputs.

Generated using TypeDoc