-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Previously, on 4.7.0.pre.rc3, I could use dot notation to access fields just fine, but after upgrading to version 4.7.2, I can no longer use dot notation.
After I looked into the source code, there was no change to method_missing or respond_to_missing?.
Not sure what the source of this issue is.
Here is some example according to the document. https://docs.mindee.com/integrations/client-libraries-sdk/quick-start#ruby
# ruby 3.4.4
require 'mindee' # 4.7.2
input_path = '/path/to/the/file.ext'
api_key = 'MY_API_KEY'
model_id = 'MY_MODEL_ID'
# Init a new client
mindee_client = Mindee::ClientV2.new(api_key: api_key)
# Set inference parameters
inference_params = Mindee::Input::InferenceParameters.new(
# ID of the model, required.
model_id,
)
# Load a file from disk
input_source = Mindee::Input::Source::PathInputSource.new(input_path)
# Send for processing using polling
response = mindee_client.enqueue_and_get_inference(
input_source,
inference_params
)
# Print a brief summary of the parsed data
puts response.inference.result.fields.supplier_address # 4.7.0.pre.rc3 works
puts response.inference.result.fields.supplier_address
#=> 4.7.2 NoMethodError: undefined method 'supplier_name' for an instance of Mindee::Parsing::V2::Field::InferenceFields (NoMethodError)
puts response.inference.result.fields.get('supplier_address')
#=> 4.7.2 works but my code base is using dot notationThank you !
Metadata
Metadata
Assignees
Labels
No labels