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
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Turbopuffer
|
|
4
|
+
module Models
|
|
5
|
+
class WriteResult < Turbopuffer::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Turbopuffer::WriteResult, Turbopuffer::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# The billing information for a write request.
|
|
12
|
+
sig { returns(Turbopuffer::WriteBilling) }
|
|
13
|
+
attr_reader :billing
|
|
14
|
+
|
|
15
|
+
sig { params(billing: Turbopuffer::WriteBilling::OrHash).void }
|
|
16
|
+
attr_writer :billing
|
|
17
|
+
|
|
18
|
+
# A message describing the result of the write request.
|
|
19
|
+
sig { returns(String) }
|
|
20
|
+
attr_accessor :message
|
|
21
|
+
|
|
22
|
+
# The number of rows affected by the write request.
|
|
23
|
+
sig { returns(Integer) }
|
|
24
|
+
attr_accessor :rows_affected
|
|
25
|
+
|
|
26
|
+
# The status of the request.
|
|
27
|
+
sig { returns(Symbol) }
|
|
28
|
+
attr_accessor :status
|
|
29
|
+
|
|
30
|
+
# The IDs of documents that were deleted. Only included when `return_affected_ids`
|
|
31
|
+
# is true and at least one document was deleted.
|
|
32
|
+
sig { returns(T.nilable(T::Array[Turbopuffer::ID::Variants])) }
|
|
33
|
+
attr_reader :deleted_ids
|
|
34
|
+
|
|
35
|
+
sig { params(deleted_ids: T::Array[Turbopuffer::ID::Variants]).void }
|
|
36
|
+
attr_writer :deleted_ids
|
|
37
|
+
|
|
38
|
+
# The IDs of documents that were patched. Only included when `return_affected_ids`
|
|
39
|
+
# is true and at least one document was patched.
|
|
40
|
+
sig { returns(T.nilable(T::Array[Turbopuffer::ID::Variants])) }
|
|
41
|
+
attr_reader :patched_ids
|
|
42
|
+
|
|
43
|
+
sig { params(patched_ids: T::Array[Turbopuffer::ID::Variants]).void }
|
|
44
|
+
attr_writer :patched_ids
|
|
45
|
+
|
|
46
|
+
# The performance information for a write request.
|
|
47
|
+
sig { returns(T.nilable(Turbopuffer::WritePerformance)) }
|
|
48
|
+
attr_reader :performance
|
|
49
|
+
|
|
50
|
+
sig { params(performance: Turbopuffer::WritePerformance::OrHash).void }
|
|
51
|
+
attr_writer :performance
|
|
52
|
+
|
|
53
|
+
# The number of rows deleted by the write request.
|
|
54
|
+
sig { returns(T.nilable(Integer)) }
|
|
55
|
+
attr_reader :rows_deleted
|
|
56
|
+
|
|
57
|
+
sig { params(rows_deleted: Integer).void }
|
|
58
|
+
attr_writer :rows_deleted
|
|
59
|
+
|
|
60
|
+
# The number of rows patched by the write request.
|
|
61
|
+
sig { returns(T.nilable(Integer)) }
|
|
62
|
+
attr_reader :rows_patched
|
|
63
|
+
|
|
64
|
+
sig { params(rows_patched: Integer).void }
|
|
65
|
+
attr_writer :rows_patched
|
|
66
|
+
|
|
67
|
+
# Whether more documents match the filter for partial operations.
|
|
68
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
69
|
+
attr_reader :rows_remaining
|
|
70
|
+
|
|
71
|
+
sig { params(rows_remaining: T::Boolean).void }
|
|
72
|
+
attr_writer :rows_remaining
|
|
73
|
+
|
|
74
|
+
# The number of rows upserted by the write request.
|
|
75
|
+
sig { returns(T.nilable(Integer)) }
|
|
76
|
+
attr_reader :rows_upserted
|
|
77
|
+
|
|
78
|
+
sig { params(rows_upserted: Integer).void }
|
|
79
|
+
attr_writer :rows_upserted
|
|
80
|
+
|
|
81
|
+
# The IDs of documents that were upserted. Only included when
|
|
82
|
+
# `return_affected_ids` is true and at least one document was upserted.
|
|
83
|
+
sig { returns(T.nilable(T::Array[Turbopuffer::ID::Variants])) }
|
|
84
|
+
attr_reader :upserted_ids
|
|
85
|
+
|
|
86
|
+
sig { params(upserted_ids: T::Array[Turbopuffer::ID::Variants]).void }
|
|
87
|
+
attr_writer :upserted_ids
|
|
88
|
+
|
|
89
|
+
# The response to a successful write request.
|
|
90
|
+
sig do
|
|
91
|
+
params(
|
|
92
|
+
billing: Turbopuffer::WriteBilling::OrHash,
|
|
93
|
+
message: String,
|
|
94
|
+
rows_affected: Integer,
|
|
95
|
+
deleted_ids: T::Array[Turbopuffer::ID::Variants],
|
|
96
|
+
patched_ids: T::Array[Turbopuffer::ID::Variants],
|
|
97
|
+
performance: Turbopuffer::WritePerformance::OrHash,
|
|
98
|
+
rows_deleted: Integer,
|
|
99
|
+
rows_patched: Integer,
|
|
100
|
+
rows_remaining: T::Boolean,
|
|
101
|
+
rows_upserted: Integer,
|
|
102
|
+
upserted_ids: T::Array[Turbopuffer::ID::Variants],
|
|
103
|
+
status: Symbol
|
|
104
|
+
).returns(T.attached_class)
|
|
105
|
+
end
|
|
106
|
+
def self.new(
|
|
107
|
+
# The billing information for a write request.
|
|
108
|
+
billing:,
|
|
109
|
+
# A message describing the result of the write request.
|
|
110
|
+
message:,
|
|
111
|
+
# The number of rows affected by the write request.
|
|
112
|
+
rows_affected:,
|
|
113
|
+
# The IDs of documents that were deleted. Only included when `return_affected_ids`
|
|
114
|
+
# is true and at least one document was deleted.
|
|
115
|
+
deleted_ids: nil,
|
|
116
|
+
# The IDs of documents that were patched. Only included when `return_affected_ids`
|
|
117
|
+
# is true and at least one document was patched.
|
|
118
|
+
patched_ids: nil,
|
|
119
|
+
# The performance information for a write request.
|
|
120
|
+
performance: nil,
|
|
121
|
+
# The number of rows deleted by the write request.
|
|
122
|
+
rows_deleted: nil,
|
|
123
|
+
# The number of rows patched by the write request.
|
|
124
|
+
rows_patched: nil,
|
|
125
|
+
# Whether more documents match the filter for partial operations.
|
|
126
|
+
rows_remaining: nil,
|
|
127
|
+
# The number of rows upserted by the write request.
|
|
128
|
+
rows_upserted: nil,
|
|
129
|
+
# The IDs of documents that were upserted. Only included when
|
|
130
|
+
# `return_affected_ids` is true and at least one document was upserted.
|
|
131
|
+
upserted_ids: nil,
|
|
132
|
+
# The status of the request.
|
|
133
|
+
status: :OK
|
|
134
|
+
)
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
sig do
|
|
138
|
+
override.returns(
|
|
139
|
+
{
|
|
140
|
+
billing: Turbopuffer::WriteBilling,
|
|
141
|
+
message: String,
|
|
142
|
+
rows_affected: Integer,
|
|
143
|
+
status: Symbol,
|
|
144
|
+
deleted_ids: T::Array[Turbopuffer::ID::Variants],
|
|
145
|
+
patched_ids: T::Array[Turbopuffer::ID::Variants],
|
|
146
|
+
performance: Turbopuffer::WritePerformance,
|
|
147
|
+
rows_deleted: Integer,
|
|
148
|
+
rows_patched: Integer,
|
|
149
|
+
rows_remaining: T::Boolean,
|
|
150
|
+
rows_upserted: Integer,
|
|
151
|
+
upserted_ids: T::Array[Turbopuffer::ID::Variants]
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
end
|
|
155
|
+
def to_hash
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|
data/rbi/turbopuffer/models.rbi
CHANGED
|
@@ -31,6 +31,11 @@ module Turbopuffer
|
|
|
31
31
|
ContainsAnyTokenFilterParams =
|
|
32
32
|
Turbopuffer::Models::ContainsAnyTokenFilterParams
|
|
33
33
|
|
|
34
|
+
CopyFromNamespaceOperation = Turbopuffer::Models::CopyFromNamespaceOperation
|
|
35
|
+
|
|
36
|
+
CopyFromNamespaceOperationResult =
|
|
37
|
+
Turbopuffer::Models::CopyFromNamespaceOperationResult
|
|
38
|
+
|
|
34
39
|
CopyFromNamespaceParams = Turbopuffer::Models::CopyFromNamespaceParams
|
|
35
40
|
|
|
36
41
|
DecayParams = Turbopuffer::Models::DecayParams
|
|
@@ -82,12 +87,17 @@ module Turbopuffer
|
|
|
82
87
|
|
|
83
88
|
NamespaceMultiQueryParams = Turbopuffer::Models::NamespaceMultiQueryParams
|
|
84
89
|
|
|
90
|
+
NamespacePollCopyFromParams = Turbopuffer::Models::NamespacePollCopyFromParams
|
|
91
|
+
|
|
85
92
|
NamespaceQueryParams = Turbopuffer::Models::NamespaceQueryParams
|
|
86
93
|
|
|
87
94
|
NamespaceRecallParams = Turbopuffer::Models::NamespaceRecallParams
|
|
88
95
|
|
|
89
96
|
NamespaceSchemaParams = Turbopuffer::Models::NamespaceSchemaParams
|
|
90
97
|
|
|
98
|
+
NamespaceStartCopyFromParams =
|
|
99
|
+
Turbopuffer::Models::NamespaceStartCopyFromParams
|
|
100
|
+
|
|
91
101
|
NamespaceSummary = Turbopuffer::Models::NamespaceSummary
|
|
92
102
|
|
|
93
103
|
NamespaceUpdateMetadataParams =
|
|
@@ -97,12 +107,16 @@ module Turbopuffer
|
|
|
97
107
|
|
|
98
108
|
NamespaceWriteParams = Turbopuffer::Models::NamespaceWriteParams
|
|
99
109
|
|
|
110
|
+
OperationError = Turbopuffer::Models::OperationError
|
|
111
|
+
|
|
100
112
|
PinningConfig = Turbopuffer::Models::PinningConfig
|
|
101
113
|
|
|
102
114
|
QueryBilling = Turbopuffer::Models::QueryBilling
|
|
103
115
|
|
|
104
116
|
QueryPerformance = Turbopuffer::Models::QueryPerformance
|
|
105
117
|
|
|
118
|
+
RerankLimit = Turbopuffer::Models::RerankLimit
|
|
119
|
+
|
|
106
120
|
Row = Turbopuffer::Models::Row
|
|
107
121
|
|
|
108
122
|
RrfParams = Turbopuffer::Models::RrfParams
|
|
@@ -122,4 +136,6 @@ module Turbopuffer
|
|
|
122
136
|
WriteBilling = Turbopuffer::Models::WriteBilling
|
|
123
137
|
|
|
124
138
|
WritePerformance = Turbopuffer::Models::WritePerformance
|
|
139
|
+
|
|
140
|
+
WriteResult = Turbopuffer::Models::WriteResult
|
|
125
141
|
end
|
|
@@ -80,6 +80,7 @@ module Turbopuffer
|
|
|
80
80
|
group_by: T::Array[T.anything],
|
|
81
81
|
include_attributes: Turbopuffer::IncludeAttributes::Variants,
|
|
82
82
|
limit: T.any(Integer, Turbopuffer::Limit::OrHash),
|
|
83
|
+
offset: Integer,
|
|
83
84
|
rank_by: T.anything,
|
|
84
85
|
top_k: Integer,
|
|
85
86
|
vector_encoding: Turbopuffer::VectorEncoding::OrSymbol,
|
|
@@ -113,6 +114,9 @@ module Turbopuffer
|
|
|
113
114
|
include_attributes: nil,
|
|
114
115
|
# Body param: Limits the documents returned by a query.
|
|
115
116
|
limit: nil,
|
|
117
|
+
# Body param: Number of documents to skip before returning results. Supported only
|
|
118
|
+
# in v2 queries with an explicit `rank_by` and `top_k` or `limit`.
|
|
119
|
+
offset: nil,
|
|
116
120
|
# Body param: How to rank the documents in the namespace.
|
|
117
121
|
rank_by: nil,
|
|
118
122
|
# Body param: The number of results to return.
|
|
@@ -159,6 +163,8 @@ module Turbopuffer
|
|
|
159
163
|
namespace: String,
|
|
160
164
|
consistency:
|
|
161
165
|
Turbopuffer::NamespaceMultiQueryParams::Consistency::OrHash,
|
|
166
|
+
limit: T.any(Integer, Turbopuffer::RerankLimit::OrHash),
|
|
167
|
+
offset: Integer,
|
|
162
168
|
rerank_by: T.anything,
|
|
163
169
|
vector_encoding: Turbopuffer::VectorEncoding::OrSymbol,
|
|
164
170
|
request_options: Turbopuffer::RequestOptions::OrHash
|
|
@@ -171,6 +177,11 @@ module Turbopuffer
|
|
|
171
177
|
namespace: nil,
|
|
172
178
|
# Body param: The consistency level for a query.
|
|
173
179
|
consistency: nil,
|
|
180
|
+
# Body param: Limits the total number of reranked documents returned.
|
|
181
|
+
limit: nil,
|
|
182
|
+
# Body param: Number of reranked documents to skip before returning results.
|
|
183
|
+
# Requires `rerank_by` and `limit`.
|
|
184
|
+
offset: nil,
|
|
174
185
|
# Body param: How to combine the rows returned by each sub-query into a single
|
|
175
186
|
# ranked list.
|
|
176
187
|
rerank_by: nil,
|
|
@@ -180,6 +191,23 @@ module Turbopuffer
|
|
|
180
191
|
)
|
|
181
192
|
end
|
|
182
193
|
|
|
194
|
+
# Retrieve the current status of a copy operation.
|
|
195
|
+
sig do
|
|
196
|
+
params(
|
|
197
|
+
token: String,
|
|
198
|
+
namespace: String,
|
|
199
|
+
request_options: Turbopuffer::RequestOptions::OrHash
|
|
200
|
+
).returns(Turbopuffer::CopyFromNamespaceOperation::Variants)
|
|
201
|
+
end
|
|
202
|
+
def poll_copy_from(
|
|
203
|
+
# The operation token obtained when starting the copy.
|
|
204
|
+
token,
|
|
205
|
+
# The name of the namespace.
|
|
206
|
+
namespace: nil,
|
|
207
|
+
request_options: {}
|
|
208
|
+
)
|
|
209
|
+
end
|
|
210
|
+
|
|
183
211
|
# Query, filter, full-text search and vector search documents.
|
|
184
212
|
sig do
|
|
185
213
|
params(
|
|
@@ -193,6 +221,7 @@ module Turbopuffer
|
|
|
193
221
|
group_by: T::Array[T.anything],
|
|
194
222
|
include_attributes: Turbopuffer::IncludeAttributes::Variants,
|
|
195
223
|
limit: T.any(Integer, Turbopuffer::Limit::OrHash),
|
|
224
|
+
offset: Integer,
|
|
196
225
|
rank_by: T.anything,
|
|
197
226
|
top_k: Integer,
|
|
198
227
|
vector_encoding: Turbopuffer::VectorEncoding::OrSymbol,
|
|
@@ -226,6 +255,9 @@ module Turbopuffer
|
|
|
226
255
|
include_attributes: nil,
|
|
227
256
|
# Body param: Limits the documents returned by a query.
|
|
228
257
|
limit: nil,
|
|
258
|
+
# Body param: Number of documents to skip before returning results. Supported only
|
|
259
|
+
# in v2 queries with an explicit `rank_by` and `top_k` or `limit`.
|
|
260
|
+
offset: nil,
|
|
229
261
|
# Body param: How to rank the documents in the namespace.
|
|
230
262
|
rank_by: nil,
|
|
231
263
|
# Body param: The number of results to return.
|
|
@@ -281,12 +313,47 @@ module Turbopuffer
|
|
|
281
313
|
)
|
|
282
314
|
end
|
|
283
315
|
|
|
316
|
+
# Start copying all documents from another namespace into this one. Returns an
|
|
317
|
+
# operation token without waiting for the copy to finish. Use the token to poll
|
|
318
|
+
# for progress and the result.
|
|
319
|
+
sig do
|
|
320
|
+
params(
|
|
321
|
+
source_namespace: String,
|
|
322
|
+
namespace: String,
|
|
323
|
+
dest_encryption:
|
|
324
|
+
T.any(
|
|
325
|
+
Turbopuffer::Encryption::CustomerManaged::OrHash,
|
|
326
|
+
Turbopuffer::Encryption::Default::OrHash
|
|
327
|
+
),
|
|
328
|
+
source_api_key: String,
|
|
329
|
+
source_region: String,
|
|
330
|
+
request_options: Turbopuffer::RequestOptions::OrHash
|
|
331
|
+
).returns(Turbopuffer::Models::NamespaceStartCopyFromResponse)
|
|
332
|
+
end
|
|
333
|
+
def start_copy_from(
|
|
334
|
+
# Body param: The namespace to copy documents from.
|
|
335
|
+
source_namespace:,
|
|
336
|
+
# Path param: The name of the namespace.
|
|
337
|
+
namespace: nil,
|
|
338
|
+
# Body param: (Optional) The encryption configuration for the destination
|
|
339
|
+
# namespace.
|
|
340
|
+
dest_encryption: nil,
|
|
341
|
+
# Body param: (Optional) An API key for the organization containing the source
|
|
342
|
+
# namespace
|
|
343
|
+
source_api_key: nil,
|
|
344
|
+
# Body param: (Optional) The region of the source namespace.
|
|
345
|
+
source_region: nil,
|
|
346
|
+
request_options: {}
|
|
347
|
+
)
|
|
348
|
+
end
|
|
349
|
+
|
|
284
350
|
# Update metadata configuration for a namespace.
|
|
285
351
|
sig do
|
|
286
352
|
params(
|
|
287
353
|
namespace: String,
|
|
288
354
|
pinning:
|
|
289
355
|
T.nilable(T.any(T::Boolean, Turbopuffer::PinningConfig::OrHash)),
|
|
356
|
+
read_only: T::Boolean,
|
|
290
357
|
request_options: Turbopuffer::RequestOptions::OrHash
|
|
291
358
|
).returns(Turbopuffer::NamespaceMetadata)
|
|
292
359
|
end
|
|
@@ -300,6 +367,10 @@ module Turbopuffer
|
|
|
300
367
|
# - `true`: enable pinning with default configuration
|
|
301
368
|
# - Object: set pinning configuration
|
|
302
369
|
pinning: nil,
|
|
370
|
+
# Body param: Set to `true` to reject document and schema writes, or `false` to
|
|
371
|
+
# allow them. Writes already in progress may still commit. Metadata updates remain
|
|
372
|
+
# available.
|
|
373
|
+
read_only: nil,
|
|
303
374
|
request_options: {}
|
|
304
375
|
)
|
|
305
376
|
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
module Turbopuffer
|
|
2
|
+
module Models
|
|
3
|
+
type copy_from_namespace_operation =
|
|
4
|
+
Turbopuffer::CopyFromNamespaceOperation::Running
|
|
5
|
+
| Turbopuffer::CopyFromNamespaceOperation::Finished
|
|
6
|
+
|
|
7
|
+
module CopyFromNamespaceOperation
|
|
8
|
+
extend Turbopuffer::Internal::Type::Union
|
|
9
|
+
|
|
10
|
+
type running = { start_time: Time, status: :running, progress: String }
|
|
11
|
+
|
|
12
|
+
class Running < Turbopuffer::Internal::Type::BaseModel
|
|
13
|
+
attr_accessor start_time: Time
|
|
14
|
+
|
|
15
|
+
attr_accessor status: :running
|
|
16
|
+
|
|
17
|
+
attr_reader progress: String?
|
|
18
|
+
|
|
19
|
+
def progress=: (String) -> String
|
|
20
|
+
|
|
21
|
+
def initialize: (
|
|
22
|
+
start_time: Time,
|
|
23
|
+
?progress: String,
|
|
24
|
+
?status: :running
|
|
25
|
+
) -> void
|
|
26
|
+
|
|
27
|
+
def to_hash: -> { start_time: Time, status: :running, progress: String }
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
type finished =
|
|
31
|
+
{
|
|
32
|
+
finish_time: Time,
|
|
33
|
+
result: Turbopuffer::Models::copy_from_namespace_operation_result,
|
|
34
|
+
start_time: Time,
|
|
35
|
+
status: :finished
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
class Finished < Turbopuffer::Internal::Type::BaseModel
|
|
39
|
+
attr_accessor finish_time: Time
|
|
40
|
+
|
|
41
|
+
attr_accessor result: Turbopuffer::Models::copy_from_namespace_operation_result
|
|
42
|
+
|
|
43
|
+
attr_accessor start_time: Time
|
|
44
|
+
|
|
45
|
+
attr_accessor status: :finished
|
|
46
|
+
|
|
47
|
+
def initialize: (
|
|
48
|
+
finish_time: Time,
|
|
49
|
+
result: Turbopuffer::Models::copy_from_namespace_operation_result,
|
|
50
|
+
start_time: Time,
|
|
51
|
+
?status: :finished
|
|
52
|
+
) -> void
|
|
53
|
+
|
|
54
|
+
def to_hash: -> {
|
|
55
|
+
finish_time: Time,
|
|
56
|
+
result: Turbopuffer::Models::copy_from_namespace_operation_result,
|
|
57
|
+
start_time: Time,
|
|
58
|
+
status: :finished
|
|
59
|
+
}
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def self?.variants: -> ::Array[Turbopuffer::Models::copy_from_namespace_operation]
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
module Turbopuffer
|
|
2
|
+
module Models
|
|
3
|
+
type copy_from_namespace_operation_result =
|
|
4
|
+
Turbopuffer::CopyFromNamespaceOperationResult::Success
|
|
5
|
+
| Turbopuffer::CopyFromNamespaceOperationResult::Error
|
|
6
|
+
|
|
7
|
+
module CopyFromNamespaceOperationResult
|
|
8
|
+
extend Turbopuffer::Internal::Type::Union
|
|
9
|
+
|
|
10
|
+
type success = { success: Turbopuffer::WriteResult }
|
|
11
|
+
|
|
12
|
+
class Success < Turbopuffer::Internal::Type::BaseModel
|
|
13
|
+
attr_accessor success: Turbopuffer::WriteResult
|
|
14
|
+
|
|
15
|
+
def initialize: (success: Turbopuffer::WriteResult) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> { success: Turbopuffer::WriteResult }
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
type error = { error: Turbopuffer::OperationError }
|
|
21
|
+
|
|
22
|
+
class Error < Turbopuffer::Internal::Type::BaseModel
|
|
23
|
+
attr_accessor error: Turbopuffer::OperationError
|
|
24
|
+
|
|
25
|
+
def initialize: (error: Turbopuffer::OperationError) -> void
|
|
26
|
+
|
|
27
|
+
def to_hash: -> { error: Turbopuffer::OperationError }
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def self?.variants: -> ::Array[Turbopuffer::Models::copy_from_namespace_operation_result]
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -12,6 +12,7 @@ module Turbopuffer
|
|
|
12
12
|
group_by: ::Array[top],
|
|
13
13
|
include_attributes: Turbopuffer::Models::include_attributes,
|
|
14
14
|
limit: Turbopuffer::Models::NamespaceExplainQueryParams::limit,
|
|
15
|
+
offset: Integer,
|
|
15
16
|
rank_by: top,
|
|
16
17
|
top_k: Integer,
|
|
17
18
|
vector_encoding: Turbopuffer::Models::vector_encoding
|
|
@@ -70,6 +71,10 @@ module Turbopuffer
|
|
|
70
71
|
Turbopuffer::Models::NamespaceExplainQueryParams::limit
|
|
71
72
|
) -> Turbopuffer::Models::NamespaceExplainQueryParams::limit
|
|
72
73
|
|
|
74
|
+
attr_reader offset: Integer?
|
|
75
|
+
|
|
76
|
+
def offset=: (Integer) -> Integer
|
|
77
|
+
|
|
73
78
|
attr_reader rank_by: top?
|
|
74
79
|
|
|
75
80
|
def rank_by=: (top) -> top
|
|
@@ -95,6 +100,7 @@ module Turbopuffer
|
|
|
95
100
|
?group_by: ::Array[top],
|
|
96
101
|
?include_attributes: Turbopuffer::Models::include_attributes,
|
|
97
102
|
?limit: Turbopuffer::Models::NamespaceExplainQueryParams::limit,
|
|
103
|
+
?offset: Integer,
|
|
98
104
|
?rank_by: top,
|
|
99
105
|
?top_k: Integer,
|
|
100
106
|
?vector_encoding: Turbopuffer::Models::vector_encoding,
|
|
@@ -112,6 +118,7 @@ module Turbopuffer
|
|
|
112
118
|
group_by: ::Array[top],
|
|
113
119
|
include_attributes: Turbopuffer::Models::include_attributes,
|
|
114
120
|
limit: Turbopuffer::Models::NamespaceExplainQueryParams::limit,
|
|
121
|
+
offset: Integer,
|
|
115
122
|
rank_by: top,
|
|
116
123
|
top_k: Integer,
|
|
117
124
|
vector_encoding: Turbopuffer::Models::vector_encoding,
|
|
@@ -10,6 +10,7 @@ module Turbopuffer
|
|
|
10
10
|
schema: ::Hash[Symbol, Turbopuffer::AttributeSchemaConfig],
|
|
11
11
|
updated_at: Time,
|
|
12
12
|
pinning: Turbopuffer::NamespaceMetadata::Pinning,
|
|
13
|
+
read_only: bool,
|
|
13
14
|
sharding: Turbopuffer::ShardingConfig
|
|
14
15
|
}
|
|
15
16
|
|
|
@@ -34,6 +35,10 @@ module Turbopuffer
|
|
|
34
35
|
Turbopuffer::NamespaceMetadata::Pinning
|
|
35
36
|
) -> Turbopuffer::NamespaceMetadata::Pinning
|
|
36
37
|
|
|
38
|
+
attr_reader read_only: bool?
|
|
39
|
+
|
|
40
|
+
def read_only=: (bool) -> bool
|
|
41
|
+
|
|
37
42
|
attr_reader sharding: Turbopuffer::ShardingConfig?
|
|
38
43
|
|
|
39
44
|
def sharding=: (
|
|
@@ -49,6 +54,7 @@ module Turbopuffer
|
|
|
49
54
|
schema: ::Hash[Symbol, Turbopuffer::AttributeSchemaConfig],
|
|
50
55
|
updated_at: Time,
|
|
51
56
|
?pinning: Turbopuffer::NamespaceMetadata::Pinning,
|
|
57
|
+
?read_only: bool,
|
|
52
58
|
?sharding: Turbopuffer::ShardingConfig
|
|
53
59
|
) -> void
|
|
54
60
|
|
|
@@ -61,6 +67,7 @@ module Turbopuffer
|
|
|
61
67
|
schema: ::Hash[Symbol, Turbopuffer::AttributeSchemaConfig],
|
|
62
68
|
updated_at: Time,
|
|
63
69
|
pinning: Turbopuffer::NamespaceMetadata::Pinning,
|
|
70
|
+
read_only: bool,
|
|
64
71
|
sharding: Turbopuffer::ShardingConfig
|
|
65
72
|
}
|
|
66
73
|
|
|
@@ -114,23 +121,32 @@ module Turbopuffer
|
|
|
114
121
|
}
|
|
115
122
|
|
|
116
123
|
type status =
|
|
117
|
-
{
|
|
124
|
+
{
|
|
125
|
+
ready_replicas: Integer,
|
|
126
|
+
replicas: Integer,
|
|
127
|
+
updated_at: Time,
|
|
128
|
+
utilization: Float
|
|
129
|
+
}
|
|
118
130
|
|
|
119
131
|
class Status < Turbopuffer::Internal::Type::BaseModel
|
|
120
132
|
attr_accessor ready_replicas: Integer
|
|
121
133
|
|
|
134
|
+
attr_accessor replicas: Integer
|
|
135
|
+
|
|
122
136
|
attr_accessor updated_at: Time
|
|
123
137
|
|
|
124
138
|
attr_accessor utilization: Float
|
|
125
139
|
|
|
126
140
|
def initialize: (
|
|
127
141
|
ready_replicas: Integer,
|
|
142
|
+
replicas: Integer,
|
|
128
143
|
updated_at: Time,
|
|
129
144
|
utilization: Float
|
|
130
145
|
) -> void
|
|
131
146
|
|
|
132
147
|
def to_hash: -> {
|
|
133
148
|
ready_replicas: Integer,
|
|
149
|
+
replicas: Integer,
|
|
134
150
|
updated_at: Time,
|
|
135
151
|
utilization: Float
|
|
136
152
|
}
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
module Turbopuffer
|
|
2
2
|
module Models
|
|
3
3
|
type namespace_metadata_patch =
|
|
4
|
-
{
|
|
4
|
+
{
|
|
5
|
+
pinning: Turbopuffer::Models::NamespaceMetadataPatch::pinning?,
|
|
6
|
+
read_only: bool
|
|
7
|
+
}
|
|
5
8
|
|
|
6
9
|
class NamespaceMetadataPatch < Turbopuffer::Internal::Type::BaseModel
|
|
7
10
|
attr_accessor pinning: Turbopuffer::Models::NamespaceMetadataPatch::pinning?
|
|
8
11
|
|
|
12
|
+
attr_reader read_only: bool?
|
|
13
|
+
|
|
14
|
+
def read_only=: (bool) -> bool
|
|
15
|
+
|
|
9
16
|
def initialize: (
|
|
10
|
-
?pinning: Turbopuffer::Models::NamespaceMetadataPatch::pinning
|
|
17
|
+
?pinning: Turbopuffer::Models::NamespaceMetadataPatch::pinning?,
|
|
18
|
+
?read_only: bool
|
|
11
19
|
) -> void
|
|
12
20
|
|
|
13
21
|
def to_hash: -> {
|
|
14
|
-
pinning: Turbopuffer::Models::NamespaceMetadataPatch::pinning
|
|
22
|
+
pinning: Turbopuffer::Models::NamespaceMetadataPatch::pinning?,
|
|
23
|
+
read_only: bool
|
|
15
24
|
}
|
|
16
25
|
|
|
17
26
|
type pinning = bool | Turbopuffer::PinningConfig
|
|
@@ -5,6 +5,8 @@ module Turbopuffer
|
|
|
5
5
|
namespace: String,
|
|
6
6
|
queries: ::Array[Turbopuffer::NamespaceMultiQueryParams::Query],
|
|
7
7
|
consistency: Turbopuffer::NamespaceMultiQueryParams::Consistency,
|
|
8
|
+
limit: Turbopuffer::Models::NamespaceMultiQueryParams::limit,
|
|
9
|
+
offset: Integer,
|
|
8
10
|
rerank_by: top,
|
|
9
11
|
vector_encoding: Turbopuffer::Models::vector_encoding
|
|
10
12
|
}
|
|
@@ -26,6 +28,16 @@ module Turbopuffer
|
|
|
26
28
|
Turbopuffer::NamespaceMultiQueryParams::Consistency
|
|
27
29
|
) -> Turbopuffer::NamespaceMultiQueryParams::Consistency
|
|
28
30
|
|
|
31
|
+
attr_reader limit: Turbopuffer::Models::NamespaceMultiQueryParams::limit?
|
|
32
|
+
|
|
33
|
+
def limit=: (
|
|
34
|
+
Turbopuffer::Models::NamespaceMultiQueryParams::limit
|
|
35
|
+
) -> Turbopuffer::Models::NamespaceMultiQueryParams::limit
|
|
36
|
+
|
|
37
|
+
attr_reader offset: Integer?
|
|
38
|
+
|
|
39
|
+
def offset=: (Integer) -> Integer
|
|
40
|
+
|
|
29
41
|
attr_reader rerank_by: top?
|
|
30
42
|
|
|
31
43
|
def rerank_by=: (top) -> top
|
|
@@ -40,6 +52,8 @@ module Turbopuffer
|
|
|
40
52
|
queries: ::Array[Turbopuffer::NamespaceMultiQueryParams::Query],
|
|
41
53
|
?namespace: String,
|
|
42
54
|
?consistency: Turbopuffer::NamespaceMultiQueryParams::Consistency,
|
|
55
|
+
?limit: Turbopuffer::Models::NamespaceMultiQueryParams::limit,
|
|
56
|
+
?offset: Integer,
|
|
43
57
|
?rerank_by: top,
|
|
44
58
|
?vector_encoding: Turbopuffer::Models::vector_encoding,
|
|
45
59
|
?request_options: Turbopuffer::request_opts
|
|
@@ -49,6 +63,8 @@ module Turbopuffer
|
|
|
49
63
|
namespace: String,
|
|
50
64
|
queries: ::Array[Turbopuffer::NamespaceMultiQueryParams::Query],
|
|
51
65
|
consistency: Turbopuffer::NamespaceMultiQueryParams::Consistency,
|
|
66
|
+
limit: Turbopuffer::Models::NamespaceMultiQueryParams::limit,
|
|
67
|
+
offset: Integer,
|
|
52
68
|
rerank_by: top,
|
|
53
69
|
vector_encoding: Turbopuffer::Models::vector_encoding,
|
|
54
70
|
request_options: Turbopuffer::RequestOptions
|
|
@@ -64,6 +80,7 @@ module Turbopuffer
|
|
|
64
80
|
group_by: ::Array[top],
|
|
65
81
|
include_attributes: Turbopuffer::Models::include_attributes,
|
|
66
82
|
limit: Turbopuffer::Models::NamespaceMultiQueryParams::Query::limit,
|
|
83
|
+
offset: Integer,
|
|
67
84
|
rank_by: top,
|
|
68
85
|
top_k: Integer
|
|
69
86
|
}
|
|
@@ -107,6 +124,10 @@ module Turbopuffer
|
|
|
107
124
|
Turbopuffer::Models::NamespaceMultiQueryParams::Query::limit
|
|
108
125
|
) -> Turbopuffer::Models::NamespaceMultiQueryParams::Query::limit
|
|
109
126
|
|
|
127
|
+
attr_reader offset: Integer?
|
|
128
|
+
|
|
129
|
+
def offset=: (Integer) -> Integer
|
|
130
|
+
|
|
110
131
|
attr_reader rank_by: top?
|
|
111
132
|
|
|
112
133
|
def rank_by=: (top) -> top
|
|
@@ -124,6 +145,7 @@ module Turbopuffer
|
|
|
124
145
|
?group_by: ::Array[top],
|
|
125
146
|
?include_attributes: Turbopuffer::Models::include_attributes,
|
|
126
147
|
?limit: Turbopuffer::Models::NamespaceMultiQueryParams::Query::limit,
|
|
148
|
+
?offset: Integer,
|
|
127
149
|
?rank_by: top,
|
|
128
150
|
?top_k: Integer
|
|
129
151
|
) -> void
|
|
@@ -137,6 +159,7 @@ module Turbopuffer
|
|
|
137
159
|
group_by: ::Array[top],
|
|
138
160
|
include_attributes: Turbopuffer::Models::include_attributes,
|
|
139
161
|
limit: Turbopuffer::Models::NamespaceMultiQueryParams::Query::limit,
|
|
162
|
+
offset: Integer,
|
|
140
163
|
rank_by: top,
|
|
141
164
|
top_k: Integer
|
|
142
165
|
}
|
|
@@ -184,6 +207,14 @@ module Turbopuffer
|
|
|
184
207
|
def self?.values: -> ::Array[Turbopuffer::Models::NamespaceMultiQueryParams::Consistency::level]
|
|
185
208
|
end
|
|
186
209
|
end
|
|
210
|
+
|
|
211
|
+
type limit = Integer | Turbopuffer::RerankLimit
|
|
212
|
+
|
|
213
|
+
module Limit
|
|
214
|
+
extend Turbopuffer::Internal::Type::Union
|
|
215
|
+
|
|
216
|
+
def self?.variants: -> ::Array[Turbopuffer::Models::NamespaceMultiQueryParams::limit]
|
|
217
|
+
end
|
|
187
218
|
end
|
|
188
219
|
end
|
|
189
220
|
end
|