claude_3_5_sonnet (Human Resources model template)
What it is
- A non-functional template for configuring an Anthropic
claude-3-5-sonnetchat model for a Human Resources domain expert. - Provides a
create_model()factory that may return aChatAnthropicinstance only if an API key is available. - The module-level
modelis currently alwaysNone.
Public API
-
create_model() -> ChatAnthropic | None- Logs a warning that this is a template.
- Reads
ANTHROPIC_API_KEYvianaas_abi.secret.get. - Returns
Noneif the key is missing; otherwise returns a configuredlangchain_anthropic.ChatAnthropic.
-
model: None- Placeholder; not initialized (comment indicates it “would be”
create_model()).
- Placeholder; not initialized (comment indicates it “would be”
Configuration/Dependencies
- Dependencies:
langchain_anthropic.ChatAnthropicnaas_abi.secret(forsecret.get("ANTHROPIC_API_KEY"))naas_abi_core.logger
- Required secret/environment:
ANTHROPIC_API_KEYmust be retrievable viasecret.get(...).
Usage
from naas_abi_marketplace.domains.human-resources-manager.models.claude_3_5_sonnet import create_model
model = create_model()
if model is None:
raise RuntimeError("Missing ANTHROPIC_API_KEY")
# Use `model` according to langchain_anthropic.ChatAnthropic expectations.
Caveats
- Marked “NOT FUNCTIONAL YET - template only”:
- Always emits a warning when
create_model()is called. - The module-level
modelis not instantiated (set toNone).
- Always emits a warning when