Class: OpenAI::Models::Beta::Threads::FileCitationDeltaAnnotation

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/threads/file_citation_delta_annotation.rb,
sig/openai/models/beta/threads/file_citation_delta_annotation.rbs

Defined Under Namespace

Classes: FileCitation

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_with_error, 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(index:, end_index: nil, file_citation: nil, start_index: nil, text: nil, type: :file_citation) ⇒ Object

Parameters:

  • index —

    The index of the annotation in the text content part.

  • text (defaults to: nil) —

    The text in the message content that needs to be replaced.

  • type (defaults to: :file_citation) —

    Always file_citation.



# File 'lib/openai/models/beta/threads/file_citation_delta_annotation.rb', line 41

Instance Attribute Details

#end_index ⇒ Integer?

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


23
# File 'lib/openai/models/beta/threads/file_citation_delta_annotation.rb', line 23

optional :end_index, Integer

#file_citation ⇒ OpenAI::Models::Beta::Threads::FileCitationDeltaAnnotation::FileCitation?



28
# File 'lib/openai/models/beta/threads/file_citation_delta_annotation.rb', line 28

optional :file_citation, -> { OpenAI::Beta::Threads::FileCitationDeltaAnnotation::FileCitation }

#index ⇒ Integer

The index of the annotation in the text content part.

Returns:

  • (Integer)


12
# File 'lib/openai/models/beta/threads/file_citation_delta_annotation.rb', line 12

required :index, Integer

#start_index ⇒ Integer?

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


33
# File 'lib/openai/models/beta/threads/file_citation_delta_annotation.rb', line 33

optional :start_index, Integer

#text ⇒ String?

The text in the message content that needs to be replaced.

Returns:

  • (String, nil)


39
# File 'lib/openai/models/beta/threads/file_citation_delta_annotation.rb', line 39

optional :text, String

#type ⇒ :file_citation

Always file_citation.

Returns:

  • (:file_citation)


18
# File 'lib/openai/models/beta/threads/file_citation_delta_annotation.rb', line 18

required :type, const: :file_citation

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


57
# File 'sig/openai/models/beta/threads/file_citation_delta_annotation.rbs', line 57

def to_hash: -> {