AI21 Labs
AI21 Labs is a company specializing in Natural Language Processing (NLP), which develops AI systems that can understand and generate natural language.
This page covers how to use the AI21
ecosystem within LangChain
.
Installation and Setupโ
- Get an AI21 api key and set it as an environment variable (
AI21_API_KEY
) - Install the Python package:
pip install langchain-ai21
Chat modelsโ
AI21 Chatโ
See a usage example.
from langchain_ai21 import ChatAI21
API Reference:ChatAI21
Deprecated featuresโ
The following features are deprecated.
AI21 LLMโ
from langchain_ai21 import AI21LLM
AI21 Contextual Answerโ
from langchain_ai21 import AI21ContextualAnswers
AI21 Embeddingsโ
from langchain_ai21 import AI21Embeddings
Text splittersโ
AI21 Semantic Text Splitterโ
from langchain_ai21 import AI21SemanticTextSplitter