docs: langchain-ai21 update ai21 docs (#28076)

Thank you for contributing to LangChain!

Update docs to match latest langchain-ai21 release.

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
miri-bar 2024-12-04 02:01:36 +02:00 committed by GitHub
parent ef365543cb
commit 6e607bb237
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 22 additions and 28 deletions

View File

@ -17,6 +17,9 @@
"source": [ "source": [
"# AI21LLM\n", "# AI21LLM\n",
"\n", "\n",
":::caution This service is deprecated.\n",
"See [this page](https://python.langchain.com/docs/integrations/chat/ai21/) for the updated ChatAI21 object. :::\n",
"\n",
"This example goes over how to use LangChain to interact with `AI21` Jurassic models. To use the Jamba model, use the [ChatAI21 object](https://python.langchain.com/docs/integrations/chat/ai21/) instead.\n", "This example goes over how to use LangChain to interact with `AI21` Jurassic models. To use the Jamba model, use the [ChatAI21 object](https://python.langchain.com/docs/integrations/chat/ai21/) instead.\n",
"\n", "\n",
"[See a full list of AI21 models and tools on LangChain.](https://pypi.org/project/langchain-ai21/)\n", "[See a full list of AI21 models and tools on LangChain.](https://pypi.org/project/langchain-ai21/)\n",

View File

@ -15,26 +15,6 @@ This page covers how to use the `AI21` ecosystem within `LangChain`.
pip install langchain-ai21 pip install langchain-ai21
``` ```
## LLMs
See a [usage example](/docs/integrations/llms/ai21).
### AI21 LLM
```python
from langchain_ai21 import AI21LLM
```
### AI21 Contextual Answer
You can use AI21s contextual answers model to receive text or document,
serving as a context, and a question and return an answer based entirely on this context.
```python
from langchain_ai21 import AI21ContextualAnswers
```
## Chat models ## Chat models
### AI21 Chat ### AI21 Chat
@ -45,23 +25,32 @@ See a [usage example](/docs/integrations/chat/ai21).
from langchain_ai21 import ChatAI21 from langchain_ai21 import ChatAI21
``` ```
## Embedding models ## Deprecated features
:::caution The following features are deprecated.
:::
### AI21 LLM
```python
from langchain_ai21 import AI21LLM
```
### AI21 Contextual Answer
```python
from langchain_ai21 import AI21ContextualAnswers
```
### AI21 Embeddings ### AI21 Embeddings
See a [usage example](/docs/integrations/text_embedding/ai21).
```python ```python
from langchain_ai21 import AI21Embeddings from langchain_ai21 import AI21Embeddings
``` ```
## Text splitters ## Text splitters
### AI21 Semantic Text Splitter ### AI21 Semantic Text Splitter
See a [usage example](/docs/integrations/document_transformers/ai21_semantic_text_splitter).
```python ```python
from langchain_ai21 import AI21SemanticTextSplitter from langchain_ai21 import AI21SemanticTextSplitter
``` ```

View File

@ -17,6 +17,8 @@
"source": [ "source": [
"# AI21Embeddings\n", "# AI21Embeddings\n",
"\n", "\n",
":::caution This service is deprecated. :::\n",
"\n",
"This will help you get started with AI21 embedding models using LangChain. For detailed documentation on `AI21Embeddings` features and configuration options, please refer to the [API reference](https://python.langchain.com/api_reference/ai21/embeddings/langchain_ai21.embeddings.AI21Embeddings.html).\n", "This will help you get started with AI21 embedding models using LangChain. For detailed documentation on `AI21Embeddings` features and configuration options, please refer to the [API reference](https://python.langchain.com/api_reference/ai21/embeddings/langchain_ai21.embeddings.AI21Embeddings.html).\n",
"\n", "\n",
"## Overview\n", "## Overview\n",