similarity • Rust AI Agent SDK
similarity: Calculate cosine similarity between two texts. # Arguments * `text1` – First text * `text2` – Second text # Returns Cosine similarity score (0.0 to…
similarity
Async
Method
</div>
This is a method of the EmbeddingAgent class in the embedding module.
Calculate cosine similarity between two texts. # Arguments text1 – First text text2 – Second text # Returns Cosine similarity score (0.0 to 1.0)
Signature
async def similarity(&self, text1: &str, text2: &str) -> Result<f32>Parameters
ParamField
&strNo description available.
ParamField
&strNo description available.