Class: Assistant::QueryClassifier::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/assistant/query_classifier.rb

Overview

Result returned by .classify. tools is always an Array (possibly empty).
model_tier is one of :flash | :pro | nil (nil means classifier abstained
and the caller should use its own fallback).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tools: [], model_tier: nil, reason: nil) ⇒ Result

Returns a new instance of Result.



29
# File 'app/services/assistant/query_classifier.rb', line 29

def initialize(tools: [], model_tier: nil, reason: nil) = super

Instance Attribute Details

#model_tierObject (readonly)

Returns the value of attribute model_tier

Returns:

  • (Object)

    the current value of model_tier



28
29
30
# File 'app/services/assistant/query_classifier.rb', line 28

def model_tier
  @model_tier
end

#reasonObject (readonly)

Returns the value of attribute reason

Returns:

  • (Object)

    the current value of reason



28
29
30
# File 'app/services/assistant/query_classifier.rb', line 28

def reason
  @reason
end

#toolsObject (readonly)

Returns the value of attribute tools

Returns:

  • (Object)

    the current value of tools



28
29
30
# File 'app/services/assistant/query_classifier.rb', line 28

def tools
  @tools
end