Class: Telnyx::Resources::AI::Collections::Settings
- Inherits:
-
Object
- Object
- Telnyx::Resources::AI::Collections::Settings
- 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
-
#create(uuid, retrieval: nil, request_options: {}) ⇒ Telnyx::Models::AI::Collections::SettingsEnvelope
Replaces the collection's retrieval settings.
-
#initialize(client:) ⇒ Settings
constructor
private
A new instance of Settings.
-
#list(uuid, request_options: {}) ⇒ Telnyx::Models::AI::Collections::SettingsEnvelope
Returns the retrieval settings for a collection.
-
#patch_all(uuid, retrieval: nil, request_options: {}) ⇒ Telnyx::Models::AI::Collections::SettingsEnvelope
Partially updates the collection's retrieval settings.
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.
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.
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, = 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: ) end |
#list(uuid, request_options: {}) ⇒ Telnyx::Models::AI::Collections::SettingsEnvelope
Returns the retrieval settings for a collection.
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.
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, = 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: ) end |