source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/client.rb
Ruby
mit
10
main
4,505
# frozen_string_literal: true module Turbopuffer class Client < Turbopuffer::Internal::Transport::BaseClient # Default max number of retries to attempt after a failed retryable request. DEFAULT_MAX_RETRIES = 4 # Default per-request timeout. DEFAULT_TIMEOUT_IN_SECONDS = 60.0 # Default initial re...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/request_options.rb
Ruby
mit
10
main
2,912
# frozen_string_literal: true module Turbopuffer # Specify HTTP behaviour to use for a specific request. These options supplement # or override those provided at the client level. # # When making a request, you can pass an actual {RequestOptions} instance, or # simply pass a Hash with symbol keys matching th...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models.rb
Ruby
mit
10
main
4,457
# frozen_string_literal: true module Turbopuffer [Turbopuffer::Internal::Type::BaseModel, *Turbopuffer::Internal::Type::BaseModel.subclasses].each do |cls| cls.define_sorbet_constant!(:OrHash) { T.type_alias { T.any(cls, Turbopuffer::Internal::AnyHash) } } end Turbopuffer::Internal::Util.walk_namespaces(Tur...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/internal.rb
Ruby
mit
10
main
522
# frozen_string_literal: true module Turbopuffer module Internal extend Turbopuffer::Internal::Util::SorbetRuntimeSupport OMIT = Object.new.tap do _1.define_singleton_method(:inspect) { "#<#{Turbopuffer::Internal}::OMIT>" } end .freeze define_sorbet_constant!(:AnyHash) do ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/file_part.rb
Ruby
mit
10
main
1,249
# frozen_string_literal: true module Turbopuffer class FilePart # @return [Pathname, StringIO, IO, String] attr_reader :content # @return [String, nil] attr_reader :content_type # @return [String, nil] attr_reader :filename # @api private # # @return [String] private def re...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/namespace.rb
Ruby
mit
10
main
494
# frozen_string_literal: true module Turbopuffer class Namespace < Turbopuffer::Resources::Namespaces # Returns the namespace ID. # # @return [String] def id @client.default_namespace end # @api private # # @param client [Turbopuffer::Client] # @param namespace [String] ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_update_schema_response.rb
Ruby
mit
10
main
250
# frozen_string_literal: true module Turbopuffer module Models # @type [Turbopuffer::Internal::Type::Converter] NamespaceUpdateSchemaResponse = Turbopuffer::Internal::Type::HashOf[-> { Turbopuffer::AttributeSchemaConfig }] end end
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_write_response.rb
Ruby
mit
10
main
4,632
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#write class NamespaceWriteResponse < Turbopuffer::Internal::Type::BaseModel # @!attribute billing # The billing information for a write request. # # @return [Turbopuffer::Model...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_hint_cache_warm_params.rb
Ruby
mit
10
main
650
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#hint_cache_warm class NamespaceHintCacheWarmParams < Turbopuffer::Internal::Type::BaseModel extend Turbopuffer::Internal::Type::RequestParameters::Converter include Turbopuffer::Internal::Type...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/query.rb
Ruby
mit
10
main
4,153
# frozen_string_literal: true module Turbopuffer module Models class Query < Turbopuffer::Internal::Type::BaseModel # @!attribute aggregate_by # Aggregations to compute over all documents in the namespace that match the # filters. # # @return [Hash{Symbol=>Object}, nil] ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_summary.rb
Ruby
mit
10
main
443
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Client#namespaces class NamespaceSummary < Turbopuffer::Internal::Type::BaseModel # @!attribute id # The namespace ID. # # @return [String] required :id, String # @!method in...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_metadata.rb
Ruby
mit
10
main
9,332
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#metadata class NamespaceMetadata < Turbopuffer::Internal::Type::BaseModel # @!attribute approx_logical_bytes # The approximate number of logical bytes in the namespace. # # @re...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/attribute_schema.rb
Ruby
mit
10
main
691
# frozen_string_literal: true module Turbopuffer module Models # The schema for an attribute attached to a document. module AttributeSchema extend Turbopuffer::Internal::Type::Union # The data type of the attribute. Valid values: string, int, uint, float, uuid, datetime, bool, []string, []int, [...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_explain_query_params.rb
Ruby
mit
10
main
6,544
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#explain_query class NamespaceExplainQueryParams < Turbopuffer::Internal::Type::BaseModel extend Turbopuffer::Internal::Type::RequestParameters::Converter include Turbopuffer::Internal::Type::R...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/query_billing.rb
Ruby
mit
10
main
987
# frozen_string_literal: true module Turbopuffer module Models class QueryBilling < Turbopuffer::Internal::Type::BaseModel # @!attribute billable_logical_bytes_queried # The number of billable logical bytes queried from the namespace. # # @return [Integer] required :billable_log...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/decay_params.rb
Ruby
mit
10
main
816
# frozen_string_literal: true module Turbopuffer module Models class DecayParams < Turbopuffer::Internal::Type::BaseModel # @!attribute exponent # An exponent that helps further control the shape of the Decay function. # # @return [Float, nil] optional :exponent, Float # ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_query_params.rb
Ruby
mit
10
main
6,466
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#query class NamespaceQueryParams < Turbopuffer::Internal::Type::BaseModel extend Turbopuffer::Internal::Type::RequestParameters::Converter include Turbopuffer::Internal::Type::RequestParameter...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_recall_response.rb
Ruby
mit
10
main
2,866
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#recall class NamespaceRecallResponse < Turbopuffer::Internal::Type::BaseModel # @!attribute avg_ann_count # The average number of documents retrieved by the approximate nearest neighbor ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/row.rb
Ruby
mit
10
main
1,226
# frozen_string_literal: true module Turbopuffer module Models class Row < Turbopuffer::Internal::Type::BaseModel # @!attribute id # An identifier for a document. # # @return [String, Integer] required :id, union: -> { Turbopuffer::ID } # @!attribute vector # A ve...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_query_response.rb
Ruby
mit
10
main
1,816
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#query class NamespaceQueryResponse < Turbopuffer::Internal::Type::BaseModel # @!attribute billing # The billing information for a query. # # @return [Turbopuffer::Models::Query...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_update_schema_params.rb
Ruby
mit
10
main
1,083
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#update_schema class NamespaceUpdateSchemaParams < Turbopuffer::Internal::Type::BaseModel extend Turbopuffer::Internal::Type::RequestParameters::Converter include Turbopuffer::Internal::Type::R...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/full_text_search.rb
Ruby
mit
10
main
672
# frozen_string_literal: true module Turbopuffer module Models # Whether this attribute can be used as part of a BM25 full-text search. Requires # the `string` or `[]string` type, and by default, BM25-enabled attributes are not # filterable. You can override this by setting `filterable: true`. module...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/write_billing.rb
Ruby
mit
10
main
923
# frozen_string_literal: true module Turbopuffer module Models class WriteBilling < Turbopuffer::Internal::Type::BaseModel # @!attribute billable_logical_bytes_written # The number of billable logical bytes written to the namespace. # # @return [Integer] required :billable_logic...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/vector_encoding.rb
Ruby
mit
10
main
321
# frozen_string_literal: true module Turbopuffer module Models # The encoding to use for vectors in the response. module VectorEncoding extend Turbopuffer::Internal::Type::Enum FLOAT = :float BASE64 = :base64 # @!method self.values # @return [Array<Symbol>] end end end
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_write_params.rb
Ruby
mit
10
main
10,751
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#write class NamespaceWriteParams < Turbopuffer::Internal::Type::BaseModel extend Turbopuffer::Internal::Type::RequestParameters::Converter include Turbopuffer::Internal::Type::RequestParameter...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/language.rb
Ruby
mit
10
main
735
# frozen_string_literal: true module Turbopuffer module Models # Describes the language of a text attribute. Defaults to `english`. module Language extend Turbopuffer::Internal::Type::Enum ARABIC = :arabic DANISH = :danish DUTCH = :dutch ENGLISH = :english FINNISH = :finn...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/bm25_clause_params.rb
Ruby
mit
10
main
626
# frozen_string_literal: true module Turbopuffer module Models class Bm25ClauseParams < Turbopuffer::Internal::Type::BaseModel # @!attribute last_as_prefix # Whether to treat the last token in the query input as a literal prefix. # # @return [Boolean, nil] optional :last_as_pref...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_schema_response.rb
Ruby
mit
10
main
238
# frozen_string_literal: true module Turbopuffer module Models # @type [Turbopuffer::Internal::Type::Converter] NamespaceSchemaResponse = Turbopuffer::Internal::Type::HashOf[-> { Turbopuffer::AttributeSchemaConfig }] end end
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/attribute_schema_config.rb
Ruby
mit
10
main
4,176
# frozen_string_literal: true module Turbopuffer module Models class AttributeSchemaConfig < Turbopuffer::Internal::Type::BaseModel # @!attribute type # The data type of the attribute. Valid values: string, int, uint, float, uuid, # datetime, bool, []string, []int, []uint, []float, []uuid, ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_schema_params.rb
Ruby
mit
10
main
634
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#schema class NamespaceSchemaParams < Turbopuffer::Internal::Type::BaseModel extend Turbopuffer::Internal::Type::RequestParameters::Converter include Turbopuffer::Internal::Type::RequestParamet...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_delete_all_response.rb
Ruby
mit
10
main
540
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#delete_all class NamespaceDeleteAllResponse < Turbopuffer::Internal::Type::BaseModel # @!attribute status # The status of the request. # # @return [Symbol, :OK] required ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/contains_all_tokens_filter_params.rb
Ruby
mit
10
main
641
# frozen_string_literal: true module Turbopuffer module Models class ContainsAllTokensFilterParams < Turbopuffer::Internal::Type::BaseModel # @!attribute last_as_prefix # Whether to treat the last token in the query input as a literal prefix. # # @return [Boolean, nil] optional ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/query_performance.rb
Ruby
mit
10
main
2,501
# frozen_string_literal: true module Turbopuffer module Models class QueryPerformance < Turbopuffer::Internal::Type::BaseModel # @!attribute approx_namespace_size # the approximate number of documents in the namespace. # # @return [Integer] required :approx_namespace_size, Integ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/write_performance.rb
Ruby
mit
10
main
540
# frozen_string_literal: true module Turbopuffer module Models class WritePerformance < Turbopuffer::Internal::Type::BaseModel # @!attribute server_total_ms # Request time measured on the server, in milliseconds. # # @return [Integer] required :server_total_ms, Integer # ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_hint_cache_warm_response.rb
Ruby
mit
10
main
722
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#hint_cache_warm class NamespaceHintCacheWarmResponse < Turbopuffer::Internal::Type::BaseModel # @!attribute status # The status of the request. # # @return [Symbol, :ACCEPTED] ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/tokenizer.rb
Ruby
mit
10
main
460
# frozen_string_literal: true module Turbopuffer module Models # The tokenizer to use for full-text search on an attribute. Defaults to # `word_v3`. module Tokenizer extend Turbopuffer::Internal::Type::Enum PRE_TOKENIZED_ARRAY = :pre_tokenized_array WORD_V0 = :word_v0 WORD_V1 = :...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/columns.rb
Ruby
mit
10
main
2,110
# frozen_string_literal: true module Turbopuffer module Models class Columns < Turbopuffer::Internal::Type::BaseModel # @!attribute id # The IDs of the documents. # # @return [Array<String, Integer>] required :id, -> { Turbopuffer::Internal::Type::ArrayOf[union: Turbopuffer::ID]...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_delete_all_params.rb
Ruby
mit
10
main
641
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#delete_all class NamespaceDeleteAllParams < Turbopuffer::Internal::Type::BaseModel extend Turbopuffer::Internal::Type::RequestParameters::Converter include Turbopuffer::Internal::Type::Request...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/contains_any_token_filter_params.rb
Ruby
mit
10
main
639
# frozen_string_literal: true module Turbopuffer module Models class ContainsAnyTokenFilterParams < Turbopuffer::Internal::Type::BaseModel # @!attribute last_as_prefix # Whether to treat the last token in the query input as a literal prefix. # # @return [Boolean, nil] optional :...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/limit.rb
Ruby
mit
10
main
2,109
# frozen_string_literal: true module Turbopuffer module Models class Limit < Turbopuffer::Internal::Type::BaseModel # @!attribute total # Limits the total number of documents returned. # # @return [Integer] required :total, Integer # @!attribute per # Limits the n...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/full_text_search_config.rb
Ruby
mit
10
main
3,931
# frozen_string_literal: true module Turbopuffer module Models class FullTextSearchConfig < Turbopuffer::Internal::Type::BaseModel # @!attribute ascii_folding # Whether to convert each non-ASCII character in a token to its ASCII equivalent, # if one exists (e.g., à -> a). Defaults to `false...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/pinning_config.rb
Ruby
mit
10
main
546
# frozen_string_literal: true module Turbopuffer module Models class PinningConfig < Turbopuffer::Internal::Type::BaseModel # @!attribute replicas # The number of read replicas to provision. Defaults to 1 if not specified. # # @return [Integer, nil] optional :replicas, Integer ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/client_namespaces_params.rb
Ruby
mit
10
main
1,232
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Client#namespaces class ClientNamespacesParams < Turbopuffer::Internal::Type::BaseModel extend Turbopuffer::Internal::Type::RequestParameters::Converter include Turbopuffer::Internal::Type::RequestParame...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_metadata_params.rb
Ruby
mit
10
main
638
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#metadata class NamespaceMetadataParams < Turbopuffer::Internal::Type::BaseModel extend Turbopuffer::Internal::Type::RequestParameters::Converter include Turbopuffer::Internal::Type::RequestPar...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_explain_query_response.rb
Ruby
mit
10
main
574
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#explain_query class NamespaceExplainQueryResponse < Turbopuffer::Internal::Type::BaseModel # @!attribute plan_text # The textual representation of the query plan. # # @return [...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/aggregation_group.rb
Ruby
mit
10
main
226
# frozen_string_literal: true module Turbopuffer module Models # @type [Turbopuffer::Internal::Type::Converter] AggregationGroup = Turbopuffer::Internal::Type::HashOf[Turbopuffer::Internal::Type::Unknown] end end
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/id.rb
Ruby
mit
10
main
341
# frozen_string_literal: true module Turbopuffer module Models # An identifier for a document. module ID extend Turbopuffer::Internal::Type::Union # A UUID. variant String # An integer ID. variant Integer # @!method self.variants # @return [Array(String, Integer...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_recall_params.rb
Ruby
mit
10
main
2,358
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#recall class NamespaceRecallParams < Turbopuffer::Internal::Type::BaseModel extend Turbopuffer::Internal::Type::RequestParameters::Converter include Turbopuffer::Internal::Type::RequestParamet...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_metadata_patch.rb
Ruby
mit
10
main
1,699
# frozen_string_literal: true module Turbopuffer module Models class NamespaceMetadataPatch < Turbopuffer::Internal::Type::BaseModel # @!attribute pinning # Configuration for namespace pinning. # # - Missing field: no change to pinning configuration # - `null` or `false`: expl...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_update_metadata_params.rb
Ruby
mit
10
main
656
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#update_metadata class NamespaceUpdateMetadataParams < Turbopuffer::Models::NamespaceMetadataPatch extend Turbopuffer::Internal::Type::RequestParameters::Converter include Turbopuffer::Internal...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/branch_from_namespace_params.rb
Ruby
mit
10
main
992
# frozen_string_literal: true module Turbopuffer module Models # The namespace to create an instant, copy-on-write clone of. module BranchFromNamespaceParams extend Turbopuffer::Internal::Type::Union # The namespace to create an instant, copy-on-write clone of. variant String varian...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/distance_metric.rb
Ruby
mit
10
main
501
# frozen_string_literal: true module Turbopuffer module Models # A function used to calculate vector similarity. module DistanceMetric extend Turbopuffer::Internal::Type::Enum # Defined as `1 - cosine_similarity` and ranges from 0 to 2. Lower is better. COSINE_DISTANCE = :cosine_distance ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/copy_from_namespace_params.rb
Ruby
mit
10
main
1,550
# frozen_string_literal: true module Turbopuffer module Models # The namespace to copy documents from. module CopyFromNamespaceParams extend Turbopuffer::Internal::Type::Union # The namespace to copy documents from. variant String variant -> { Turbopuffer::CopyFromNamespaceParams::C...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_multi_query_params.rb
Ruby
mit
10
main
2,882
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#multi_query class NamespaceMultiQueryParams < Turbopuffer::Internal::Type::BaseModel extend Turbopuffer::Internal::Type::RequestParameters::Converter include Turbopuffer::Internal::Type::Reque...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/namespace_multi_query_response.rb
Ruby
mit
10
main
2,314
# frozen_string_literal: true module Turbopuffer module Models # @see Turbopuffer::Resources::Namespaces#multi_query class NamespaceMultiQueryResponse < Turbopuffer::Internal::Type::BaseModel # @!attribute billing # The billing information for a query. # # @return [Turbopuffer::Mo...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/include_attributes.rb
Ruby
mit
10
main
723
# frozen_string_literal: true module Turbopuffer module Models # Whether to include attributes in the response. module IncludeAttributes extend Turbopuffer::Internal::Type::Union # When `true`, include all attributes in the response. When `false`, include no attributes in the response. var...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/saturate_params.rb
Ruby
mit
10
main
834
# frozen_string_literal: true module Turbopuffer module Models class SaturateParams < Turbopuffer::Internal::Type::BaseModel # @!attribute exponent # An exponent that helps further control the shape of the Saturate function. # # @return [Float, nil] optional :exponent, Float ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/models/vector.rb
Ruby
mit
10
main
591
# frozen_string_literal: true module Turbopuffer module Models # A vector embedding associated with a document. module Vector extend Turbopuffer::Internal::Type::Union # A dense vector encoded as an array of floats. variant -> { Turbopuffer::Models::Vector::FloatArray } # A dense ve...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/resources/namespaces.rb
Ruby
mit
10
main
18,439
# frozen_string_literal: true module Turbopuffer module Resources class Namespaces # Delete namespace. # # @overload delete_all(namespace: nil, request_options: {}) # # @param namespace [String] The name of the namespace. # # @param request_options [Turbopuffer::RequestO...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/internal/namespace_page.rb
Ruby
mit
10
main
2,274
# frozen_string_literal: true module Turbopuffer module Internal # @generic Elem # # @example # if namespace_page.has_next? # namespace_page = namespace_page.next_page # end # # @example # namespace_page.auto_paging_each do |client| # puts(client) # end ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/internal/util.rb
Ruby
mit
10
main
27,478
# frozen_string_literal: true module Turbopuffer module Internal # @api private module Util # @api private # # @return [Float] def self.monotonic_secs = Process.clock_gettime(Process::CLOCK_MONOTONIC) # @api private # # @param ns [Module, Class] # # @ret...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/internal/type/base_page.rb
Ruby
mit
10
main
1,400
# frozen_string_literal: true module Turbopuffer module Internal module Type # @api private # # @generic Elem # # This module provides a base implementation for paginated responses in the SDK. module BasePage # rubocop:disable Lint/UnusedMethodArgument # @api ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/internal/type/enum.rb
Ruby
mit
10
main
4,200
# frozen_string_literal: true module Turbopuffer module Internal module Type # @api private # # A value from among a specified list of options. OpenAPI enum values map to Ruby # values in the SDK as follows: # # 1. boolean => true | false # 2. integer => Integer # ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/internal/type/array_of.rb
Ruby
mit
10
main
4,740
# frozen_string_literal: true module Turbopuffer module Internal module Type # @api private # # @abstract # # @generic Elem # # Array of items of a given type. class ArrayOf include Turbopuffer::Internal::Type::Converter include Turbopuffer::Interna...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/internal/type/unknown.rb
Ruby
mit
10
main
1,979
# frozen_string_literal: true module Turbopuffer module Internal module Type # @api private # # @abstract # # When we don't know what to expect for the value. class Unknown extend Turbopuffer::Internal::Type::Converter extend Turbopuffer::Internal::Util::Sorbet...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/internal/type/union.rb
Ruby
mit
10
main
7,612
# frozen_string_literal: true module Turbopuffer module Internal module Type # @api private # # @example # # `attribute_schema` is a `Turbopuffer::AttributeSchema` # case attribute_schema # when Turbopuffer::AttributeType # # ... # when Turbopuffer::Att...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/internal/type/boolean.rb
Ruby
mit
10
main
2,034
# frozen_string_literal: true module Turbopuffer module Internal module Type # @api private # # @abstract # # Ruby has no Boolean class; this is something for models to refer to. class Boolean extend Turbopuffer::Internal::Type::Converter extend Turbopuffer::In...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/internal/type/base_model.rb
Ruby
mit
10
main
17,323
# frozen_string_literal: true module Turbopuffer module Internal module Type # @abstract class BaseModel extend Turbopuffer::Internal::Type::Converter extend Turbopuffer::Internal::Util::SorbetRuntimeSupport class << self # @api private # # Assum...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/internal/type/file_input.rb
Ruby
mit
10
main
3,210
# frozen_string_literal: true module Turbopuffer module Internal module Type # @api private # # @abstract # # Either `Pathname` or `StringIO`, or `IO`, or # `Turbopuffer::Internal::Type::FileInput`. # # Note: when `IO` is used, all retries are disabled, since many ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/internal/type/request_parameters.rb
Ruby
mit
10
main
1,266
# frozen_string_literal: true module Turbopuffer module Internal module Type # @api private module RequestParameters # @!attribute request_options # Options to specify HTTP behaviour for this request. # # @return [Turbopuffer::RequestOptions, Hash{Symbol=>Object}] ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/internal/type/hash_of.rb
Ruby
mit
10
main
5,227
# frozen_string_literal: true module Turbopuffer module Internal module Type # @api private # # @abstract # # @generic Elem # # Hash of items of a given type. class HashOf include Turbopuffer::Internal::Type::Converter include Turbopuffer::Internal:...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/internal/type/converter.rb
Ruby
mit
10
main
11,088
# frozen_string_literal: true module Turbopuffer module Internal module Type # @api private module Converter extend Turbopuffer::Internal::Util::SorbetRuntimeSupport # rubocop:disable Lint/UnusedMethodArgument # @api private # # @param value [Object] ...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/internal/transport/pooled_net_requester.rb
Ruby
mit
10
main
7,190
# frozen_string_literal: true module Turbopuffer module Internal module Transport # @api private class PooledNetRequester extend Turbopuffer::Internal::Util::SorbetRuntimeSupport # from the golang stdlib # https://github.com/golang/go/blob/c8eced8580028328fde7c03cbfcb720ce15b...
github
turbopuffer/turbopuffer-ruby
https://github.com/turbopuffer/turbopuffer-ruby
lib/turbopuffer/internal/transport/base_client.rb
Ruby
mit
10
main
20,479
# frozen_string_literal: true module Turbopuffer module Internal module Transport # @api private # # @abstract class BaseClient extend Turbopuffer::Internal::Util::SorbetRuntimeSupport # from whatwg fetch spec MAX_REDIRECTS = 20 # rubocop:disable Style/Mu...