turbopuffer 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/README.md +1 -10
- data/lib/turbopuffer/client.rb +2 -2
- data/lib/turbopuffer/internal/type/union.rb +17 -7
- data/lib/turbopuffer/models/copy_from_namespace_operation.rb +84 -0
- data/lib/turbopuffer/models/copy_from_namespace_operation_result.rb +37 -0
- data/lib/turbopuffer/models/namespace_explain_query_params.rb +10 -1
- data/lib/turbopuffer/models/namespace_metadata.rb +21 -2
- data/lib/turbopuffer/models/namespace_metadata_patch.rb +10 -1
- data/lib/turbopuffer/models/namespace_multi_query_params.rb +45 -2
- data/lib/turbopuffer/models/namespace_poll_copy_from_params.rb +26 -0
- data/lib/turbopuffer/models/namespace_query_params.rb +10 -1
- data/lib/turbopuffer/models/namespace_start_copy_from_params.rb +53 -0
- data/lib/turbopuffer/models/namespace_start_copy_from_response.rb +17 -0
- data/lib/turbopuffer/models/operation_error.rb +46 -0
- data/lib/turbopuffer/models/rerank_limit.rb +18 -0
- data/lib/turbopuffer/models/write_result.rb +112 -0
- data/lib/turbopuffer/models.rb +14 -0
- data/lib/turbopuffer/resources/namespaces.rb +80 -4
- data/lib/turbopuffer/version.rb +1 -1
- data/lib/turbopuffer.rb +8 -0
- data/rbi/turbopuffer/client.rbi +2 -2
- data/rbi/turbopuffer/models/copy_from_namespace_operation.rbi +133 -0
- data/rbi/turbopuffer/models/copy_from_namespace_operation_result.rbi +85 -0
- data/rbi/turbopuffer/models/namespace_explain_query_params.rbi +13 -0
- data/rbi/turbopuffer/models/namespace_metadata.rbi +30 -1
- data/rbi/turbopuffer/models/namespace_metadata_patch.rbi +18 -3
- data/rbi/turbopuffer/models/namespace_multi_query_params.rbi +54 -0
- data/rbi/turbopuffer/models/namespace_poll_copy_from_params.rbi +49 -0
- data/rbi/turbopuffer/models/namespace_query_params.rbi +13 -0
- data/rbi/turbopuffer/models/namespace_start_copy_from_params.rbi +113 -0
- data/rbi/turbopuffer/models/namespace_start_copy_from_response.rbi +30 -0
- data/rbi/turbopuffer/models/operation_error.rbi +77 -0
- data/rbi/turbopuffer/models/rerank_limit.rbi +28 -0
- data/rbi/turbopuffer/models/write_result.rbi +159 -0
- data/rbi/turbopuffer/models.rbi +16 -0
- data/rbi/turbopuffer/resources/namespaces.rbi +71 -0
- data/sig/turbopuffer/models/copy_from_namespace_operation.rbs +65 -0
- data/sig/turbopuffer/models/copy_from_namespace_operation_result.rbs +33 -0
- data/sig/turbopuffer/models/namespace_explain_query_params.rbs +7 -0
- data/sig/turbopuffer/models/namespace_metadata.rbs +17 -1
- data/sig/turbopuffer/models/namespace_metadata_patch.rbs +12 -3
- data/sig/turbopuffer/models/namespace_multi_query_params.rbs +31 -0
- data/sig/turbopuffer/models/namespace_poll_copy_from_params.rbs +30 -0
- data/sig/turbopuffer/models/namespace_query_params.rbs +7 -0
- data/sig/turbopuffer/models/namespace_start_copy_from_params.rbs +56 -0
- data/sig/turbopuffer/models/namespace_start_copy_from_response.rbs +13 -0
- data/sig/turbopuffer/models/operation_error.rbs +34 -0
- data/sig/turbopuffer/models/rerank_limit.rbs +13 -0
- data/sig/turbopuffer/models/write_result.rbs +99 -0
- data/sig/turbopuffer/models.rbs +14 -0
- data/sig/turbopuffer/resources/namespaces.rbs +20 -0
- metadata +26 -2
|
@@ -45,6 +45,13 @@ module Turbopuffer
|
|
|
45
45
|
end
|
|
46
46
|
attr_writer :pinning
|
|
47
47
|
|
|
48
|
+
# Whether document and schema writes are rejected. Omitted when `false`.
|
|
49
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
50
|
+
attr_reader :read_only
|
|
51
|
+
|
|
52
|
+
sig { params(read_only: T::Boolean).void }
|
|
53
|
+
attr_writer :read_only
|
|
54
|
+
|
|
48
55
|
# Configuration for namespace sharding, which partitions a namespace's documents
|
|
49
56
|
# across multiple internal shards to scale indexing and query throughput beyond a
|
|
50
57
|
# single machine. Sharding can only be configured on a namespace's inaugural
|
|
@@ -74,6 +81,7 @@ module Turbopuffer
|
|
|
74
81
|
schema: T::Hash[Symbol, Turbopuffer::AttributeSchemaConfig::OrHash],
|
|
75
82
|
updated_at: Time,
|
|
76
83
|
pinning: Turbopuffer::NamespaceMetadata::Pinning::OrHash,
|
|
84
|
+
read_only: T::Boolean,
|
|
77
85
|
sharding: Turbopuffer::ShardingConfig::OrHash
|
|
78
86
|
).returns(T.attached_class)
|
|
79
87
|
end
|
|
@@ -94,6 +102,8 @@ module Turbopuffer
|
|
|
94
102
|
# Configuration for namespace pinning, along with the current status of the pinned
|
|
95
103
|
# namespace.
|
|
96
104
|
pinning: nil,
|
|
105
|
+
# Whether document and schema writes are rejected. Omitted when `false`.
|
|
106
|
+
read_only: nil,
|
|
97
107
|
# Configuration for namespace sharding, which partitions a namespace's documents
|
|
98
108
|
# across multiple internal shards to scale indexing and query throughput beyond a
|
|
99
109
|
# single machine. Sharding can only be configured on a namespace's inaugural
|
|
@@ -113,6 +123,7 @@ module Turbopuffer
|
|
|
113
123
|
schema: T::Hash[Symbol, Turbopuffer::AttributeSchemaConfig],
|
|
114
124
|
updated_at: Time,
|
|
115
125
|
pinning: Turbopuffer::NamespaceMetadata::Pinning,
|
|
126
|
+
read_only: T::Boolean,
|
|
116
127
|
sharding: Turbopuffer::ShardingConfig
|
|
117
128
|
}
|
|
118
129
|
)
|
|
@@ -252,6 +263,13 @@ module Turbopuffer
|
|
|
252
263
|
sig { returns(Integer) }
|
|
253
264
|
attr_accessor :ready_replicas
|
|
254
265
|
|
|
266
|
+
# The number of running replicas for the namespace. Replicas are billed once
|
|
267
|
+
# running, even before they finish warming their caches and become ready to serve
|
|
268
|
+
# traffic. This count is updated independently and may briefly disagree with the
|
|
269
|
+
# other status fields.
|
|
270
|
+
sig { returns(Integer) }
|
|
271
|
+
attr_accessor :replicas
|
|
272
|
+
|
|
255
273
|
# The timestamp of the latest pinning status snapshot.
|
|
256
274
|
sig { returns(Time) }
|
|
257
275
|
attr_accessor :updated_at
|
|
@@ -265,6 +283,7 @@ module Turbopuffer
|
|
|
265
283
|
sig do
|
|
266
284
|
params(
|
|
267
285
|
ready_replicas: Integer,
|
|
286
|
+
replicas: Integer,
|
|
268
287
|
updated_at: Time,
|
|
269
288
|
utilization: Float
|
|
270
289
|
).returns(T.attached_class)
|
|
@@ -272,6 +291,11 @@ module Turbopuffer
|
|
|
272
291
|
def self.new(
|
|
273
292
|
# The number of replicas that are warm and serving traffic.
|
|
274
293
|
ready_replicas:,
|
|
294
|
+
# The number of running replicas for the namespace. Replicas are billed once
|
|
295
|
+
# running, even before they finish warming their caches and become ready to serve
|
|
296
|
+
# traffic. This count is updated independently and may briefly disagree with the
|
|
297
|
+
# other status fields.
|
|
298
|
+
replicas:,
|
|
275
299
|
# The timestamp of the latest pinning status snapshot.
|
|
276
300
|
updated_at:,
|
|
277
301
|
# Aggregate utilization for the pinned namespace, reported as a value between 0.0
|
|
@@ -282,7 +306,12 @@ module Turbopuffer
|
|
|
282
306
|
|
|
283
307
|
sig do
|
|
284
308
|
override.returns(
|
|
285
|
-
{
|
|
309
|
+
{
|
|
310
|
+
ready_replicas: Integer,
|
|
311
|
+
replicas: Integer,
|
|
312
|
+
updated_at: Time,
|
|
313
|
+
utilization: Float
|
|
314
|
+
}
|
|
286
315
|
)
|
|
287
316
|
end
|
|
288
317
|
def to_hash
|
|
@@ -20,11 +20,20 @@ module Turbopuffer
|
|
|
20
20
|
sig { returns(T.nilable(T.any(T::Boolean, Turbopuffer::PinningConfig))) }
|
|
21
21
|
attr_accessor :pinning
|
|
22
22
|
|
|
23
|
+
# Set to `true` to reject document and schema writes, or `false` to allow them.
|
|
24
|
+
# Writes already in progress may still commit. Metadata updates remain available.
|
|
25
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
26
|
+
attr_reader :read_only
|
|
27
|
+
|
|
28
|
+
sig { params(read_only: T::Boolean).void }
|
|
29
|
+
attr_writer :read_only
|
|
30
|
+
|
|
23
31
|
# Request to update namespace metadata configuration.
|
|
24
32
|
sig do
|
|
25
33
|
params(
|
|
26
34
|
pinning:
|
|
27
|
-
T.nilable(T.any(T::Boolean, Turbopuffer::PinningConfig::OrHash))
|
|
35
|
+
T.nilable(T.any(T::Boolean, Turbopuffer::PinningConfig::OrHash)),
|
|
36
|
+
read_only: T::Boolean
|
|
28
37
|
).returns(T.attached_class)
|
|
29
38
|
end
|
|
30
39
|
def self.new(
|
|
@@ -34,13 +43,19 @@ module Turbopuffer
|
|
|
34
43
|
# - `null` or `false`: explicitly remove pinning
|
|
35
44
|
# - `true`: enable pinning with default configuration
|
|
36
45
|
# - Object: set pinning configuration
|
|
37
|
-
pinning: nil
|
|
46
|
+
pinning: nil,
|
|
47
|
+
# Set to `true` to reject document and schema writes, or `false` to allow them.
|
|
48
|
+
# Writes already in progress may still commit. Metadata updates remain available.
|
|
49
|
+
read_only: nil
|
|
38
50
|
)
|
|
39
51
|
end
|
|
40
52
|
|
|
41
53
|
sig do
|
|
42
54
|
override.returns(
|
|
43
|
-
{
|
|
55
|
+
{
|
|
56
|
+
pinning: T.nilable(T.any(T::Boolean, Turbopuffer::PinningConfig)),
|
|
57
|
+
read_only: T::Boolean
|
|
58
|
+
}
|
|
44
59
|
)
|
|
45
60
|
end
|
|
46
61
|
def to_hash
|
|
@@ -37,6 +37,23 @@ module Turbopuffer
|
|
|
37
37
|
end
|
|
38
38
|
attr_writer :consistency
|
|
39
39
|
|
|
40
|
+
# Limits the total number of reranked documents returned.
|
|
41
|
+
sig { returns(T.nilable(T.any(Integer, Turbopuffer::RerankLimit))) }
|
|
42
|
+
attr_reader :limit
|
|
43
|
+
|
|
44
|
+
sig do
|
|
45
|
+
params(limit: T.any(Integer, Turbopuffer::RerankLimit::OrHash)).void
|
|
46
|
+
end
|
|
47
|
+
attr_writer :limit
|
|
48
|
+
|
|
49
|
+
# Number of reranked documents to skip before returning results. Requires
|
|
50
|
+
# `rerank_by` and `limit`.
|
|
51
|
+
sig { returns(T.nilable(Integer)) }
|
|
52
|
+
attr_reader :offset
|
|
53
|
+
|
|
54
|
+
sig { params(offset: Integer).void }
|
|
55
|
+
attr_writer :offset
|
|
56
|
+
|
|
40
57
|
# How to combine the rows returned by each sub-query into a single ranked list.
|
|
41
58
|
sig { returns(T.nilable(T.anything)) }
|
|
42
59
|
attr_reader :rerank_by
|
|
@@ -60,6 +77,8 @@ module Turbopuffer
|
|
|
60
77
|
namespace: String,
|
|
61
78
|
consistency:
|
|
62
79
|
Turbopuffer::NamespaceMultiQueryParams::Consistency::OrHash,
|
|
80
|
+
limit: T.any(Integer, Turbopuffer::RerankLimit::OrHash),
|
|
81
|
+
offset: Integer,
|
|
63
82
|
rerank_by: T.anything,
|
|
64
83
|
vector_encoding: Turbopuffer::VectorEncoding::OrSymbol,
|
|
65
84
|
request_options: Turbopuffer::RequestOptions::OrHash
|
|
@@ -70,6 +89,11 @@ module Turbopuffer
|
|
|
70
89
|
namespace: nil,
|
|
71
90
|
# The consistency level for a query.
|
|
72
91
|
consistency: nil,
|
|
92
|
+
# Limits the total number of reranked documents returned.
|
|
93
|
+
limit: nil,
|
|
94
|
+
# Number of reranked documents to skip before returning results. Requires
|
|
95
|
+
# `rerank_by` and `limit`.
|
|
96
|
+
offset: nil,
|
|
73
97
|
# How to combine the rows returned by each sub-query into a single ranked list.
|
|
74
98
|
rerank_by: nil,
|
|
75
99
|
# The encoding to use for vectors in the response.
|
|
@@ -84,6 +108,8 @@ module Turbopuffer
|
|
|
84
108
|
namespace: String,
|
|
85
109
|
queries: T::Array[Turbopuffer::NamespaceMultiQueryParams::Query],
|
|
86
110
|
consistency: Turbopuffer::NamespaceMultiQueryParams::Consistency,
|
|
111
|
+
limit: T.any(Integer, Turbopuffer::RerankLimit),
|
|
112
|
+
offset: Integer,
|
|
87
113
|
rerank_by: T.anything,
|
|
88
114
|
vector_encoding: Turbopuffer::VectorEncoding::OrSymbol,
|
|
89
115
|
request_options: Turbopuffer::RequestOptions
|
|
@@ -170,6 +196,14 @@ module Turbopuffer
|
|
|
170
196
|
sig { params(limit: T.any(Integer, Turbopuffer::Limit::OrHash)).void }
|
|
171
197
|
attr_writer :limit
|
|
172
198
|
|
|
199
|
+
# Number of documents to skip before returning results. Supported only in v2
|
|
200
|
+
# queries with an explicit `rank_by` and `top_k` or `limit`.
|
|
201
|
+
sig { returns(T.nilable(Integer)) }
|
|
202
|
+
attr_reader :offset
|
|
203
|
+
|
|
204
|
+
sig { params(offset: Integer).void }
|
|
205
|
+
attr_writer :offset
|
|
206
|
+
|
|
173
207
|
# How to rank the documents in the namespace.
|
|
174
208
|
sig { returns(T.nilable(T.anything)) }
|
|
175
209
|
attr_reader :rank_by
|
|
@@ -195,6 +229,7 @@ module Turbopuffer
|
|
|
195
229
|
group_by: T::Array[T.anything],
|
|
196
230
|
include_attributes: Turbopuffer::IncludeAttributes::Variants,
|
|
197
231
|
limit: T.any(Integer, Turbopuffer::Limit::OrHash),
|
|
232
|
+
offset: Integer,
|
|
198
233
|
rank_by: T.anything,
|
|
199
234
|
top_k: Integer
|
|
200
235
|
).returns(T.attached_class)
|
|
@@ -222,6 +257,9 @@ module Turbopuffer
|
|
|
222
257
|
include_attributes: nil,
|
|
223
258
|
# Limits the documents returned by a query.
|
|
224
259
|
limit: nil,
|
|
260
|
+
# Number of documents to skip before returning results. Supported only in v2
|
|
261
|
+
# queries with an explicit `rank_by` and `top_k` or `limit`.
|
|
262
|
+
offset: nil,
|
|
225
263
|
# How to rank the documents in the namespace.
|
|
226
264
|
rank_by: nil,
|
|
227
265
|
# The number of results to return.
|
|
@@ -240,6 +278,7 @@ module Turbopuffer
|
|
|
240
278
|
group_by: T::Array[T.anything],
|
|
241
279
|
include_attributes: Turbopuffer::IncludeAttributes::Variants,
|
|
242
280
|
limit: T.any(Integer, Turbopuffer::Limit),
|
|
281
|
+
offset: Integer,
|
|
243
282
|
rank_by: T.anything,
|
|
244
283
|
top_k: Integer
|
|
245
284
|
}
|
|
@@ -355,6 +394,21 @@ module Turbopuffer
|
|
|
355
394
|
end
|
|
356
395
|
end
|
|
357
396
|
end
|
|
397
|
+
|
|
398
|
+
# Limits the total number of reranked documents returned.
|
|
399
|
+
module Limit
|
|
400
|
+
extend Turbopuffer::Internal::Type::Union
|
|
401
|
+
|
|
402
|
+
Variants = T.type_alias { T.any(Integer, Turbopuffer::RerankLimit) }
|
|
403
|
+
|
|
404
|
+
sig do
|
|
405
|
+
override.returns(
|
|
406
|
+
T::Array[Turbopuffer::NamespaceMultiQueryParams::Limit::Variants]
|
|
407
|
+
)
|
|
408
|
+
end
|
|
409
|
+
def self.variants
|
|
410
|
+
end
|
|
411
|
+
end
|
|
358
412
|
end
|
|
359
413
|
end
|
|
360
414
|
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Turbopuffer
|
|
4
|
+
module Models
|
|
5
|
+
class NamespacePollCopyFromParams < Turbopuffer::Internal::Type::BaseModel
|
|
6
|
+
extend Turbopuffer::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Turbopuffer::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Turbopuffer::NamespacePollCopyFromParams,
|
|
13
|
+
Turbopuffer::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(T.nilable(String)) }
|
|
18
|
+
attr_reader :namespace
|
|
19
|
+
|
|
20
|
+
sig { params(namespace: String).void }
|
|
21
|
+
attr_writer :namespace
|
|
22
|
+
|
|
23
|
+
sig { returns(String) }
|
|
24
|
+
attr_accessor :token
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
params(
|
|
28
|
+
token: String,
|
|
29
|
+
namespace: String,
|
|
30
|
+
request_options: Turbopuffer::RequestOptions::OrHash
|
|
31
|
+
).returns(T.attached_class)
|
|
32
|
+
end
|
|
33
|
+
def self.new(token:, namespace: nil, request_options: {})
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
sig do
|
|
37
|
+
override.returns(
|
|
38
|
+
{
|
|
39
|
+
namespace: String,
|
|
40
|
+
token: String,
|
|
41
|
+
request_options: Turbopuffer::RequestOptions
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
end
|
|
45
|
+
def to_hash
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -99,6 +99,14 @@ module Turbopuffer
|
|
|
99
99
|
sig { params(limit: T.any(Integer, Turbopuffer::Limit::OrHash)).void }
|
|
100
100
|
attr_writer :limit
|
|
101
101
|
|
|
102
|
+
# Number of documents to skip before returning results. Supported only in v2
|
|
103
|
+
# queries with an explicit `rank_by` and `top_k` or `limit`.
|
|
104
|
+
sig { returns(T.nilable(Integer)) }
|
|
105
|
+
attr_reader :offset
|
|
106
|
+
|
|
107
|
+
sig { params(offset: Integer).void }
|
|
108
|
+
attr_writer :offset
|
|
109
|
+
|
|
102
110
|
# How to rank the documents in the namespace.
|
|
103
111
|
sig { returns(T.nilable(T.anything)) }
|
|
104
112
|
attr_reader :rank_by
|
|
@@ -134,6 +142,7 @@ module Turbopuffer
|
|
|
134
142
|
group_by: T::Array[T.anything],
|
|
135
143
|
include_attributes: Turbopuffer::IncludeAttributes::Variants,
|
|
136
144
|
limit: T.any(Integer, Turbopuffer::Limit::OrHash),
|
|
145
|
+
offset: Integer,
|
|
137
146
|
rank_by: T.anything,
|
|
138
147
|
top_k: Integer,
|
|
139
148
|
vector_encoding: Turbopuffer::VectorEncoding::OrSymbol,
|
|
@@ -166,6 +175,9 @@ module Turbopuffer
|
|
|
166
175
|
include_attributes: nil,
|
|
167
176
|
# Limits the documents returned by a query.
|
|
168
177
|
limit: nil,
|
|
178
|
+
# Number of documents to skip before returning results. Supported only in v2
|
|
179
|
+
# queries with an explicit `rank_by` and `top_k` or `limit`.
|
|
180
|
+
offset: nil,
|
|
169
181
|
# How to rank the documents in the namespace.
|
|
170
182
|
rank_by: nil,
|
|
171
183
|
# The number of results to return.
|
|
@@ -189,6 +201,7 @@ module Turbopuffer
|
|
|
189
201
|
group_by: T::Array[T.anything],
|
|
190
202
|
include_attributes: Turbopuffer::IncludeAttributes::Variants,
|
|
191
203
|
limit: T.any(Integer, Turbopuffer::Limit),
|
|
204
|
+
offset: Integer,
|
|
192
205
|
rank_by: T.anything,
|
|
193
206
|
top_k: Integer,
|
|
194
207
|
vector_encoding: Turbopuffer::VectorEncoding::OrSymbol,
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Turbopuffer
|
|
4
|
+
module Models
|
|
5
|
+
class NamespaceStartCopyFromParams < Turbopuffer::Internal::Type::BaseModel
|
|
6
|
+
extend Turbopuffer::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Turbopuffer::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Turbopuffer::NamespaceStartCopyFromParams,
|
|
13
|
+
Turbopuffer::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(T.nilable(String)) }
|
|
18
|
+
attr_reader :namespace
|
|
19
|
+
|
|
20
|
+
sig { params(namespace: String).void }
|
|
21
|
+
attr_writer :namespace
|
|
22
|
+
|
|
23
|
+
# The namespace to copy documents from.
|
|
24
|
+
sig { returns(String) }
|
|
25
|
+
attr_accessor :source_namespace
|
|
26
|
+
|
|
27
|
+
# (Optional) The encryption configuration for the destination namespace.
|
|
28
|
+
sig do
|
|
29
|
+
returns(
|
|
30
|
+
T.nilable(
|
|
31
|
+
T.any(
|
|
32
|
+
Turbopuffer::Encryption::CustomerManaged,
|
|
33
|
+
Turbopuffer::Encryption::Default
|
|
34
|
+
)
|
|
35
|
+
)
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
attr_reader :dest_encryption
|
|
39
|
+
|
|
40
|
+
sig do
|
|
41
|
+
params(
|
|
42
|
+
dest_encryption:
|
|
43
|
+
T.any(
|
|
44
|
+
Turbopuffer::Encryption::CustomerManaged::OrHash,
|
|
45
|
+
Turbopuffer::Encryption::Default::OrHash
|
|
46
|
+
)
|
|
47
|
+
).void
|
|
48
|
+
end
|
|
49
|
+
attr_writer :dest_encryption
|
|
50
|
+
|
|
51
|
+
# (Optional) An API key for the organization containing the source namespace
|
|
52
|
+
sig { returns(T.nilable(String)) }
|
|
53
|
+
attr_reader :source_api_key
|
|
54
|
+
|
|
55
|
+
sig { params(source_api_key: String).void }
|
|
56
|
+
attr_writer :source_api_key
|
|
57
|
+
|
|
58
|
+
# (Optional) The region of the source namespace.
|
|
59
|
+
sig { returns(T.nilable(String)) }
|
|
60
|
+
attr_reader :source_region
|
|
61
|
+
|
|
62
|
+
sig { params(source_region: String).void }
|
|
63
|
+
attr_writer :source_region
|
|
64
|
+
|
|
65
|
+
sig do
|
|
66
|
+
params(
|
|
67
|
+
source_namespace: String,
|
|
68
|
+
namespace: String,
|
|
69
|
+
dest_encryption:
|
|
70
|
+
T.any(
|
|
71
|
+
Turbopuffer::Encryption::CustomerManaged::OrHash,
|
|
72
|
+
Turbopuffer::Encryption::Default::OrHash
|
|
73
|
+
),
|
|
74
|
+
source_api_key: String,
|
|
75
|
+
source_region: String,
|
|
76
|
+
request_options: Turbopuffer::RequestOptions::OrHash
|
|
77
|
+
).returns(T.attached_class)
|
|
78
|
+
end
|
|
79
|
+
def self.new(
|
|
80
|
+
# The namespace to copy documents from.
|
|
81
|
+
source_namespace:,
|
|
82
|
+
namespace: nil,
|
|
83
|
+
# (Optional) The encryption configuration for the destination namespace.
|
|
84
|
+
dest_encryption: nil,
|
|
85
|
+
# (Optional) An API key for the organization containing the source namespace
|
|
86
|
+
source_api_key: nil,
|
|
87
|
+
# (Optional) The region of the source namespace.
|
|
88
|
+
source_region: nil,
|
|
89
|
+
request_options: {}
|
|
90
|
+
)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
sig do
|
|
94
|
+
override.returns(
|
|
95
|
+
{
|
|
96
|
+
namespace: String,
|
|
97
|
+
source_namespace: String,
|
|
98
|
+
dest_encryption:
|
|
99
|
+
T.any(
|
|
100
|
+
Turbopuffer::Encryption::CustomerManaged,
|
|
101
|
+
Turbopuffer::Encryption::Default
|
|
102
|
+
),
|
|
103
|
+
source_api_key: String,
|
|
104
|
+
source_region: String,
|
|
105
|
+
request_options: Turbopuffer::RequestOptions
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
end
|
|
109
|
+
def to_hash
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Turbopuffer
|
|
4
|
+
module Models
|
|
5
|
+
class NamespaceStartCopyFromResponse < Turbopuffer::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Turbopuffer::Models::NamespaceStartCopyFromResponse,
|
|
10
|
+
Turbopuffer::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The token identifying the copy operation.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :token
|
|
17
|
+
|
|
18
|
+
sig { params(token: String).returns(T.attached_class) }
|
|
19
|
+
def self.new(
|
|
20
|
+
# The token identifying the copy operation.
|
|
21
|
+
token:
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
sig { override.returns({ token: String }) }
|
|
26
|
+
def to_hash
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Turbopuffer
|
|
4
|
+
module Models
|
|
5
|
+
class OperationError < Turbopuffer::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Turbopuffer::OperationError, Turbopuffer::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# The response to an unsuccessful request.
|
|
12
|
+
sig { returns(Turbopuffer::OperationError::Detail) }
|
|
13
|
+
attr_reader :detail
|
|
14
|
+
|
|
15
|
+
sig { params(detail: Turbopuffer::OperationError::Detail::OrHash).void }
|
|
16
|
+
attr_writer :detail
|
|
17
|
+
|
|
18
|
+
# The HTTP status code of the operation's error.
|
|
19
|
+
sig { returns(Integer) }
|
|
20
|
+
attr_accessor :status_code
|
|
21
|
+
|
|
22
|
+
sig do
|
|
23
|
+
params(
|
|
24
|
+
detail: Turbopuffer::OperationError::Detail::OrHash,
|
|
25
|
+
status_code: Integer
|
|
26
|
+
).returns(T.attached_class)
|
|
27
|
+
end
|
|
28
|
+
def self.new(
|
|
29
|
+
# The response to an unsuccessful request.
|
|
30
|
+
detail:,
|
|
31
|
+
# The HTTP status code of the operation's error.
|
|
32
|
+
status_code:
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
sig do
|
|
37
|
+
override.returns(
|
|
38
|
+
{ detail: Turbopuffer::OperationError::Detail, status_code: Integer }
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
def to_hash
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
class Detail < Turbopuffer::Internal::Type::BaseModel
|
|
45
|
+
OrHash =
|
|
46
|
+
T.type_alias do
|
|
47
|
+
T.any(
|
|
48
|
+
Turbopuffer::OperationError::Detail,
|
|
49
|
+
Turbopuffer::Internal::AnyHash
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# The error message.
|
|
54
|
+
sig { returns(String) }
|
|
55
|
+
attr_accessor :error
|
|
56
|
+
|
|
57
|
+
# The status of the request.
|
|
58
|
+
sig { returns(Symbol) }
|
|
59
|
+
attr_accessor :status
|
|
60
|
+
|
|
61
|
+
# The response to an unsuccessful request.
|
|
62
|
+
sig { params(error: String, status: Symbol).returns(T.attached_class) }
|
|
63
|
+
def self.new(
|
|
64
|
+
# The error message.
|
|
65
|
+
error:,
|
|
66
|
+
# The status of the request.
|
|
67
|
+
status: :error
|
|
68
|
+
)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
sig { override.returns({ error: String, status: Symbol }) }
|
|
72
|
+
def to_hash
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Turbopuffer
|
|
4
|
+
module Models
|
|
5
|
+
class RerankLimit < Turbopuffer::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Turbopuffer::RerankLimit, Turbopuffer::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Limits the total number of documents returned after reranking.
|
|
12
|
+
sig { returns(Integer) }
|
|
13
|
+
attr_accessor :total
|
|
14
|
+
|
|
15
|
+
# Limits the total number of reranked documents returned.
|
|
16
|
+
sig { params(total: Integer).returns(T.attached_class) }
|
|
17
|
+
def self.new(
|
|
18
|
+
# Limits the total number of documents returned after reranking.
|
|
19
|
+
total:
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
sig { override.returns({ total: Integer }) }
|
|
24
|
+
def to_hash
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|