End a trace for a chain run.
(
self,
outputs: Dict[str, Any],
*,
run_id: UUID,
inputs: Optional[Dict[str, Any]] = None,
**kwargs: Any,
)
| 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, |
no test coverage detected