Class: Zavudev::Models::AgentTestParams::History

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/zavudev/models/agent_test_params.rb,
sig/zavudev/models/agent_test_params.rbs

Defined Under Namespace

Modules: Role

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(content:, role:) ⇒ Object

Parameters:



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/zavudev/models/agent_test_params.rb', line 63

class History < Zavudev::Internal::Type::BaseModel
  # @!attribute content
  #
  #   @return [String]
  required :content, String

  # @!attribute role
  #
  #   @return [Symbol, Zavudev::Models::AgentTestParams::History::Role]
  required :role, enum: -> { Zavudev::AgentTestParams::History::Role }

  # @!method initialize(content:, role:)
  #   @param content [String]
  #   @param role [Symbol, Zavudev::Models::AgentTestParams::History::Role]

  # @see Zavudev::Models::AgentTestParams::History#role
  module Role
    extend Zavudev::Internal::Type::Enum

    USER = :user
    ASSISTANT = :assistant

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#content ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


67
# File 'lib/zavudev/models/agent_test_params.rb', line 67

required :content, String

#role ⇒ Symbol, Zavudev::Models::AgentTestParams::History::Role

Parameters:

  • value (Zavudev::Models::AgentTestParams::History::role)

Returns:



72
# File 'lib/zavudev/models/agent_test_params.rb', line 72

required :role, enum: -> { Zavudev::AgentTestParams::History::Role }

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


69
# File 'sig/zavudev/models/agent_test_params.rbs', line 69

def to_hash: -> {