_call() — langchain Function Reference
Architecture documentation for the _call() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 90aa30a1_894c_0c7f_2f26_64e1e1157b85["_call()"] 94675137_e239_b0ed_4295_d86f72dadd0c["LLMSummarizationCheckerChain"] 90aa30a1_894c_0c7f_2f26_64e1e1157b85 -->|defined in| 94675137_e239_b0ed_4295_d86f72dadd0c style 90aa30a1_894c_0c7f_2f26_64e1e1157b85 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/chains/llm_summarization_checker/base.py lines 147–177
def _call(
self,
inputs: dict[str, Any],
run_manager: CallbackManagerForChainRun | None = None,
) -> dict[str, str]:
_run_manager = run_manager or CallbackManagerForChainRun.get_noop_manager()
all_true = False
count = 0
output = None
original_input = inputs[self.input_key]
chain_input = original_input
while not all_true and count < self.max_checks:
output = self.sequential_chain(
{"summary": chain_input},
callbacks=_run_manager.get_child(),
)
count += 1
if output["all_true"].strip() == "True":
break
if self.verbose:
logger.info(output["revised_summary"])
chain_input = output["revised_summary"]
if not output:
msg = "No output from chain"
raise ValueError(msg)
return {self.output_key: output["revised_summary"].strip()}
Domain
Subdomains
Source
Frequently Asked Questions
What does _call() do?
_call() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/chains/llm_summarization_checker/base.py.
Where is _call() defined?
_call() is defined in libs/langchain/langchain_classic/chains/llm_summarization_checker/base.py at line 147.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free