diff --git a/reference/python/docs/integrations/langchain_ibm/index.md b/reference/python/docs/integrations/langchain_ibm/index.md index 78ff887b66..55ea6c4921 100644 --- a/reference/python/docs/integrations/langchain_ibm/index.md +++ b/reference/python/docs/integrations/langchain_ibm/index.md @@ -23,7 +23,7 @@ title: IBM [:octicons-arrow-right-24: Reference](./ChatWatsonx.md) -- :material-message-text:{ .lg .middle } __`WatsonxLLM`__ +- :fontawesome-solid-i-cursor:{ .lg .middle } __`WatsonxLLM`__ --- @@ -39,7 +39,7 @@ title: IBM [:octicons-arrow-right-24: Reference](./WatsonxEmbeddings.md) -- :fontawesome-solid-layer-group:{ .lg .middle } __`WatsonxRerank`__ +- :fontawesome-solid-download:{ .lg .middle } __`WatsonxRerank`__ --- diff --git a/reference/python/docs/integrations/langchain_openai/index.md b/reference/python/docs/integrations/langchain_openai/index.md index e39d03f880..69a73c92fb 100644 --- a/reference/python/docs/integrations/langchain_openai/index.md +++ b/reference/python/docs/integrations/langchain_openai/index.md @@ -31,7 +31,7 @@ title: OpenAI [:octicons-arrow-right-24: Reference](./AzureChatOpenAI.md) -- :material-message-text:{ .lg .middle } __`OpenAI`__ +- :fontawesome-solid-i-cursor:{ .lg .middle } __`OpenAI`__ --- @@ -39,7 +39,7 @@ title: OpenAI [:octicons-arrow-right-24: Reference](./OpenAI.md) -- :material-message-text:{ .lg .middle } __`AzureOpenAI`__ +- :fontawesome-solid-i-cursor:{ .lg .middle } __`AzureOpenAI`__ --- @@ -47,7 +47,7 @@ title: OpenAI [:octicons-arrow-right-24: Reference](./AzureChatOpenAI.md) -- :material-message-text:{ .lg .middle } __`OpenAIEmbeddings`__ +- :fontawesome-solid-layer-group:{ .lg .middle } __`OpenAIEmbeddings`__ --- @@ -55,7 +55,7 @@ title: OpenAI [:octicons-arrow-right-24: Reference](./OpenAIEmbeddings.md) -- :material-message-text:{ .lg .middle } __`OpenAIEmbeddings`__ +- :fontawesome-solid-layer-group:{ .lg .middle } __`AzureOpenAIEmbeddings`__ --- diff --git a/src/oss/python/integrations/chat/ibm_watsonx.mdx b/src/oss/python/integrations/chat/ibm_watsonx.mdx index 371014759e..544084e7aa 100644 --- a/src/oss/python/integrations/chat/ibm_watsonx.mdx +++ b/src/oss/python/integrations/chat/ibm_watsonx.mdx @@ -12,7 +12,7 @@ The aim of these examples is to show how to communicate with `watsonx.ai` models | Class | Package | Local | Serializable | [JS support](https://js.langchain.com/docs/integrations/chat/ibm/) | Downloads | Version | | :--- | :--- | :---: | :---: | :---: | :---: | :---: | -| [ChatWatsonx](https://python.langchain.com/api_reference/ibm/chat_models/langchain_ibm.chat_models.ChatWatsonx.html) | [langchain-ibm](https://python.langchain.com/api_reference/ibm/index.html) | ❌ | ❌ | ✅ | ![PyPI - Downloads](https://img.shields.io/pypi/dm/langchain-ibm?style=flat-square&label=%20) | ![PyPI - Version](https://img.shields.io/pypi/v/langchain-ibm?style=flat-square&label=%20) | +| [`ChatWatsonx`](https://reference.langchain.com/python/integrations/langchain_ibm/ChatWatsonx/) | [`langchain-ibm`](https://reference.langchain.com/python/integrations/langchain_ibm/) | ❌ | ❌ | ✅ | ![PyPI - Downloads](https://img.shields.io/pypi/dm/langchain-ibm?style=flat-square&label=%20) | ![PyPI - Version](https://img.shields.io/pypi/v/langchain-ibm?style=flat-square&label=%20) | ### Model features @@ -307,4 +307,4 @@ ai_msg.tool_calls ## API reference -For detailed documentation of all `ChatWatsonx` features and configurations head to the [API reference](https://python.langchain.com/api_reference/ibm/chat_models/langchain_ibm.chat_models.ChatWatsonx.html). +For detailed documentation of all `ChatWatsonx` features and configurations head to the [API reference](https://reference.langchain.com/python/integrations/langchain_ibm/ChatWatsonx/). diff --git a/src/oss/python/integrations/chat/index.mdx b/src/oss/python/integrations/chat/index.mdx index fd2b69dd2d..7d3656b463 100644 --- a/src/oss/python/integrations/chat/index.mdx +++ b/src/oss/python/integrations/chat/index.mdx @@ -22,6 +22,7 @@ mode: wide | [`ChatBedrock`](/oss/integrations/chat/bedrock) | ✅ | ✅ | ❌ | ❌ | ❌ | [`langchain-aws`](https://reference.langchain.com/python/integrations/langchain_aws/) | | [`ChatHuggingFace`](/oss/integrations/chat/huggingface) | ✅ | ✅ | ❌ | ✅ | ❌ | [`langchain-huggingface`](https://reference.langchain.com/python/integrations/langchain_huggingface/) | | [`ChatOllama`](/oss/integrations/chat/ollama) | ✅ | ✅ | ✅ | ✅ | ❌ | [`langchain-ollama`](https://reference.langchain.com/python/integrations/langchain_ollama/) | +| [`ChatWatsonx`](/oss/integrations/chat/ibm_watsonx) | ✅ | ✅ | ✅ | ❌ | ✅ | [`langchain-ibm`](https://reference.langchain.com/python/integrations/langchain_ibm/) | | [`ChatXAI`](/oss/integrations/chat/xai) | ✅ | ✅ | ❌ | ❌ | ❌ | [`langchain-xai`](https://reference.langchain.com/python/integrations/langchain_xai/) | | [`ChatNVIDIA`](/oss/integrations/chat/nvidia_ai_endpoints) | ✅ | ✅ | ✅ | ✅ | ✅ | [`langchain-nvidia-ai-endpoints`](https://reference.langchain.com/python/integrations/langchain_nvidia_ai_endpoints/) | | [`ChatCohere`](/oss/integrations/chat/cohere) | ✅ | ✅ | ❌ | ❌ | ❌ | [`langchain-cohere`](https://reference.langchain.com/python/integrations/langchain_cohere/) | diff --git a/src/oss/python/integrations/llms/ibm_watsonx.mdx b/src/oss/python/integrations/llms/ibm_watsonx.mdx index b71d5c7193..02de1224b5 100644 --- a/src/oss/python/integrations/llms/ibm_watsonx.mdx +++ b/src/oss/python/integrations/llms/ibm_watsonx.mdx @@ -2,7 +2,7 @@ title: IBM watsonx.ai --- ->[WatsonxLLM](https://ibm.github.io/watsonx-ai-python-sdk/fm_extensions.html#langchain) is a wrapper for IBM [watsonx.ai](https://www.ibm.com/products/watsonx-ai) foundation models. +>[`WatsonxLLM`](https://ibm.github.io/watsonx-ai-python-sdk/fm_extensions.html#langchain) is a wrapper for IBM [watsonx.ai](https://www.ibm.com/products/watsonx-ai) foundation models. This example shows how to communicate with `watsonx.ai` models using `LangChain`. @@ -12,7 +12,7 @@ This example shows how to communicate with `watsonx.ai` models using `LangChain` | Class | Package | Local | Serializable | [JS support](https://js.langchain.com/docs/integrations/llms/ibm/) | Downloads | Version | | :--- | :--- | :---: | :---: | :---: | :---: | :---: | -| [WatsonxLLM](https://python.langchain.com/api_reference/ibm/llms/langchain_ibm.llms.WatsonxLLM.html) | [langchain-ibm](https://python.langchain.com/api_reference/ibm/index.html) | ❌ | ❌ | ✅ | ![PyPI - Downloads](https://img.shields.io/pypi/dm/langchain-ibm?style=flat-square&label=%20) | ![PyPI - Version](https://img.shields.io/pypi/v/langchain-ibm?style=flat-square&label=%20) | +| [`WatsonxLLM`](https://reference.langchain.com/python/integrations/langchain_ibm/WatsonxLLM/) | [`langchain-ibm`](https://reference.langchain.com/python/integrations/langchain_ibm/) | ❌ | ❌ | ✅ | ![PyPI - Downloads](https://img.shields.io/pypi/dm/langchain-ibm?style=flat-square&label=%20) | ![PyPI - Version](https://img.shields.io/pypi/v/langchain-ibm?style=flat-square&label=%20) | ## Setup @@ -211,4 +211,4 @@ llm_chain.invoke(topic) ## API reference -For detailed documentation of all `WatsonxLLM` features and configurations head to the [API reference](https://python.langchain.com/api_reference/ibm/llms/langchain_ibm.llms.WatsonxLLM.html). +For detailed documentation of all `WatsonxLLM` features and configurations head to the [API reference](https://reference.langchain.com/python/integrations/langchain_ibm/WatsonxLLM/). diff --git a/src/oss/python/integrations/providers/ibm.mdx b/src/oss/python/integrations/providers/ibm.mdx index 85798cb75c..32c1172a16 100644 --- a/src/oss/python/integrations/providers/ibm.mdx +++ b/src/oss/python/integrations/providers/ibm.mdx @@ -6,6 +6,7 @@ LangChain integrations related to IBM technologies, including the [IBM watsonx.ai](https://www.ibm.com/products/watsonx-ai) platform and DB2 database. ## Watsonx AI + IBM® watsonx.ai™ AI studio is part of the IBM [watsonx](https://www.ibm.com/watsonx)™ AI and data platform, bringing together new generative AI capabilities powered by [foundation models](https://www.ibm.com/products/watsonx-ai/foundation-models) and traditional machine learning (ML) into a powerful studio spanning the AI lifecycle. Tune and guide models with your enterprise data to meet your needs with easy-to-use tools for @@ -17,103 +18,52 @@ Watsonx.ai offers: - **End-to-end AI governance:** Enterprises can scale and accelerate the impact of AI with trusted data across the business, using data wherever it resides. - **Hybrid, multi-cloud deployments:** IBM provides the flexibility to integrate and deploy your AI workloads into your hybrid-cloud stack of choice. +### Model interfaces -### Installation and Setup - -Install the integration package with: - - -```bash pip -pip install -qU langchain-ibm -``` - -```bash uv -uv add langchain-ibm -``` - - -Get an IBM watsonx.ai api key and set it as an environment variable (`WATSONX_APIKEY`) -```python -import os - -os.environ["WATSONX_APIKEY"] = "your IBM watsonx.ai api key" -``` - -### Chat Model - -#### ChatWatsonx - -See a [usage example](/oss/integrations/chat/ibm_watsonx). - -```python -from langchain_ibm import ChatWatsonx -``` - -### LLMs - -#### WatsonxLLM - -See a [usage example](/oss/integrations/llms/ibm_watsonx). - -```python -from langchain_ibm import WatsonxLLM -``` + + + IBM watsonx.ai chat models. + + + (Legacy) IBM watsonx.ai text completion models. + + + IBM watsonx.ai embedding models. + + -### Embedding Models +### Tools and toolkits -#### WatsonxEmbeddings + + + IBM watsonx.ai toolkit. + + -See a [usage example](/oss/integrations/text_embedding/ibm_watsonx). +### Retrievers -```python -from langchain_ibm import WatsonxEmbeddings -``` + + + IBM watsonx.ai document retriever. + + -### Reranker - -#### WatsonxRerank - -See a [usage example](/oss/integrations/retrievers/ibm_watsonx_ranker). - -```python -from langchain_ibm import WatsonxRerank -``` - -### Toolkit +## DB2 -#### WatsonxToolkit +The IBM DB2 relational database v12.1.2 and above offers the abilities of vector store +and vector search. Installation of `langchain-db2` package will give LangChain users +the support of DB2 vector store and vector search. -See a [usage example](/oss/integrations/tools/ibm_watsonx). -```python -from langchain_ibm.agent_toolkits.utility import WatsonxToolkit -``` + +`langchain-db2` is a separate package for Vector Store feature only, and can be run without the `langchain-ibm` package. + -## DB2 ### Vector stores -#### IBM DB2 Vector Store and Vector Search - -The IBM DB2 relational database v12.1.2 and above offers the abilities of vector store -and vector search. Installation of `langchain-db2` package will give LangChain users -the support of DB2 vector store and vector search. - -See detailed usage examples in the guide [here](/oss/integrations/vectorstores/db2). - -Installation: This is a separate package for vector store feature only and can be run -without the `langchain-ibm` package. - -```bash pip -pip install -U langchain-db2 -``` - -```bash uv -uv add langchain-db2 -``` - -Usage: -```python -from langchain_db2 import db2vs -from langchain_db2.db2vs import DB2VS -``` + + + IBM DB2 Vector Store and Vector Search + + diff --git a/src/oss/python/integrations/retrievers/ibm_watsonx_ranker.mdx b/src/oss/python/integrations/retrievers/ibm_watsonx_ranker.mdx index 244938ff3b..242734567d 100644 --- a/src/oss/python/integrations/retrievers/ibm_watsonx_ranker.mdx +++ b/src/oss/python/integrations/retrievers/ibm_watsonx_ranker.mdx @@ -2,7 +2,7 @@ title: IBM watsonx.ai --- ->WatsonxRerank is a wrapper for IBM [watsonx.ai](https://www.ibm.com/products/watsonx-ai) foundation models. +>`WatsonxRerank` is a wrapper for IBM [watsonx.ai](https://www.ibm.com/products/watsonx-ai) foundation models. This notebook shows how to use [watsonx's rerank endpoint](https://cloud.ibm.com/apidocs/watsonx-ai#text-rerank) in a retriever. @@ -12,7 +12,7 @@ This notebook shows how to use [watsonx's rerank endpoint](https://cloud.ibm.com | Class | Package | [JS support](https://js.langchain.com/docs/integrations/document_compressors/ibm/) | Downloads | Version | | :--- | :--- | :---: | :---: | :---: | -| [WatsonxRerank](https://python.langchain.com/api_reference/ibm/rerank/langchain_ibm.rerank.WatsonxRerank.html) | [langchain-ibm](https://python.langchain.com/api_reference/ibm/index.html) | ✅ | ![PyPI - Downloads](https://img.shields.io/pypi/dm/langchain-ibm?style=flat-square&label=%20) | ![PyPI - Version](https://img.shields.io/pypi/v/langchain-ibm?style=flat-square&label=%20) | +| [`WatsonxRerank`](https://reference.langchain.com/python/integrations/langchain_ibm/WatsonxRerank/) | [`langchain-ibm`](https://reference.langchain.com/python/integrations/langchain_ibm/) | ✅ | ![PyPI - Downloads](https://img.shields.io/pypi/dm/langchain-ibm?style=flat-square&label=%20) | ![PyPI - Version](https://img.shields.io/pypi/v/langchain-ibm?style=flat-square&label=%20) | ## Setup @@ -267,4 +267,4 @@ chain.invoke(query) ## API reference -For detailed documentation of all `WatsonxRerank` features and configurations head to the [API reference](https://python.langchain.com/api_reference/ibm/chat_models/langchain_ibm.rerank.WatsonxRerank.html). +For detailed documentation of all `WatsonxRerank` features and configurations head to the [API reference](https://reference.langchain.com/python/integrations/langchain_ibm/WatsonxRerank/). diff --git a/src/oss/python/integrations/text_embedding/ibm_watsonx.mdx b/src/oss/python/integrations/text_embedding/ibm_watsonx.mdx index f0bc9bc99f..c3e70050ba 100644 --- a/src/oss/python/integrations/text_embedding/ibm_watsonx.mdx +++ b/src/oss/python/integrations/text_embedding/ibm_watsonx.mdx @@ -2,7 +2,7 @@ title: IBM watsonx.ai --- ->WatsonxEmbeddings is a wrapper for IBM [watsonx.ai](https://www.ibm.com/products/watsonx-ai) foundation models. +>`WatsonxEmbeddings` is a wrapper for IBM [watsonx.ai](https://www.ibm.com/products/watsonx-ai) foundation models. This example shows how to communicate with `watsonx.ai` models using `LangChain`. @@ -183,4 +183,4 @@ doc_result[0][:5] ## API reference -For detailed documentation of all `WatsonxEmbeddings` features and configurations head to the [API reference](https://python.langchain.com/api_reference/ibm/embeddings/langchain_ibm.embeddings.WatsonxEmbeddings.html). +For detailed documentation of all `WatsonxEmbeddings` features and configurations head to the [API reference](https://reference.langchain.com/python/integrations/langchain_ibm/WatsonxEmbeddings/). diff --git a/src/oss/python/integrations/tools/ibm_watsonx.mdx b/src/oss/python/integrations/tools/ibm_watsonx.mdx index 89715ddeea..3b209378cd 100644 --- a/src/oss/python/integrations/tools/ibm_watsonx.mdx +++ b/src/oss/python/integrations/tools/ibm_watsonx.mdx @@ -2,7 +2,7 @@ title: IBM watsonx.ai --- ->WatsonxToolkit is a wrapper for IBM [watsonx.ai](https://www.ibm.com/products/watsonx-ai) Toolkit. +>`WatsonxToolkit` is a wrapper for IBM [watsonx.ai](https://www.ibm.com/products/watsonx-ai) Toolkit. This example shows how to use `watsonx.ai` Toolkit using `LangChain`. @@ -12,7 +12,7 @@ This example shows how to use `watsonx.ai` Toolkit using `LangChain`. | Class | Package | Serializable | [JS support](https://js.langchain.com/docs/integrations/toolkits/ibm/) | Downloads | Version | | :--- | :--- | :---: | :---: | :---: | :---: | -| [WatsonxToolkit](https://python.langchain.com/api_reference/ibm/agent_toolkits/langchain_ibm.agent_toolkits.utility.toolkit.WatsonxToolkit.html) | [langchain-ibm](https://python.langchain.com/api_reference/ibm/index.html) | ❌ | ✅ | ![PyPI - Downloads](https://img.shields.io/pypi/dm/langchain-ibm?style=flat-square&label=%20) | ![PyPI - Version](https://img.shields.io/pypi/v/langchain-ibm?style=flat-square&label=%20) | +| [`WatsonxToolkit`](https://reference.langchain.com/python/integrations/langchain_ibm/WatsonxToolkit/) | [`langchain-ibm`](https://reference.langchain.com/python/integrations/langchain_ibm/) | ❌ | ✅ | ![PyPI - Downloads](https://img.shields.io/pypi/dm/langchain-ibm?style=flat-square&label=%20) | ![PyPI - Version](https://img.shields.io/pypi/v/langchain-ibm?style=flat-square&label=%20) | ## Setup @@ -302,4 +302,4 @@ The current weather in Boston is -1°C with 0mm of rain, a relative humidity of ## API reference -For detailed documentation of all `WatsonxToolkit` features and configurations head to the [API reference](https://python.langchain.com/api_reference/ibm/toolkit/langchain_ibm.toolkit.WatsonxToolkit.html). +For detailed documentation of all `WatsonxToolkit` features and configurations head to the [API reference](https://reference.langchain.com/python/integrations/langchain_ibm/WatsonxToolkit/).