Skip to content

Commit 87821c6

Browse files
MateuszOssGitmdrxy
andauthored
docs(langchain-ibm): Updated langchain-ibm and langchain-db2 docs, Added correct icons, Makes IBM more visible (#1270)
## Overview Updated `langchain-ibm` and `langchain-db2` docs, Added correct icons, Makes `IBM` more visible ## Type of change **Type:** Update existing documentation ## Related issues/PRs <!-- Link to related issues, feature PRs, or discussions (if applicable) To automatically close an issue when this PR is merged, use closing keywords: - "closes #123" or "fixes #123" or "resolves #123" For regular references without auto-closing, just use: - "#123" or "See issue #123" Examples: - closes #456 (will auto-close issue #456 when PR is merged) - See #789 for context (will reference but not auto-close issue #789) --> - GitHub issue: - Feature PR: <!-- For LangChain employees, if applicable: --> - Linear issue: - Slack thread: ## Checklist <!-- Put an 'x' in all boxes that apply --> - [x] I have read the [contributing guidelines](README.md) - [x] I have tested my changes locally using `docs dev` - [x] All code examples have been tested and work correctly - [ ] I have used **root relative** paths for internal links - [x] I have updated navigation in `src/docs.json` if needed - I have gotten approval from the relevant reviewers - (Internal team members only / optional) I have created a preview deployment using the [Create Preview Branch workflow](https://github.com/langchain-ai/docs/actions/workflows/create-preview-branch.yml) ## Additional notes <!-- Any other information that would be helpful for reviewers --> --------- Co-authored-by: Mason Daugherty <github@mdrxy.com> Co-authored-by: Mason Daugherty <mason@langchain.dev>
1 parent 95ea7d0 commit 87821c6

File tree

9 files changed

+57
-106
lines changed

9 files changed

+57
-106
lines changed

reference/python/docs/integrations/langchain_ibm/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ title: IBM
2323

2424
[:octicons-arrow-right-24: Reference](./ChatWatsonx.md)
2525

26-
- :material-message-text:{ .lg .middle } __`WatsonxLLM`__
26+
- :fontawesome-solid-i-cursor:{ .lg .middle } __`WatsonxLLM`__
2727

2828
---
2929

@@ -39,7 +39,7 @@ title: IBM
3939

4040
[:octicons-arrow-right-24: Reference](./WatsonxEmbeddings.md)
4141

42-
- :fontawesome-solid-layer-group:{ .lg .middle } __`WatsonxRerank`__
42+
- :fontawesome-solid-download:{ .lg .middle } __`WatsonxRerank`__
4343

4444
---
4545

reference/python/docs/integrations/langchain_openai/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,31 +31,31 @@ title: OpenAI
3131

3232
[:octicons-arrow-right-24: Reference](./AzureChatOpenAI.md)
3333

34-
- :material-message-text:{ .lg .middle } __`OpenAI`__
34+
- :fontawesome-solid-i-cursor:{ .lg .middle } __`OpenAI`__
3535

3636
---
3737

3838
(Legacy) OpenAI text completion models.
3939

4040
[:octicons-arrow-right-24: Reference](./OpenAI.md)
4141

42-
- :material-message-text:{ .lg .middle } __`AzureOpenAI`__
42+
- :fontawesome-solid-i-cursor:{ .lg .middle } __`AzureOpenAI`__
4343

4444
---
4545

4646
Wrapper for (legacy) OpenAI text completion models hosted on Azure.
4747

4848
[:octicons-arrow-right-24: Reference](./AzureChatOpenAI.md)
4949

50-
- :material-message-text:{ .lg .middle } __`OpenAIEmbeddings`__
50+
- :fontawesome-solid-layer-group:{ .lg .middle } __`OpenAIEmbeddings`__
5151

5252
---
5353

5454
OpenAI embedding models.
5555

5656
[:octicons-arrow-right-24: Reference](./OpenAIEmbeddings.md)
5757

58-
- :material-message-text:{ .lg .middle } __`OpenAIEmbeddings`__
58+
- :fontawesome-solid-layer-group:{ .lg .middle } __`AzureOpenAIEmbeddings`__
5959

6060
---
6161

src/oss/python/integrations/chat/ibm_watsonx.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The aim of these examples is to show how to communicate with `watsonx.ai` models
1212

1313
| Class | Package | Local | Serializable | [JS support](https://js.langchain.com/docs/integrations/chat/ibm/) | Downloads | Version |
1414
| :--- | :--- | :---: | :---: | :---: | :---: | :---: |
15-
| [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) |
15+
| [`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) |
1616

1717
### Model features
1818

@@ -307,4 +307,4 @@ ai_msg.tool_calls
307307

308308
## API reference
309309

310-
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).
310+
For detailed documentation of all `ChatWatsonx` features and configurations head to the [API reference](https://reference.langchain.com/python/integrations/langchain_ibm/ChatWatsonx/).

src/oss/python/integrations/chat/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ mode: wide
2222
| [`ChatBedrock`](/oss/integrations/chat/bedrock) |||||| [`langchain-aws`](https://reference.langchain.com/python/integrations/langchain_aws/) |
2323
| [`ChatHuggingFace`](/oss/integrations/chat/huggingface) |||||| [`langchain-huggingface`](https://reference.langchain.com/python/integrations/langchain_huggingface/) |
2424
| [`ChatOllama`](/oss/integrations/chat/ollama) |||||| [`langchain-ollama`](https://reference.langchain.com/python/integrations/langchain_ollama/) |
25+
| [`ChatWatsonx`](/oss/integrations/chat/ibm_watsonx) |||||| [`langchain-ibm`](https://reference.langchain.com/python/integrations/langchain_ibm/) |
2526
| [`ChatXAI`](/oss/integrations/chat/xai) |||||| [`langchain-xai`](https://reference.langchain.com/python/integrations/langchain_xai/) |
2627
| [`ChatNVIDIA`](/oss/integrations/chat/nvidia_ai_endpoints) |||||| [`langchain-nvidia-ai-endpoints`](https://reference.langchain.com/python/integrations/langchain_nvidia_ai_endpoints/) |
2728
| [`ChatCohere`](/oss/integrations/chat/cohere) |||||| [`langchain-cohere`](https://reference.langchain.com/python/integrations/langchain_cohere/) |

src/oss/python/integrations/llms/ibm_watsonx.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: IBM watsonx.ai
33
---
44

5-
>[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.
5+
>[`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.
66
77
This example shows how to communicate with `watsonx.ai` models using `LangChain`.
88

@@ -12,7 +12,7 @@ This example shows how to communicate with `watsonx.ai` models using `LangChain`
1212

1313
| Class | Package | Local | Serializable | [JS support](https://js.langchain.com/docs/integrations/llms/ibm/) | Downloads | Version |
1414
| :--- | :--- | :---: | :---: | :---: | :---: | :---: |
15-
| [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) |
15+
| [`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) |
1616

1717
## Setup
1818

@@ -211,4 +211,4 @@ llm_chain.invoke(topic)
211211

212212
## API reference
213213

214-
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).
214+
For detailed documentation of all `WatsonxLLM` features and configurations head to the [API reference](https://reference.langchain.com/python/integrations/langchain_ibm/WatsonxLLM/).

src/oss/python/integrations/providers/ibm.mdx

Lines changed: 37 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ LangChain integrations related to IBM technologies, including the
66
[IBM watsonx.ai](https://www.ibm.com/products/watsonx-ai) platform and DB2 database.
77

88
## Watsonx AI
9+
910
IBM® watsonx.ai™ AI studio is part of the IBM [watsonx](https://www.ibm.com/watsonx)™ AI and data platform, bringing together new generative
1011
AI capabilities powered by [foundation models](https://www.ibm.com/products/watsonx-ai/foundation-models) and traditional machine learning (ML)
1112
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:
1718
- **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.
1819
- **Hybrid, multi-cloud deployments:** IBM provides the flexibility to integrate and deploy your AI workloads into your hybrid-cloud stack of choice.
1920

21+
### Model interfaces
2022

21-
### Installation and Setup
22-
23-
Install the integration package with:
24-
25-
<CodeGroup>
26-
```bash pip
27-
pip install -qU langchain-ibm
28-
```
29-
30-
```bash uv
31-
uv add langchain-ibm
32-
```
33-
</CodeGroup>
34-
35-
Get an IBM watsonx.ai api key and set it as an environment variable (`WATSONX_APIKEY`)
36-
```python
37-
import os
38-
39-
os.environ["WATSONX_APIKEY"] = "your IBM watsonx.ai api key"
40-
```
41-
42-
### Chat Model
43-
44-
#### ChatWatsonx
45-
46-
See a [usage example](/oss/integrations/chat/ibm_watsonx).
47-
48-
```python
49-
from langchain_ibm import ChatWatsonx
50-
```
51-
52-
### LLMs
53-
54-
#### WatsonxLLM
55-
56-
See a [usage example](/oss/integrations/llms/ibm_watsonx).
57-
58-
```python
59-
from langchain_ibm import WatsonxLLM
60-
```
23+
<Columns cols={2}>
24+
<Card title="ChatWatsonx" href="/oss/integrations/chat/ibm_watsonx" cta="Get started" icon="message" arrow>
25+
IBM watsonx.ai chat models.
26+
</Card>
27+
<Card title="WatsonxLLM" href="/oss/integrations/llms/ibm_watsonx" cta="Get started" icon="i-cursor" arrow>
28+
(Legacy) IBM watsonx.ai text completion models.
29+
</Card>
30+
<Card title="WatsonxEmbeddings" href="/oss/integrations/text_embedding/ibm_watsonx" cta="Get started" icon="layer-group" arrow>
31+
IBM watsonx.ai embedding models.
32+
</Card>
33+
</Columns>
6134

62-
### Embedding Models
35+
### Tools and toolkits
6336

64-
#### WatsonxEmbeddings
37+
<Columns cols={2}>
38+
<Card title="WatsonxToolkit" href="/oss/integrations/tools/ibm_watsonx" cta="Get started" icon="screwdriver-wrench" arrow>
39+
IBM watsonx.ai toolkit.
40+
</Card>
41+
</Columns>
6542

66-
See a [usage example](/oss/integrations/text_embedding/ibm_watsonx).
43+
### Retrievers
6744

68-
```python
69-
from langchain_ibm import WatsonxEmbeddings
70-
```
45+
<Columns cols={2}>
46+
<Card title="WatsonxRerank" href="/oss/integrations/retrievers/ibm_watsonx_ranker" cta="Get started" icon="download" arrow>
47+
IBM watsonx.ai document retriever.
48+
</Card>
49+
</Columns>
7150

72-
### Reranker
73-
74-
#### WatsonxRerank
75-
76-
See a [usage example](/oss/integrations/retrievers/ibm_watsonx_ranker).
77-
78-
```python
79-
from langchain_ibm import WatsonxRerank
80-
```
81-
82-
### Toolkit
51+
## DB2
8352

84-
#### WatsonxToolkit
53+
The IBM DB2 relational database v12.1.2 and above offers the abilities of vector store
54+
and vector search. Installation of `langchain-db2` package will give LangChain users
55+
the support of DB2 vector store and vector search.
8556

86-
See a [usage example](/oss/integrations/tools/ibm_watsonx).
8757

88-
```python
89-
from langchain_ibm.agent_toolkits.utility import WatsonxToolkit
90-
```
58+
<Note>
59+
`langchain-db2` is a separate package for Vector Store feature only, and can be run without the `langchain-ibm` package.
60+
</Note>
9161

92-
## DB2
9362

9463
### Vector stores
9564

96-
#### IBM DB2 Vector Store and Vector Search
97-
98-
The IBM DB2 relational database v12.1.2 and above offers the abilities of vector store
99-
and vector search. Installation of `langchain-db2` package will give LangChain users
100-
the support of DB2 vector store and vector search.
101-
102-
See detailed usage examples in the guide [here](/oss/integrations/vectorstores/db2).
103-
104-
Installation: This is a separate package for vector store feature only and can be run
105-
without the `langchain-ibm` package.
106-
<CodeGroup>
107-
```bash pip
108-
pip install -U langchain-db2
109-
```
110-
111-
```bash uv
112-
uv add langchain-db2
113-
```
114-
</CodeGroup>
115-
Usage:
116-
```python
117-
from langchain_db2 import db2vs
118-
from langchain_db2.db2vs import DB2VS
119-
```
65+
<Columns cols={2}>
66+
<Card title="DB2VS" href="/oss/integrations/vectorstores/db2" cta="Get started" icon="database" arrow>
67+
IBM DB2 Vector Store and Vector Search
68+
</Card>
69+
</Columns>

src/oss/python/integrations/retrievers/ibm_watsonx_ranker.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: IBM watsonx.ai
33
---
44

5-
>WatsonxRerank is a wrapper for IBM [watsonx.ai](https://www.ibm.com/products/watsonx-ai) foundation models.
5+
>`WatsonxRerank` is a wrapper for IBM [watsonx.ai](https://www.ibm.com/products/watsonx-ai) foundation models.
66
77
This notebook shows how to use [watsonx's rerank endpoint](https://cloud.ibm.com/apidocs/watsonx-ai#text-rerank) in a retriever.
88

@@ -12,7 +12,7 @@ This notebook shows how to use [watsonx's rerank endpoint](https://cloud.ibm.com
1212

1313
| Class | Package | [JS support](https://js.langchain.com/docs/integrations/document_compressors/ibm/) | Downloads | Version |
1414
| :--- | :--- | :---: | :---: | :---: |
15-
| [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) |
15+
| [`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) |
1616

1717
## Setup
1818

@@ -267,4 +267,4 @@ chain.invoke(query)
267267

268268
## API reference
269269

270-
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).
270+
For detailed documentation of all `WatsonxRerank` features and configurations head to the [API reference](https://reference.langchain.com/python/integrations/langchain_ibm/WatsonxRerank/).

src/oss/python/integrations/text_embedding/ibm_watsonx.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: IBM watsonx.ai
33
---
44

5-
>WatsonxEmbeddings is a wrapper for IBM [watsonx.ai](https://www.ibm.com/products/watsonx-ai) foundation models.
5+
>`WatsonxEmbeddings` is a wrapper for IBM [watsonx.ai](https://www.ibm.com/products/watsonx-ai) foundation models.
66
77
This example shows how to communicate with `watsonx.ai` models using `LangChain`.
88

@@ -183,4 +183,4 @@ doc_result[0][:5]
183183

184184
## API reference
185185

186-
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).
186+
For detailed documentation of all `WatsonxEmbeddings` features and configurations head to the [API reference](https://reference.langchain.com/python/integrations/langchain_ibm/WatsonxEmbeddings/).

src/oss/python/integrations/tools/ibm_watsonx.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: IBM watsonx.ai
33
---
44

5-
>WatsonxToolkit is a wrapper for IBM [watsonx.ai](https://www.ibm.com/products/watsonx-ai) Toolkit.
5+
>`WatsonxToolkit` is a wrapper for IBM [watsonx.ai](https://www.ibm.com/products/watsonx-ai) Toolkit.
66
77
This example shows how to use `watsonx.ai` Toolkit using `LangChain`.
88

@@ -12,7 +12,7 @@ This example shows how to use `watsonx.ai` Toolkit using `LangChain`.
1212

1313
| Class | Package | Serializable | [JS support](https://js.langchain.com/docs/integrations/toolkits/ibm/) | Downloads | Version |
1414
| :--- | :--- | :---: | :---: | :---: | :---: |
15-
| [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) |
15+
| [`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) |
1616

1717
## Setup
1818

@@ -302,4 +302,4 @@ The current weather in Boston is -1°C with 0mm of rain, a relative humidity of
302302

303303
## API reference
304304

305-
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).
305+
For detailed documentation of all `WatsonxToolkit` features and configurations head to the [API reference](https://reference.langchain.com/python/integrations/langchain_ibm/WatsonxToolkit/).

0 commit comments

Comments
 (0)