Class: Legion::Extensions::Llm::Gateway::Transport::Messages::InferenceResponse
- Inherits:
-
Transport::Message
- Object
- Transport::Message
- Legion::Extensions::Llm::Gateway::Transport::Messages::InferenceResponse
- Defined in:
- lib/legion/extensions/llm/gateway/transport/messages/inference_response.rb
Instance Method Summary collapse
Instance Method Details
#encrypt? ⇒ Boolean
18 19 20 |
# File 'lib/legion/extensions/llm/gateway/transport/messages/inference_response.rb', line 18 def encrypt? false end |
#message ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/legion/extensions/llm/gateway/transport/messages/inference_response.rb', line 28 def token_fields.merge( correlation_id: @options[:correlation_id], response: @options[:response], provider: @options[:provider], model_id: @options[:model_id], error: @options[:error] ) end |
#routing_key ⇒ Object
10 11 12 |
# File 'lib/legion/extensions/llm/gateway/transport/messages/inference_response.rb', line 10 def routing_key 'inference.response' end |
#type ⇒ Object
14 15 16 |
# File 'lib/legion/extensions/llm/gateway/transport/messages/inference_response.rb', line 14 def type 'inference_response' end |
#validate ⇒ Object
22 23 24 25 26 |
# File 'lib/legion/extensions/llm/gateway/transport/messages/inference_response.rb', line 22 def validate raise 'correlation_id is required' unless @options[:correlation_id] @valid = true end |