Claude
ClaudeModelName
module-attribute
ClaudeModelName = Literal['claude-3-5-haiku-20241022', 'claude-3-5-sonnet-20241022']
Claude
Claude(logger: Logger, model_name: ClaudeModelName, prompt_caching: bool = False, system_extension: str | None = None, system_message: str | None = None, retry_max_attempts: int = 10, retry_wait_strategy: WaitStrategy = WaitExponential(multiplier=1, max=10, exp_base=2))
Bases: CodeActModel
A CodeActModel
implementation based on Anthropic's Claude API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
logger
|
Logger
|
Logger instance for logging requests and responses. |
required |
model_name
|
ClaudeModelName
|
Name of the Claude model to use (e.g., "claude-3-5-sonnet-20241022"). |
required |
prompt_caching
|
bool
|
Whether to enable prompt caching. Defaults to False. |
False
|
system_extension
|
str | None
|
Additional system prompt text. Defaults to None. |
None
|
system_message
|
str | None
|
Complete system message to override default. Defaults to None. |
None
|
retry_max_attempts
|
int
|
Maximum number of retry attempts. Defaults to 10. |
10
|