This page is for version v0.24.0.
For other versions, use one of these documentation indexes:
- Latest (default): https://docs.nvidia.com/nemo/guardrails/latest/llms.txt
- v0.24.1: https://docs.nvidia.com/nemo/guardrails/v0.24.1/llms.txt
- v0.24.0: https://docs.nvidia.com/nemo/guardrails/v0.24.0/llms.txt
- v0.23.0: https://docs.nvidia.com/nemo/guardrails/v0.23.0/llms.txt
- v0.22.0: https://docs.nvidia.com/nemo/guardrails/v0.22.0/llms.txt
Module Contents
Classes
| Name | Description |
|---|---|
LLMStats | Simple class to store stats for the LLM usage. |
API
class nemoguardrails.logging.stats.LLMStats()
Simple class to store stats for the LLM usage.
_stats
= self._get_empty_stats()
nemoguardrails.logging.stats.LLMStats.__str__()
nemoguardrails.logging.stats.LLMStats._get_empty_stats()
staticmethod
nemoguardrails.logging.stats.LLMStats.get_stat(name)
nemoguardrails.logging.stats.LLMStats.get_stats()
nemoguardrails.logging.stats.LLMStats.inc(name: str,value: typing.Union[float, int] = 1)
Increment a stat.
nemoguardrails.logging.stats.LLMStats.reset()