Module: FeatherAi
- Defined in:
- lib/feather_ai.rb,
lib/feather_ai/result.rb,
lib/feather_ai/version.rb,
lib/feather_ai/consensus.rb,
lib/feather_ai/identifier.rb,
lib/feather_ai/configuration.rb,
lib/feather_ai/rails/railtie.rb,
lib/feather_ai/instrumentation.rb,
lib/feather_ai/photography_tips.rb,
lib/feather_ai/rails/acts_as_sighting.rb,
lib/generators/feather_ai/install_generator.rb,
lib/generators/feather_ai/add_corrections_generator.rb
Overview
Top-level module for bird identification using LLMs.
Defined Under Namespace
Modules: Generators, Instrumentation, Rails Classes: Configuration, ConfigurationError, Consensus, Error, IdentificationError, Identifier, PhotographyTips, Result
Constant Summary collapse
- VERSION =
"0.4.0"
Class Method Summary collapse
- .configuration ⇒ Object
- .configure {|configuration| ... } ⇒ Object
-
.identify(image = nil, audio = nil, location: nil, consensus: false, tools: nil) ⇒ Object
Identify a bird from image(s) and/or audio.
- .reset! ⇒ Object
Class Method Details
.configuration ⇒ Object
21 22 23 |
# File 'lib/feather_ai.rb', line 21 def configuration @configuration ||= Configuration.new end |
.configure {|configuration| ... } ⇒ Object
25 26 27 |
# File 'lib/feather_ai.rb', line 25 def configure yield configuration end |
.identify(image = nil, audio = nil, location: nil, consensus: false, tools: nil) ⇒ Object
Identify a bird from image(s) and/or audio.
37 38 39 40 41 42 43 |
# File 'lib/feather_ai.rb', line 37 def identify(image = nil, audio = nil, location: nil, consensus: false, tools: nil) if consensus Consensus.new.identify(image, audio, location: location, tools: tools) else Identifier.new.identify(image, audio, location: location, tools: tools) end end |
.reset! ⇒ Object
29 30 31 |
# File 'lib/feather_ai.rb', line 29 def reset! @configuration = nil end |