turbopuffer-ruby 0.2.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.
- checksums.yaml +7 -0
- data/.ignore +2 -0
- data/CHANGELOG.md +60 -0
- data/README.md +291 -0
- data/SECURITY.md +27 -0
- data/lib/turbopuffer/client.rb +130 -0
- data/lib/turbopuffer/errors.rb +214 -0
- data/lib/turbopuffer/file_part.rb +55 -0
- data/lib/turbopuffer/internal/namespace_page.rb +86 -0
- data/lib/turbopuffer/internal/transport/base_client.rb +563 -0
- data/lib/turbopuffer/internal/transport/pooled_net_requester.rb +209 -0
- data/lib/turbopuffer/internal/type/array_of.rb +167 -0
- data/lib/turbopuffer/internal/type/base_model.rb +534 -0
- data/lib/turbopuffer/internal/type/base_page.rb +55 -0
- data/lib/turbopuffer/internal/type/boolean.rb +77 -0
- data/lib/turbopuffer/internal/type/converter.rb +300 -0
- data/lib/turbopuffer/internal/type/enum.rb +152 -0
- data/lib/turbopuffer/internal/type/file_input.rb +108 -0
- data/lib/turbopuffer/internal/type/hash_of.rb +187 -0
- data/lib/turbopuffer/internal/type/request_parameters.rb +42 -0
- data/lib/turbopuffer/internal/type/union.rb +252 -0
- data/lib/turbopuffer/internal/type/unknown.rb +81 -0
- data/lib/turbopuffer/internal/util.rb +914 -0
- data/lib/turbopuffer/internal.rb +20 -0
- data/lib/turbopuffer/models/attribute_schema.rb +19 -0
- data/lib/turbopuffer/models/attribute_schema_config.rb +48 -0
- data/lib/turbopuffer/models/attribute_type.rb +7 -0
- data/lib/turbopuffer/models/client_namespaces_params.rb +38 -0
- data/lib/turbopuffer/models/columns.rb +64 -0
- data/lib/turbopuffer/models/distance_metric.rb +19 -0
- data/lib/turbopuffer/models/full_text_search.rb +20 -0
- data/lib/turbopuffer/models/full_text_search_config.rb +72 -0
- data/lib/turbopuffer/models/id.rb +19 -0
- data/lib/turbopuffer/models/include_attributes.rb +22 -0
- data/lib/turbopuffer/models/language.rb +32 -0
- data/lib/turbopuffer/models/namespace_delete_all_params.rb +20 -0
- data/lib/turbopuffer/models/namespace_delete_all_response.rb +19 -0
- data/lib/turbopuffer/models/namespace_hint_cache_warm_params.rb +20 -0
- data/lib/turbopuffer/models/namespace_hint_cache_warm_response.rb +26 -0
- data/lib/turbopuffer/models/namespace_metadata.rb +35 -0
- data/lib/turbopuffer/models/namespace_metadata_params.rb +20 -0
- data/lib/turbopuffer/models/namespace_multi_query_params.rb +73 -0
- data/lib/turbopuffer/models/namespace_multi_query_response.rb +51 -0
- data/lib/turbopuffer/models/namespace_query_params.rb +119 -0
- data/lib/turbopuffer/models/namespace_query_response.rb +41 -0
- data/lib/turbopuffer/models/namespace_recall_params.rb +57 -0
- data/lib/turbopuffer/models/namespace_recall_response.rb +39 -0
- data/lib/turbopuffer/models/namespace_schema_params.rb +20 -0
- data/lib/turbopuffer/models/namespace_schema_response.rb +8 -0
- data/lib/turbopuffer/models/namespace_summary.rb +19 -0
- data/lib/turbopuffer/models/namespace_update_schema_params.rb +29 -0
- data/lib/turbopuffer/models/namespace_update_schema_response.rb +9 -0
- data/lib/turbopuffer/models/namespace_write_params.rb +158 -0
- data/lib/turbopuffer/models/namespace_write_response.rb +67 -0
- data/lib/turbopuffer/models/query.rb +63 -0
- data/lib/turbopuffer/models/query_billing.rb +26 -0
- data/lib/turbopuffer/models/query_performance.rb +63 -0
- data/lib/turbopuffer/models/row.rb +38 -0
- data/lib/turbopuffer/models/tokenizer.rb +17 -0
- data/lib/turbopuffer/models/vector.rb +22 -0
- data/lib/turbopuffer/models/vector_encoding.rb +16 -0
- data/lib/turbopuffer/models/write_billing.rb +26 -0
- data/lib/turbopuffer/models.rb +101 -0
- data/lib/turbopuffer/namespace.rb +22 -0
- data/lib/turbopuffer/request_options.rb +77 -0
- data/lib/turbopuffer/resources/namespaces.rb +311 -0
- data/lib/turbopuffer/version.rb +5 -0
- data/lib/turbopuffer.rb +94 -0
- data/manifest.yaml +15 -0
- data/rbi/turbopuffer/client.rbi +91 -0
- data/rbi/turbopuffer/errors.rbi +178 -0
- data/rbi/turbopuffer/file_part.rbi +37 -0
- data/rbi/turbopuffer/internal/namespace_page.rbi +22 -0
- data/rbi/turbopuffer/internal/transport/base_client.rbi +298 -0
- data/rbi/turbopuffer/internal/transport/pooled_net_requester.rbi +80 -0
- data/rbi/turbopuffer/internal/type/array_of.rbi +104 -0
- data/rbi/turbopuffer/internal/type/base_model.rbi +304 -0
- data/rbi/turbopuffer/internal/type/base_page.rbi +43 -0
- data/rbi/turbopuffer/internal/type/boolean.rbi +58 -0
- data/rbi/turbopuffer/internal/type/converter.rbi +162 -0
- data/rbi/turbopuffer/internal/type/enum.rbi +82 -0
- data/rbi/turbopuffer/internal/type/file_input.rbi +59 -0
- data/rbi/turbopuffer/internal/type/hash_of.rbi +104 -0
- data/rbi/turbopuffer/internal/type/request_parameters.rbi +31 -0
- data/rbi/turbopuffer/internal/type/union.rbi +121 -0
- data/rbi/turbopuffer/internal/type/unknown.rbi +58 -0
- data/rbi/turbopuffer/internal/util.rbi +487 -0
- data/rbi/turbopuffer/internal.rbi +18 -0
- data/rbi/turbopuffer/models/attribute_schema.rbi +17 -0
- data/rbi/turbopuffer/models/attribute_schema_config.rbi +92 -0
- data/rbi/turbopuffer/models/attribute_type.rbi +7 -0
- data/rbi/turbopuffer/models/client_namespaces_params.rbi +71 -0
- data/rbi/turbopuffer/models/columns.rbi +82 -0
- data/rbi/turbopuffer/models/distance_metric.rbi +27 -0
- data/rbi/turbopuffer/models/full_text_search.rbi +19 -0
- data/rbi/turbopuffer/models/full_text_search_config.rbi +116 -0
- data/rbi/turbopuffer/models/id.rbi +16 -0
- data/rbi/turbopuffer/models/include_attributes.rbi +24 -0
- data/rbi/turbopuffer/models/language.rbi +36 -0
- data/rbi/turbopuffer/models/namespace_delete_all_params.rbi +41 -0
- data/rbi/turbopuffer/models/namespace_delete_all_response.rbi +31 -0
- data/rbi/turbopuffer/models/namespace_hint_cache_warm_params.rbi +41 -0
- data/rbi/turbopuffer/models/namespace_hint_cache_warm_response.rbi +38 -0
- data/rbi/turbopuffer/models/namespace_metadata.rbi +54 -0
- data/rbi/turbopuffer/models/namespace_metadata_params.rbi +41 -0
- data/rbi/turbopuffer/models/namespace_multi_query_params.rbi +175 -0
- data/rbi/turbopuffer/models/namespace_multi_query_response.rbi +111 -0
- data/rbi/turbopuffer/models/namespace_query_params.rbi +241 -0
- data/rbi/turbopuffer/models/namespace_query_response.rbi +73 -0
- data/rbi/turbopuffer/models/namespace_recall_params.rbi +93 -0
- data/rbi/turbopuffer/models/namespace_recall_response.rbi +59 -0
- data/rbi/turbopuffer/models/namespace_schema_params.rbi +41 -0
- data/rbi/turbopuffer/models/namespace_schema_response.rbi +11 -0
- data/rbi/turbopuffer/models/namespace_summary.rbi +28 -0
- data/rbi/turbopuffer/models/namespace_update_schema_params.rbi +80 -0
- data/rbi/turbopuffer/models/namespace_update_schema_response.rbi +11 -0
- data/rbi/turbopuffer/models/namespace_write_params.rbi +290 -0
- data/rbi/turbopuffer/models/namespace_write_response.rbi +101 -0
- data/rbi/turbopuffer/models/query.rbi +106 -0
- data/rbi/turbopuffer/models/query_billing.rbi +46 -0
- data/rbi/turbopuffer/models/query_performance.rbi +82 -0
- data/rbi/turbopuffer/models/row.rbi +47 -0
- data/rbi/turbopuffer/models/tokenizer.rbi +22 -0
- data/rbi/turbopuffer/models/vector.rbi +22 -0
- data/rbi/turbopuffer/models/vector_encoding.rbi +22 -0
- data/rbi/turbopuffer/models/write_billing.rbi +49 -0
- data/rbi/turbopuffer/models.rbi +64 -0
- data/rbi/turbopuffer/namespace.rbi +8 -0
- data/rbi/turbopuffer/request_options.rbi +59 -0
- data/rbi/turbopuffer/resources/namespaces.rbi +243 -0
- data/rbi/turbopuffer/version.rbi +5 -0
- data/sig/turbopuffer/client.rbs +41 -0
- data/sig/turbopuffer/errors.rbs +110 -0
- data/sig/turbopuffer/file_part.rbs +21 -0
- data/sig/turbopuffer/internal/namespace_page.rbs +13 -0
- data/sig/turbopuffer/internal/transport/base_client.rbs +131 -0
- data/sig/turbopuffer/internal/transport/pooled_net_requester.rbs +45 -0
- data/sig/turbopuffer/internal/type/array_of.rbs +48 -0
- data/sig/turbopuffer/internal/type/base_model.rbs +102 -0
- data/sig/turbopuffer/internal/type/base_page.rbs +24 -0
- data/sig/turbopuffer/internal/type/boolean.rbs +26 -0
- data/sig/turbopuffer/internal/type/converter.rbs +62 -0
- data/sig/turbopuffer/internal/type/enum.rbs +32 -0
- data/sig/turbopuffer/internal/type/file_input.rbs +25 -0
- data/sig/turbopuffer/internal/type/hash_of.rbs +48 -0
- data/sig/turbopuffer/internal/type/request_parameters.rbs +19 -0
- data/sig/turbopuffer/internal/type/union.rbs +52 -0
- data/sig/turbopuffer/internal/type/unknown.rbs +26 -0
- data/sig/turbopuffer/internal/util.rbs +185 -0
- data/sig/turbopuffer/internal.rbs +9 -0
- data/sig/turbopuffer/models/attribute_schema.rbs +11 -0
- data/sig/turbopuffer/models/attribute_schema_config.rbs +45 -0
- data/sig/turbopuffer/models/attribute_type.rbs +5 -0
- data/sig/turbopuffer/models/client_namespaces_params.rbs +38 -0
- data/sig/turbopuffer/models/columns.rbs +42 -0
- data/sig/turbopuffer/models/distance_metric.rbs +17 -0
- data/sig/turbopuffer/models/full_text_search.rbs +11 -0
- data/sig/turbopuffer/models/full_text_search_config.rbs +68 -0
- data/sig/turbopuffer/models/id.rbs +11 -0
- data/sig/turbopuffer/models/include_attributes.rbs +13 -0
- data/sig/turbopuffer/models/language.rbs +48 -0
- data/sig/turbopuffer/models/namespace_delete_all_params.rbs +25 -0
- data/sig/turbopuffer/models/namespace_delete_all_response.rbs +13 -0
- data/sig/turbopuffer/models/namespace_hint_cache_warm_params.rbs +25 -0
- data/sig/turbopuffer/models/namespace_hint_cache_warm_response.rbs +17 -0
- data/sig/turbopuffer/models/namespace_metadata.rbs +30 -0
- data/sig/turbopuffer/models/namespace_metadata_params.rbs +25 -0
- data/sig/turbopuffer/models/namespace_multi_query_params.rbs +86 -0
- data/sig/turbopuffer/models/namespace_multi_query_response.rbs +53 -0
- data/sig/turbopuffer/models/namespace_query_params.rbs +125 -0
- data/sig/turbopuffer/models/namespace_query_response.rbs +39 -0
- data/sig/turbopuffer/models/namespace_recall_params.rbs +56 -0
- data/sig/turbopuffer/models/namespace_recall_response.rbs +26 -0
- data/sig/turbopuffer/models/namespace_schema_params.rbs +25 -0
- data/sig/turbopuffer/models/namespace_schema_response.rbs +8 -0
- data/sig/turbopuffer/models/namespace_summary.rbs +13 -0
- data/sig/turbopuffer/models/namespace_update_schema_params.rbs +37 -0
- data/sig/turbopuffer/models/namespace_update_schema_response.rbs +8 -0
- data/sig/turbopuffer/models/namespace_write_params.rbs +156 -0
- data/sig/turbopuffer/models/namespace_write_response.rbs +56 -0
- data/sig/turbopuffer/models/query.rbs +61 -0
- data/sig/turbopuffer/models/query_billing.rbs +25 -0
- data/sig/turbopuffer/models/query_performance.rbs +45 -0
- data/sig/turbopuffer/models/row.rbs +24 -0
- data/sig/turbopuffer/models/tokenizer.rbs +15 -0
- data/sig/turbopuffer/models/vector.rbs +13 -0
- data/sig/turbopuffer/models/vector_encoding.rbs +14 -0
- data/sig/turbopuffer/models/write_billing.rbs +27 -0
- data/sig/turbopuffer/models.rbs +61 -0
- data/sig/turbopuffer/namespace.rbs +5 -0
- data/sig/turbopuffer/request_options.rbs +36 -0
- data/sig/turbopuffer/resources/namespaces.rbs +81 -0
- data/sig/turbopuffer/version.rbs +3 -0
- metadata +251 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
module Turbopuffer
|
2
|
+
module Models
|
3
|
+
type namespace_query_response =
|
4
|
+
{
|
5
|
+
billing: Turbopuffer::QueryBilling,
|
6
|
+
performance: Turbopuffer::QueryPerformance,
|
7
|
+
aggregations: ::Hash[Symbol, top],
|
8
|
+
rows: ::Array[Turbopuffer::Row]
|
9
|
+
}
|
10
|
+
|
11
|
+
class NamespaceQueryResponse < Turbopuffer::Internal::Type::BaseModel
|
12
|
+
attr_accessor billing: Turbopuffer::QueryBilling
|
13
|
+
|
14
|
+
attr_accessor performance: Turbopuffer::QueryPerformance
|
15
|
+
|
16
|
+
attr_reader aggregations: ::Hash[Symbol, top]?
|
17
|
+
|
18
|
+
def aggregations=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
19
|
+
|
20
|
+
attr_reader rows: ::Array[Turbopuffer::Row]?
|
21
|
+
|
22
|
+
def rows=: (::Array[Turbopuffer::Row]) -> ::Array[Turbopuffer::Row]
|
23
|
+
|
24
|
+
def initialize: (
|
25
|
+
billing: Turbopuffer::QueryBilling,
|
26
|
+
performance: Turbopuffer::QueryPerformance,
|
27
|
+
?aggregations: ::Hash[Symbol, top],
|
28
|
+
?rows: ::Array[Turbopuffer::Row]
|
29
|
+
) -> void
|
30
|
+
|
31
|
+
def to_hash: -> {
|
32
|
+
billing: Turbopuffer::QueryBilling,
|
33
|
+
performance: Turbopuffer::QueryPerformance,
|
34
|
+
aggregations: ::Hash[Symbol, top],
|
35
|
+
rows: ::Array[Turbopuffer::Row]
|
36
|
+
}
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module Turbopuffer
|
2
|
+
module Models
|
3
|
+
type namespace_recall_params =
|
4
|
+
{
|
5
|
+
namespace: String,
|
6
|
+
filters: top,
|
7
|
+
num: Integer,
|
8
|
+
queries: ::Array[Float],
|
9
|
+
top_k: Integer
|
10
|
+
}
|
11
|
+
& Turbopuffer::Internal::Type::request_parameters
|
12
|
+
|
13
|
+
class NamespaceRecallParams < Turbopuffer::Internal::Type::BaseModel
|
14
|
+
extend Turbopuffer::Internal::Type::RequestParameters::Converter
|
15
|
+
include Turbopuffer::Internal::Type::RequestParameters
|
16
|
+
|
17
|
+
attr_reader namespace: String?
|
18
|
+
|
19
|
+
def namespace=: (String) -> String
|
20
|
+
|
21
|
+
attr_reader filters: top?
|
22
|
+
|
23
|
+
def filters=: (top) -> top
|
24
|
+
|
25
|
+
attr_reader num: Integer?
|
26
|
+
|
27
|
+
def num=: (Integer) -> Integer
|
28
|
+
|
29
|
+
attr_reader queries: ::Array[Float]?
|
30
|
+
|
31
|
+
def queries=: (::Array[Float]) -> ::Array[Float]
|
32
|
+
|
33
|
+
attr_reader top_k: Integer?
|
34
|
+
|
35
|
+
def top_k=: (Integer) -> Integer
|
36
|
+
|
37
|
+
def initialize: (
|
38
|
+
?namespace: String,
|
39
|
+
?filters: top,
|
40
|
+
?num: Integer,
|
41
|
+
?queries: ::Array[Float],
|
42
|
+
?top_k: Integer,
|
43
|
+
?request_options: Turbopuffer::request_opts
|
44
|
+
) -> void
|
45
|
+
|
46
|
+
def to_hash: -> {
|
47
|
+
namespace: String,
|
48
|
+
filters: top,
|
49
|
+
num: Integer,
|
50
|
+
queries: ::Array[Float],
|
51
|
+
top_k: Integer,
|
52
|
+
request_options: Turbopuffer::RequestOptions
|
53
|
+
}
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Turbopuffer
|
2
|
+
module Models
|
3
|
+
type namespace_recall_response =
|
4
|
+
{ avg_ann_count: Float, avg_exhaustive_count: Float, avg_recall: Float }
|
5
|
+
|
6
|
+
class NamespaceRecallResponse < Turbopuffer::Internal::Type::BaseModel
|
7
|
+
attr_accessor avg_ann_count: Float
|
8
|
+
|
9
|
+
attr_accessor avg_exhaustive_count: Float
|
10
|
+
|
11
|
+
attr_accessor avg_recall: Float
|
12
|
+
|
13
|
+
def initialize: (
|
14
|
+
avg_ann_count: Float,
|
15
|
+
avg_exhaustive_count: Float,
|
16
|
+
avg_recall: Float
|
17
|
+
) -> void
|
18
|
+
|
19
|
+
def to_hash: -> {
|
20
|
+
avg_ann_count: Float,
|
21
|
+
avg_exhaustive_count: Float,
|
22
|
+
avg_recall: Float
|
23
|
+
}
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Turbopuffer
|
2
|
+
module Models
|
3
|
+
type namespace_schema_params =
|
4
|
+
{ namespace: String } & Turbopuffer::Internal::Type::request_parameters
|
5
|
+
|
6
|
+
class NamespaceSchemaParams < Turbopuffer::Internal::Type::BaseModel
|
7
|
+
extend Turbopuffer::Internal::Type::RequestParameters::Converter
|
8
|
+
include Turbopuffer::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
attr_reader namespace: String?
|
11
|
+
|
12
|
+
def namespace=: (String) -> String
|
13
|
+
|
14
|
+
def initialize: (
|
15
|
+
?namespace: String,
|
16
|
+
?request_options: Turbopuffer::request_opts
|
17
|
+
) -> void
|
18
|
+
|
19
|
+
def to_hash: -> {
|
20
|
+
namespace: String,
|
21
|
+
request_options: Turbopuffer::RequestOptions
|
22
|
+
}
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Turbopuffer
|
2
|
+
module Models
|
3
|
+
type namespace_summary = { id: String }
|
4
|
+
|
5
|
+
class NamespaceSummary < Turbopuffer::Internal::Type::BaseModel
|
6
|
+
attr_accessor id: String
|
7
|
+
|
8
|
+
def initialize: (id: String) -> void
|
9
|
+
|
10
|
+
def to_hash: -> { id: String }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Turbopuffer
|
2
|
+
module Models
|
3
|
+
type namespace_update_schema_params =
|
4
|
+
{
|
5
|
+
namespace: String,
|
6
|
+
schema: ::Hash[Symbol, Turbopuffer::Models::attribute_schema]
|
7
|
+
}
|
8
|
+
& Turbopuffer::Internal::Type::request_parameters
|
9
|
+
|
10
|
+
class NamespaceUpdateSchemaParams < Turbopuffer::Internal::Type::BaseModel
|
11
|
+
extend Turbopuffer::Internal::Type::RequestParameters::Converter
|
12
|
+
include Turbopuffer::Internal::Type::RequestParameters
|
13
|
+
|
14
|
+
attr_reader namespace: String?
|
15
|
+
|
16
|
+
def namespace=: (String) -> String
|
17
|
+
|
18
|
+
attr_reader schema: ::Hash[Symbol, Turbopuffer::Models::attribute_schema]?
|
19
|
+
|
20
|
+
def schema=: (
|
21
|
+
::Hash[Symbol, Turbopuffer::Models::attribute_schema]
|
22
|
+
) -> ::Hash[Symbol, Turbopuffer::Models::attribute_schema]
|
23
|
+
|
24
|
+
def initialize: (
|
25
|
+
?namespace: String,
|
26
|
+
?schema: ::Hash[Symbol, Turbopuffer::Models::attribute_schema],
|
27
|
+
?request_options: Turbopuffer::request_opts
|
28
|
+
) -> void
|
29
|
+
|
30
|
+
def to_hash: -> {
|
31
|
+
namespace: String,
|
32
|
+
schema: ::Hash[Symbol, Turbopuffer::Models::attribute_schema],
|
33
|
+
request_options: Turbopuffer::RequestOptions
|
34
|
+
}
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,156 @@
|
|
1
|
+
module Turbopuffer
|
2
|
+
module Models
|
3
|
+
type namespace_write_params =
|
4
|
+
{
|
5
|
+
namespace: String,
|
6
|
+
copy_from_namespace: String,
|
7
|
+
delete_by_filter: top,
|
8
|
+
delete_condition: top,
|
9
|
+
deletes: ::Array[Turbopuffer::Models::id],
|
10
|
+
distance_metric: Turbopuffer::Models::distance_metric,
|
11
|
+
encryption: Turbopuffer::NamespaceWriteParams::Encryption,
|
12
|
+
patch_columns: Turbopuffer::Columns,
|
13
|
+
patch_condition: top,
|
14
|
+
patch_rows: ::Array[Turbopuffer::Row],
|
15
|
+
schema: ::Hash[Symbol, Turbopuffer::Models::attribute_schema],
|
16
|
+
upsert_columns: Turbopuffer::Columns,
|
17
|
+
upsert_condition: top,
|
18
|
+
upsert_rows: ::Array[Turbopuffer::Row]
|
19
|
+
}
|
20
|
+
& Turbopuffer::Internal::Type::request_parameters
|
21
|
+
|
22
|
+
class NamespaceWriteParams < Turbopuffer::Internal::Type::BaseModel
|
23
|
+
extend Turbopuffer::Internal::Type::RequestParameters::Converter
|
24
|
+
include Turbopuffer::Internal::Type::RequestParameters
|
25
|
+
|
26
|
+
attr_reader namespace: String?
|
27
|
+
|
28
|
+
def namespace=: (String) -> String
|
29
|
+
|
30
|
+
attr_reader copy_from_namespace: String?
|
31
|
+
|
32
|
+
def copy_from_namespace=: (String) -> String
|
33
|
+
|
34
|
+
attr_reader delete_by_filter: top?
|
35
|
+
|
36
|
+
def delete_by_filter=: (top) -> top
|
37
|
+
|
38
|
+
attr_reader delete_condition: top?
|
39
|
+
|
40
|
+
def delete_condition=: (top) -> top
|
41
|
+
|
42
|
+
attr_reader deletes: ::Array[Turbopuffer::Models::id]?
|
43
|
+
|
44
|
+
def deletes=: (
|
45
|
+
::Array[Turbopuffer::Models::id]
|
46
|
+
) -> ::Array[Turbopuffer::Models::id]
|
47
|
+
|
48
|
+
attr_reader distance_metric: Turbopuffer::Models::distance_metric?
|
49
|
+
|
50
|
+
def distance_metric=: (
|
51
|
+
Turbopuffer::Models::distance_metric
|
52
|
+
) -> Turbopuffer::Models::distance_metric
|
53
|
+
|
54
|
+
attr_reader encryption: Turbopuffer::NamespaceWriteParams::Encryption?
|
55
|
+
|
56
|
+
def encryption=: (
|
57
|
+
Turbopuffer::NamespaceWriteParams::Encryption
|
58
|
+
) -> Turbopuffer::NamespaceWriteParams::Encryption
|
59
|
+
|
60
|
+
attr_reader patch_columns: Turbopuffer::Columns?
|
61
|
+
|
62
|
+
def patch_columns=: (Turbopuffer::Columns) -> Turbopuffer::Columns
|
63
|
+
|
64
|
+
attr_reader patch_condition: top?
|
65
|
+
|
66
|
+
def patch_condition=: (top) -> top
|
67
|
+
|
68
|
+
attr_reader patch_rows: ::Array[Turbopuffer::Row]?
|
69
|
+
|
70
|
+
def patch_rows=: (::Array[Turbopuffer::Row]) -> ::Array[Turbopuffer::Row]
|
71
|
+
|
72
|
+
attr_reader schema: ::Hash[Symbol, Turbopuffer::Models::attribute_schema]?
|
73
|
+
|
74
|
+
def schema=: (
|
75
|
+
::Hash[Symbol, Turbopuffer::Models::attribute_schema]
|
76
|
+
) -> ::Hash[Symbol, Turbopuffer::Models::attribute_schema]
|
77
|
+
|
78
|
+
attr_reader upsert_columns: Turbopuffer::Columns?
|
79
|
+
|
80
|
+
def upsert_columns=: (Turbopuffer::Columns) -> Turbopuffer::Columns
|
81
|
+
|
82
|
+
attr_reader upsert_condition: top?
|
83
|
+
|
84
|
+
def upsert_condition=: (top) -> top
|
85
|
+
|
86
|
+
attr_reader upsert_rows: ::Array[Turbopuffer::Row]?
|
87
|
+
|
88
|
+
def upsert_rows=: (::Array[Turbopuffer::Row]) -> ::Array[Turbopuffer::Row]
|
89
|
+
|
90
|
+
def initialize: (
|
91
|
+
?namespace: String,
|
92
|
+
?copy_from_namespace: String,
|
93
|
+
?delete_by_filter: top,
|
94
|
+
?delete_condition: top,
|
95
|
+
?deletes: ::Array[Turbopuffer::Models::id],
|
96
|
+
?distance_metric: Turbopuffer::Models::distance_metric,
|
97
|
+
?encryption: Turbopuffer::NamespaceWriteParams::Encryption,
|
98
|
+
?patch_columns: Turbopuffer::Columns,
|
99
|
+
?patch_condition: top,
|
100
|
+
?patch_rows: ::Array[Turbopuffer::Row],
|
101
|
+
?schema: ::Hash[Symbol, Turbopuffer::Models::attribute_schema],
|
102
|
+
?upsert_columns: Turbopuffer::Columns,
|
103
|
+
?upsert_condition: top,
|
104
|
+
?upsert_rows: ::Array[Turbopuffer::Row],
|
105
|
+
?request_options: Turbopuffer::request_opts
|
106
|
+
) -> void
|
107
|
+
|
108
|
+
def to_hash: -> {
|
109
|
+
namespace: String,
|
110
|
+
copy_from_namespace: String,
|
111
|
+
delete_by_filter: top,
|
112
|
+
delete_condition: top,
|
113
|
+
deletes: ::Array[Turbopuffer::Models::id],
|
114
|
+
distance_metric: Turbopuffer::Models::distance_metric,
|
115
|
+
encryption: Turbopuffer::NamespaceWriteParams::Encryption,
|
116
|
+
patch_columns: Turbopuffer::Columns,
|
117
|
+
patch_condition: top,
|
118
|
+
patch_rows: ::Array[Turbopuffer::Row],
|
119
|
+
schema: ::Hash[Symbol, Turbopuffer::Models::attribute_schema],
|
120
|
+
upsert_columns: Turbopuffer::Columns,
|
121
|
+
upsert_condition: top,
|
122
|
+
upsert_rows: ::Array[Turbopuffer::Row],
|
123
|
+
request_options: Turbopuffer::RequestOptions
|
124
|
+
}
|
125
|
+
|
126
|
+
type encryption =
|
127
|
+
{ cmek: Turbopuffer::NamespaceWriteParams::Encryption::Cmek }
|
128
|
+
|
129
|
+
class Encryption < Turbopuffer::Internal::Type::BaseModel
|
130
|
+
attr_reader cmek: Turbopuffer::NamespaceWriteParams::Encryption::Cmek?
|
131
|
+
|
132
|
+
def cmek=: (
|
133
|
+
Turbopuffer::NamespaceWriteParams::Encryption::Cmek
|
134
|
+
) -> Turbopuffer::NamespaceWriteParams::Encryption::Cmek
|
135
|
+
|
136
|
+
def initialize: (
|
137
|
+
?cmek: Turbopuffer::NamespaceWriteParams::Encryption::Cmek
|
138
|
+
) -> void
|
139
|
+
|
140
|
+
def to_hash: -> {
|
141
|
+
cmek: Turbopuffer::NamespaceWriteParams::Encryption::Cmek
|
142
|
+
}
|
143
|
+
|
144
|
+
type cmek = { key_name: String }
|
145
|
+
|
146
|
+
class Cmek < Turbopuffer::Internal::Type::BaseModel
|
147
|
+
attr_accessor key_name: String
|
148
|
+
|
149
|
+
def initialize: (key_name: String) -> void
|
150
|
+
|
151
|
+
def to_hash: -> { key_name: String }
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module Turbopuffer
|
2
|
+
module Models
|
3
|
+
type namespace_write_response =
|
4
|
+
{
|
5
|
+
billing: Turbopuffer::WriteBilling,
|
6
|
+
message: String,
|
7
|
+
rows_affected: Integer,
|
8
|
+
status: :OK,
|
9
|
+
rows_deleted: Integer,
|
10
|
+
rows_patched: Integer,
|
11
|
+
rows_upserted: Integer
|
12
|
+
}
|
13
|
+
|
14
|
+
class NamespaceWriteResponse < Turbopuffer::Internal::Type::BaseModel
|
15
|
+
attr_accessor billing: Turbopuffer::WriteBilling
|
16
|
+
|
17
|
+
attr_accessor message: String
|
18
|
+
|
19
|
+
attr_accessor rows_affected: Integer
|
20
|
+
|
21
|
+
attr_accessor status: :OK
|
22
|
+
|
23
|
+
attr_reader rows_deleted: Integer?
|
24
|
+
|
25
|
+
def rows_deleted=: (Integer) -> Integer
|
26
|
+
|
27
|
+
attr_reader rows_patched: Integer?
|
28
|
+
|
29
|
+
def rows_patched=: (Integer) -> Integer
|
30
|
+
|
31
|
+
attr_reader rows_upserted: Integer?
|
32
|
+
|
33
|
+
def rows_upserted=: (Integer) -> Integer
|
34
|
+
|
35
|
+
def initialize: (
|
36
|
+
billing: Turbopuffer::WriteBilling,
|
37
|
+
message: String,
|
38
|
+
rows_affected: Integer,
|
39
|
+
?rows_deleted: Integer,
|
40
|
+
?rows_patched: Integer,
|
41
|
+
?rows_upserted: Integer,
|
42
|
+
?status: :OK
|
43
|
+
) -> void
|
44
|
+
|
45
|
+
def to_hash: -> {
|
46
|
+
billing: Turbopuffer::WriteBilling,
|
47
|
+
message: String,
|
48
|
+
rows_affected: Integer,
|
49
|
+
status: :OK,
|
50
|
+
rows_deleted: Integer,
|
51
|
+
rows_patched: Integer,
|
52
|
+
rows_upserted: Integer
|
53
|
+
}
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module Turbopuffer
|
2
|
+
module Models
|
3
|
+
type query =
|
4
|
+
{
|
5
|
+
aggregate_by: ::Hash[Symbol, top],
|
6
|
+
distance_metric: Turbopuffer::Models::distance_metric,
|
7
|
+
filters: top,
|
8
|
+
include_attributes: Turbopuffer::Models::include_attributes,
|
9
|
+
rank_by: top,
|
10
|
+
top_k: Integer
|
11
|
+
}
|
12
|
+
|
13
|
+
class Query < Turbopuffer::Internal::Type::BaseModel
|
14
|
+
attr_reader aggregate_by: ::Hash[Symbol, top]?
|
15
|
+
|
16
|
+
def aggregate_by=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
17
|
+
|
18
|
+
attr_reader distance_metric: Turbopuffer::Models::distance_metric?
|
19
|
+
|
20
|
+
def distance_metric=: (
|
21
|
+
Turbopuffer::Models::distance_metric
|
22
|
+
) -> Turbopuffer::Models::distance_metric
|
23
|
+
|
24
|
+
attr_reader filters: top?
|
25
|
+
|
26
|
+
def filters=: (top) -> top
|
27
|
+
|
28
|
+
attr_reader include_attributes: Turbopuffer::Models::include_attributes?
|
29
|
+
|
30
|
+
def include_attributes=: (
|
31
|
+
Turbopuffer::Models::include_attributes
|
32
|
+
) -> Turbopuffer::Models::include_attributes
|
33
|
+
|
34
|
+
attr_reader rank_by: top?
|
35
|
+
|
36
|
+
def rank_by=: (top) -> top
|
37
|
+
|
38
|
+
attr_reader top_k: Integer?
|
39
|
+
|
40
|
+
def top_k=: (Integer) -> Integer
|
41
|
+
|
42
|
+
def initialize: (
|
43
|
+
?aggregate_by: ::Hash[Symbol, top],
|
44
|
+
?distance_metric: Turbopuffer::Models::distance_metric,
|
45
|
+
?filters: top,
|
46
|
+
?include_attributes: Turbopuffer::Models::include_attributes,
|
47
|
+
?rank_by: top,
|
48
|
+
?top_k: Integer
|
49
|
+
) -> void
|
50
|
+
|
51
|
+
def to_hash: -> {
|
52
|
+
aggregate_by: ::Hash[Symbol, top],
|
53
|
+
distance_metric: Turbopuffer::Models::distance_metric,
|
54
|
+
filters: top,
|
55
|
+
include_attributes: Turbopuffer::Models::include_attributes,
|
56
|
+
rank_by: top,
|
57
|
+
top_k: Integer
|
58
|
+
}
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Turbopuffer
|
2
|
+
module Models
|
3
|
+
type query_billing =
|
4
|
+
{
|
5
|
+
billable_logical_bytes_queried: Integer,
|
6
|
+
billable_logical_bytes_returned: Integer
|
7
|
+
}
|
8
|
+
|
9
|
+
class QueryBilling < Turbopuffer::Internal::Type::BaseModel
|
10
|
+
attr_accessor billable_logical_bytes_queried: Integer
|
11
|
+
|
12
|
+
attr_accessor billable_logical_bytes_returned: Integer
|
13
|
+
|
14
|
+
def initialize: (
|
15
|
+
billable_logical_bytes_queried: Integer,
|
16
|
+
billable_logical_bytes_returned: Integer
|
17
|
+
) -> void
|
18
|
+
|
19
|
+
def to_hash: -> {
|
20
|
+
billable_logical_bytes_queried: Integer,
|
21
|
+
billable_logical_bytes_returned: Integer
|
22
|
+
}
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module Turbopuffer
|
2
|
+
module Models
|
3
|
+
type query_performance =
|
4
|
+
{
|
5
|
+
approx_namespace_size: Integer,
|
6
|
+
cache_hit_ratio: Float,
|
7
|
+
cache_temperature: String,
|
8
|
+
exhaustive_search_count: Integer,
|
9
|
+
query_execution_ms: Integer,
|
10
|
+
server_total_ms: Integer
|
11
|
+
}
|
12
|
+
|
13
|
+
class QueryPerformance < Turbopuffer::Internal::Type::BaseModel
|
14
|
+
attr_accessor approx_namespace_size: Integer
|
15
|
+
|
16
|
+
attr_accessor cache_hit_ratio: Float
|
17
|
+
|
18
|
+
attr_accessor cache_temperature: String
|
19
|
+
|
20
|
+
attr_accessor exhaustive_search_count: Integer
|
21
|
+
|
22
|
+
attr_accessor query_execution_ms: Integer
|
23
|
+
|
24
|
+
attr_accessor server_total_ms: Integer
|
25
|
+
|
26
|
+
def initialize: (
|
27
|
+
approx_namespace_size: Integer,
|
28
|
+
cache_hit_ratio: Float,
|
29
|
+
cache_temperature: String,
|
30
|
+
exhaustive_search_count: Integer,
|
31
|
+
query_execution_ms: Integer,
|
32
|
+
server_total_ms: Integer
|
33
|
+
) -> void
|
34
|
+
|
35
|
+
def to_hash: -> {
|
36
|
+
approx_namespace_size: Integer,
|
37
|
+
cache_hit_ratio: Float,
|
38
|
+
cache_temperature: String,
|
39
|
+
exhaustive_search_count: Integer,
|
40
|
+
query_execution_ms: Integer,
|
41
|
+
server_total_ms: Integer
|
42
|
+
}
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Turbopuffer
|
2
|
+
module Models
|
3
|
+
type row =
|
4
|
+
{ id: Turbopuffer::Models::id, vector: Turbopuffer::Models::vector }
|
5
|
+
|
6
|
+
class Row < Turbopuffer::Internal::Type::BaseModel
|
7
|
+
attr_accessor id: Turbopuffer::Models::id
|
8
|
+
|
9
|
+
attr_reader vector: Turbopuffer::Models::vector?
|
10
|
+
|
11
|
+
def vector=: (Turbopuffer::Models::vector) -> Turbopuffer::Models::vector
|
12
|
+
|
13
|
+
def initialize: (
|
14
|
+
id: Turbopuffer::Models::id,
|
15
|
+
?vector: Turbopuffer::Models::vector
|
16
|
+
) -> void
|
17
|
+
|
18
|
+
def to_hash: -> {
|
19
|
+
id: Turbopuffer::Models::id,
|
20
|
+
vector: Turbopuffer::Models::vector
|
21
|
+
}
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Turbopuffer
|
2
|
+
module Models
|
3
|
+
type tokenizer = :pre_tokenized_array | :word_v0 | :word_v1
|
4
|
+
|
5
|
+
module Tokenizer
|
6
|
+
extend Turbopuffer::Internal::Type::Enum
|
7
|
+
|
8
|
+
PRE_TOKENIZED_ARRAY: :pre_tokenized_array
|
9
|
+
WORD_V0: :word_v0
|
10
|
+
WORD_V1: :word_v1
|
11
|
+
|
12
|
+
def self?.values: -> ::Array[Turbopuffer::Models::tokenizer]
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Turbopuffer
|
2
|
+
module Models
|
3
|
+
type vector = ::Array[Float] | String
|
4
|
+
|
5
|
+
module Vector
|
6
|
+
extend Turbopuffer::Internal::Type::Union
|
7
|
+
|
8
|
+
def self?.variants: -> ::Array[Turbopuffer::Models::vector]
|
9
|
+
|
10
|
+
FloatArray: Turbopuffer::Internal::Type::Converter
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Turbopuffer
|
2
|
+
module Models
|
3
|
+
type vector_encoding = :float | :base64
|
4
|
+
|
5
|
+
module VectorEncoding
|
6
|
+
extend Turbopuffer::Internal::Type::Enum
|
7
|
+
|
8
|
+
FLOAT: :float
|
9
|
+
BASE64: :base64
|
10
|
+
|
11
|
+
def self?.values: -> ::Array[Turbopuffer::Models::vector_encoding]
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Turbopuffer
|
2
|
+
module Models
|
3
|
+
type write_billing =
|
4
|
+
{
|
5
|
+
billable_logical_bytes_written: Integer,
|
6
|
+
query: Turbopuffer::QueryBilling
|
7
|
+
}
|
8
|
+
|
9
|
+
class WriteBilling < Turbopuffer::Internal::Type::BaseModel
|
10
|
+
attr_accessor billable_logical_bytes_written: Integer
|
11
|
+
|
12
|
+
attr_reader query: Turbopuffer::QueryBilling?
|
13
|
+
|
14
|
+
def query=: (Turbopuffer::QueryBilling) -> Turbopuffer::QueryBilling
|
15
|
+
|
16
|
+
def initialize: (
|
17
|
+
billable_logical_bytes_written: Integer,
|
18
|
+
?query: Turbopuffer::QueryBilling
|
19
|
+
) -> void
|
20
|
+
|
21
|
+
def to_hash: -> {
|
22
|
+
billable_logical_bytes_written: Integer,
|
23
|
+
query: Turbopuffer::QueryBilling
|
24
|
+
}
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|