Class: Mindee::Parsing::V2::InferenceActiveOptions
- Inherits:
-
Object
- Object
- Mindee::Parsing::V2::InferenceActiveOptions
- Defined in:
- lib/mindee/parsing/v2/inference_active_options.rb
Overview
Options which were activated during the inference.
Instance Attribute Summary collapse
-
#confidence ⇒ Boolean
readonly
Whether the confidence feature was activated.
-
#polygon ⇒ Boolean
readonly
Whether the polygon feature was activated.
-
#rag ⇒ Boolean
readonly
Whether the Retrieval-Augmented Generation feature was activated.
-
#raw_text ⇒ Boolean
readonly
Whether the Raw Text feature was activated.
Instance Method Summary collapse
-
#initialize(server_response) ⇒ InferenceActiveOptions
constructor
A new instance of InferenceActiveOptions.
-
#to_s ⇒ String
String representation.
Constructor Details
#initialize(server_response) ⇒ InferenceActiveOptions
Returns a new instance of InferenceActiveOptions.
18 19 20 21 22 23 |
# File 'lib/mindee/parsing/v2/inference_active_options.rb', line 18 def initialize(server_response) @raw_text = server_response['raw_text'] @polygon = server_response['polygon'] @confidence = server_response['confidence'] @rag = server_response['rag'] end |
Instance Attribute Details
#confidence ⇒ Boolean (readonly)
Returns Whether the confidence feature was activated.
13 14 15 |
# File 'lib/mindee/parsing/v2/inference_active_options.rb', line 13 def confidence @confidence end |
#polygon ⇒ Boolean (readonly)
Returns Whether the polygon feature was activated.
11 12 13 |
# File 'lib/mindee/parsing/v2/inference_active_options.rb', line 11 def polygon @polygon end |
#rag ⇒ Boolean (readonly)
Returns Whether the Retrieval-Augmented Generation feature was activated.
15 16 17 |
# File 'lib/mindee/parsing/v2/inference_active_options.rb', line 15 def rag @rag end |
#raw_text ⇒ Boolean (readonly)
Returns Whether the Raw Text feature was activated.
9 10 11 |
# File 'lib/mindee/parsing/v2/inference_active_options.rb', line 9 def raw_text @raw_text end |
Instance Method Details
#to_s ⇒ String
String representation.
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/mindee/parsing/v2/inference_active_options.rb', line 27 def to_s parts = [ 'Active Options', '==============', ":Raw Text: #{@raw_text ? 'True' : 'False'}", ":Polygon: #{@polygon ? 'True' : 'False'}", ":Confidence: #{@confidence ? 'True' : 'False'}", ":RAG: #{@rag ? 'True' : 'False'}", '', ] parts.join("\n") end |