LlamaIndex
==========
IBM integration with LlamaIndex is available under `IBM and LlamaIndex LLM integration documentation `_, while for embedding integration you may visit `IBM and LlamaIndex Embedding integration documentation `_.
.. note::
The ``llama-index-llms-ibm==0.2.x`` package relies on version ``0.11.x`` of the ``llama-index-core`` package and ``ibm_watsonx_ai`` in version ``>=1.1.x``.
Installation and Setup
----------------------
Install the integration package with
.. code-block::
pip install -qU llama-index-llms-ibm
Get an IBM watsonx.ai api key and set it as an environment variable (``WATSONX_APIKEY``)
.. code-block::
import os
os.environ["WATSONX_APIKEY"] = watsonx_api_key
LLMs
----
See detailed example how to load a model in the following `link `_
.. code-block:: python
from llama_index.llms.ibm import WatsonxLLM
Embedding Models
----------------
Install the integration package with
.. code-block::
pip install -qU llama-index-embeddings-ibm
.. note::
The ``llama-index-embeddings-ibm==0.1.x`` package relies on version ``0.11.x`` of the ``llama-index-core`` package and ``ibm_watsonx_ai`` in version ``>=1.0.x``.
Usage example:
.. code-block::
from llama_index.embeddings.ibm import WatsonxEmbeddings
More details can be found `here `_
API reference
-------------
For detailed documentation of all IBM watsonx.ai features and configurations head to the `API reference `_