search

Function search 

pub fn search<T: AsRef<[u8]>>(
    user_history: &[T],
    text_embedding: &[u8],
) -> Result<Vec<ScoreResult>, Error>
Expand description

Search a user’s history for relevance to a given query string.

The text embedding is expected to be generated using the plumerai_vision_language package.

The results are returned in the same order as the user_history input, i.e. the first ScoreResult corresponds to the first video embedding in user_history.

§Arguments

  • user_history: Video embeddings, obtained from VLMVideoEmbedder.
  • text_embedding: The text embedding.

§Errors

  • Error::InvalidVideoEmbedding
  • Error::InvalidTextEmbedding