Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.praison.ai/llms.txt

Use this file to discover all available pages before exploring further.

similarity

AsyncMethod
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

text1
&str
required
No description available.
text2
&str
required
No description available.

Returns

Returns
Result<f32>
The result of the operation.