Type Alias CreateStructuredOutputRunnableConfig<RunInput, RunOutput>

CreateStructuredOutputRunnableConfig<RunInput, RunOutput>: {
    llm: Toolkit<Toolkit, Toolkit, Toolkit>;
    outputSchema: z.AnyZodObject | JsonSchema7Type;
    prompt: Toolkit<Toolkit<Extract<keyof RunInput, string>>>;
    outputParser?: Toolkit<RunOutput>;
}

Configuration params for the createStructuredOutputRunnable method.

Type Parameters

  • RunInput extends Record<string, any>
  • RunOutput

Type declaration

  • llm: Toolkit<Toolkit, Toolkit, Toolkit>

    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: Toolkit<Toolkit<Extract<keyof RunInput, string>>>

    BasePromptTemplate to pass to the model.

  • OptionaloutputParser?: Toolkit<RunOutput>

    BaseLLMOutputParser to use for parsing model outputs.