Module: RailsAi::ContextAware
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/controllers/concerns/ai/context_aware.rb
Instance Method Summary collapse
- #ai_context_analyzer ⇒ Object
- #analyze_image_with_context(image, prompt, **opts) ⇒ Object
- #generate_image_with_context(prompt, **opts) ⇒ Object
- #generate_with_context(prompt, **opts) ⇒ Object
Instance Method Details
#ai_context_analyzer ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/controllers/concerns/ai/context_aware.rb', line 11 def ai_context_analyzer @ai_context_analyzer ||= RailsAi::ContextAnalyzer.new( user_context: ai_user_context, window_context: ai_window_context, image_context: ai_image_context ) end |
#analyze_image_with_context(image, prompt, **opts) ⇒ Object
19 20 21 |
# File 'app/controllers/concerns/ai/context_aware.rb', line 19 def analyze_image_with_context(image, prompt, **opts) ai_context_analyzer.analyze_with_context(image, prompt, **opts) end |
#generate_image_with_context(prompt, **opts) ⇒ Object
27 28 29 |
# File 'app/controllers/concerns/ai/context_aware.rb', line 27 def generate_image_with_context(prompt, **opts) ai_context_analyzer.generate_image_with_context(prompt, **opts) end |
#generate_with_context(prompt, **opts) ⇒ Object
23 24 25 |
# File 'app/controllers/concerns/ai/context_aware.rb', line 23 def generate_with_context(prompt, **opts) ai_context_analyzer.generate_with_context(prompt, **opts) end |