langchain.chains.openai_functions.tagging.create_tagging_chain_pydantic¶
langchain.chains.openai_functions.tagging.create_tagging_chain_pydantic(pydantic_schema: Any, llm: BaseLanguageModel, prompt: Optional[ChatPromptTemplate] = None, **kwargs: Any) → Chain[source]¶
Creates a chain that extracts information from a passagebased on a pydantic schema.
Parameters
pydantic_schema – The pydantic schema of the entities to extract.
llm – The language model to use.
Returns
Chain (LLMChain) that can be used to extract information from a passage.
Examples using create_tagging_chain_pydantic¶
Set env var OPENAI_API_KEY or load from a .env file: