API version (e.g. for Azure).
| Name | Type |
|---|---|
| router | Any |
LiteLLM Router-backed embedding model.
Wraps a litellm.Router instance to provide load-balanced embedding
calls across multiple deployments of the same model.
Example:
.. code-block:: python
from litellm import Router from langchain_litellm import LiteLLMEmbeddingsRouter
router = Router( model_list=[ { "model_name": "text-embedding-3-small", "litellm_params": { "model": "openai/text-embedding-3-small", "api_key": "sk-key1", }, }, { "model_name": "text-embedding-3-small", "litellm_params": { "model": "openai/text-embedding-3-small", "api_key": "sk-key2", }, }, ] ) embeddings = LiteLLMEmbeddingsRouter(router=router)
A litellm.Router instance.
Additional parameters passed to LiteLLMEmbeddings.
A litellm.Router instance.
Embed a list of document texts via the router.
Embed a single query text via the router.
Async embed a list of document texts via the router.
Async embed a single query text via the router.