Skip to main content
View module source on GitHub

current_retrieval

Get the current retrieval from the context variable. Returns: otherwise None.

retrieval

Decorator for tracking retrieval operations. This decorator wraps functions to automatically create and manage Retrieval objects for tracking retrieval operations, including inputs, outputs, and metadata. The decorated function must be called within a @trace or @span decorated context. Arguments: logger from context.
  • id Optional[str] or Optional[Callable], optional - The ID for the retrieval. If callable, it will be called to generate the ID. Defaults to None.
  • input Optional[str] or Optional[Callable], optional - The input for the retrieval. If callable, it will be called to generate the input. Defaults to None.