anthropic: set default model (#21986)

Various docs reference `ChatAnthropic()`, but this currently raises
ValidationError.
This commit is contained in:
ccurme 2024-05-21 10:24:31 -07:00 committed by GitHub
parent 0923136851
commit 35439cf3bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -259,7 +259,7 @@ class ChatAnthropic(BaseChatModel):
_client: anthropic.Client = Field(default=None)
_async_client: anthropic.AsyncClient = Field(default=None)
model: str = Field(alias="model_name")
model: str = Field(default="claude-3-haiku-20240307", alias="model_name")
"""Model name to use."""
max_tokens: int = Field(default=1024, alias="max_tokens_to_sample")