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.
- #data_schema ⇒ DataSchemaActiveOption readonly
-
#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.
39 40 41 42 43 44 45 46 |
# File 'lib/mindee/parsing/v2/inference_active_options.rb', line 39 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'] @data_schema = DataSchemaActiveOption.new(server_response['data_schema']) end |
Instance Attribute Details
#confidence ⇒ Boolean (readonly)
Returns Whether the confidence feature was activated.
30 31 32 |
# File 'lib/mindee/parsing/v2/inference_active_options.rb', line 30 def confidence @confidence end |
#data_schema ⇒ DataSchemaActiveOption (readonly)
36 37 38 |
# File 'lib/mindee/parsing/v2/inference_active_options.rb', line 36 def data_schema @data_schema end |
#polygon ⇒ Boolean (readonly)
Returns Whether the polygon feature was activated.
28 29 30 |
# File 'lib/mindee/parsing/v2/inference_active_options.rb', line 28 def polygon @polygon end |
#rag ⇒ Boolean (readonly)
Returns Whether the Retrieval-Augmented Generation feature was activated.
32 33 34 |
# File 'lib/mindee/parsing/v2/inference_active_options.rb', line 32 def rag @rag end |
#raw_text ⇒ Boolean (readonly)
Returns Whether the Raw Text feature was activated.
26 27 28 |
# File 'lib/mindee/parsing/v2/inference_active_options.rb', line 26 def raw_text @raw_text end |
#text_context ⇒ Boolean (readonly)
Returns Whether the text context feature was activated.
34 35 36 |
# File 'lib/mindee/parsing/v2/inference_active_options.rb', line 34 def text_context @text_context end |
Instance Method Details
#to_s ⇒ String
String representation.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/mindee/parsing/v2/inference_active_options.rb', line 50 def to_s parts = [ 'Active Options', '==============', ":Raw Text: #{@raw_text ? 'True' : 'False'}", ":Polygon: #{@polygon ? 'True' : 'False'}", ":Confidence: #{@confidence ? 'True' : 'False'}", ":RAG: #{@rag ? 'True' : 'False'}", ":Text Context: #{@text_context ? 'True' : 'False'}\n", @data_schema.to_s, '', ] parts.join("\n") end |