LemonAi. Providers. TextSanitizer
(lemon_ai v0.1.0)
View Source
Sanitizes text for safe use with AI providers.
Handles invalid or incomplete UTF-8 sequences by replacing them with the Unicode replacement character (U+FFFD), converts non-binary terms to strings, and normalizes nil input to an empty string.