docs: update docstring of the ChatAnthropic and AnthropicLLM classes (#18649)

**Description:** Update docstring of the ChatAnthropic and AnthropicLLM
classes
**Issue:** Not applicable
**Dependencies:** None
This commit is contained in:
aditya thomas
2024-03-29 04:03:54 +05:30
committed by GitHub
parent f19229c564
commit dc9e9a66db
2 changed files with 8 additions and 21 deletions

View File

@@ -134,16 +134,15 @@ def _format_messages(messages: List[BaseMessage]) -> Tuple[Optional[str], List[D
class ChatAnthropic(BaseChatModel):
"""Anthropic chat model.
To use, you should have the packages ``anthropic`` and ``langchain-anthropic``
installed, and the environment variable ANTHROPIC_API_KEY set with your API key,
or pass it as a named parameter to the constructor.
To use, you should have the environment variable ``ANTHROPIC_API_KEY``
set with your API key, or pass it as a named parameter to the constructor.
Example:
.. code-block:: python
from langchain_anthropic import ChatAnthropic
model = ChatAnthropic()
model = ChatAnthropic(model='claude-3-opus-20240229')
"""
class Config: