MCPcopy Create free account
hub / github.com/InfinitiBit/graphbit / as_texts

Method as_texts

core/src/embeddings.rs:85–90  ·  view source on GitHub ↗

Get the texts as a vector

(&self)

Source from the content-addressed store, hash-verified

83impl EmbeddingInput {
84 /// Get the texts as a vector
85 pub fn as_texts(&self) -> Vec<&str> {
86 match self {
87 Self::Single(text) => vec![text.as_str()],
88 Self::Multiple(texts) => texts.iter().map(String::as_str).collect(),
89 }
90 }
91
92 /// Get the number of texts
93 pub fn len(&self) -> usize {

Callers 3

generate_embeddingsMethod · 0.80
generate_embeddingsMethod · 0.80

Calls

no outgoing calls

Tested by 1