Skip to main content
Ctrl+K
🦜🔗 LangChain  documentation - Home 🦜🔗 LangChain  documentation - Home
  • Reference
  • Legacy reference
Ctrl+K
Docs
  • GitHub
  • X / Twitter
Ctrl+K
  • Reference
  • Legacy reference
Docs
  • GitHub
  • X / Twitter

Section Navigation

Base packages

  • Core
  • Langchain
  • Text Splitters
  • Community
  • Experimental

Integrations

  • AI21
    • ai21_base
    • chat
      • ChatAdapter
      • J2ChatAdapter
      • JambaChatCompletionsAdapter
      • create_chat_adapter
    • chat_models
    • contextual_answers
    • embeddings
    • llms
    • semantic_text_splitter
  • Airbyte
  • Anthropic
  • AstraDB
  • AWS
  • Azure Dynamic Sessions
  • Box
  • Chroma
  • Cohere
  • Couchbase
  • Elasticsearch
  • Exa
  • Fireworks
  • Google Community
  • Google GenAI
  • Google VertexAI
  • Groq
  • Huggingface
  • Milvus
  • MistralAI
  • MongoDB
  • Nomic
  • Nvidia Ai Endpoints
  • Ollama
  • OpenAI
  • Pinecone
  • Postgres
  • Prompty
  • Qdrant
  • Robocorp
  • Together
  • Unstructured
  • VoyageAI
  • Weaviate
  • LangChain Python API Reference
  • chat
  • J2ChatAdapter

J2ChatAdapter#

class langchain_ai21.chat.chat_adapter.J2ChatAdapter[source]#

Adapter for J2Chat models.

Methods

__init__()

call()

convert_messages(messages)

__init__()#
call(client: Any, stream: Literal[True], **params: Any) → Iterator[ChatGenerationChunk][source]#
call(client: Any, stream: Literal[False], **params: Any) → List[BaseMessage]
convert_messages(messages: List[BaseMessage]) → Dict[str, Any][source]#
Parameters:

messages (List[BaseMessage]) –

Return type:

Dict[str, Any]

On this page
  • J2ChatAdapter
    • __init__()
    • call()
    • convert_messages()

© Copyright 2023, LangChain Inc.