Class: Legion::Extensions::Llm::Ollama::Transport::Messages::RegistryEvent
- Inherits:
-
Transport::Message
- Object
- Transport::Message
- Legion::Extensions::Llm::Ollama::Transport::Messages::RegistryEvent
- Defined in:
- lib/legion/extensions/llm/ollama/transport/messages/registry_event.rb
Overview
Publishes lex-llm RegistryEvent envelopes to the llm.registry exchange.
Instance Method Summary collapse
- #app_id ⇒ Object
- #exchange ⇒ Object
-
#initialize(event:, **options) ⇒ RegistryEvent
constructor
A new instance of RegistryEvent.
-
#persistent ⇒ Object
rubocop:disable Naming/PredicateMethod.
- #routing_key ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(event:, **options) ⇒ RegistryEvent
Returns a new instance of RegistryEvent.
13 14 15 |
# File 'lib/legion/extensions/llm/ollama/transport/messages/registry_event.rb', line 13 def initialize(event:, **) super(**event.to_h.merge()) end |
Instance Method Details
#app_id ⇒ Object
29 30 31 |
# File 'lib/legion/extensions/llm/ollama/transport/messages/registry_event.rb', line 29 def app_id @options[:app_id] || RegistryPublisher::APP_ID end |
#exchange ⇒ Object
17 18 19 |
# File 'lib/legion/extensions/llm/ollama/transport/messages/registry_event.rb', line 17 def exchange Transport::Exchanges::LlmRegistry end |
#persistent ⇒ Object
rubocop:disable Naming/PredicateMethod
33 34 35 |
# File 'lib/legion/extensions/llm/ollama/transport/messages/registry_event.rb', line 33 def persistent # rubocop:disable Naming/PredicateMethod false end |
#routing_key ⇒ Object
21 22 23 |
# File 'lib/legion/extensions/llm/ollama/transport/messages/registry_event.rb', line 21 def routing_key @options[:routing_key] || "llm.registry.#{@options.fetch(:event_type)}" end |
#type ⇒ Object
25 26 27 |
# File 'lib/legion/extensions/llm/ollama/transport/messages/registry_event.rb', line 25 def type 'llm.registry.event' end |