mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-24 07:35:18 +00:00
- Description: Add verbose support for the extraction_chain - Issue: Fixes #7982 - Dependencies: NA - Twitter handle: sheikirfanbasha @hwchase17 and @agola11 --------- Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
parent
812a1643db
commit
d6493590da
@ -43,12 +43,16 @@ Passage:
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
def create_extraction_chain(schema: dict, llm: BaseLanguageModel) -> Chain:
|
||||
def create_extraction_chain(
|
||||
schema: dict, llm: BaseLanguageModel, verbose: bool = False
|
||||
) -> Chain:
|
||||
"""Creates a chain that extracts information from a passage.
|
||||
|
||||
Args:
|
||||
schema: The schema of the entities to extract.
|
||||
llm: The language model to use.
|
||||
verbose: Whether to run in verbose mode. In verbose mode, some intermediate
|
||||
logs will be printed to the console. Defaults to `langchain.verbose` value.
|
||||
|
||||
Returns:
|
||||
Chain that can be used to extract information from a passage.
|
||||
@ -62,6 +66,7 @@ def create_extraction_chain(schema: dict, llm: BaseLanguageModel) -> Chain:
|
||||
prompt=prompt,
|
||||
llm_kwargs=llm_kwargs,
|
||||
output_parser=output_parser,
|
||||
verbose=verbose,
|
||||
)
|
||||
return chain
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user