MCPcopy Create free account
hub / github.com/acking-you/static_flow / embed_text_with_language

Function embed_text_with_language

crates/embedding/src/text.rs:109–114  ·  view source on GitHub ↗

Generate a semantic embedding for text using a language-specific default model.

(
    text: &str,
    language: TextEmbeddingLanguage,
)

Source from the content-addressed store, hash-verified

107/// Generate a semantic embedding for text using a language-specific default
108/// model.
109pub fn embed_text_with_language(
110 text: &str,
111 language: TextEmbeddingLanguage,
112) -> anyhow::Result<Vec<f32>> {
113 embed_text_with_model(text, language.default_model())
114}
115
116/// Generate a semantic embedding for text using an explicit model selection.
117pub fn embed_text_with_model(text: &str, model: TextEmbeddingModel) -> anyhow::Result<Vec<f32>> {

Callers 10

search_songs_semanticMethod · 0.85
backfill_song_vectorsMethod · 0.85
backfill_article_vectorsFunction · 0.85
runFunction · 0.85
runFunction · 0.85
sync_notesFunction · 0.85
embed_textFunction · 0.85

Calls 2

embed_text_with_modelFunction · 0.85
default_modelMethod · 0.80