Class: Telnyx::Resources::AI::Collections::Settings

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/ai/collections/settings.rb,
sig/telnyx/resources/ai/collections/settings.rbs

Overview

Create and manage logical collections of your Telnyx data, tune retrieval settings, manage sources, and run collection-scoped semantic search.

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Settings

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Settings.

Parameters:



81
82
83
# File 'lib/telnyx/resources/ai/collections/settings.rb', line 81

def initialize(client:)
  @client = client
end

Instance Method Details

#create(uuid, retrieval: nil, request_options: {}) ⇒ Telnyx::Models::AI::Collections::SettingsEnvelope

Replaces the collection's retrieval settings.

Parameters:

Returns:

See Also:



23
24
25
26
27
28
29
30
31
32
# File 'lib/telnyx/resources/ai/collections/settings.rb', line 23

def create(uuid, params = {})
  parsed, options = Telnyx::AI::Collections::SettingCreateParams.dump_request(params)
  @client.request(
    method: :put,
    path: ["ai/collections/%1$s/settings", uuid],
    body: parsed,
    model: Telnyx::AI::Collections::SettingsEnvelope,
    options: options
  )
end

#list(uuid, request_options: {}) ⇒ Telnyx::Models::AI::Collections::SettingsEnvelope

Returns the retrieval settings for a collection.

Parameters:

  • uuid (String)

    The collection's unique identifier.

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

Returns:

See Also:



45
46
47
48
49
50
51
52
# File 'lib/telnyx/resources/ai/collections/settings.rb', line 45

def list(uuid, params = {})
  @client.request(
    method: :get,
    path: ["ai/collections/%1$s/settings", uuid],
    model: Telnyx::AI::Collections::SettingsEnvelope,
    options: params[:request_options]
  )
end

#patch_all(uuid, retrieval: nil, request_options: {}) ⇒ Telnyx::Models::AI::Collections::SettingsEnvelope

Partially updates the collection's retrieval settings.

Parameters:

Returns:

See Also:



67
68
69
70
71
72
73
74
75
76
# File 'lib/telnyx/resources/ai/collections/settings.rb', line 67

def patch_all(uuid, params = {})
  parsed, options = Telnyx::AI::Collections::SettingPatchAllParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["ai/collections/%1$s/settings", uuid],
    body: parsed,
    model: Telnyx::AI::Collections::SettingsEnvelope,
    options: options
  )
end