create_qa_with_structure_chain(
llm: BaseLanguageModel,
schema: dict | type[BaseModel],
output_parser: str| Name | Type | Description |
|---|---|---|
llm* | BaseLanguageModel | Language model to use for the chain. |
schema* | dict | type[BaseModel] | Pydantic schema to use for the output. |
output_parser | str | Default: 'base' |
prompt | PromptTemplate | ChatPromptTemplate | None | Default: None |
verbose | bool | Default: False |
Create a question answering chain with structure.
Create a question answering chain that returns an answer with sources based on schema.
Output parser to use. Should be one of 'pydantic' or 'base'.
Optional prompt to use for the chain.
Whether to run the chain in verbose mode.