Skip to content

Bedrock claude tokenizer

BedrockClaudeTokenizer

Bases: AnthropicTokenizer

Source code in griptape/griptape/tokenizers/bedrock_claude_tokenizer.py
5
6
7
8
@define(frozen=True)
class BedrockClaudeTokenizer(AnthropicTokenizer):
    DEFAULT_MODEL = "anthropic.claude-v2:1"
    MODEL_PREFIXES_TO_MAX_TOKENS = {"anthropic.claude-v2:1": 200000, "anthropic.claude": 100000}

DEFAULT_MODEL = 'anthropic.claude-v2:1' class-attribute instance-attribute

MODEL_PREFIXES_TO_MAX_TOKENS = {'anthropic.claude-v2:1': 200000, 'anthropic.claude': 100000} class-attribute instance-attribute