Class: Believe::Models::PepTalkRetrieveResponse::Chunk

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/believe/models/pep_talk_retrieve_response.rb

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(chunk_id:, is_final:, text:, emotional_beat: nil) ⇒ Object

Some parameter documentations has been truncated, see Believe::Models::PepTalkRetrieveResponse::Chunk for more details.

A chunk of a streaming pep talk from Ted.

Parameters:

  • chunk_id (Integer)

    Chunk sequence number

  • is_final (Boolean)

    Is this the final chunk

  • text (String)

    The text of this chunk

  • emotional_beat (String, nil) (defaults to: nil)

    The emotional purpose of this chunk (e.g., greeting, acknowledgment, wisdom, aff



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/believe/models/pep_talk_retrieve_response.rb', line 27

class Chunk < ::Believe::Internal::Type::BaseModel
  # @!attribute chunk_id
  #   Chunk sequence number
  #
  #   @return [Integer]
  required :chunk_id, Integer

  # @!attribute is_final
  #   Is this the final chunk
  #
  #   @return [Boolean]
  required :is_final, ::Believe::Internal::Type::Boolean

  # @!attribute text
  #   The text of this chunk
  #
  #   @return [String]
  required :text, String

  # @!attribute emotional_beat
  #   The emotional purpose of this chunk (e.g., greeting, acknowledgment, wisdom,
  #   affirmation, encouragement)
  #
  #   @return [String, nil]
  optional :emotional_beat, String, nil?: true

  # @!method initialize(chunk_id:, is_final:, text:, emotional_beat: nil)
  #   Some parameter documentations has been truncated, see
  #   {::Believe::Models::PepTalkRetrieveResponse::Chunk} for more details.
  #
  #   A chunk of a streaming pep talk from Ted.
  #
  #   @param chunk_id [Integer] Chunk sequence number
  #
  #   @param is_final [Boolean] Is this the final chunk
  #
  #   @param text [String] The text of this chunk
  #
  #   @param emotional_beat [String, nil] The emotional purpose of this chunk (e.g., greeting, acknowledgment, wisdom, aff
end

Instance Attribute Details

#chunk_idInteger

Chunk sequence number

Returns:

  • (Integer)


32
# File 'lib/believe/models/pep_talk_retrieve_response.rb', line 32

required :chunk_id, Integer

#emotional_beatString?

The emotional purpose of this chunk (e.g., greeting, acknowledgment, wisdom, affirmation, encouragement)

Returns:

  • (String, nil)


51
# File 'lib/believe/models/pep_talk_retrieve_response.rb', line 51

optional :emotional_beat, String, nil?: true

#is_finalBoolean

Is this the final chunk

Returns:

  • (Boolean)


38
# File 'lib/believe/models/pep_talk_retrieve_response.rb', line 38

required :is_final, ::Believe::Internal::Type::Boolean

#textString

The text of this chunk

Returns:

  • (String)


44
# File 'lib/believe/models/pep_talk_retrieve_response.rb', line 44

required :text, String