langchain.chains.openai_tools.extraction.create_extraction_chain_pydantic¶
langchain.chains.openai_tools.extraction.create_extraction_chain_pydantic(pydantic_schemas: Union[List[Type[BaseModel]], Type[BaseModel]], llm: BaseLanguageModel, system_message: str = 'Extract and save the relevant entities mentioned in the following passage together with their properties.\n\nIf a property is not present and is not required in the function parameters, do not include it in the output.') → Runnable[source]¶
Examples using create_extraction_chain_pydantic¶
Set env var OPENAI_API_KEY or load from a .env file: