Module: Legion::Extensions::Llm::Gateway::Helpers::Rpc
- Defined in:
- lib/legion/extensions/llm/gateway/helpers/rpc.rb
Class Method Summary collapse
- .agent_queue_name ⇒ Object
- .build_reply_headers(correlation_id:) ⇒ Object
- .generate_correlation_id ⇒ Object
Class Method Details
.agent_queue_name ⇒ Object
17 18 19 20 21 |
# File 'lib/legion/extensions/llm/gateway/helpers/rpc.rb', line 17 def agent_queue_name return Legion::Transport.agent_queue_name if defined?(Legion::Transport) && Legion::Transport.respond_to?(:agent_queue_name) # rubocop:disable Legion/HelperMigration/DefinedTransportGuard nil end |
.build_reply_headers(correlation_id:) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/legion/extensions/llm/gateway/helpers/rpc.rb', line 23 def build_reply_headers(correlation_id:) { reply_to: agent_queue_name, correlation_id: correlation_id } end |
.generate_correlation_id ⇒ Object
13 14 15 |
# File 'lib/legion/extensions/llm/gateway/helpers/rpc.rb', line 13 def generate_correlation_id SecureRandom.uuid end |