turbopuffer 2.3.0 → 2.4.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 +21 -0
- data/README.md +2 -2
- data/lib/turbopuffer/models/attribute_schema_config.rb +14 -1
- data/lib/turbopuffer/models/highlight_config_params.rb +46 -0
- data/lib/turbopuffer/models/highlight_fragment_by.rb +25 -0
- data/lib/turbopuffer/models/highlight_offset_units.rb +17 -0
- data/lib/turbopuffer/models/namespace_explain_query_params.rb +11 -1
- data/lib/turbopuffer/models/namespace_metadata.rb +12 -1
- data/lib/turbopuffer/models/namespace_multi_query_params.rb +11 -1
- data/lib/turbopuffer/models/namespace_query_params.rb +11 -1
- data/lib/turbopuffer/models/namespace_write_params.rb +12 -1
- data/lib/turbopuffer/models/rrf_params.rb +14 -1
- data/lib/turbopuffer/models/sharding_config.rb +21 -0
- data/lib/turbopuffer/models.rb +8 -0
- data/lib/turbopuffer/resources/namespaces.rb +9 -3
- data/lib/turbopuffer/version.rb +1 -1
- data/lib/turbopuffer.rb +4 -0
- data/rbi/turbopuffer/models/attribute_schema_config.rbi +20 -3
- data/rbi/turbopuffer/models/highlight_config_params.rbi +85 -0
- data/rbi/turbopuffer/models/highlight_fragment_by.rbi +36 -0
- data/rbi/turbopuffer/models/highlight_offset_units.rbi +27 -0
- data/rbi/turbopuffer/models/namespace_explain_query_params.rbi +15 -0
- data/rbi/turbopuffer/models/namespace_metadata.rbi +20 -3
- data/rbi/turbopuffer/models/namespace_multi_query_params.rbi +15 -0
- data/rbi/turbopuffer/models/namespace_query_params.rbi +15 -0
- data/rbi/turbopuffer/models/namespace_write_params.rbi +17 -0
- data/rbi/turbopuffer/models/rrf_params.rbi +22 -3
- data/rbi/turbopuffer/models/sharding_config.rbi +31 -0
- data/rbi/turbopuffer/models.rbi +8 -0
- data/rbi/turbopuffer/resources/namespaces.rbi +16 -0
- data/sig/turbopuffer/models/attribute_schema_config.rbs +12 -3
- data/sig/turbopuffer/models/highlight_config_params.rbs +47 -0
- data/sig/turbopuffer/models/highlight_fragment_by.rbs +23 -0
- data/sig/turbopuffer/models/highlight_offset_units.rbs +15 -0
- data/sig/turbopuffer/models/namespace_explain_query_params.rbs +7 -0
- data/sig/turbopuffer/models/namespace_metadata.rbs +12 -3
- data/sig/turbopuffer/models/namespace_multi_query_params.rbs +7 -0
- data/sig/turbopuffer/models/namespace_query_params.rbs +7 -0
- data/sig/turbopuffer/models/namespace_write_params.rbs +9 -0
- data/sig/turbopuffer/models/rrf_params.rbs +10 -3
- data/sig/turbopuffer/models/sharding_config.rbs +13 -0
- data/sig/turbopuffer/models.rbs +8 -0
- data/sig/turbopuffer/resources/namespaces.rbs +3 -0
- metadata +14 -2
|
@@ -4,6 +4,7 @@ module Turbopuffer
|
|
|
4
4
|
{
|
|
5
5
|
namespace: String,
|
|
6
6
|
aggregate_by: ::Hash[Symbol, top],
|
|
7
|
+
compute_attributes: ::Hash[Symbol, top],
|
|
7
8
|
consistency: Turbopuffer::NamespaceQueryParams::Consistency,
|
|
8
9
|
distance_metric: Turbopuffer::Models::distance_metric,
|
|
9
10
|
exclude_attributes: ::Array[String],
|
|
@@ -29,6 +30,10 @@ module Turbopuffer
|
|
|
29
30
|
|
|
30
31
|
def aggregate_by=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
31
32
|
|
|
33
|
+
attr_reader compute_attributes: ::Hash[Symbol, top]?
|
|
34
|
+
|
|
35
|
+
def compute_attributes=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
|
36
|
+
|
|
32
37
|
attr_reader consistency: Turbopuffer::NamespaceQueryParams::Consistency?
|
|
33
38
|
|
|
34
39
|
def consistency=: (
|
|
@@ -82,6 +87,7 @@ module Turbopuffer
|
|
|
82
87
|
def initialize: (
|
|
83
88
|
?namespace: String,
|
|
84
89
|
?aggregate_by: ::Hash[Symbol, top],
|
|
90
|
+
?compute_attributes: ::Hash[Symbol, top],
|
|
85
91
|
?consistency: Turbopuffer::NamespaceQueryParams::Consistency,
|
|
86
92
|
?distance_metric: Turbopuffer::Models::distance_metric,
|
|
87
93
|
?exclude_attributes: ::Array[String],
|
|
@@ -98,6 +104,7 @@ module Turbopuffer
|
|
|
98
104
|
def to_hash: -> {
|
|
99
105
|
namespace: String,
|
|
100
106
|
aggregate_by: ::Hash[Symbol, top],
|
|
107
|
+
compute_attributes: ::Hash[Symbol, top],
|
|
101
108
|
consistency: Turbopuffer::NamespaceQueryParams::Consistency,
|
|
102
109
|
distance_metric: Turbopuffer::Models::distance_metric,
|
|
103
110
|
exclude_attributes: ::Array[String],
|
|
@@ -19,6 +19,7 @@ module Turbopuffer
|
|
|
19
19
|
patch_rows: ::Array[Turbopuffer::Row],
|
|
20
20
|
return_affected_ids: bool,
|
|
21
21
|
schema: ::Hash[Symbol, Turbopuffer::Models::attribute_schema],
|
|
22
|
+
sharding: Turbopuffer::ShardingConfig,
|
|
22
23
|
upsert_columns: Turbopuffer::Columns,
|
|
23
24
|
upsert_condition: top,
|
|
24
25
|
upsert_rows: ::Array[Turbopuffer::Row]
|
|
@@ -111,6 +112,12 @@ module Turbopuffer
|
|
|
111
112
|
::Hash[Symbol, Turbopuffer::Models::attribute_schema]
|
|
112
113
|
) -> ::Hash[Symbol, Turbopuffer::Models::attribute_schema]
|
|
113
114
|
|
|
115
|
+
attr_reader sharding: Turbopuffer::ShardingConfig?
|
|
116
|
+
|
|
117
|
+
def sharding=: (
|
|
118
|
+
Turbopuffer::ShardingConfig
|
|
119
|
+
) -> Turbopuffer::ShardingConfig
|
|
120
|
+
|
|
114
121
|
attr_reader upsert_columns: Turbopuffer::Columns?
|
|
115
122
|
|
|
116
123
|
def upsert_columns=: (Turbopuffer::Columns) -> Turbopuffer::Columns
|
|
@@ -141,6 +148,7 @@ module Turbopuffer
|
|
|
141
148
|
?patch_rows: ::Array[Turbopuffer::Row],
|
|
142
149
|
?return_affected_ids: bool,
|
|
143
150
|
?schema: ::Hash[Symbol, Turbopuffer::Models::attribute_schema],
|
|
151
|
+
?sharding: Turbopuffer::ShardingConfig,
|
|
144
152
|
?upsert_columns: Turbopuffer::Columns,
|
|
145
153
|
?upsert_condition: top,
|
|
146
154
|
?upsert_rows: ::Array[Turbopuffer::Row],
|
|
@@ -165,6 +173,7 @@ module Turbopuffer
|
|
|
165
173
|
patch_rows: ::Array[Turbopuffer::Row],
|
|
166
174
|
return_affected_ids: bool,
|
|
167
175
|
schema: ::Hash[Symbol, Turbopuffer::Models::attribute_schema],
|
|
176
|
+
sharding: Turbopuffer::ShardingConfig,
|
|
168
177
|
upsert_columns: Turbopuffer::Columns,
|
|
169
178
|
upsert_condition: top,
|
|
170
179
|
upsert_rows: ::Array[Turbopuffer::Row],
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
module Turbopuffer
|
|
2
2
|
module Models
|
|
3
|
-
type rrf_params = { rank_constant: Integer }
|
|
3
|
+
type rrf_params = { rank_constant: Integer, weights: ::Array[Float] }
|
|
4
4
|
|
|
5
5
|
class RrfParams < Turbopuffer::Internal::Type::BaseModel
|
|
6
6
|
attr_reader rank_constant: Integer?
|
|
7
7
|
|
|
8
8
|
def rank_constant=: (Integer) -> Integer
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
attr_reader weights: ::Array[Float]?
|
|
11
11
|
|
|
12
|
-
def
|
|
12
|
+
def weights=: (::Array[Float]) -> ::Array[Float]
|
|
13
|
+
|
|
14
|
+
def initialize: (
|
|
15
|
+
?rank_constant: Integer,
|
|
16
|
+
?weights: ::Array[Float]
|
|
17
|
+
) -> void
|
|
18
|
+
|
|
19
|
+
def to_hash: -> { rank_constant: Integer, weights: ::Array[Float] }
|
|
13
20
|
end
|
|
14
21
|
end
|
|
15
22
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Turbopuffer
|
|
2
|
+
module Models
|
|
3
|
+
type sharding_config = { num_shards: Integer }
|
|
4
|
+
|
|
5
|
+
class ShardingConfig < Turbopuffer::Internal::Type::BaseModel
|
|
6
|
+
attr_accessor num_shards: Integer
|
|
7
|
+
|
|
8
|
+
def initialize: (num_shards: Integer) -> void
|
|
9
|
+
|
|
10
|
+
def to_hash: -> { num_shards: Integer }
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
data/sig/turbopuffer/models.rbs
CHANGED
|
@@ -41,6 +41,12 @@ module Turbopuffer
|
|
|
41
41
|
|
|
42
42
|
class FuzzyParams = Turbopuffer::Models::FuzzyParams
|
|
43
43
|
|
|
44
|
+
class HighlightConfigParams = Turbopuffer::Models::HighlightConfigParams
|
|
45
|
+
|
|
46
|
+
module HighlightFragmentBy = Turbopuffer::Models::HighlightFragmentBy
|
|
47
|
+
|
|
48
|
+
module HighlightOffsetUnits = Turbopuffer::Models::HighlightOffsetUnits
|
|
49
|
+
|
|
44
50
|
module ID = Turbopuffer::Models::ID
|
|
45
51
|
|
|
46
52
|
module IncludeAttributes = Turbopuffer::Models::IncludeAttributes
|
|
@@ -93,6 +99,8 @@ module Turbopuffer
|
|
|
93
99
|
|
|
94
100
|
class SaturateParams = Turbopuffer::Models::SaturateParams
|
|
95
101
|
|
|
102
|
+
class ShardingConfig = Turbopuffer::Models::ShardingConfig
|
|
103
|
+
|
|
96
104
|
module SparseDistanceMetric = Turbopuffer::Models::SparseDistanceMetric
|
|
97
105
|
|
|
98
106
|
module Tokenizer = Turbopuffer::Models::Tokenizer
|
|
@@ -24,6 +24,7 @@ module Turbopuffer
|
|
|
24
24
|
def explain_query: (
|
|
25
25
|
?namespace: String,
|
|
26
26
|
?aggregate_by: ::Hash[Symbol, top],
|
|
27
|
+
?compute_attributes: ::Hash[Symbol, top],
|
|
27
28
|
?consistency: Turbopuffer::NamespaceExplainQueryParams::Consistency,
|
|
28
29
|
?distance_metric: Turbopuffer::Models::distance_metric,
|
|
29
30
|
?exclude_attributes: ::Array[String],
|
|
@@ -59,6 +60,7 @@ module Turbopuffer
|
|
|
59
60
|
def query: (
|
|
60
61
|
?namespace: String,
|
|
61
62
|
?aggregate_by: ::Hash[Symbol, top],
|
|
63
|
+
?compute_attributes: ::Hash[Symbol, top],
|
|
62
64
|
?consistency: Turbopuffer::NamespaceQueryParams::Consistency,
|
|
63
65
|
?distance_metric: Turbopuffer::Models::distance_metric,
|
|
64
66
|
?exclude_attributes: ::Array[String],
|
|
@@ -117,6 +119,7 @@ module Turbopuffer
|
|
|
117
119
|
?patch_rows: ::Array[Turbopuffer::Row],
|
|
118
120
|
?return_affected_ids: bool,
|
|
119
121
|
?schema: ::Hash[Symbol, Turbopuffer::Models::attribute_schema],
|
|
122
|
+
?sharding: Turbopuffer::ShardingConfig,
|
|
120
123
|
?upsert_columns: Turbopuffer::Columns,
|
|
121
124
|
?upsert_condition: top,
|
|
122
125
|
?upsert_rows: ::Array[Turbopuffer::Row],
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: turbopuffer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Turbopuffer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-07-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|
|
@@ -92,6 +92,9 @@ files:
|
|
|
92
92
|
- lib/turbopuffer/models/full_text_search_config.rb
|
|
93
93
|
- lib/turbopuffer/models/fuzzy_max_edit_distance.rb
|
|
94
94
|
- lib/turbopuffer/models/fuzzy_params.rb
|
|
95
|
+
- lib/turbopuffer/models/highlight_config_params.rb
|
|
96
|
+
- lib/turbopuffer/models/highlight_fragment_by.rb
|
|
97
|
+
- lib/turbopuffer/models/highlight_offset_units.rb
|
|
95
98
|
- lib/turbopuffer/models/id.rb
|
|
96
99
|
- lib/turbopuffer/models/include_attributes.rb
|
|
97
100
|
- lib/turbopuffer/models/language.rb
|
|
@@ -129,6 +132,7 @@ files:
|
|
|
129
132
|
- lib/turbopuffer/models/row.rb
|
|
130
133
|
- lib/turbopuffer/models/rrf_params.rb
|
|
131
134
|
- lib/turbopuffer/models/saturate_params.rb
|
|
135
|
+
- lib/turbopuffer/models/sharding_config.rb
|
|
132
136
|
- lib/turbopuffer/models/sparse_distance_metric.rb
|
|
133
137
|
- lib/turbopuffer/models/tokenizer.rb
|
|
134
138
|
- lib/turbopuffer/models/vector.rb
|
|
@@ -181,6 +185,9 @@ files:
|
|
|
181
185
|
- rbi/turbopuffer/models/full_text_search_config.rbi
|
|
182
186
|
- rbi/turbopuffer/models/fuzzy_max_edit_distance.rbi
|
|
183
187
|
- rbi/turbopuffer/models/fuzzy_params.rbi
|
|
188
|
+
- rbi/turbopuffer/models/highlight_config_params.rbi
|
|
189
|
+
- rbi/turbopuffer/models/highlight_fragment_by.rbi
|
|
190
|
+
- rbi/turbopuffer/models/highlight_offset_units.rbi
|
|
184
191
|
- rbi/turbopuffer/models/id.rbi
|
|
185
192
|
- rbi/turbopuffer/models/include_attributes.rbi
|
|
186
193
|
- rbi/turbopuffer/models/language.rbi
|
|
@@ -218,6 +225,7 @@ files:
|
|
|
218
225
|
- rbi/turbopuffer/models/row.rbi
|
|
219
226
|
- rbi/turbopuffer/models/rrf_params.rbi
|
|
220
227
|
- rbi/turbopuffer/models/saturate_params.rbi
|
|
228
|
+
- rbi/turbopuffer/models/sharding_config.rbi
|
|
221
229
|
- rbi/turbopuffer/models/sparse_distance_metric.rbi
|
|
222
230
|
- rbi/turbopuffer/models/tokenizer.rbi
|
|
223
231
|
- rbi/turbopuffer/models/vector.rbi
|
|
@@ -269,6 +277,9 @@ files:
|
|
|
269
277
|
- sig/turbopuffer/models/full_text_search_config.rbs
|
|
270
278
|
- sig/turbopuffer/models/fuzzy_max_edit_distance.rbs
|
|
271
279
|
- sig/turbopuffer/models/fuzzy_params.rbs
|
|
280
|
+
- sig/turbopuffer/models/highlight_config_params.rbs
|
|
281
|
+
- sig/turbopuffer/models/highlight_fragment_by.rbs
|
|
282
|
+
- sig/turbopuffer/models/highlight_offset_units.rbs
|
|
272
283
|
- sig/turbopuffer/models/id.rbs
|
|
273
284
|
- sig/turbopuffer/models/include_attributes.rbs
|
|
274
285
|
- sig/turbopuffer/models/language.rbs
|
|
@@ -306,6 +317,7 @@ files:
|
|
|
306
317
|
- sig/turbopuffer/models/row.rbs
|
|
307
318
|
- sig/turbopuffer/models/rrf_params.rbs
|
|
308
319
|
- sig/turbopuffer/models/saturate_params.rbs
|
|
320
|
+
- sig/turbopuffer/models/sharding_config.rbs
|
|
309
321
|
- sig/turbopuffer/models/sparse_distance_metric.rbs
|
|
310
322
|
- sig/turbopuffer/models/tokenizer.rbs
|
|
311
323
|
- sig/turbopuffer/models/vector.rbs
|