Toggle Menu
Prev Up Next

# `langchain_core.callbacks.base`.RetrieverManagerMixin

class langchain_core.callbacks.base.RetrieverManagerMixin

  Mixin for Retriever callbacks.

  Methods

  `__init__`() |
  `on_retriever_end`(documents, *, run_id[, ...]) | Run when Retriever ends running.
  `on_retriever_error`(error, *, run_id[, ...]) | Run when Retriever errors.

  __init__()
  on_retriever_end(documents: Sequence[Document], *, run_id: UUID, parent_run_id: Optional[UUID] = None, **kwargs: Any) → Any

    Run when Retriever ends running.

    Parameters

      - documents (Sequence[Document]) –

      - run_id (UUID) –

      - parent_run_id (Optional[UUID]) –

      - kwargs (Any) –

    Return type

      Any

  on_retriever_error(error: BaseException, *, run_id: UUID, parent_run_id: Optional[UUID] = None, **kwargs: Any) → Any

    Run when Retriever errors.

    Parameters

      - error (BaseException) –

      - run_id (UUID) –

      - parent_run_id (Optional[UUID]) –

      - kwargs (Any) –

    Return type

      Any