langchain_ai21.chat.chat_adapter.J2ChatAdapter

class langchain_ai21.chat.chat_adapter.J2ChatAdapter[source]

用于J2Chat模型的适配器。

方法

__init__()

call()

convert_messages(messages)

__init__()
call(client: Any, stream: Literal[True], **params: Any) Iterator[ChatGenerationChunk][源代码]
call(client: Any, stream: Literal[False], **params: Any) List[BaseMessage]
convert_messages(messages: List[BaseMessage]) Dict[str, Any][源代码]
参数

messages (列表[BaseMessage]) -

返回类型

字典[str, Any]