Skip to main content
Generate text embeddings using IBM’s watsonx.ai platform.

Supported Models

You can find a list of supported models at IBM watsonx.ai Documentation. The currently supported model names are:
For new tables, ibm/granite-embedding-278m-multilingual is the recommended default. Older model IDs (such as ibm/slate-125m-english-rtrvr and sentence-transformers/all-minilm-l12-v2) remain resolvable for tables whose stored metadata references them, but they are no longer advertised for new use.

Parameters

The following parameters can be passed to the create method:
You must supply exactly one of project_id or space_id (either as an argument or via its environment variable). Setting both, or neither, raises a ValueError.

Usage Example

First, the watsonx.ai library is an optional dependency, so must be installed separately:
Optionally set environment variables (if not passing credentials to create directly):