Module util

Source
Expand description

§General utilities.

Functions§

parse_audio_url
Parses and loads an audio file from a URL, file path, or data URL.
parse_image_url
Parses and loads an image from a URL, file path, or data URL.
sanitize_error_message
Sanitize error messages to remove internal implementation details like stack traces. This ensures that sensitive internal information is not exposed to API clients.
validate_model_name
Validates that the requested model matches one of the loaded models.