Bedrock jurassic prompt model driver
BedrockJurassicPromptModelDriver
Bases: BasePromptModelDriver
Source code in griptape/griptape/drivers/prompt_model/bedrock_jurassic_prompt_model_driver.py
prompt_driver: Optional[AmazonBedrockPromptDriver] = field(default=None, kw_only=True)
class-attribute
instance-attribute
supports_streaming: bool = field(default=False, kw_only=True)
class-attribute
instance-attribute
tokenizer: BedrockJurassicTokenizer
property
Returns the tokenizer for this driver.
We need to pass the session
field from the Prompt Driver to the
Tokenizer. However, the Prompt Driver is not initialized until after
the Prompt Model Driver is initialized. To resolve this, we make the tokenizer
field a @property that is only initialized when it is first accessed.
This ensures that by the time we need to initialize the Tokenizer, the
Prompt Driver has already been initialized.
See this thread more more information: https://github.com/griptape-ai/griptape/issues/244
Returns:
Name | Type | Description |
---|---|---|
BedrockJurassicTokenizer |
BedrockJurassicTokenizer
|
The tokenizer for this driver. |