turbopuffer 2.0.1 → 2.1.0.pre.alpha.1

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.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +6 -6
  4. data/lib/turbopuffer/internal/type/union.rb +6 -6
  5. data/lib/turbopuffer/models/attribute_embed.rb +21 -0
  6. data/lib/turbopuffer/models/attribute_embed_config.rb +43 -0
  7. data/lib/turbopuffer/models/attribute_schema_config.rb +11 -1
  8. data/lib/turbopuffer/models/embed_params.rb +22 -0
  9. data/lib/turbopuffer/models/fuzzy_max_edit_distance.rb +30 -0
  10. data/lib/turbopuffer/models/fuzzy_params.rb +23 -0
  11. data/lib/turbopuffer/models/namespace_multi_query_params.rb +9 -1
  12. data/lib/turbopuffer/models/rrf_params.rb +18 -0
  13. data/lib/turbopuffer/models.rb +12 -0
  14. data/lib/turbopuffer/resources/namespaces.rb +6 -1
  15. data/lib/turbopuffer/version.rb +1 -1
  16. data/lib/turbopuffer.rb +6 -0
  17. data/rbi/turbopuffer/models/attribute_embed.rbi +19 -0
  18. data/rbi/turbopuffer/models/attribute_embed_config.rbi +67 -0
  19. data/rbi/turbopuffer/models/attribute_schema_config.rbi +15 -0
  20. data/rbi/turbopuffer/models/embed_params.rbi +33 -0
  21. data/rbi/turbopuffer/models/fuzzy_max_edit_distance.rbi +43 -0
  22. data/rbi/turbopuffer/models/fuzzy_params.rbi +38 -0
  23. data/rbi/turbopuffer/models/namespace_multi_query_params.rbi +11 -0
  24. data/rbi/turbopuffer/models/rrf_params.rbi +31 -0
  25. data/rbi/turbopuffer/models.rbi +12 -0
  26. data/rbi/turbopuffer/resources/namespaces.rbi +4 -0
  27. data/sig/turbopuffer/models/attribute_embed.rbs +11 -0
  28. data/sig/turbopuffer/models/attribute_embed_config.rbs +26 -0
  29. data/sig/turbopuffer/models/attribute_schema_config.rbs +5 -0
  30. data/sig/turbopuffer/models/embed_params.rbs +15 -0
  31. data/sig/turbopuffer/models/fuzzy_max_edit_distance.rbs +16 -0
  32. data/sig/turbopuffer/models/fuzzy_params.rbs +18 -0
  33. data/sig/turbopuffer/models/namespace_multi_query_params.rbs +7 -0
  34. data/sig/turbopuffer/models/rrf_params.rbs +15 -0
  35. data/sig/turbopuffer/models.rbs +12 -0
  36. data/sig/turbopuffer/resources/namespaces.rbs +1 -0
  37. metadata +22 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4be40e5b1ec16648e8f8399a9ea5f226ce34b2a8e64599a03ae00ec1b7775098
4
- data.tar.gz: b42a4f3bcf669249bee313f803e0a734688ebcab54904f1307ba86650f841b5c
3
+ metadata.gz: a814ab0c5687f91477030e939f26d9ee96154dc1d0236377f406cd788d60cce7
4
+ data.tar.gz: 10e4bbefbaf97630ac5312f87482bc015766b94097f8ede4dbde7cf88cae4baa
5
5
  SHA512:
6
- metadata.gz: 89563024f84fc9a2ee9b71d6321e147d940494702db456cac0a57495a890aec606fdd9db1b1d9809157a6dae4302afe5a1726182b8b47eb6ae44f304d9cfdd0b
7
- data.tar.gz: 96a17ae4fa203347880ea0f384b890f5c9bd1da728e21aeb77c8f38380828ebcf829740131bc7767359b6c93d3bba8d8e10991d0ee16ba5d970b15cb97c25527
6
+ metadata.gz: a9004f09f663e6fb6149488e5d29826bfafb37fb1f49b910f718c52d5ae7f1894913a045b4b949fd7379a4e4aff0a5c27b5f98e63a0b0af17048c5b9c22ec430
7
+ data.tar.gz: c1faf2b9e10cbd8e5654f2441df0226bf4c89ea15c8085a8e3e7a884a02a226cecb79a82078fbc493053314ed5a6795ea2b5bd3fd5c0d8b0e9d4e2c53cec5064
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.1.0-alpha.1 (2026-06-02)
4
+
5
+ Full Changelog: [v2.0.1...v2.1.0-alpha.1](https://github.com/turbopuffer/turbopuffer-ruby/compare/v2.0.1...v2.1.0-alpha.1)
6
+
7
+ ### Features
8
+
9
+ * openapi: spec for `rerank_by: ["RRF"]` ([5a0e680](https://github.com/turbopuffer/turbopuffer-ruby/commit/5a0e68006df01e1a91eaceaf4040cf2b9a72d7d3))
10
+ * rename /docs/auth to /docs/overview ([15afd7a](https://github.com/turbopuffer/turbopuffer-ruby/commit/15afd7a27db0bf537ec330c0447f5ca75420e59d))
11
+ * spec: add SDK support for native embedding ([097137a](https://github.com/turbopuffer/turbopuffer-ruby/commit/097137a21639a6d207951b4403661bd5636883d4))
12
+ * spec: force generation of FuzzyParams stainless models ([d30149d](https://github.com/turbopuffer/turbopuffer-ruby/commit/d30149d6f02b06f2e104d7469e23a4362792c0a8))
13
+
14
+
15
+ ### Chores
16
+
17
+ * fix API docs links ([#59](https://github.com/turbopuffer/turbopuffer-ruby/issues/59)) ([434f523](https://github.com/turbopuffer/turbopuffer-ruby/commit/434f523237eff7209b3f0ffc2abde8d04d80abe1))
18
+
3
19
  ## 2.0.1 (2026-05-18)
4
20
 
5
21
  Full Changelog: [v2.0.0...v2.0.1](https://github.com/turbopuffer/turbopuffer-ruby/compare/v2.0.0...v2.0.1)
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
- # Turbopuffer Ruby API library
1
+ # turbopuffer Ruby API library
2
2
 
3
- The Turbopuffer Ruby library provides convenient access to the Turbopuffer REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/turbopuffer/turbopuffer-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.
3
+ The turbopuffer Ruby library provides convenient access to the [turbopuffer HTTP API](https://turbopuffer.com/docs/overview) from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/turbopuffer/turbopuffer-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.
4
4
 
5
5
  It is generated with [Stainless](https://www.stainless.com/).
6
6
 
7
7
  ## MCP Server
8
8
 
9
- Use the Turbopuffer MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
9
+ Use the turbopuffer MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
10
10
 
11
11
  [![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40turbopuffer%2Fturbopuffer-mcp&config=eyJuYW1lIjoiQHR1cmJvcHVmZmVyL3R1cmJvcHVmZmVyLW1jcCIsInRyYW5zcG9ydCI6Imh0dHAiLCJ1cmwiOiJodHRwczovL3R1cmJvcHVmZmVyLnN0bG1jcC5jb20iLCJoZWFkZXJzIjp7IngtdHVyYm9wdWZmZXItYXBpLWtleSI6InRwdWZfQTEuLi4ifX0)
12
12
  [![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40turbopuffer%2Fturbopuffer-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fturbopuffer.stlmcp.com%22%2C%22headers%22%3A%7B%22x-turbopuffer-api-key%22%3A%22tpuf_A1...%22%7D%7D)
@@ -17,7 +17,7 @@ Use the Turbopuffer MCP Server to enable AI assistants to interact with this API
17
17
 
18
18
  Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/turbopuffer).
19
19
 
20
- The REST API documentation can be found on [turbopuffer.com](https://turbopuffer.com/docs/auth).
20
+ The REST API documentation can be found at [turbopuffer.com/docs/overview](https://turbopuffer.com/docs/overview).
21
21
 
22
22
  ## Installation
23
23
 
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "turbopuffer", "~> 2.0.1"
29
+ gem "turbopuffer", "~> 2.1.0.pre.alpha.1"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -73,7 +73,7 @@ puts result.rows
73
73
 
74
74
  ### Pagination
75
75
 
76
- List methods in the Turbopuffer API are paginated.
76
+ List methods in the turbopuffer API are paginated.
77
77
 
78
78
  This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:
79
79
 
@@ -6,14 +6,14 @@ module Turbopuffer
6
6
  # @api private
7
7
  #
8
8
  # @example
9
- # # `attribute_schema` is a `Turbopuffer::AttributeSchema`
10
- # case attribute_schema
11
- # when Turbopuffer::AttributeType
9
+ # # `attribute_embed` is a `Turbopuffer::AttributeEmbed`
10
+ # case attribute_embed
11
+ # when String
12
12
  # # ...
13
- # when Turbopuffer::AttributeSchemaConfig
14
- # puts(attribute_schema.type)
13
+ # when Turbopuffer::AttributeEmbedConfig
14
+ # puts(attribute_embed.model)
15
15
  # else
16
- # puts(attribute_schema)
16
+ # puts(attribute_embed)
17
17
  # end
18
18
  module Union
19
19
  include Turbopuffer::Internal::Type::Converter
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Turbopuffer
4
+ module Models
5
+ # Whether to automatically embed this string attribute into a vector attribute.
6
+ # Can be a model name, a detailed configuration object, or `null` to remove an
7
+ # existing embedding configuration.
8
+ module AttributeEmbed
9
+ extend Turbopuffer::Internal::Type::Union
10
+
11
+ # The model to use for embedding. If you only specify a model, turbopuffer will generate a vector attribute for you to store the embedding.
12
+ variant String
13
+
14
+ # Configuration options for automatic embedding.
15
+ variant -> { Turbopuffer::AttributeEmbedConfig }
16
+
17
+ # @!method self.variants
18
+ # @return [Array(String, Turbopuffer::Models::AttributeEmbedConfig)]
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Turbopuffer
4
+ module Models
5
+ class AttributeEmbedConfig < Turbopuffer::Internal::Type::BaseModel
6
+ # @!attribute model
7
+ # The model to use for embedding. See our documentation for a list of models
8
+ # supported in each region.
9
+ #
10
+ # @return [String]
11
+ required :model, String
12
+
13
+ # @!attribute attribute
14
+ # The name of an existing vector attribute to store embeddings in. If omitted,
15
+ # turbopuffer will generate a computed vector attribute named
16
+ # `$embed_<attribute>`.
17
+ #
18
+ # @return [String, nil]
19
+ optional :attribute, String
20
+
21
+ # @!attribute dims
22
+ # The dimensionality to embed at. If not set, will pick the default for this
23
+ # model. If you're storing embeddings in an existing attribute, this can be
24
+ # omitted, and may not be set to a value other than the dimensions of that
25
+ # attribute.
26
+ #
27
+ # @return [Integer, nil]
28
+ optional :dims, Integer
29
+
30
+ # @!method initialize(model:, attribute: nil, dims: nil)
31
+ # Some parameter documentations has been truncated, see
32
+ # {Turbopuffer::Models::AttributeEmbedConfig} for more details.
33
+ #
34
+ # Configuration options for automatic embedding.
35
+ #
36
+ # @param model [String] The model to use for embedding. See our documentation for a list of models suppo
37
+ #
38
+ # @param attribute [String] The name of an existing vector attribute to store embeddings in. If omitted, tur
39
+ #
40
+ # @param dims [Integer] The dimensionality to embed at. If not set, will pick the default for this model
41
+ end
42
+ end
43
+ end
@@ -18,6 +18,14 @@ module Turbopuffer
18
18
  # @return [Boolean, Turbopuffer::Models::AttributeSchemaConfig::Ann::AnnConfig, nil]
19
19
  optional :ann, union: -> { Turbopuffer::AttributeSchemaConfig::Ann }
20
20
 
21
+ # @!attribute embed
22
+ # Whether to automatically embed this string attribute into a vector attribute.
23
+ # Can be a model name, a detailed configuration object, or `null` to remove an
24
+ # existing embedding configuration.
25
+ #
26
+ # @return [String, Turbopuffer::Models::AttributeEmbedConfig, nil]
27
+ optional :embed, union: -> { Turbopuffer::AttributeEmbed }, nil?: true
28
+
21
29
  # @!attribute filterable
22
30
  # Whether or not the attributes can be used in filters.
23
31
  #
@@ -57,7 +65,7 @@ module Turbopuffer
57
65
  # @return [Turbopuffer::Models::AttributeSchemaConfig::SparseKnn, nil]
58
66
  optional :sparse_knn, -> { Turbopuffer::AttributeSchemaConfig::SparseKnn }
59
67
 
60
- # @!method initialize(type:, ann: nil, filterable: nil, full_text_search: nil, fuzzy: nil, glob: nil, regex: nil, sparse_knn: nil)
68
+ # @!method initialize(type:, ann: nil, embed: nil, filterable: nil, full_text_search: nil, fuzzy: nil, glob: nil, regex: nil, sparse_knn: nil)
61
69
  # Some parameter documentations has been truncated, see
62
70
  # {Turbopuffer::Models::AttributeSchemaConfig} for more details.
63
71
  #
@@ -67,6 +75,8 @@ module Turbopuffer
67
75
  #
68
76
  # @param ann [Boolean, Turbopuffer::Models::AttributeSchemaConfig::Ann::AnnConfig] Whether to create an approximate nearest neighbor index for the attribute. Can b
69
77
  #
78
+ # @param embed [String, Turbopuffer::Models::AttributeEmbedConfig, nil] Whether to automatically embed this string attribute into a vector attribute. Ca
79
+ #
70
80
  # @param filterable [Boolean] Whether or not the attributes can be used in filters.
71
81
  #
72
82
  # @param full_text_search [Boolean, Turbopuffer::Models::FullTextSearchConfig] Whether this attribute can be used as part of a BM25 full-text search. Requires
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Turbopuffer
4
+ module Models
5
+ class EmbedParams < Turbopuffer::Internal::Type::BaseModel
6
+ # @!attribute model
7
+ # The model to use for embedding, overriding the model configured for the
8
+ # attribute.
9
+ #
10
+ # @return [String, nil]
11
+ optional :model, String
12
+
13
+ # @!method initialize(model: nil)
14
+ # Some parameter documentations has been truncated, see
15
+ # {Turbopuffer::Models::EmbedParams} for more details.
16
+ #
17
+ # Additional (optional) parameters for the Embed expression.
18
+ #
19
+ # @param model [String] The model to use for embedding, overriding the model configured for the attribut
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Turbopuffer
4
+ module Models
5
+ class FuzzyMaxEditDistance < Turbopuffer::Internal::Type::BaseModel
6
+ # @!attribute distance
7
+ # The maximum edit distance to allow.
8
+ #
9
+ # @return [Integer]
10
+ required :distance, Integer
11
+
12
+ # @!attribute min_query_chars
13
+ # Minimum number of characters in a query where this distance applies. Must be at
14
+ # least 3 · (distance + 1).
15
+ #
16
+ # @return [Integer]
17
+ required :min_query_chars, Integer
18
+
19
+ # @!method initialize(distance:, min_query_chars:)
20
+ # Some parameter documentations has been truncated, see
21
+ # {Turbopuffer::Models::FuzzyMaxEditDistance} for more details.
22
+ #
23
+ # An edit distance threshold for the Fuzzy filter.
24
+ #
25
+ # @param distance [Integer] The maximum edit distance to allow.
26
+ #
27
+ # @param min_query_chars [Integer] Minimum number of characters in a query where this distance applies. Must be at
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Turbopuffer
4
+ module Models
5
+ class FuzzyParams < Turbopuffer::Internal::Type::BaseModel
6
+ # @!attribute max_edit_distance
7
+ # Maximum edit distance allowed at each query length. Queries shorter than the
8
+ # first threshold return no matches.
9
+ #
10
+ # @return [Array<Turbopuffer::Models::FuzzyMaxEditDistance>]
11
+ required :max_edit_distance,
12
+ -> { Turbopuffer::Internal::Type::ArrayOf[Turbopuffer::FuzzyMaxEditDistance] }
13
+
14
+ # @!method initialize(max_edit_distance:)
15
+ # Some parameter documentations has been truncated, see
16
+ # {Turbopuffer::Models::FuzzyParams} for more details.
17
+ #
18
+ # Additional parameters for the Fuzzy filter.
19
+ #
20
+ # @param max_edit_distance [Array<Turbopuffer::Models::FuzzyMaxEditDistance>] Maximum edit distance allowed at each query length. Queries shorter than the fir
21
+ end
22
+ end
23
+ end
@@ -24,19 +24,27 @@ module Turbopuffer
24
24
  # @return [Turbopuffer::Models::NamespaceMultiQueryParams::Consistency, nil]
25
25
  optional :consistency, -> { Turbopuffer::NamespaceMultiQueryParams::Consistency }
26
26
 
27
+ # @!attribute rerank_by
28
+ # How to combine the rows returned by each sub-query into a single ranked list.
29
+ #
30
+ # @return [Object, nil]
31
+ optional :rerank_by, Turbopuffer::Internal::Type::Unknown
32
+
27
33
  # @!attribute vector_encoding
28
34
  # The encoding to use for vectors in the response.
29
35
  #
30
36
  # @return [Symbol, Turbopuffer::Models::VectorEncoding, nil]
31
37
  optional :vector_encoding, enum: -> { Turbopuffer::VectorEncoding }
32
38
 
33
- # @!method initialize(queries:, namespace: nil, consistency: nil, vector_encoding: nil, request_options: {})
39
+ # @!method initialize(queries:, namespace: nil, consistency: nil, rerank_by: nil, vector_encoding: nil, request_options: {})
34
40
  # @param queries [Array<Turbopuffer::Models::NamespaceMultiQueryParams::Query>]
35
41
  #
36
42
  # @param namespace [String]
37
43
  #
38
44
  # @param consistency [Turbopuffer::Models::NamespaceMultiQueryParams::Consistency] The consistency level for a query.
39
45
  #
46
+ # @param rerank_by [Object] How to combine the rows returned by each sub-query into a single ranked list.
47
+ #
40
48
  # @param vector_encoding [Symbol, Turbopuffer::Models::VectorEncoding] The encoding to use for vectors in the response.
41
49
  #
42
50
  # @param request_options [Turbopuffer::RequestOptions, Hash{Symbol=>Object}]
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Turbopuffer
4
+ module Models
5
+ class RrfParams < Turbopuffer::Internal::Type::BaseModel
6
+ # @!attribute rank_constant
7
+ # RRF rank constant (`k`). Must be greater than zero. Defaults to `60`.
8
+ #
9
+ # @return [Integer, nil]
10
+ optional :rank_constant, Integer
11
+
12
+ # @!method initialize(rank_constant: nil)
13
+ # Configuration options for RRF.
14
+ #
15
+ # @param rank_constant [Integer] RRF rank constant (`k`). Must be greater than zero. Defaults to `60`.
16
+ end
17
+ end
18
+ end
@@ -42,6 +42,10 @@ module Turbopuffer
42
42
  # @type [Turbopuffer::Internal::Type::Converter]
43
43
  AggregationGroup = Turbopuffer::Models::AggregationGroup
44
44
 
45
+ AttributeEmbed = Turbopuffer::Models::AttributeEmbed
46
+
47
+ AttributeEmbedConfig = Turbopuffer::Models::AttributeEmbedConfig
48
+
45
49
  AttributeSchema = Turbopuffer::Models::AttributeSchema
46
50
 
47
51
  AttributeSchemaConfig = Turbopuffer::Models::AttributeSchemaConfig
@@ -66,12 +70,18 @@ module Turbopuffer
66
70
 
67
71
  DistanceMetric = Turbopuffer::Models::DistanceMetric
68
72
 
73
+ EmbedParams = Turbopuffer::Models::EmbedParams
74
+
69
75
  Encryption = Turbopuffer::Models::Encryption
70
76
 
71
77
  FullTextSearch = Turbopuffer::Models::FullTextSearch
72
78
 
73
79
  FullTextSearchConfig = Turbopuffer::Models::FullTextSearchConfig
74
80
 
81
+ FuzzyMaxEditDistance = Turbopuffer::Models::FuzzyMaxEditDistance
82
+
83
+ FuzzyParams = Turbopuffer::Models::FuzzyParams
84
+
75
85
  ID = Turbopuffer::Models::ID
76
86
 
77
87
  IncludeAttributes = Turbopuffer::Models::IncludeAttributes
@@ -120,6 +130,8 @@ module Turbopuffer
120
130
 
121
131
  Row = Turbopuffer::Models::Row
122
132
 
133
+ RrfParams = Turbopuffer::Models::RrfParams
134
+
123
135
  SaturateParams = Turbopuffer::Models::SaturateParams
124
136
 
125
137
  SparseDistanceMetric = Turbopuffer::Models::SparseDistanceMetric
@@ -192,9 +192,12 @@ module Turbopuffer
192
192
  )
193
193
  end
194
194
 
195
+ # Some parameter documentations has been truncated, see
196
+ # {Turbopuffer::Models::NamespaceMultiQueryParams} for more details.
197
+ #
195
198
  # Issue multiple concurrent queries filter or search documents.
196
199
  #
197
- # @overload multi_query(queries:, namespace: nil, consistency: nil, vector_encoding: nil, request_options: {})
200
+ # @overload multi_query(queries:, namespace: nil, consistency: nil, rerank_by: nil, vector_encoding: nil, request_options: {})
198
201
  #
199
202
  # @param queries [Array<Turbopuffer::Models::NamespaceMultiQueryParams::Query>] Body param
200
203
  #
@@ -202,6 +205,8 @@ module Turbopuffer
202
205
  #
203
206
  # @param consistency [Turbopuffer::Models::NamespaceMultiQueryParams::Consistency] Body param: The consistency level for a query.
204
207
  #
208
+ # @param rerank_by [Object] Body param: How to combine the rows returned by each sub-query into a single ran
209
+ #
205
210
  # @param vector_encoding [Symbol, Turbopuffer::Models::VectorEncoding] Body param: The encoding to use for vectors in the response.
206
211
  #
207
212
  # @param request_options [Turbopuffer::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Turbopuffer
4
- VERSION = "2.0.1"
4
+ VERSION = "2.1.0.pre.alpha.1"
5
5
  end
data/lib/turbopuffer.rb CHANGED
@@ -56,6 +56,8 @@ require_relative "turbopuffer/internal/namespace_page"
56
56
  require_relative "turbopuffer/models/pinning_config"
57
57
  require_relative "turbopuffer/models/namespace_metadata_patch"
58
58
  require_relative "turbopuffer/models/aggregation_group"
59
+ require_relative "turbopuffer/models/attribute_embed"
60
+ require_relative "turbopuffer/models/attribute_embed_config"
59
61
  require_relative "turbopuffer/models/attribute_schema"
60
62
  require_relative "turbopuffer/models/attribute_schema_config"
61
63
  require_relative "turbopuffer/models/attribute_type"
@@ -68,9 +70,12 @@ require_relative "turbopuffer/models/contains_any_token_filter_params"
68
70
  require_relative "turbopuffer/models/copy_from_namespace_params"
69
71
  require_relative "turbopuffer/models/decay_params"
70
72
  require_relative "turbopuffer/models/distance_metric"
73
+ require_relative "turbopuffer/models/embed_params"
71
74
  require_relative "turbopuffer/models/encryption"
72
75
  require_relative "turbopuffer/models/full_text_search"
73
76
  require_relative "turbopuffer/models/full_text_search_config"
77
+ require_relative "turbopuffer/models/fuzzy_max_edit_distance"
78
+ require_relative "turbopuffer/models/fuzzy_params"
74
79
  require_relative "turbopuffer/models/id"
75
80
  require_relative "turbopuffer/models/include_attributes"
76
81
  require_relative "turbopuffer/models/language"
@@ -104,6 +109,7 @@ require_relative "turbopuffer/models/namespace_write_response"
104
109
  require_relative "turbopuffer/models/query_billing"
105
110
  require_relative "turbopuffer/models/query_performance"
106
111
  require_relative "turbopuffer/models/row"
112
+ require_relative "turbopuffer/models/rrf_params"
107
113
  require_relative "turbopuffer/models/saturate_params"
108
114
  require_relative "turbopuffer/models/sparse_distance_metric"
109
115
  require_relative "turbopuffer/models/tokenizer"
@@ -0,0 +1,19 @@
1
+ # typed: strong
2
+
3
+ module Turbopuffer
4
+ module Models
5
+ # Whether to automatically embed this string attribute into a vector attribute.
6
+ # Can be a model name, a detailed configuration object, or `null` to remove an
7
+ # existing embedding configuration.
8
+ module AttributeEmbed
9
+ extend Turbopuffer::Internal::Type::Union
10
+
11
+ Variants =
12
+ T.type_alias { T.any(String, Turbopuffer::AttributeEmbedConfig) }
13
+
14
+ sig { override.returns(T::Array[Turbopuffer::AttributeEmbed::Variants]) }
15
+ def self.variants
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,67 @@
1
+ # typed: strong
2
+
3
+ module Turbopuffer
4
+ module Models
5
+ class AttributeEmbedConfig < Turbopuffer::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Turbopuffer::AttributeEmbedConfig,
10
+ Turbopuffer::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The model to use for embedding. See our documentation for a list of models
15
+ # supported in each region.
16
+ sig { returns(String) }
17
+ attr_accessor :model
18
+
19
+ # The name of an existing vector attribute to store embeddings in. If omitted,
20
+ # turbopuffer will generate a computed vector attribute named
21
+ # `$embed_<attribute>`.
22
+ sig { returns(T.nilable(String)) }
23
+ attr_reader :attribute
24
+
25
+ sig { params(attribute: String).void }
26
+ attr_writer :attribute
27
+
28
+ # The dimensionality to embed at. If not set, will pick the default for this
29
+ # model. If you're storing embeddings in an existing attribute, this can be
30
+ # omitted, and may not be set to a value other than the dimensions of that
31
+ # attribute.
32
+ sig { returns(T.nilable(Integer)) }
33
+ attr_reader :dims
34
+
35
+ sig { params(dims: Integer).void }
36
+ attr_writer :dims
37
+
38
+ # Configuration options for automatic embedding.
39
+ sig do
40
+ params(model: String, attribute: String, dims: Integer).returns(
41
+ T.attached_class
42
+ )
43
+ end
44
+ def self.new(
45
+ # The model to use for embedding. See our documentation for a list of models
46
+ # supported in each region.
47
+ model:,
48
+ # The name of an existing vector attribute to store embeddings in. If omitted,
49
+ # turbopuffer will generate a computed vector attribute named
50
+ # `$embed_<attribute>`.
51
+ attribute: nil,
52
+ # The dimensionality to embed at. If not set, will pick the default for this
53
+ # model. If you're storing embeddings in an existing attribute, this can be
54
+ # omitted, and may not be set to a value other than the dimensions of that
55
+ # attribute.
56
+ dims: nil
57
+ )
58
+ end
59
+
60
+ sig do
61
+ override.returns({ model: String, attribute: String, dims: Integer })
62
+ end
63
+ def to_hash
64
+ end
65
+ end
66
+ end
67
+ end
@@ -42,6 +42,14 @@ module Turbopuffer
42
42
  end
43
43
  attr_writer :ann
44
44
 
45
+ # Whether to automatically embed this string attribute into a vector attribute.
46
+ # Can be a model name, a detailed configuration object, or `null` to remove an
47
+ # existing embedding configuration.
48
+ sig do
49
+ returns(T.nilable(T.any(String, Turbopuffer::AttributeEmbedConfig)))
50
+ end
51
+ attr_accessor :embed
52
+
45
53
  # Whether or not the attributes can be used in filters.
46
54
  sig { returns(T.nilable(T::Boolean)) }
47
55
  attr_reader :filterable
@@ -107,6 +115,8 @@ module Turbopuffer
107
115
  T::Boolean,
108
116
  Turbopuffer::AttributeSchemaConfig::Ann::AnnConfig::OrHash
109
117
  ),
118
+ embed:
119
+ T.nilable(T.any(String, Turbopuffer::AttributeEmbedConfig::OrHash)),
110
120
  filterable: T::Boolean,
111
121
  full_text_search:
112
122
  T.any(T::Boolean, Turbopuffer::FullTextSearchConfig::OrHash),
@@ -124,6 +134,10 @@ module Turbopuffer
124
134
  # Whether to create an approximate nearest neighbor index for the attribute. Can
125
135
  # be a boolean or a detailed configuration object.
126
136
  ann: nil,
137
+ # Whether to automatically embed this string attribute into a vector attribute.
138
+ # Can be a model name, a detailed configuration object, or `null` to remove an
139
+ # existing embedding configuration.
140
+ embed: nil,
127
141
  # Whether or not the attributes can be used in filters.
128
142
  filterable: nil,
129
143
  # Whether this attribute can be used as part of a BM25 full-text search. Requires
@@ -151,6 +165,7 @@ module Turbopuffer
151
165
  T::Boolean,
152
166
  Turbopuffer::AttributeSchemaConfig::Ann::AnnConfig
153
167
  ),
168
+ embed: T.nilable(T.any(String, Turbopuffer::AttributeEmbedConfig)),
154
169
  filterable: T::Boolean,
155
170
  full_text_search:
156
171
  T.any(T::Boolean, Turbopuffer::FullTextSearchConfig),
@@ -0,0 +1,33 @@
1
+ # typed: strong
2
+
3
+ module Turbopuffer
4
+ module Models
5
+ class EmbedParams < Turbopuffer::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Turbopuffer::EmbedParams, Turbopuffer::Internal::AnyHash)
9
+ end
10
+
11
+ # The model to use for embedding, overriding the model configured for the
12
+ # attribute.
13
+ sig { returns(T.nilable(String)) }
14
+ attr_reader :model
15
+
16
+ sig { params(model: String).void }
17
+ attr_writer :model
18
+
19
+ # Additional (optional) parameters for the Embed expression.
20
+ sig { params(model: String).returns(T.attached_class) }
21
+ def self.new(
22
+ # The model to use for embedding, overriding the model configured for the
23
+ # attribute.
24
+ model: nil
25
+ )
26
+ end
27
+
28
+ sig { override.returns({ model: String }) }
29
+ def to_hash
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,43 @@
1
+ # typed: strong
2
+
3
+ module Turbopuffer
4
+ module Models
5
+ class FuzzyMaxEditDistance < Turbopuffer::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Turbopuffer::FuzzyMaxEditDistance,
10
+ Turbopuffer::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The maximum edit distance to allow.
15
+ sig { returns(Integer) }
16
+ attr_accessor :distance
17
+
18
+ # Minimum number of characters in a query where this distance applies. Must be at
19
+ # least 3 · (distance + 1).
20
+ sig { returns(Integer) }
21
+ attr_accessor :min_query_chars
22
+
23
+ # An edit distance threshold for the Fuzzy filter.
24
+ sig do
25
+ params(distance: Integer, min_query_chars: Integer).returns(
26
+ T.attached_class
27
+ )
28
+ end
29
+ def self.new(
30
+ # The maximum edit distance to allow.
31
+ distance:,
32
+ # Minimum number of characters in a query where this distance applies. Must be at
33
+ # least 3 · (distance + 1).
34
+ min_query_chars:
35
+ )
36
+ end
37
+
38
+ sig { override.returns({ distance: Integer, min_query_chars: Integer }) }
39
+ def to_hash
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,38 @@
1
+ # typed: strong
2
+
3
+ module Turbopuffer
4
+ module Models
5
+ class FuzzyParams < Turbopuffer::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Turbopuffer::FuzzyParams, Turbopuffer::Internal::AnyHash)
9
+ end
10
+
11
+ # Maximum edit distance allowed at each query length. Queries shorter than the
12
+ # first threshold return no matches.
13
+ sig { returns(T::Array[Turbopuffer::FuzzyMaxEditDistance]) }
14
+ attr_accessor :max_edit_distance
15
+
16
+ # Additional parameters for the Fuzzy filter.
17
+ sig do
18
+ params(
19
+ max_edit_distance: T::Array[Turbopuffer::FuzzyMaxEditDistance::OrHash]
20
+ ).returns(T.attached_class)
21
+ end
22
+ def self.new(
23
+ # Maximum edit distance allowed at each query length. Queries shorter than the
24
+ # first threshold return no matches.
25
+ max_edit_distance:
26
+ )
27
+ end
28
+
29
+ sig do
30
+ override.returns(
31
+ { max_edit_distance: T::Array[Turbopuffer::FuzzyMaxEditDistance] }
32
+ )
33
+ end
34
+ def to_hash
35
+ end
36
+ end
37
+ end
38
+ end
@@ -37,6 +37,13 @@ module Turbopuffer
37
37
  end
38
38
  attr_writer :consistency
39
39
 
40
+ # How to combine the rows returned by each sub-query into a single ranked list.
41
+ sig { returns(T.nilable(T.anything)) }
42
+ attr_reader :rerank_by
43
+
44
+ sig { params(rerank_by: T.anything).void }
45
+ attr_writer :rerank_by
46
+
40
47
  # The encoding to use for vectors in the response.
41
48
  sig { returns(T.nilable(Turbopuffer::VectorEncoding::OrSymbol)) }
42
49
  attr_reader :vector_encoding
@@ -53,6 +60,7 @@ module Turbopuffer
53
60
  namespace: String,
54
61
  consistency:
55
62
  Turbopuffer::NamespaceMultiQueryParams::Consistency::OrHash,
63
+ rerank_by: T.anything,
56
64
  vector_encoding: Turbopuffer::VectorEncoding::OrSymbol,
57
65
  request_options: Turbopuffer::RequestOptions::OrHash
58
66
  ).returns(T.attached_class)
@@ -62,6 +70,8 @@ module Turbopuffer
62
70
  namespace: nil,
63
71
  # The consistency level for a query.
64
72
  consistency: nil,
73
+ # How to combine the rows returned by each sub-query into a single ranked list.
74
+ rerank_by: nil,
65
75
  # The encoding to use for vectors in the response.
66
76
  vector_encoding: nil,
67
77
  request_options: {}
@@ -74,6 +84,7 @@ module Turbopuffer
74
84
  namespace: String,
75
85
  queries: T::Array[Turbopuffer::NamespaceMultiQueryParams::Query],
76
86
  consistency: Turbopuffer::NamespaceMultiQueryParams::Consistency,
87
+ rerank_by: T.anything,
77
88
  vector_encoding: Turbopuffer::VectorEncoding::OrSymbol,
78
89
  request_options: Turbopuffer::RequestOptions
79
90
  }
@@ -0,0 +1,31 @@
1
+ # typed: strong
2
+
3
+ module Turbopuffer
4
+ module Models
5
+ class RrfParams < Turbopuffer::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Turbopuffer::RrfParams, Turbopuffer::Internal::AnyHash)
9
+ end
10
+
11
+ # RRF rank constant (`k`). Must be greater than zero. Defaults to `60`.
12
+ sig { returns(T.nilable(Integer)) }
13
+ attr_reader :rank_constant
14
+
15
+ sig { params(rank_constant: Integer).void }
16
+ attr_writer :rank_constant
17
+
18
+ # Configuration options for RRF.
19
+ sig { params(rank_constant: Integer).returns(T.attached_class) }
20
+ def self.new(
21
+ # RRF rank constant (`k`). Must be greater than zero. Defaults to `60`.
22
+ rank_constant: nil
23
+ )
24
+ end
25
+
26
+ sig { override.returns({ rank_constant: Integer }) }
27
+ def to_hash
28
+ end
29
+ end
30
+ end
31
+ end
@@ -7,6 +7,10 @@ module Turbopuffer
7
7
  Turbopuffer::Internal::Type::Converter
8
8
  )
9
9
 
10
+ AttributeEmbed = Turbopuffer::Models::AttributeEmbed
11
+
12
+ AttributeEmbedConfig = Turbopuffer::Models::AttributeEmbedConfig
13
+
10
14
  AttributeSchema = Turbopuffer::Models::AttributeSchema
11
15
 
12
16
  AttributeSchemaConfig = Turbopuffer::Models::AttributeSchemaConfig
@@ -33,12 +37,18 @@ module Turbopuffer
33
37
 
34
38
  DistanceMetric = Turbopuffer::Models::DistanceMetric
35
39
 
40
+ EmbedParams = Turbopuffer::Models::EmbedParams
41
+
36
42
  Encryption = Turbopuffer::Models::Encryption
37
43
 
38
44
  FullTextSearch = Turbopuffer::Models::FullTextSearch
39
45
 
40
46
  FullTextSearchConfig = Turbopuffer::Models::FullTextSearchConfig
41
47
 
48
+ FuzzyMaxEditDistance = Turbopuffer::Models::FuzzyMaxEditDistance
49
+
50
+ FuzzyParams = Turbopuffer::Models::FuzzyParams
51
+
42
52
  ID = Turbopuffer::Models::ID
43
53
 
44
54
  IncludeAttributes = Turbopuffer::Models::IncludeAttributes
@@ -89,6 +99,8 @@ module Turbopuffer
89
99
 
90
100
  Row = Turbopuffer::Models::Row
91
101
 
102
+ RrfParams = Turbopuffer::Models::RrfParams
103
+
92
104
  SaturateParams = Turbopuffer::Models::SaturateParams
93
105
 
94
106
  SparseDistanceMetric = Turbopuffer::Models::SparseDistanceMetric
@@ -146,6 +146,7 @@ module Turbopuffer
146
146
  namespace: String,
147
147
  consistency:
148
148
  Turbopuffer::NamespaceMultiQueryParams::Consistency::OrHash,
149
+ rerank_by: T.anything,
149
150
  vector_encoding: Turbopuffer::VectorEncoding::OrSymbol,
150
151
  request_options: Turbopuffer::RequestOptions::OrHash
151
152
  ).returns(Turbopuffer::Models::NamespaceMultiQueryResponse)
@@ -157,6 +158,9 @@ module Turbopuffer
157
158
  namespace: nil,
158
159
  # Body param: The consistency level for a query.
159
160
  consistency: nil,
161
+ # Body param: How to combine the rows returned by each sub-query into a single
162
+ # ranked list.
163
+ rerank_by: nil,
160
164
  # Body param: The encoding to use for vectors in the response.
161
165
  vector_encoding: nil,
162
166
  request_options: {}
@@ -0,0 +1,11 @@
1
+ module Turbopuffer
2
+ module Models
3
+ type attribute_embed = String | Turbopuffer::AttributeEmbedConfig
4
+
5
+ module AttributeEmbed
6
+ extend Turbopuffer::Internal::Type::Union
7
+
8
+ def self?.variants: -> ::Array[Turbopuffer::Models::attribute_embed]
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,26 @@
1
+ module Turbopuffer
2
+ module Models
3
+ type attribute_embed_config =
4
+ { model: String, attribute: String, dims: Integer }
5
+
6
+ class AttributeEmbedConfig < Turbopuffer::Internal::Type::BaseModel
7
+ attr_accessor model: String
8
+
9
+ attr_reader attribute: String?
10
+
11
+ def attribute=: (String) -> String
12
+
13
+ attr_reader dims: Integer?
14
+
15
+ def dims=: (Integer) -> Integer
16
+
17
+ def initialize: (
18
+ model: String,
19
+ ?attribute: String,
20
+ ?dims: Integer
21
+ ) -> void
22
+
23
+ def to_hash: -> { model: String, attribute: String, dims: Integer }
24
+ end
25
+ end
26
+ end
@@ -4,6 +4,7 @@ module Turbopuffer
4
4
  {
5
5
  type: String,
6
6
  ann: Turbopuffer::Models::AttributeSchemaConfig::ann,
7
+ embed: Turbopuffer::Models::attribute_embed?,
7
8
  filterable: bool,
8
9
  full_text_search: Turbopuffer::Models::full_text_search,
9
10
  fuzzy: bool,
@@ -21,6 +22,8 @@ module Turbopuffer
21
22
  Turbopuffer::Models::AttributeSchemaConfig::ann
22
23
  ) -> Turbopuffer::Models::AttributeSchemaConfig::ann
23
24
 
25
+ attr_accessor embed: Turbopuffer::Models::attribute_embed?
26
+
24
27
  attr_reader filterable: bool?
25
28
 
26
29
  def filterable=: (bool) -> bool
@@ -52,6 +55,7 @@ module Turbopuffer
52
55
  def initialize: (
53
56
  type: String,
54
57
  ?ann: Turbopuffer::Models::AttributeSchemaConfig::ann,
58
+ ?embed: Turbopuffer::Models::attribute_embed?,
55
59
  ?filterable: bool,
56
60
  ?full_text_search: Turbopuffer::Models::full_text_search,
57
61
  ?fuzzy: bool,
@@ -63,6 +67,7 @@ module Turbopuffer
63
67
  def to_hash: -> {
64
68
  type: String,
65
69
  ann: Turbopuffer::Models::AttributeSchemaConfig::ann,
70
+ embed: Turbopuffer::Models::attribute_embed?,
66
71
  filterable: bool,
67
72
  full_text_search: Turbopuffer::Models::full_text_search,
68
73
  fuzzy: bool,
@@ -0,0 +1,15 @@
1
+ module Turbopuffer
2
+ module Models
3
+ type embed_params = { model: String }
4
+
5
+ class EmbedParams < Turbopuffer::Internal::Type::BaseModel
6
+ attr_reader model: String?
7
+
8
+ def model=: (String) -> String
9
+
10
+ def initialize: (?model: String) -> void
11
+
12
+ def to_hash: -> { model: String }
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,16 @@
1
+ module Turbopuffer
2
+ module Models
3
+ type fuzzy_max_edit_distance =
4
+ { distance: Integer, min_query_chars: Integer }
5
+
6
+ class FuzzyMaxEditDistance < Turbopuffer::Internal::Type::BaseModel
7
+ attr_accessor distance: Integer
8
+
9
+ attr_accessor min_query_chars: Integer
10
+
11
+ def initialize: (distance: Integer, min_query_chars: Integer) -> void
12
+
13
+ def to_hash: -> { distance: Integer, min_query_chars: Integer }
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,18 @@
1
+ module Turbopuffer
2
+ module Models
3
+ type fuzzy_params =
4
+ { max_edit_distance: ::Array[Turbopuffer::FuzzyMaxEditDistance] }
5
+
6
+ class FuzzyParams < Turbopuffer::Internal::Type::BaseModel
7
+ attr_accessor max_edit_distance: ::Array[Turbopuffer::FuzzyMaxEditDistance]
8
+
9
+ def initialize: (
10
+ max_edit_distance: ::Array[Turbopuffer::FuzzyMaxEditDistance]
11
+ ) -> void
12
+
13
+ def to_hash: -> {
14
+ max_edit_distance: ::Array[Turbopuffer::FuzzyMaxEditDistance]
15
+ }
16
+ end
17
+ end
18
+ end
@@ -5,6 +5,7 @@ module Turbopuffer
5
5
  namespace: String,
6
6
  queries: ::Array[Turbopuffer::NamespaceMultiQueryParams::Query],
7
7
  consistency: Turbopuffer::NamespaceMultiQueryParams::Consistency,
8
+ rerank_by: top,
8
9
  vector_encoding: Turbopuffer::Models::vector_encoding
9
10
  }
10
11
  & Turbopuffer::Internal::Type::request_parameters
@@ -25,6 +26,10 @@ module Turbopuffer
25
26
  Turbopuffer::NamespaceMultiQueryParams::Consistency
26
27
  ) -> Turbopuffer::NamespaceMultiQueryParams::Consistency
27
28
 
29
+ attr_reader rerank_by: top?
30
+
31
+ def rerank_by=: (top) -> top
32
+
28
33
  attr_reader vector_encoding: Turbopuffer::Models::vector_encoding?
29
34
 
30
35
  def vector_encoding=: (
@@ -35,6 +40,7 @@ module Turbopuffer
35
40
  queries: ::Array[Turbopuffer::NamespaceMultiQueryParams::Query],
36
41
  ?namespace: String,
37
42
  ?consistency: Turbopuffer::NamespaceMultiQueryParams::Consistency,
43
+ ?rerank_by: top,
38
44
  ?vector_encoding: Turbopuffer::Models::vector_encoding,
39
45
  ?request_options: Turbopuffer::request_opts
40
46
  ) -> void
@@ -43,6 +49,7 @@ module Turbopuffer
43
49
  namespace: String,
44
50
  queries: ::Array[Turbopuffer::NamespaceMultiQueryParams::Query],
45
51
  consistency: Turbopuffer::NamespaceMultiQueryParams::Consistency,
52
+ rerank_by: top,
46
53
  vector_encoding: Turbopuffer::Models::vector_encoding,
47
54
  request_options: Turbopuffer::RequestOptions
48
55
  }
@@ -0,0 +1,15 @@
1
+ module Turbopuffer
2
+ module Models
3
+ type rrf_params = { rank_constant: Integer }
4
+
5
+ class RrfParams < Turbopuffer::Internal::Type::BaseModel
6
+ attr_reader rank_constant: Integer?
7
+
8
+ def rank_constant=: (Integer) -> Integer
9
+
10
+ def initialize: (?rank_constant: Integer) -> void
11
+
12
+ def to_hash: -> { rank_constant: Integer }
13
+ end
14
+ end
15
+ end
@@ -1,6 +1,10 @@
1
1
  module Turbopuffer
2
2
  AggregationGroup: Turbopuffer::Internal::Type::Converter
3
3
 
4
+ module AttributeEmbed = Turbopuffer::Models::AttributeEmbed
5
+
6
+ class AttributeEmbedConfig = Turbopuffer::Models::AttributeEmbedConfig
7
+
4
8
  module AttributeSchema = Turbopuffer::Models::AttributeSchema
5
9
 
6
10
  class AttributeSchemaConfig = Turbopuffer::Models::AttributeSchemaConfig
@@ -25,12 +29,18 @@ module Turbopuffer
25
29
 
26
30
  module DistanceMetric = Turbopuffer::Models::DistanceMetric
27
31
 
32
+ class EmbedParams = Turbopuffer::Models::EmbedParams
33
+
28
34
  module Encryption = Turbopuffer::Models::Encryption
29
35
 
30
36
  module FullTextSearch = Turbopuffer::Models::FullTextSearch
31
37
 
32
38
  class FullTextSearchConfig = Turbopuffer::Models::FullTextSearchConfig
33
39
 
40
+ class FuzzyMaxEditDistance = Turbopuffer::Models::FuzzyMaxEditDistance
41
+
42
+ class FuzzyParams = Turbopuffer::Models::FuzzyParams
43
+
34
44
  module ID = Turbopuffer::Models::ID
35
45
 
36
46
  module IncludeAttributes = Turbopuffer::Models::IncludeAttributes
@@ -79,6 +89,8 @@ module Turbopuffer
79
89
 
80
90
  class Row = Turbopuffer::Models::Row
81
91
 
92
+ class RrfParams = Turbopuffer::Models::RrfParams
93
+
82
94
  class SaturateParams = Turbopuffer::Models::SaturateParams
83
95
 
84
96
  module SparseDistanceMetric = Turbopuffer::Models::SparseDistanceMetric
@@ -50,6 +50,7 @@ module Turbopuffer
50
50
  queries: ::Array[Turbopuffer::NamespaceMultiQueryParams::Query],
51
51
  ?namespace: String,
52
52
  ?consistency: Turbopuffer::NamespaceMultiQueryParams::Consistency,
53
+ ?rerank_by: top,
53
54
  ?vector_encoding: Turbopuffer::Models::vector_encoding,
54
55
  ?request_options: Turbopuffer::request_opts
55
56
  ) -> Turbopuffer::Models::NamespaceMultiQueryResponse
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.0.1
4
+ version: 2.1.0.pre.alpha.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Turbopuffer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-18 00:00:00.000000000 Z
11
+ date: 2026-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi
@@ -71,6 +71,8 @@ files:
71
71
  - lib/turbopuffer/internal/util.rb
72
72
  - lib/turbopuffer/models.rb
73
73
  - lib/turbopuffer/models/aggregation_group.rb
74
+ - lib/turbopuffer/models/attribute_embed.rb
75
+ - lib/turbopuffer/models/attribute_embed_config.rb
74
76
  - lib/turbopuffer/models/attribute_schema.rb
75
77
  - lib/turbopuffer/models/attribute_schema_config.rb
76
78
  - lib/turbopuffer/models/attribute_type.rb
@@ -83,9 +85,12 @@ files:
83
85
  - lib/turbopuffer/models/copy_from_namespace_params.rb
84
86
  - lib/turbopuffer/models/decay_params.rb
85
87
  - lib/turbopuffer/models/distance_metric.rb
88
+ - lib/turbopuffer/models/embed_params.rb
86
89
  - lib/turbopuffer/models/encryption.rb
87
90
  - lib/turbopuffer/models/full_text_search.rb
88
91
  - lib/turbopuffer/models/full_text_search_config.rb
92
+ - lib/turbopuffer/models/fuzzy_max_edit_distance.rb
93
+ - lib/turbopuffer/models/fuzzy_params.rb
89
94
  - lib/turbopuffer/models/id.rb
90
95
  - lib/turbopuffer/models/include_attributes.rb
91
96
  - lib/turbopuffer/models/language.rb
@@ -121,6 +126,7 @@ files:
121
126
  - lib/turbopuffer/models/query_billing.rb
122
127
  - lib/turbopuffer/models/query_performance.rb
123
128
  - lib/turbopuffer/models/row.rb
129
+ - lib/turbopuffer/models/rrf_params.rb
124
130
  - lib/turbopuffer/models/saturate_params.rb
125
131
  - lib/turbopuffer/models/sparse_distance_metric.rb
126
132
  - lib/turbopuffer/models/tokenizer.rb
@@ -154,6 +160,8 @@ files:
154
160
  - rbi/turbopuffer/internal/util.rbi
155
161
  - rbi/turbopuffer/models.rbi
156
162
  - rbi/turbopuffer/models/aggregation_group.rbi
163
+ - rbi/turbopuffer/models/attribute_embed.rbi
164
+ - rbi/turbopuffer/models/attribute_embed_config.rbi
157
165
  - rbi/turbopuffer/models/attribute_schema.rbi
158
166
  - rbi/turbopuffer/models/attribute_schema_config.rbi
159
167
  - rbi/turbopuffer/models/attribute_type.rbi
@@ -166,9 +174,12 @@ files:
166
174
  - rbi/turbopuffer/models/copy_from_namespace_params.rbi
167
175
  - rbi/turbopuffer/models/decay_params.rbi
168
176
  - rbi/turbopuffer/models/distance_metric.rbi
177
+ - rbi/turbopuffer/models/embed_params.rbi
169
178
  - rbi/turbopuffer/models/encryption.rbi
170
179
  - rbi/turbopuffer/models/full_text_search.rbi
171
180
  - rbi/turbopuffer/models/full_text_search_config.rbi
181
+ - rbi/turbopuffer/models/fuzzy_max_edit_distance.rbi
182
+ - rbi/turbopuffer/models/fuzzy_params.rbi
172
183
  - rbi/turbopuffer/models/id.rbi
173
184
  - rbi/turbopuffer/models/include_attributes.rbi
174
185
  - rbi/turbopuffer/models/language.rbi
@@ -204,6 +215,7 @@ files:
204
215
  - rbi/turbopuffer/models/query_billing.rbi
205
216
  - rbi/turbopuffer/models/query_performance.rbi
206
217
  - rbi/turbopuffer/models/row.rbi
218
+ - rbi/turbopuffer/models/rrf_params.rbi
207
219
  - rbi/turbopuffer/models/saturate_params.rbi
208
220
  - rbi/turbopuffer/models/sparse_distance_metric.rbi
209
221
  - rbi/turbopuffer/models/tokenizer.rbi
@@ -236,6 +248,8 @@ files:
236
248
  - sig/turbopuffer/internal/util.rbs
237
249
  - sig/turbopuffer/models.rbs
238
250
  - sig/turbopuffer/models/aggregation_group.rbs
251
+ - sig/turbopuffer/models/attribute_embed.rbs
252
+ - sig/turbopuffer/models/attribute_embed_config.rbs
239
253
  - sig/turbopuffer/models/attribute_schema.rbs
240
254
  - sig/turbopuffer/models/attribute_schema_config.rbs
241
255
  - sig/turbopuffer/models/attribute_type.rbs
@@ -248,9 +262,12 @@ files:
248
262
  - sig/turbopuffer/models/copy_from_namespace_params.rbs
249
263
  - sig/turbopuffer/models/decay_params.rbs
250
264
  - sig/turbopuffer/models/distance_metric.rbs
265
+ - sig/turbopuffer/models/embed_params.rbs
251
266
  - sig/turbopuffer/models/encryption.rbs
252
267
  - sig/turbopuffer/models/full_text_search.rbs
253
268
  - sig/turbopuffer/models/full_text_search_config.rbs
269
+ - sig/turbopuffer/models/fuzzy_max_edit_distance.rbs
270
+ - sig/turbopuffer/models/fuzzy_params.rbs
254
271
  - sig/turbopuffer/models/id.rbs
255
272
  - sig/turbopuffer/models/include_attributes.rbs
256
273
  - sig/turbopuffer/models/language.rbs
@@ -286,6 +303,7 @@ files:
286
303
  - sig/turbopuffer/models/query_billing.rbs
287
304
  - sig/turbopuffer/models/query_performance.rbs
288
305
  - sig/turbopuffer/models/row.rbs
306
+ - sig/turbopuffer/models/rrf_params.rbs
289
307
  - sig/turbopuffer/models/saturate_params.rbs
290
308
  - sig/turbopuffer/models/sparse_distance_metric.rbs
291
309
  - sig/turbopuffer/models/tokenizer.rbs
@@ -314,9 +332,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
314
332
  version: 3.2.0
315
333
  required_rubygems_version: !ruby/object:Gem::Requirement
316
334
  requirements:
317
- - - ">="
335
+ - - ">"
318
336
  - !ruby/object:Gem::Version
319
- version: '0'
337
+ version: 1.3.1
320
338
  requirements: []
321
339
  rubygems_version: 3.4.1
322
340
  signing_key: