litellm_to_list
embeds: The LiteLLM embedding response.
LiteLLMEncoder Objects
pip install "semantic-router[litellm]".
__init__
name(str): The name of the embedding model to use. Must use LiteLLM naming convention (e.g. “openai/text-embedding-3-small” or “mistral/mistral-embed”).score_threshold(float): The score threshold for the embeddings.
ImportError: If litellm is not installed.
__call__
docs: List of text documents to encode.
acall
docs: List of documents to encode.

