yera.models.context.base
Module containing the base class for all model contexts.
Symbols
BaseModelContext
Inherits:
ABCSubclasses:
LLMContextThe abstract base class for all model context classes.
Implementations must implement a method that gets the current value in a context var. This is used to manage a stack of model contexts.
Methods
BaseModelContext.__enter__
__enter__() → NoneEnter the model context and make it the active one.
BaseModelContext.__exit__
__exit__(
exc_type: type[BaseException] | None,
exc_val: BaseException | None,
exc_tb: TracebackType | None,
)Exit the model context and return to the previous context value.