claude_3_7_sonnet
What it is
- Defines a preconfigured Anthropic Claude chat model (
claude-3-7-sonnet-20250219) wrapped as anaas_abi_core.models.Model.ChatModel. - Intended to be imported and used as a ready-to-run model instance.
Public API
MODEL_ID: str- Constant model identifier:
"claude-3-7-sonnet-20250219".
- Constant model identifier:
PROVIDER: str- Constant provider identifier:
"anthropic".
- Constant provider identifier:
model: ChatModel- A
ChatModelinstance configured with:- underlying
langchain_anthropic.ChatAnthropic temperature=0max_retries=2timeout=Nonestop=Noneapi_keysourced fromABIModule.get_instance().configuration.anthropic_api_key(wrapped inpydantic.SecretStr)
- underlying
- A
Configuration/Dependencies
- Dependencies:
langchain_anthropic.ChatAnthropicnaas_abi_marketplace.ai.claude.ABIModulenaas_abi_core.models.Model.ChatModelpydantic.SecretStr
- Requires configuration:
ABIModule.get_instance().configuration.anthropic_api_keymust be set to a valid Anthropic API key.
Usage
from naas_abi_marketplace.ai.claude.models.claude_3_7_sonnet import model
# Use `model` with the interfaces expected by your application.
# (The exact invocation methods depend on ChatModel's implementation.)
print(model.model_id, model.provider)
Caveats
- Importing this module constructs the model immediately and reads the API key from
ABIModuleconfiguration at import time. - The callable methods for sending chat messages are not defined here; they depend on
ChatModeland the underlyingChatAnthropicobject.