MCPcopy
hub / github.com/langchain-ai/langchain / on_chain_end

Method on_chain_end

libs/core/langchain_core/tracers/base.py:201–218  ·  view source on GitHub ↗

End a trace for a chain run.

(
        self,
        outputs: Dict[str, Any],
        *,
        run_id: UUID,
        inputs: Optional[Dict[str, Any]] = None,
        **kwargs: Any,
    )

Source from the content-addressed store, hash-verified

199 return chain_run
200
201 def on_chain_end(
202 self,
203 outputs: Dict[str, Any],
204 *,
205 run_id: UUID,
206 inputs: Optional[Dict[str, Any]] = None,
207 **kwargs: Any,
208 ) -> Run:
209 """End a trace for a chain run."""
210 chain_run = self._complete_chain_run(
211 outputs=outputs,
212 run_id=run_id,
213 inputs=inputs,
214 **kwargs,
215 )
216 self._end_trace(chain_run)
217 self._on_chain_end(chain_run)
218 return chain_run
219
220 def on_chain_error(
221 self,

Callers 15

_call_with_configMethod · 0.45
_acall_with_configMethod · 0.45
_batch_with_configMethod · 0.45
_abatch_with_configMethod · 0.45
invokeMethod · 0.45
ainvokeMethod · 0.45
batchMethod · 0.45
abatchMethod · 0.45
invokeMethod · 0.45
ainvokeMethod · 0.45

Calls 3

_end_traceMethod · 0.95
_complete_chain_runMethod · 0.80
_on_chain_endMethod · 0.45

Tested by

no test coverage detected