Class: Telnyx::Models::AIRetrieveConversationHistoriesResponse

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

Overview

See Also:

  • Telnyx::Resources::AI#retrieve_conversation_histories

Defined Under Namespace

Modules: Region

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(id:, chunk_index:, chunk_total:, ingested_at:, organization_id:, record_created_at:, record_id:, region:, score:, text:, user_id:, metadata: nil) ⇒ Object

Some parameter documentations has been truncated, see Telnyx::Models::AIRetrieveConversationHistoriesResponse for more details.

A single search result representing one chunk of a conversation history record. Records are split into chunks of up to 480 tokens with 64-token overlap at ingestion time.

Parameters:

  • id (String)

    Unique chunk identifier.

  • chunk_index (Integer)

    Zero-based index of this chunk within the parent record.

  • chunk_total (Integer)

    Total number of chunks the parent record was split into.

  • ingested_at (Time)

    When the record was chunked, embedded, and indexed (ISO 8601).

  • organization_id (String)

    Identifier of the organization that owns this record.

  • record_created_at (Time)

    When the original record was created (ISO 8601).

  • record_id (String)

    Identifier of the parent record. Multiple chunks from the same record share this

  • region (Symbol, Telnyx::Models::AIRetrieveConversationHistoriesResponse::Region)

    The region where this record is stored.

  • score (Float)

    Cosine similarity score between the query vector and this chunk's vector. Higher

  • text (String)

    The text content of this chunk (up to 480 tokens).

  • user_id (String)

    Identifier of the user who owns this record.

  • metadata (Hash{Symbol=>Object}) (defaults to: nil)

    Arbitrary metadata attached to the record at ingestion time. Filterable via filt



# File 'lib/telnyx/models/ai_retrieve_conversation_histories_response.rb', line 82

Instance Attribute Details

#chunk_indexInteger

Zero-based index of this chunk within the parent record.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


17
# File 'lib/telnyx/models/ai_retrieve_conversation_histories_response.rb', line 17

required :chunk_index, Integer

#chunk_totalInteger

Total number of chunks the parent record was split into.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


23
# File 'lib/telnyx/models/ai_retrieve_conversation_histories_response.rb', line 23

required :chunk_total, Integer

#idString

Unique chunk identifier.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/telnyx/models/ai_retrieve_conversation_histories_response.rb', line 11

required :id, String

#ingested_atTime

When the record was chunked, embedded, and indexed (ISO 8601).

Parameters:

  • value (Time)

Returns:

  • (Time)


29
# File 'lib/telnyx/models/ai_retrieve_conversation_histories_response.rb', line 29

required :ingested_at, Time

#metadataHash{Symbol=>Object}?

Arbitrary metadata attached to the record at ingestion time. Filterable via filter=value query parameters.

Parameters:

  • (::Hash[Symbol, top])

Returns:

  • (Hash{Symbol=>Object}, nil)


80
# File 'lib/telnyx/models/ai_retrieve_conversation_histories_response.rb', line 80

optional :metadata, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]

#organization_idString

Identifier of the organization that owns this record.

Parameters:

  • value (String)

Returns:

  • (String)


35
# File 'lib/telnyx/models/ai_retrieve_conversation_histories_response.rb', line 35

required :organization_id, String

#record_created_atTime

When the original record was created (ISO 8601).

Parameters:

  • value (Time)

Returns:

  • (Time)


41
# File 'lib/telnyx/models/ai_retrieve_conversation_histories_response.rb', line 41

required :record_created_at, Time

#record_idString

Identifier of the parent record. Multiple chunks from the same record share this ID.

Parameters:

  • value (String)

Returns:

  • (String)


48
# File 'lib/telnyx/models/ai_retrieve_conversation_histories_response.rb', line 48

required :record_id, String

#regionSymbol, Telnyx::Models::AIRetrieveConversationHistoriesResponse::Region

The region where this record is stored.

Parameters:

  • value (Telnyx::Models::AIRetrieveConversationHistoriesResponse::region)

Returns:



54
# File 'lib/telnyx/models/ai_retrieve_conversation_histories_response.rb', line 54

required :region, enum: -> { Telnyx::Models::AIRetrieveConversationHistoriesResponse::Region }

#scoreFloat

Cosine similarity score between the query vector and this chunk's vector. Higher values indicate greater semantic relevance.

Parameters:

  • value (Float)

Returns:

  • (Float)


61
# File 'lib/telnyx/models/ai_retrieve_conversation_histories_response.rb', line 61

required :score, Float

#textString

The text content of this chunk (up to 480 tokens).

Parameters:

  • value (String)

Returns:

  • (String)


67
# File 'lib/telnyx/models/ai_retrieve_conversation_histories_response.rb', line 67

required :text, String

#user_idString

Identifier of the user who owns this record.

Parameters:

  • value (String)

Returns:

  • (String)


73
# File 'lib/telnyx/models/ai_retrieve_conversation_histories_response.rb', line 73

required :user_id, String

Instance Method Details

#to_hash{

Returns:

  • ({)


61
# File 'sig/telnyx/models/ai_retrieve_conversation_histories_response.rbs', line 61

def to_hash: -> {