Skip to content

Commit

Permalink
docs: update to docstrings of ChatAnthropic class (langchain-ai#18493)
Browse files Browse the repository at this point in the history
**Description:** Update docstrings of ChatAnthropic class
**Issue:** Change to ChatAnthropic from ChatAnthropicMessages
**Dependencies:** None
**Lint and test**:  `make format`, `make lint` and `make test` passed
  • Loading branch information
sepiatone authored and gkorland committed Mar 30, 2024
1 parent 67fbdfe commit a45d55b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions libs/partners/anthropic/langchain_anthropic/chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,18 @@ def _format_messages(messages: List[BaseMessage]) -> Tuple[Optional[str], List[D


class ChatAnthropic(BaseChatModel):
"""ChatAnthropicMessages chat model.
"""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.
Example:
.. code-block:: python
from langchain_anthropic import ChatAnthropicMessages
from langchain_anthropic import ChatAnthropic
model = ChatAnthropicMessages()
model = ChatAnthropic()
"""

class Config:
Expand Down

0 comments on commit a45d55b

Please sign in to comment.