Documentation
¶
Index ¶
- Variables
- func Abs(x int) int
- func Clamp(x, min, max int) int
- func CloseLogger() error
- func Debug(msg string, args ...any)
- func Error(msg string, args ...any)
- func FormatBytes(bytes int64) string
- func FormatDuration(ms int64) string
- func FormatTokens(n int) string
- func FormatTokens64(n uint64) string
- func GetModelFamily(modelName string) string
- func GetTokmanSourceDir() string
- func Info(msg string, args ...any)
- func InitLogger(logPath string, level LogLevel) error
- func Max(a, b int) int
- func Min(a, b int) int
- func ShortenPath(path string, maxLen int) string
- func Warn(msg string, args ...any)
- type LogLevel
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger *slog.Logger
Logger is the global logger instance.
Functions ¶
func CloseLogger ¶ added in v0.28.0
func CloseLogger() error
CloseLogger closes the log file and resets the logger.
func FormatBytes ¶
func FormatDuration ¶
func FormatTokens ¶
func FormatTokens64 ¶
func GetModelFamily ¶
func GetTokmanSourceDir ¶ added in v0.28.0
func GetTokmanSourceDir() string
func InitLogger ¶
InitLogger initializes the global logger.
func ShortenPath ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.