• 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.

    Parameters

    • schema: FunctionParameters

      JSON schema of the function parameters.

    • llm: BaseChatModel<BaseFunctionCallOptions, BaseMessageChunk>

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

    Returns LLMChain<object, BaseChatModel<BaseFunctionCallOptions, BaseMessageChunk>>

    A LLMChain instance configured to return data matching the schema.

Generated using TypeDoc