current_generation
| Name | Description |
|---|---|
Optional[[Generation](/sdk/python/references/logger/components/generation)] | The current generation instance if one exists, |
generation
| Name | Type | Description |
|---|---|---|
logger | Optional[Logger] | Maxim logger instance. If None, uses the current |
idOptional[Union[Callable, str]] - Generation ID. Can be a string or a callable that returns a string. If None, generates a UUID.nameOptional[str] - Human-readable name for the generation.maxim_prompt_idOptional[str] - ID of the Maxim prompt template used.tagsOptional[Dict[str, str]] - Key-value pairs for tagging the generation.evaluatorsOptional[List[str]] - List of evaluator names to run on this generation.evaluator_variablesOptional[Dict[str, str]] - Variables to pass to evaluators.
| Name | Description |
|---|---|
Callable | The decorator function that wraps the target function. |
ValueError- If no logger is found or if called outside of a trace/span context when raise_exceptions is True.