Registry / llm-agents / llama-index-embeddings-ibm

llama-index-embeddings-ibm

JSON →
library0.6.0.post1pypypi✓ verified 84d ago

LlamaIndex integration for IBM watsonx.ai embeddings. Provides wrapper classes to generate embeddings using IBM foundation models via watsonx.ai API. Current version 0.6.0.post1, supports Python >=3.11, <4.0. Packages are released frequently alongside llama-index core updates.

pip install llama-index-embeddings-ibm
INSTALL
IMPORT
SIG · LLAMA-INDEX-EMBEDD
L
llama-index-embeddings-ibm
llm-agentspythonv0.6.0.post1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WatsonxEmbeddings
from llama_index.embeddings.ibm import WatsonxEmbeddings
from llama_index.embeddings.watsonx import WatsonxEmbeddings
The package namespace changed from 'watsonx' to 'ibm' in version 0.5.0+

Initialize WatsonxEmbeddings with credentials and generate an embedding.

from llama_index.embeddings.ibm import WatsonxEmbeddings embedding = WatsonxEmbeddings( model_id="ibm/slate-125m-english-rtrvr", url=os.environ.get("WATSONX_URL", "https://us-south.ml.cloud.ibm.com"), apikey=os.environ.get("WATSONX_APIKEY", ""), project_id=os.environ.get("WATSONX_PROJECT_ID", ""), ) embeddings = embedding.get_text_embedding("Hello World!") print(embeddings[:5])
Debug
Known issues
breakingIn version 0.5.0, the import path changed from `llama_index.embeddings.watsonx` to `llama_index.embeddings.ibm`. Update all imports.
fix
Use `from llama_index.embeddings.ibm import WatsonxEmbeddings`
affects: >=0.5.0
deprecatedPassing `credentials` as a dict is deprecated. Use explicit parameters (`url`, `apikey`, `project_id`) instead.
fix
Remove `credentials` argument and set individual parameters.
affects: >=0.6.0
gotchaThe `model_id` must include the provider prefix (e.g., 'ibm/slate-125m-english-rtrvr'). Omitting 'ibm/' may cause a silent fallback or error.
fix
Always prefix your model with 'ibm/'.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'ibm_watsonx_ai'
Missing required dependency `ibm-watsonx-ai` not installed.
fix
Run `pip install ibm-watsonx-ai`.
ImportError: cannot import name 'WatsonxEmbeddings' from 'llama_index.embeddings.watsonx'
Import path changed after version 0.5.0.
fix
Use `from llama_index.embeddings.ibm import WatsonxEmbeddings`.
AuthenticationError: Bearer token is invalid.
Missing or incorrect API key or project ID.
fix
Ensure `WATSONX_APIKEY` and `WATSONX_PROJECT_ID` are set correctly.
Upgrade
Version history
0.6.0.post1latest on PyPI · released Feb 17, 2026
Audit
Dependencies
llama-index-corerequiredRequired for base embedding classes and integration framework
ibm-watsonx-airequiredRequired for interaction with IBM watsonx.ai API
Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
2
Resources
llama-index-embeddings-ibm — pip install llama-index-embeddings-ibm · libregistry