Class: Telnyx::Resources::AI::Embeddings::Buckets
- Inherits:
-
Object
- Object
- Telnyx::Resources::AI::Embeddings::Buckets
- Defined in:
- lib/telnyx/resources/ai/embeddings/buckets.rb
Overview
Embed documents and perform text searches
Instance Method Summary collapse
-
#delete(bucket_name, request_options: {}) ⇒ nil
Deletes an entire bucket’s embeddings and disables the bucket for AI-use, returning it to normal storage pricing.
-
#initialize(client:) ⇒ Buckets
constructor
private
A new instance of Buckets.
-
#list(request_options: {}) ⇒ Telnyx::Models::AI::Embeddings::BucketListResponse
Get all embedding buckets for a user.
-
#retrieve(bucket_name, request_options: {}) ⇒ Telnyx::Models::AI::Embeddings::BucketRetrieveResponse
Get all embedded files for a given user bucket, including their processing status.
Constructor Details
#initialize(client:) ⇒ Buckets
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 Buckets.
70 71 72 |
# File 'lib/telnyx/resources/ai/embeddings/buckets.rb', line 70 def initialize(client:) @client = client end |
Instance Method Details
#delete(bucket_name, request_options: {}) ⇒ nil
Deletes an entire bucket’s embeddings and disables the bucket for AI-use, returning it to normal storage pricing.
58 59 60 61 62 63 64 65 |
# File 'lib/telnyx/resources/ai/embeddings/buckets.rb', line 58 def delete(bucket_name, params = {}) @client.request( method: :delete, path: ["ai/embeddings/buckets/%1$s", bucket_name], model: NilClass, options: params[:request_options] ) end |
#list(request_options: {}) ⇒ Telnyx::Models::AI::Embeddings::BucketListResponse
Get all embedding buckets for a user.
38 39 40 41 42 43 44 45 |
# File 'lib/telnyx/resources/ai/embeddings/buckets.rb', line 38 def list(params = {}) @client.request( method: :get, path: "ai/embeddings/buckets", model: Telnyx::Models::AI::Embeddings::BucketListResponse, options: params[:request_options] ) end |
#retrieve(bucket_name, request_options: {}) ⇒ Telnyx::Models::AI::Embeddings::BucketRetrieveResponse
Get all embedded files for a given user bucket, including their processing status.
20 21 22 23 24 25 26 27 |
# File 'lib/telnyx/resources/ai/embeddings/buckets.rb', line 20 def retrieve(bucket_name, params = {}) @client.request( method: :get, path: ["ai/embeddings/buckets/%1$s", bucket_name], model: Telnyx::Models::AI::Embeddings::BucketRetrieveResponse, options: params[:request_options] ) end |