Class: ObsceneGpt::Configuration
- Inherits:
-
Object
- Object
- ObsceneGpt::Configuration
- Defined in:
- lib/obscene_gpt/configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#model ⇒ Object
Returns the value of attribute model.
-
#profanity_threshold ⇒ Object
Returns the value of attribute profanity_threshold.
-
#prompt ⇒ Object
Returns the value of attribute prompt.
-
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
-
#schema ⇒ Object
Returns the value of attribute schema.
-
#test_detector_class ⇒ Object
Returns the value of attribute test_detector_class.
-
#test_mode ⇒ Object
Returns the value of attribute test_mode.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/obscene_gpt/configuration.rb', line 16 def initialize @api_key = ENV.fetch("OPENAI_API_KEY", nil) @model = "gpt-4.1-nano" @prompt = Prompts::SYSTEM_PROMPT @schema = Prompts::SIMPLE_SCHEMA @profanity_threshold = 0.8 @test_mode = false @test_detector_class = TestDetector @request_timeout = 10 end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
13 14 15 |
# File 'lib/obscene_gpt/configuration.rb', line 13 def api_key @api_key end |
#model ⇒ Object
Returns the value of attribute model.
13 14 15 |
# File 'lib/obscene_gpt/configuration.rb', line 13 def model @model end |
#profanity_threshold ⇒ Object
Returns the value of attribute profanity_threshold.
13 14 15 |
# File 'lib/obscene_gpt/configuration.rb', line 13 def profanity_threshold @profanity_threshold end |
#prompt ⇒ Object
Returns the value of attribute prompt.
13 14 15 |
# File 'lib/obscene_gpt/configuration.rb', line 13 def prompt @prompt end |
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
13 14 15 |
# File 'lib/obscene_gpt/configuration.rb', line 13 def request_timeout @request_timeout end |
#schema ⇒ Object
Returns the value of attribute schema.
13 14 15 |
# File 'lib/obscene_gpt/configuration.rb', line 13 def schema @schema end |
#test_detector_class ⇒ Object
Returns the value of attribute test_detector_class.
13 14 15 |
# File 'lib/obscene_gpt/configuration.rb', line 13 def test_detector_class @test_detector_class end |
#test_mode ⇒ Object
Returns the value of attribute test_mode.
13 14 15 |
# File 'lib/obscene_gpt/configuration.rb', line 13 def test_mode @test_mode end |