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.
-
#text_context ⇒ Boolean
readonly
Whether the text context 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.
20 21 22 23 24 25 26 |
# File 'lib/mindee/parsing/v2/inference_active_options.rb', line 20 def initialize(server_response) @raw_text = server_response['raw_text'] @polygon = server_response['polygon'] @confidence = server_response['confidence'] @rag = server_response['rag'] @text_context = server_response['text_context'] 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 |
#text_context ⇒ Boolean (readonly)
Returns Whether the text context feature was activated.
17 18 19 |
# File 'lib/mindee/parsing/v2/inference_active_options.rb', line 17 def text_context @text_context end |
Instance Method Details
#to_s ⇒ String
String representation.
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/mindee/parsing/v2/inference_active_options.rb', line 30 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 |