class Vellum::GenerateResultError
def self.from_json(json_object:)
-
(GenerateResultError)-
Parameters:
-
json_object(JSON) --
def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) JSON.parse(json_object) message = struct.message new(message: message, additional_properties: struct) end
def self.validate_raw(obj:)
-
(Void)-
Parameters:
-
obj(Object) --
def self.validate_raw(obj:) obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.") end
def initialize(message:, additional_properties: nil)
-
(GenerateResultError)-
Parameters:
-
additional_properties(OpenStruct) -- Additional properties unmapped to the current class definition -
message(String) -- The error message returned by the LLM provider.
def initialize(message:, additional_properties: nil) # @type [String] The error message returned by the LLM provider. @message = message # @type [OpenStruct] Additional properties unmapped to the current class definition @additional_properties = additional_properties end
def to_json(*_args)
-
(JSON)-
def to_json(*_args) { "message": @message }.to_json end