• Function that creates an extraction chain using the provided JSON schema. It sets up the necessary components, such as the prompt, output parser, and tags.


    • schema: FunctionParameters

      JSON schema of the function parameters.

    • llm: BaseChatModel<BaseFunctionCallOptions>

      Must be a ChatOpenAI or AnthropicFunctions model that supports function calling.

    Returns LLMChain<string, BaseChatModel<BaseFunctionCallOptions>>

    A LLMChain instance configured to return data matching the schema.

Generated using TypeDoc