To simplify using LLMInterface.embeddings(), you can use the following embeddings model aliases:
default
large
small
If no model is passed, the system will use the default model for the LLM provider. If you'd prefer to specify your model by size instead of name, pass large
or small
.
Aliases can simplify working with multiple LLM providers letting you call different providers with the same model names out of the box.
const response = await LLMInterface.embeddings("openai", "Explain the importance of low latency LLMs", { model: "small" });
const geminiResult = await LLMInterface.embeddings("gemini", "Explain the importance of low latency LLMs", { model: "small" });
Changing the aliases is easy:
LLMInterface.setEmeddingsModelAlias("openai", "default", "text-embedding-3-large");
- This provider does not support model selection. Model names passed will be ignored.
default
: text-embedding-ada-002large
: text-embedding-3-largesmall
: text-embedding-3-small
default
: thenlper/gte-largelarge
: thenlper/gte-largesmall
: BAAI/bge-large-en-v1.5
default
: @cf/baai/bge-base-en-v1.5large
: @cf/baai/bge-large-en-v1.5small
: @cf/baai/bge-small-en-v1.5
default
: embed-english-v3.0large
: embed-english-v3.0small
: embed-english-light-v3.0
default
: BAAI/bge-base-en-v1.5large
: BAAI/bge-large-en-v1.5small
: BAAI/bge-base-en-v1.5
default
: nomic-ai/nomic-embed-text-v1.5large
: nomic-ai/nomic-embed-text-v1.5small
: nomic-ai/nomic-embed-text-v1.5
default
: text-embedding-004large
: text-embedding-004small
: text-embedding-004
default
: sentence-transformers/all-mpnet-base-v2large
: sentence-transformers/sentence-t5-largesmall
: sentence-transformers/all-MiniLM-L6-v2
default
: sentence-transformers/all-MiniLM-L6-v2large
: sentence-transformers/all-MiniLM-L6-v2small
: sentence-transformers/all-MiniLM-L6-v2
default
: nonelarge
: nonesmall
: none
default
: mistral-embedlarge
: mistral-embedsmall
: mistral-embed
default
: all-minilmlarge
: all-minilmsmall
: all-minilm
default
: text-embedding-ada-002large
: text-embedding-3-largesmall
: text-embedding-3-small
default
: bert-base-uncasedlarge
: BAAI/bge-large-en-v1.5small
: BAAI/bge-base-en-v1.5
default
: voyage-2large
: voyage-large-2small
: voyage-2
default
: ibm/slate-125m-english-rtrvrlarge
: ibm/slate-125m-english-rtrvrsmall
: ibm/slate-30m-english-rtrvr