pip install 'semantic-router[fastembed]'
Arguments:
name
: The name of the embedding model to use.max_length
: The maximum length of the input text.cache_dir
: The directory to cache the embedding model.threads
: The number of threads to use for the embedding.score_threshold
(float
): The threshold for the score of the embedding.docs
(List[str]
): The documents to embed.ValueError
: If the embedding fails.List[List[float]]
: The vector embeddings of the documents.