Skip to content

The agent engineering platform.

docs: Update IBM WatsonxLLM and ChatWatsonx documentation (#29752)

Mateusz Szewczykb82cef36a5d1
diff --git a/docs/docs/integrations/chat/ibm_watsonx.ipynb b/docs/docs/integrations/chat/ibm_watsonx.ipynb
index e6755d9a4b..ae87d6cdf0 100644
--- a/docs/docs/integrations/chat/ibm_watsonx.ipynb
+++ b/docs/docs/integrations/chat/ibm_watsonx.ipynb
@@ -210,7 +210,7 @@
"id": "96ed13d4",
"metadata": {},
"source": [
- "Instead of `model_id`, you can also pass the `deployment_id` of the previously tuned model. The entire model tuning workflow is described in [Working with TuneExperiment and PromptTuner](https://ibm.github.io/watsonx-ai-python-sdk/pt_working_with_class_and_prompt_tuner.html)."
+ "Instead of `model_id`, you can also pass the `deployment_id` of the previously [deployed model with reference to a Prompt Template](https://cloud.ibm.com/apidocs/watsonx-ai#deployments-text-chat)."
]
},
{
@@ -228,6 +228,31 @@
")"
]
},
+ {
+ "cell_type": "markdown",
+ "id": "3d29767c",
+ "metadata": {},
+ "source": [
+ "For certain requirements, there is an option to pass the IBM's [`APIClient`](https://ibm.github.io/watsonx-ai-python-sdk/base.html#apiclient) object into the `ChatWatsonx` class."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "0ae9531e",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "from ibm_watsonx_ai import APIClient\n",
+ "\n",
+ "api_client = APIClient(...)\n",
+ "\n",
+ "chat = ChatWatsonx(\n",
+ " model_id=\"ibm/granite-34b-code-instruct\",\n",
+ " watsonx_client=api_client,\n",
+ ")"
+ ]
+ },
{
"cell_type": "markdown",
"id": "f571001d",
@@ -448,9 +473,7 @@
"source": [
"## Tool calling\n",
"\n",
- "### ChatWatsonx.bind_tools()\n",
- "\n",
- "Please note that `ChatWatsonx.bind_tools` is on beta state, so we recommend using `mistralai/mistral-large` model."
+ "### ChatWatsonx.bind_tools()"
]
},
{
@@ -563,7 +586,7 @@
],
"metadata": {
"kernelspec": {
- "display_name": "Python 3 (ipykernel)",
+ "display_name": "langchain_ibm",
"language": "python",
"name": "python3"
},
diff --git a/docs/docs/integrations/llms/ibm_watsonx.ipynb b/docs/docs/integrations/llms/ibm_watsonx.ipynb
index 10360b7ff4..90eba54989 100644
--- a/docs/docs/integrations/llms/ibm_watsonx.ipynb
+++ b/docs/docs/integrations/llms/ibm_watsonx.ipynb
@@ -195,7 +195,7 @@
"id": "96ed13d4",
"metadata": {},
"source": [
- "Instead of `model_id`, you can also pass the `deployment_id` of the previously tuned model. The entire model tuning workflow is described [here](https://ibm.github.io/watsonx-ai-python-sdk/pt_working_with_class_and_prompt_tuner.html)."
+ "Instead of `model_id`, you can also pass the `deployment_id` of the previously tuned model. The entire model tuning workflow is described in [Working with TuneExperiment and PromptTuner](https://ibm.github.io/watsonx-ai-python-sdk/pt_tune_experiment_run.html)."
]
},
{
@@ -420,7 +420,7 @@
],
"metadata": {
"kernelspec": {
- "display_name": "Python 3 (ipykernel)",
+ "display_name": "langchain_ibm",
"language": "python",
"name": "python3"
},