Class: PromptCanary::Configuration
- Inherits:
-
Object
- Object
- PromptCanary::Configuration
- Defined in:
- lib/prompt_canary/configuration.rb
Constant Summary collapse
- VALID_ADAPTERS =
%i[anthropic].freeze
- VALID_STORAGE =
%i[memory sqlite active_record].freeze
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
-
#storage ⇒ Object
Returns the value of attribute storage.
Instance Method Summary collapse
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
8 9 10 |
# File 'lib/prompt_canary/configuration.rb', line 8 def adapter @adapter end |
#storage ⇒ Object
Returns the value of attribute storage.
8 9 10 |
# File 'lib/prompt_canary/configuration.rb', line 8 def storage @storage end |
Instance Method Details
#validate! ⇒ Object
26 27 28 29 |
# File 'lib/prompt_canary/configuration.rb', line 26 def validate! raise ConfigurationError, "adapter is required" if adapter.nil? raise ConfigurationError, "storage is required" if storage.nil? end |