docs: Updated text embedding model for IBM provider (#31554)

Thank you for contributing to LangChain!

Description: Updated text embedding (`WatsonxEmbeddings`) model for IBM
provider
This commit is contained in:
Mateusz Szewczyk 2025-06-10 21:41:36 +02:00 committed by GitHub
parent b0f100af7e
commit eadbb9077e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -135,14 +135,14 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"from langchain_ibm import WatsonxEmbeddings\n", "from langchain_ibm import WatsonxEmbeddings\n",
"\n", "\n",
"watsonx_embedding = WatsonxEmbeddings(\n", "watsonx_embedding = WatsonxEmbeddings(\n",
" model_id=\"ibm/slate-125m-english-rtrvr\",\n", " model_id=\"ibm/granite-embedding-107m-multilingual\",\n",
" url=\"https://us-south.ml.cloud.ibm.com\",\n", " url=\"https://us-south.ml.cloud.ibm.com\",\n",
" project_id=\"PASTE YOUR PROJECT_ID HERE\",\n", " project_id=\"PASTE YOUR PROJECT_ID HERE\",\n",
" params=embed_params,\n", " params=embed_params,\n",
@ -163,7 +163,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"watsonx_embedding = WatsonxEmbeddings(\n", "watsonx_embedding = WatsonxEmbeddings(\n",
" model_id=\"ibm/slate-125m-english-rtrvr\",\n", " model_id=\"ibm/granite-embedding-107m-multilingual\",\n",
" url=\"PASTE YOUR URL HERE\",\n", " url=\"PASTE YOUR URL HERE\",\n",
" username=\"PASTE YOUR USERNAME HERE\",\n", " username=\"PASTE YOUR USERNAME HERE\",\n",
" password=\"PASTE YOUR PASSWORD HERE\",\n", " password=\"PASTE YOUR PASSWORD HERE\",\n",
@ -192,7 +192,7 @@
"api_client = APIClient(...)\n", "api_client = APIClient(...)\n",
"\n", "\n",
"watsonx_embedding = WatsonxEmbeddings(\n", "watsonx_embedding = WatsonxEmbeddings(\n",
" model_id=\"ibm/slate-125m-english-rtrvr\",\n", " model_id=\"ibm/granite-embedding-107m-multilingual\",\n",
" watsonx_client=api_client,\n", " watsonx_client=api_client,\n",
")" ")"
] ]
@ -341,7 +341,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.10.14" "version": "3.11.12"
} }
}, },
"nbformat": 4, "nbformat": 4,