Skip to main content

Embedding Models

info

This page may contain outdated information. It will be updated as soon as possible.

Amazon Bedrock Embeddings​

Used to load embedding models from Amazon Bedrock.

ParameterTypeDescriptionDefault
credentials_profile_namestrName of the AWS credentials profile in ~/.aws/credentials or ~/.aws/config, which has access keys or role information.
model_idstrID of the model to call, e.g., amazon.titan-embed-text-v1. This is equivalent to the modelId property in the list-foundation-models API.
endpoint_urlstrURL to set a specific service endpoint other than the default AWS endpoint.
region_namestrAWS region to use, e.g., us-west-2. Falls back to AWS_DEFAULT_REGION environment variable or region specified in ~/.aws/config if not provided.

Astra vectorize​

Used to generate server-side embeddings using DataStax Astra.

ParameterTypeDescriptionDefault
providerstrThe embedding provider to use.
model_namestrThe embedding model to use.
authenticationdictAuthentication parameters. Use the Astra Portal to add the embedding provider integration to your Astra organization.
provider_api_keystrAn alternative to the Astra Authentication that let you use directly the API key of the provider.
model_parametersdictAdditional model parameters.

Cohere Embeddings​

Used to load embedding models from Cohere.

ParameterTypeDescriptionDefault
cohere_api_keystrAPI key required to authenticate with the Cohere service.
modelstrLanguage model used for embedding text documents and performing queries.embed-english-v2.0
truncateboolWhether to truncate the input text to fit within the model's constraints.False

Azure OpenAI Embeddings​

Generate embeddings using Azure OpenAI models.

ParameterTypeDescriptionDefault
Azure EndpointstrYour Azure endpoint, including the resource. Example: https://example-resource.azure.openai.com/
Deployment NamestrThe name of the deployment.
API VersionstrThe API version to use, options include various dates.
API KeystrThe API key to access the Azure OpenAI service.

Hugging Face API Embeddings​

Generate embeddings using Hugging Face Inference API models.

ParameterTypeDescriptionDefault
API KeystrAPI key for accessing the Hugging Face Inference API.
API URLstrURL of the Hugging Face Inference API.http://localhost:8080
Model NamestrName of the model to use for embeddings.BAAI/bge-large-en-v1.5
Cache FolderstrFolder path to cache Hugging Face models.
Encode KwargsdictAdditional arguments for the encoding process.
Model KwargsdictAdditional arguments for the model.
Multi ProcessboolWhether to use multiple processes.False

Hugging Face Embeddings​

Used to load embedding models from HuggingFace.

ParameterTypeDescriptionDefault
Cache FolderstrFolder path to cache HuggingFace models.
Encode KwargsdictAdditional arguments for the encoding process.
Model KwargsdictAdditional arguments for the model.
Model NamestrName of the HuggingFace model to use.sentence-transformers/all-mpnet-base-v2
Multi ProcessboolWhether to use multiple processes.False

OpenAI Embeddings​

Used to load embedding models from OpenAI.

ParameterTypeDescriptionDefault
OpenAI API KeystrThe API key to use for accessing the OpenAI API.
Default HeadersDict[str, str]Default headers for the HTTP requests.
Default QueryNestedDictDefault query parameters for the HTTP requests.
Allowed SpecialList[str]Special tokens allowed for processing.[]
Disallowed SpecialList[str]Special tokens disallowed for processing.["all"]
Chunk SizeintChunk size for processing.1000
ClientAnyHTTP client for making requests.
DeploymentstrDeployment name for the model.text-embedding-3-small
Embedding Context LengthintLength of embedding context.8191
Max RetriesintMaximum number of retries for failed requests.6
ModelstrName of the model to use.text-embedding-3-small
Model KwargsNestedDictAdditional keyword arguments for the model.
OpenAI API BasestrBase URL of the OpenAI API.
OpenAI API TypestrType of the OpenAI API.
OpenAI API VersionstrVersion of the OpenAI API.
OpenAI OrganizationstrOrganization associated with the API key.
OpenAI ProxystrProxy server for the requests.
Request TimeoutfloatTimeout for the HTTP requests.
Show Progress BarboolWhether to show a progress bar for processing.False
Skip EmptyboolWhether to skip empty inputs.False
TikToken EnableboolWhether to enable TikToken.True
TikToken Model NamestrName of the TikToken model.

Ollama Embeddings​

Generate embeddings using Ollama models.

ParameterTypeDescriptionDefault
Ollama ModelstrName of the Ollama model to use.llama2
Ollama Base URLstrBase URL of the Ollama API.http://localhost:11434
Model TemperaturefloatTemperature parameter for the model. Adjusts the randomness in the generated embeddings.

VertexAI Embeddings​

Wrapper around Google Vertex AI Embeddings API.

ParameterTypeDescriptionDefault
credentialsCredentialsThe default custom credentials to use.
locationstrThe default location to use when making API calls.us-central1
max_output_tokensintToken limit determines the maximum amount of text output from one prompt.128
model_namestrThe name of the Vertex AI large language model.text-bison
projectstrThe default GCP project to use when making Vertex API calls.
request_parallelismintThe amount of parallelism allowed for requests issued to VertexAI models.5
temperaturefloatTunes the degree of randomness in text generations. Should be a non-negative value.0
top_kintHow the model selects tokens for output, the next token is selected from the top k tokens.40
top_pfloatTokens are selected from the most probable to least until the sum of their probabilities exceeds the top p value.0.95
tuned_model_namestrThe name of a tuned model. If provided, model_name is ignored.
verboseboolThis parameter controls the level of detail in the output. When set to True, it prints internal states of the chain to help debug.False

Previous Vector Stores

Hi, how can I help you?