Class: SentinelRb::Client::Base
- Inherits:
-
Object
- Object
- SentinelRb::Client::Base
- Defined in:
- lib/sentinel_rb/client/base.rb
Overview
Base class for LLM client implementations
Instance Method Summary collapse
-
#analyze_content(prompt) ⇒ Hash
Abstract method: Analyze content for relevance and quality.
-
#fact_check(statement) ⇒ Hash
Abstract method: Check factual accuracy of a statement.
-
#initialize(config) ⇒ Base
constructor
A new instance of Base.
-
#similarity(text1, text2) ⇒ Float
Abstract method: Calculate semantic similarity between two texts.
Constructor Details
#initialize(config) ⇒ Base
Returns a new instance of Base.
7 8 9 |
# File 'lib/sentinel_rb/client/base.rb', line 7 def initialize(config) @config = config end |
Instance Method Details
#analyze_content(prompt) ⇒ Hash
Abstract method: Analyze content for relevance and quality
29 30 31 |
# File 'lib/sentinel_rb/client/base.rb', line 29 def analyze_content(prompt) raise NotImplementedError, "Subclasses must implement #analyze_content" end |
#fact_check(statement) ⇒ Hash
Abstract method: Check factual accuracy of a statement
22 23 24 |
# File 'lib/sentinel_rb/client/base.rb', line 22 def fact_check(statement) raise NotImplementedError, "Subclasses must implement #fact_check" end |
#similarity(text1, text2) ⇒ Float
Abstract method: Calculate semantic similarity between two texts
15 16 17 |
# File 'lib/sentinel_rb/client/base.rb', line 15 def similarity(text1, text2) raise NotImplementedError, "Subclasses must implement #similarity" end |