Skip to content

Commit

Permalink
Added model_name property into ChatAnthropic
Browse files Browse the repository at this point in the history
As model_name is used to retrieve the name of the model in other providers, it will be helpful to implement similar property into Anthropic package as well.
  • Loading branch information
codeonprod authored Feb 4, 2025
1 parent 5771e56 commit aa87be0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libs/partners/anthropic/langchain_anthropic/chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,11 @@ class Joke(BaseModel):
message chunks will be generated during the stream including usage metadata.
"""

@property
def model_name(self) -> str:
"""Alias for model"""
return self.model

@property
def _llm_type(self) -> str:
"""Return type of chat model."""
Expand Down

0 comments on commit aa87be0

Please sign in to comment.