class Vellum::TestSuiteRunExecutionChatHistoryOutput
def self.from_json(json_object:)
-
(TestSuiteRunExecutionChatHistoryOutput)-
Parameters:
-
json_object(JSON) --
def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) output_variable_id = struct.output_variable_id value = parsed_json["value"].map do |v| v = v.to_json ChatMessage.from_json(json_object: v) end new(output_variable_id: output_variable_id, value: value, additional_properties: struct) end
def self.validate_raw(obj:)
-
(Void)-
Parameters:
-
obj(Object) --
def self.validate_raw(obj:) obj.output_variable_id.is_a?(String) != false || raise("Passed value for field obj.output_variable_id is not the expected type, validation failed.") obj.value&.is_a?(Array) != false || raise("Passed value for field obj.value is not the expected type, validation failed.") end
def initialize(output_variable_id:, value: nil, additional_properties: nil)
-
(TestSuiteRunExecutionChatHistoryOutput)-
Parameters:
-
additional_properties(OpenStruct) -- Additional properties unmapped to the current class definition -
value(Array) -- -
output_variable_id(String) --
def initialize(output_variable_id:, value: nil, additional_properties: nil) # @type [String] @output_variable_id = output_variable_id # @type [Array<ChatMessage>] @value = value # @type [OpenStruct] Additional properties unmapped to the current class definition @additional_properties = additional_properties end
def to_json(*_args)
-
(JSON)-
def to_json(*_args) { "output_variable_id": @output_variable_id, "value": @value }.to_json end