Skip to main content

is_embeddable

Function is_embeddable 

Source
pub fn is_embeddable(s: &str) -> bool
Expand description

Returns true if s is non-empty after stripping ASCII whitespace.

Used to detect inputs that would produce degenerate zero/NaN embeddings when sent to an embedding API.