Function that creates an extraction chain from a Zod schema. It converts the Zod schema to a JSON schema using zod-to-json-schema before creating the extraction chain.
The Zod schema which extracted data should match
Must be a ChatOpenAI or AnthropicFunctions model that supports function calling.
A LLMChain instance configured to return data matching the schema.
Generated using TypeDoc
Function that creates an extraction chain from a Zod schema. It converts the Zod schema to a JSON schema using zod-to-json-schema before creating the extraction chain.