Class: Telnyx::Models::AI::CollectionRetrieveDocumentsParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/telnyx/models/ai/collection_retrieve_documents_params.rb,
sig/telnyx/models/ai/collection_retrieve_documents_params.rbs

Overview

See Also:

  • Telnyx::Resources::AI::Collections#retrieve_documents

Defined Under Namespace

Modules: RetrievalType

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(slug:, filter: nil, page_number: nil, page_size: nil, query: nil, retrieval_type: nil, sources: nil, top_k: nil, request_options: {}) ⇒ Object

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

Parameters:

  • slug (String)
  • filter (Hash{Symbol=>Object}) (defaults to: nil)

    Field filters applied before ranking, using filter[field][operator]=value. Sup

  • page_number (Integer) (defaults to: nil)

    Page number to return (1-based). Defaults to 1.

  • page_size (Integer) (defaults to: nil)

    Number of results per page. Defaults to 20.

  • query (String) (defaults to: nil)

    Natural-language search query. When provided, the text is matched against the co

  • retrieval_type (Symbol, Telnyx::Models::AI::CollectionRetrieveDocumentsParams::RetrievalType) (defaults to: nil)

    Override the collection's configured retrieval strategy for this request. Echoed

  • sources (String) (defaults to: nil)

    Comma-separated list of source types to restrict the search to. When omitted, al

  • top_k (Integer) (defaults to: nil)

    Maximum number of ranked results to consider. When omitted, the collection's con

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


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

Instance Attribute Details

#filterHash{Symbol=>Object}?

Field filters applied before ranking, using filter[field][operator]=value. Supported operators: eq (default), in, gte, gt, lte, lt, contains. Known fields: record_type, record_id, user_id, record_created_at, ingested_at; any other name resolves to a metadata.<field> filter. Example: filter[record_id][eq]=rec_123.

Parameters:

  • (::Hash[Symbol, top])

Returns:

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


24
# File 'lib/telnyx/models/ai/collection_retrieve_documents_params.rb', line 24

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

#page_numberInteger?

Page number to return (1-based). Defaults to 1.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


30
# File 'lib/telnyx/models/ai/collection_retrieve_documents_params.rb', line 30

optional :page_number, Integer

#page_sizeInteger?

Number of results per page. Defaults to 20.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


36
# File 'lib/telnyx/models/ai/collection_retrieve_documents_params.rb', line 36

optional :page_size, Integer

#queryString?

Natural-language search query. When provided, the text is matched against the collection's document chunks using the collection's retrieval_type (vector or hybrid). When omitted, documents are returned as a plain catalog listing.

Parameters:

  • (String)

Returns:

  • (String, nil)


44
# File 'lib/telnyx/models/ai/collection_retrieve_documents_params.rb', line 44

optional :query, String

#retrieval_typeSymbol, ...

Override the collection's configured retrieval strategy for this request. Echoed back in meta.retrieval_type.



51
# File 'lib/telnyx/models/ai/collection_retrieve_documents_params.rb', line 51

optional :retrieval_type, enum: -> { Telnyx::AI::CollectionRetrieveDocumentsParams::RetrievalType }

#slugString

Parameters:

  • value (String)

Returns:

  • (String)


14
# File 'lib/telnyx/models/ai/collection_retrieve_documents_params.rb', line 14

required :slug, String

#sourcesString?

Comma-separated list of source types to restrict the search to. When omitted, all of the collection's sources are searched.

Parameters:

  • (String)

Returns:

  • (String, nil)


58
# File 'lib/telnyx/models/ai/collection_retrieve_documents_params.rb', line 58

optional :sources, String

#top_kInteger?

Maximum number of ranked results to consider. When omitted, the collection's configured top_k setting is used.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


65
# File 'lib/telnyx/models/ai/collection_retrieve_documents_params.rb', line 65

optional :top_k, Integer

Instance Method Details

#to_hash{

Returns:

  • ({)


65
# File 'sig/telnyx/models/ai/collection_retrieve_documents_params.rbs', line 65

def to_hash: -> {