Class: BandcampDiscover::Analyzer
- Inherits:
-
Object
- Object
- BandcampDiscover::Analyzer
- Defined in:
- lib/bandcamp-discover/analyzer.rb
Instance Method Summary collapse
- #accepts_demos? ⇒ Boolean
-
#initialize(description, model = nil, credits: []) ⇒ Analyzer
constructor
A per-call model still wins over the configured one so existing callers keep their behaviour.
- #label? ⇒ Boolean
Constructor Details
#initialize(description, model = nil, credits: []) ⇒ Analyzer
A per-call model still wins over the configured one so existing callers keep their behaviour.
8 9 10 11 12 |
# File 'lib/bandcamp-discover/analyzer.rb', line 8 def initialize(description, model = nil, credits: []) @description = description @credits = credits @model = model || BandcampDiscover.configuration.model end |
Instance Method Details
#accepts_demos? ⇒ Boolean
20 21 22 23 24 |
# File 'lib/bandcamp-discover/analyzer.rb', line 20 def accepts_demos? return false unless llm? ask(BandcampDiscover.configuration.demos_prompt) end |
#label? ⇒ Boolean
14 15 16 17 18 |
# File 'lib/bandcamp-discover/analyzer.rb', line 14 def label? return ask(BandcampDiscover.configuration.label_prompt) if llm? @description.to_s.match?(/label|platform|records/i) end |