Class: Assistant::ChatService::Result
- Inherits:
-
Data
- Object
- Data
- Assistant::ChatService::Result
- Defined in:
- app/services/assistant/chat_service.rb
Overview
Result object containing response and usage stats (immutable)
Includes model_reason for auto-selection and thinking_text for extended reasoning traces
Instance Attribute Summary collapse
-
#cache_creation_tokens ⇒ Object
readonly
Returns the value of attribute cache_creation_tokens.
-
#cached_tokens ⇒ Object
readonly
Returns the value of attribute cached_tokens.
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#input_tokens ⇒ Object
readonly
Returns the value of attribute input_tokens.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#model_reason ⇒ Object
readonly
Returns the value of attribute model_reason.
-
#output_tokens ⇒ Object
readonly
Returns the value of attribute output_tokens.
-
#response_time ⇒ Object
readonly
Returns the value of attribute response_time.
-
#thinking_text ⇒ Object
readonly
Returns the value of attribute thinking_text.
-
#tool_limit_reached ⇒ Object
readonly
Returns the value of attribute tool_limit_reached.
-
#tool_stats ⇒ Object
readonly
Returns the value of attribute tool_stats.
Instance Method Summary collapse
-
#initialize(content: nil, model: nil, input_tokens: nil, output_tokens: nil, cached_tokens: nil, cache_creation_tokens: nil, response_time: nil, model_reason: nil, thinking_text: nil, tool_limit_reached: false, tool_stats: {}) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(content: nil, model: nil, input_tokens: nil, output_tokens: nil, cached_tokens: nil, cache_creation_tokens: nil, response_time: nil, model_reason: nil, thinking_text: nil, tool_limit_reached: false, tool_stats: {}) ⇒ Result
Returns a new instance of Result.
301 |
# File 'app/services/assistant/chat_service.rb', line 301 def initialize(content: nil, model: nil, input_tokens: nil, output_tokens: nil, cached_tokens: nil, cache_creation_tokens: nil, response_time: nil, model_reason: nil, thinking_text: nil, tool_limit_reached: false, tool_stats: {}) = super |
Instance Attribute Details
#cache_creation_tokens ⇒ Object (readonly)
Returns the value of attribute cache_creation_tokens
288 289 290 |
# File 'app/services/assistant/chat_service.rb', line 288 def cache_creation_tokens @cache_creation_tokens end |
#cached_tokens ⇒ Object (readonly)
Returns the value of attribute cached_tokens
288 289 290 |
# File 'app/services/assistant/chat_service.rb', line 288 def cached_tokens @cached_tokens end |
#content ⇒ Object (readonly)
Returns the value of attribute content
288 289 290 |
# File 'app/services/assistant/chat_service.rb', line 288 def content @content end |
#input_tokens ⇒ Object (readonly)
Returns the value of attribute input_tokens
288 289 290 |
# File 'app/services/assistant/chat_service.rb', line 288 def input_tokens @input_tokens end |
#model ⇒ Object (readonly)
Returns the value of attribute model
288 289 290 |
# File 'app/services/assistant/chat_service.rb', line 288 def model @model end |
#model_reason ⇒ Object (readonly)
Returns the value of attribute model_reason
288 289 290 |
# File 'app/services/assistant/chat_service.rb', line 288 def model_reason @model_reason end |
#output_tokens ⇒ Object (readonly)
Returns the value of attribute output_tokens
288 289 290 |
# File 'app/services/assistant/chat_service.rb', line 288 def output_tokens @output_tokens end |
#response_time ⇒ Object (readonly)
Returns the value of attribute response_time
288 289 290 |
# File 'app/services/assistant/chat_service.rb', line 288 def response_time @response_time end |
#thinking_text ⇒ Object (readonly)
Returns the value of attribute thinking_text
288 289 290 |
# File 'app/services/assistant/chat_service.rb', line 288 def thinking_text @thinking_text end |
#tool_limit_reached ⇒ Object (readonly)
Returns the value of attribute tool_limit_reached
288 289 290 |
# File 'app/services/assistant/chat_service.rb', line 288 def tool_limit_reached @tool_limit_reached end |
#tool_stats ⇒ Object (readonly)
Returns the value of attribute tool_stats
288 289 290 |
# File 'app/services/assistant/chat_service.rb', line 288 def tool_stats @tool_stats end |