trieve_ruby_client 0.7.6 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/docs/ChunkData.md +1 -1
- data/docs/ChunkMetadata.md +0 -2
- data/docs/ChunkMetadataWithScore.md +0 -2
- data/docs/CreateChunkGroupData.md +3 -1
- data/docs/GroupScoreSlimChunks.md +4 -0
- data/docs/OrganizationUsageCount.md +2 -0
- data/docs/RecommendChunksRequest.md +1 -1
- data/docs/RecommendGroupChunksRequest.md +1 -1
- data/docs/SearchChunkData.md +6 -4
- data/docs/SearchOverGroupsData.md +4 -2
- data/docs/SearchWithinGroupData.md +6 -4
- data/lib/trieve_ruby_client/api/auth_api.rb +1 -1
- data/lib/trieve_ruby_client/api/chunk_api.rb +1 -1
- data/lib/trieve_ruby_client/api/chunk_group_api.rb +1 -1
- data/lib/trieve_ruby_client/api/dataset_api.rb +1 -1
- data/lib/trieve_ruby_client/api/events_api.rb +1 -1
- data/lib/trieve_ruby_client/api/file_api.rb +1 -1
- data/lib/trieve_ruby_client/api/health_api.rb +1 -1
- data/lib/trieve_ruby_client/api/invitation_api.rb +1 -1
- data/lib/trieve_ruby_client/api/message_api.rb +1 -1
- data/lib/trieve_ruby_client/api/organization_api.rb +1 -1
- data/lib/trieve_ruby_client/api/stripe_api.rb +1 -1
- data/lib/trieve_ruby_client/api/topic_api.rb +1 -1
- data/lib/trieve_ruby_client/api/user_api.rb +1 -1
- data/lib/trieve_ruby_client/api_client.rb +1 -1
- data/lib/trieve_ruby_client/api_error.rb +1 -1
- data/lib/trieve_ruby_client/configuration.rb +1 -1
- data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/auth_query.rb +1 -1
- data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +1 -1
- data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
- data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
- data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_data.rb +8 -2
- data/lib/trieve_ruby_client/models/chunk_filter.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_group.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_metadata.rb +2 -18
- data/lib/trieve_ruby_client/models/chunk_metadata_with_score.rb +2 -18
- data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +1 -1
- data/lib/trieve_ruby_client/models/create_chunk_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +17 -6
- data/lib/trieve_ruby_client/models/create_dataset_request.rb +1 -1
- data/lib/trieve_ruby_client/models/create_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
- data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
- data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/event.rb +1 -1
- data/lib/trieve_ruby_client/models/event_return.rb +1 -1
- data/lib/trieve_ruby_client/models/field_condition.rb +1 -1
- data/lib/trieve_ruby_client/models/file.rb +1 -1
- data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/generate_chunks_request.rb +1 -1
- data/lib/trieve_ruby_client/models/geo_info.rb +1 -1
- data/lib/trieve_ruby_client/models/geo_types.rb +1 -1
- data/lib/trieve_ruby_client/models/get_chunks_data.rb +1 -1
- data/lib/trieve_ruby_client/models/get_events_data.rb +1 -1
- data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
- data/lib/trieve_ruby_client/models/get_tracking_chunks_data.rb +1 -1
- data/lib/trieve_ruby_client/models/group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/group_score_chunk.rb +1 -1
- data/lib/trieve_ruby_client/models/group_score_slim_chunks.rb +22 -2
- data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
- data/lib/trieve_ruby_client/models/location_bounding_box.rb +1 -1
- data/lib/trieve_ruby_client/models/location_polygon.rb +1 -1
- data/lib/trieve_ruby_client/models/location_radius.rb +1 -1
- data/lib/trieve_ruby_client/models/match_condition.rb +1 -1
- data/lib/trieve_ruby_client/models/message.rb +1 -1
- data/lib/trieve_ruby_client/models/organization.rb +1 -1
- data/lib/trieve_ruby_client/models/organization_usage_count.rb +18 -2
- data/lib/trieve_ruby_client/models/range.rb +1 -1
- data/lib/trieve_ruby_client/models/range_condition.rb +1 -1
- data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +2 -2
- data/lib/trieve_ruby_client/models/recommend_group_chunks_request.rb +2 -2
- data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/return_queued_chunk.rb +1 -1
- data/lib/trieve_ruby_client/models/score_chunk_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/score_slim_chunks.rb +1 -1
- data/lib/trieve_ruby_client/models/search_chunk_data.rb +26 -15
- data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_data.rb +15 -4
- data/lib/trieve_ruby_client/models/search_over_groups_results.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_slim_results.rb +1 -1
- data/lib/trieve_ruby_client/models/search_slim_chunk_query_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_within_group_data.rb +26 -15
- data/lib/trieve_ruby_client/models/search_within_group_results.rb +1 -1
- data/lib/trieve_ruby_client/models/search_within_group_slim_results.rb +1 -1
- data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +1 -1
- data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
- data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_chunk_metadata.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_score.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
- data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
- data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
- data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
- data/lib/trieve_ruby_client/models/topic.rb +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_dataset_request.rb +1 -1
- data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_user_org_role_data.rb +1 -1
- data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
- data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
- data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
- data/lib/trieve_ruby_client/version.rb +2 -2
- data/lib/trieve_ruby_client.rb +1 -1
- data/openapi-generator.yaml +1 -1
- data/openapi.json +150 -37
- data/spec/spec_helper.rb +1 -1
- data/trieve_ruby_client-0.7.6.gem +0 -0
- data/trieve_ruby_client-0.8.0.gem +0 -0
- data/trieve_ruby_client.gemspec +1 -1
- metadata +4 -2
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -15,6 +15,8 @@ require 'time'
|
|
15
15
|
|
16
16
|
module TrieveRubyClient
|
17
17
|
class OrganizationUsageCount
|
18
|
+
attr_accessor :chunk_count
|
19
|
+
|
18
20
|
attr_accessor :dataset_count
|
19
21
|
|
20
22
|
attr_accessor :file_storage
|
@@ -30,6 +32,7 @@ module TrieveRubyClient
|
|
30
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
33
|
def self.attribute_map
|
32
34
|
{
|
35
|
+
:'chunk_count' => :'chunk_count',
|
33
36
|
:'dataset_count' => :'dataset_count',
|
34
37
|
:'file_storage' => :'file_storage',
|
35
38
|
:'id' => :'id',
|
@@ -47,6 +50,7 @@ module TrieveRubyClient
|
|
47
50
|
# Attribute type mapping.
|
48
51
|
def self.openapi_types
|
49
52
|
{
|
53
|
+
:'chunk_count' => :'Integer',
|
50
54
|
:'dataset_count' => :'Integer',
|
51
55
|
:'file_storage' => :'Integer',
|
52
56
|
:'id' => :'String',
|
@@ -77,6 +81,12 @@ module TrieveRubyClient
|
|
77
81
|
h[k.to_sym] = v
|
78
82
|
}
|
79
83
|
|
84
|
+
if attributes.key?(:'chunk_count')
|
85
|
+
self.chunk_count = attributes[:'chunk_count']
|
86
|
+
else
|
87
|
+
self.chunk_count = nil
|
88
|
+
end
|
89
|
+
|
80
90
|
if attributes.key?(:'dataset_count')
|
81
91
|
self.dataset_count = attributes[:'dataset_count']
|
82
92
|
else
|
@@ -119,6 +129,10 @@ module TrieveRubyClient
|
|
119
129
|
def list_invalid_properties
|
120
130
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
121
131
|
invalid_properties = Array.new
|
132
|
+
if @chunk_count.nil?
|
133
|
+
invalid_properties.push('invalid value for "chunk_count", chunk_count cannot be nil.')
|
134
|
+
end
|
135
|
+
|
122
136
|
if @dataset_count.nil?
|
123
137
|
invalid_properties.push('invalid value for "dataset_count", dataset_count cannot be nil.')
|
124
138
|
end
|
@@ -150,6 +164,7 @@ module TrieveRubyClient
|
|
150
164
|
# @return true if the model is valid
|
151
165
|
def valid?
|
152
166
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
167
|
+
return false if @chunk_count.nil?
|
153
168
|
return false if @dataset_count.nil?
|
154
169
|
return false if @file_storage.nil?
|
155
170
|
return false if @id.nil?
|
@@ -164,6 +179,7 @@ module TrieveRubyClient
|
|
164
179
|
def ==(o)
|
165
180
|
return true if self.equal?(o)
|
166
181
|
self.class == o.class &&
|
182
|
+
chunk_count == o.chunk_count &&
|
167
183
|
dataset_count == o.dataset_count &&
|
168
184
|
file_storage == o.file_storage &&
|
169
185
|
id == o.id &&
|
@@ -181,7 +197,7 @@ module TrieveRubyClient
|
|
181
197
|
# Calculates hash code according to all attributes.
|
182
198
|
# @return [Integer] Hash code
|
183
199
|
def hash
|
184
|
-
[dataset_count, file_storage, id, message_count, org_id, user_count].hash
|
200
|
+
[chunk_count, dataset_count, file_storage, id, message_count, org_id, user_count].hash
|
185
201
|
end
|
186
202
|
|
187
203
|
# Builds the object from hash
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -35,7 +35,7 @@ module TrieveRubyClient
|
|
35
35
|
# The type of recommendation to make. This lets you choose whether to recommend based off of `semantic` or `fulltext` similarity. The default is `semantic`.
|
36
36
|
attr_accessor :recommend_type
|
37
37
|
|
38
|
-
# Set slim_chunks to true to avoid returning the content and chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement. Default is false.
|
38
|
+
# Set slim_chunks to true to avoid returning the content and chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement (typicall 10-50ms). Default is false.
|
39
39
|
attr_accessor :slim_chunks
|
40
40
|
|
41
41
|
# Strategy to use for recommendations, either \"average_vector\" or \"best_score\". The default is \"average_vector\". The \"average_vector\" strategy will construct a single average vector from the positive and negative samples then use it to perform a pseudo-search. The \"best_score\" strategy is more advanced and navigates the HNSW with a heuristic of picking edges where the point is closer to the positive samples than it is the negatives.
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -38,7 +38,7 @@ module TrieveRubyClient
|
|
38
38
|
# The type of recommendation to make. This lets you choose whether to recommend based off of `semantic` or `fulltext` similarity. The default is `semantic`.
|
39
39
|
attr_accessor :recommend_type
|
40
40
|
|
41
|
-
# Set slim_chunks to true to avoid returning the content and chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement. Default is false.
|
41
|
+
# Set slim_chunks to true to avoid returning the content and chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement (typicall 10-50ms). Default is false.
|
42
42
|
attr_accessor :slim_chunks
|
43
43
|
|
44
44
|
# Strategy to use for recommendations, either \"average_vector\" or \"best_score\". The default is \"average_vector\". The \"average_vector\" strategy will construct a single average vector from the positive and negative samples then use it to perform a pseudo-search. The \"best_score\" strategy is more advanced and navigates the HNSW with a heuristic of picking edges where the point is closer to the positive samples than it is the negatives.
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -15,18 +15,18 @@ require 'time'
|
|
15
15
|
|
16
16
|
module TrieveRubyClient
|
17
17
|
class SearchChunkData
|
18
|
-
# Set date_bias to true to bias search results towards more recent chunks. This will work best in hybrid search mode.
|
19
|
-
attr_accessor :date_bias
|
20
|
-
|
21
18
|
attr_accessor :filters
|
22
19
|
|
23
20
|
# Set get_collisions to true to get the collisions for each chunk. This will only apply if environment variable COLLISIONS_ENABLED is set to true.
|
24
21
|
attr_accessor :get_collisions
|
25
22
|
|
23
|
+
# Get total page count for the query accounting for the applied filters. Defaults to false, but can be set to true when the latency penalty is acceptable (typically 50-200ms).
|
24
|
+
attr_accessor :get_total_pages
|
25
|
+
|
26
26
|
# Set highlight_delimiters to a list of strings to use as delimiters for highlighting. If not specified, this defaults to [\"?\", \",\", \".\", \"!\"].
|
27
27
|
attr_accessor :highlight_delimiters
|
28
28
|
|
29
|
-
# Set highlight_results to
|
29
|
+
# Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add <b><mark> tags to the chunk_html of the chunks to highlight matching sub-sentences.
|
30
30
|
attr_accessor :highlight_results
|
31
31
|
|
32
32
|
# Page of chunks to fetch. Page is 1-indexed.
|
@@ -38,13 +38,16 @@ module TrieveRubyClient
|
|
38
38
|
# Query is the search query. This can be any string. The query will be used to create an embedding vector and/or SPLADE vector which will be used to find the result set.
|
39
39
|
attr_accessor :query
|
40
40
|
|
41
|
+
# Recency Bias lets you determine how much of an effect the recency of chunks will have on the search results. If not specified, this defaults to 0.0. We recommend setting this to 1.0 for a gentle reranking of the results, >3.0 for a strong reranking of the results.
|
42
|
+
attr_accessor :recency_bias
|
43
|
+
|
41
44
|
# Set score_threshold to a float to filter out chunks with a score below the threshold.
|
42
45
|
attr_accessor :score_threshold
|
43
46
|
|
44
47
|
# Can be either \"semantic\", \"fulltext\", or \"hybrid\". \"hybrid\" will pull in one page (10 chunks) of both semantic and full-text results then re-rank them using BAAI/bge-reranker-large. \"semantic\" will pull in one page (10 chunks) of the nearest cosine distant vectors. \"fulltext\" will pull in one page (10 chunks) of full-text results based on SPLADE.
|
45
48
|
attr_accessor :search_type
|
46
49
|
|
47
|
-
# Set slim_chunks to true to avoid returning the content and chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement. Default is false.
|
50
|
+
# Set slim_chunks to true to avoid returning the content and chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement (typicall 10-50ms). Default is false.
|
48
51
|
attr_accessor :slim_chunks
|
49
52
|
|
50
53
|
# Set use_weights to true to use the weights of the chunks in the result set in order to sort them. If not specified, this defaults to true.
|
@@ -53,14 +56,15 @@ module TrieveRubyClient
|
|
53
56
|
# Attribute mapping from ruby-style variable name to JSON key.
|
54
57
|
def self.attribute_map
|
55
58
|
{
|
56
|
-
:'date_bias' => :'date_bias',
|
57
59
|
:'filters' => :'filters',
|
58
60
|
:'get_collisions' => :'get_collisions',
|
61
|
+
:'get_total_pages' => :'get_total_pages',
|
59
62
|
:'highlight_delimiters' => :'highlight_delimiters',
|
60
63
|
:'highlight_results' => :'highlight_results',
|
61
64
|
:'page' => :'page',
|
62
65
|
:'page_size' => :'page_size',
|
63
66
|
:'query' => :'query',
|
67
|
+
:'recency_bias' => :'recency_bias',
|
64
68
|
:'score_threshold' => :'score_threshold',
|
65
69
|
:'search_type' => :'search_type',
|
66
70
|
:'slim_chunks' => :'slim_chunks',
|
@@ -76,14 +80,15 @@ module TrieveRubyClient
|
|
76
80
|
# Attribute type mapping.
|
77
81
|
def self.openapi_types
|
78
82
|
{
|
79
|
-
:'date_bias' => :'Boolean',
|
80
83
|
:'filters' => :'ChunkFilter',
|
81
84
|
:'get_collisions' => :'Boolean',
|
85
|
+
:'get_total_pages' => :'Boolean',
|
82
86
|
:'highlight_delimiters' => :'Array<String>',
|
83
87
|
:'highlight_results' => :'Boolean',
|
84
88
|
:'page' => :'Integer',
|
85
89
|
:'page_size' => :'Integer',
|
86
90
|
:'query' => :'String',
|
91
|
+
:'recency_bias' => :'Float',
|
87
92
|
:'score_threshold' => :'Float',
|
88
93
|
:'search_type' => :'String',
|
89
94
|
:'slim_chunks' => :'Boolean',
|
@@ -94,13 +99,14 @@ module TrieveRubyClient
|
|
94
99
|
# List of attributes with nullable: true
|
95
100
|
def self.openapi_nullable
|
96
101
|
Set.new([
|
97
|
-
:'date_bias',
|
98
102
|
:'filters',
|
99
103
|
:'get_collisions',
|
104
|
+
:'get_total_pages',
|
100
105
|
:'highlight_delimiters',
|
101
106
|
:'highlight_results',
|
102
107
|
:'page',
|
103
108
|
:'page_size',
|
109
|
+
:'recency_bias',
|
104
110
|
:'score_threshold',
|
105
111
|
:'slim_chunks',
|
106
112
|
:'use_weights'
|
@@ -122,10 +128,6 @@ module TrieveRubyClient
|
|
122
128
|
h[k.to_sym] = v
|
123
129
|
}
|
124
130
|
|
125
|
-
if attributes.key?(:'date_bias')
|
126
|
-
self.date_bias = attributes[:'date_bias']
|
127
|
-
end
|
128
|
-
|
129
131
|
if attributes.key?(:'filters')
|
130
132
|
self.filters = attributes[:'filters']
|
131
133
|
end
|
@@ -134,6 +136,10 @@ module TrieveRubyClient
|
|
134
136
|
self.get_collisions = attributes[:'get_collisions']
|
135
137
|
end
|
136
138
|
|
139
|
+
if attributes.key?(:'get_total_pages')
|
140
|
+
self.get_total_pages = attributes[:'get_total_pages']
|
141
|
+
end
|
142
|
+
|
137
143
|
if attributes.key?(:'highlight_delimiters')
|
138
144
|
if (value = attributes[:'highlight_delimiters']).is_a?(Array)
|
139
145
|
self.highlight_delimiters = value
|
@@ -158,6 +164,10 @@ module TrieveRubyClient
|
|
158
164
|
self.query = nil
|
159
165
|
end
|
160
166
|
|
167
|
+
if attributes.key?(:'recency_bias')
|
168
|
+
self.recency_bias = attributes[:'recency_bias']
|
169
|
+
end
|
170
|
+
|
161
171
|
if attributes.key?(:'score_threshold')
|
162
172
|
self.score_threshold = attributes[:'score_threshold']
|
163
173
|
end
|
@@ -237,14 +247,15 @@ module TrieveRubyClient
|
|
237
247
|
def ==(o)
|
238
248
|
return true if self.equal?(o)
|
239
249
|
self.class == o.class &&
|
240
|
-
date_bias == o.date_bias &&
|
241
250
|
filters == o.filters &&
|
242
251
|
get_collisions == o.get_collisions &&
|
252
|
+
get_total_pages == o.get_total_pages &&
|
243
253
|
highlight_delimiters == o.highlight_delimiters &&
|
244
254
|
highlight_results == o.highlight_results &&
|
245
255
|
page == o.page &&
|
246
256
|
page_size == o.page_size &&
|
247
257
|
query == o.query &&
|
258
|
+
recency_bias == o.recency_bias &&
|
248
259
|
score_threshold == o.score_threshold &&
|
249
260
|
search_type == o.search_type &&
|
250
261
|
slim_chunks == o.slim_chunks &&
|
@@ -260,7 +271,7 @@ module TrieveRubyClient
|
|
260
271
|
# Calculates hash code according to all attributes.
|
261
272
|
# @return [Integer] Hash code
|
262
273
|
def hash
|
263
|
-
[
|
274
|
+
[filters, get_collisions, get_total_pages, highlight_delimiters, highlight_results, page, page_size, query, recency_bias, score_threshold, search_type, slim_chunks, use_weights].hash
|
264
275
|
end
|
265
276
|
|
266
277
|
# Builds the object from hash
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -20,13 +20,16 @@ module TrieveRubyClient
|
|
20
20
|
# Set get_collisions to true to get the collisions for each chunk. This will only apply if environment variable COLLISIONS_ENABLED is set to true.
|
21
21
|
attr_accessor :get_collisions
|
22
22
|
|
23
|
+
# Get total page count for the query accounting for the applied filters. Defaults to false, but can be set to true when the latency penalty is acceptable (typically 50-200ms).
|
24
|
+
attr_accessor :get_total_pages
|
25
|
+
|
23
26
|
# Group_size is the number of chunks to fetch for each group. The default is 3. If a group has less than group_size chunks, all chunks will be returned. If this is set to a large number, we recommend setting slim_chunks to true to avoid returning the content and chunk_html of the chunks so as to lower the amount of time required for content download and serialization.
|
24
27
|
attr_accessor :group_size
|
25
28
|
|
26
29
|
# Set highlight_delimiters to a list of strings to use as delimiters for highlighting. If not specified, this defaults to [\"?\", \",\", \".\", \"!\"].
|
27
30
|
attr_accessor :highlight_delimiters
|
28
31
|
|
29
|
-
# Set highlight_results to
|
32
|
+
# Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add <b><mark> tags to the chunk_html of the chunks to highlight matching sub-sentences.
|
30
33
|
attr_accessor :highlight_results
|
31
34
|
|
32
35
|
# Page of group results to fetch. Page is 1-indexed.
|
@@ -44,7 +47,7 @@ module TrieveRubyClient
|
|
44
47
|
# Can be either \"semantic\", \"fulltext\", or \"hybrid\". \"hybrid\" will pull in one page (10 chunks) of both semantic and full-text results then re-rank them using BAAI/bge-reranker-large. \"semantic\" will pull in one page (10 chunks) of the nearest cosine distant vectors. \"fulltext\" will pull in one page (10 chunks) of full-text results based on SPLADE.
|
45
48
|
attr_accessor :search_type
|
46
49
|
|
47
|
-
# Set slim_chunks to true to avoid returning the content and chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement. Default is false.
|
50
|
+
# Set slim_chunks to true to avoid returning the content and chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement (typicall 10-50ms). Default is false.
|
48
51
|
attr_accessor :slim_chunks
|
49
52
|
|
50
53
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -52,6 +55,7 @@ module TrieveRubyClient
|
|
52
55
|
{
|
53
56
|
:'filters' => :'filters',
|
54
57
|
:'get_collisions' => :'get_collisions',
|
58
|
+
:'get_total_pages' => :'get_total_pages',
|
55
59
|
:'group_size' => :'group_size',
|
56
60
|
:'highlight_delimiters' => :'highlight_delimiters',
|
57
61
|
:'highlight_results' => :'highlight_results',
|
@@ -74,6 +78,7 @@ module TrieveRubyClient
|
|
74
78
|
{
|
75
79
|
:'filters' => :'ChunkFilter',
|
76
80
|
:'get_collisions' => :'Boolean',
|
81
|
+
:'get_total_pages' => :'Boolean',
|
77
82
|
:'group_size' => :'Integer',
|
78
83
|
:'highlight_delimiters' => :'Array<String>',
|
79
84
|
:'highlight_results' => :'Boolean',
|
@@ -91,6 +96,7 @@ module TrieveRubyClient
|
|
91
96
|
Set.new([
|
92
97
|
:'filters',
|
93
98
|
:'get_collisions',
|
99
|
+
:'get_total_pages',
|
94
100
|
:'group_size',
|
95
101
|
:'highlight_delimiters',
|
96
102
|
:'highlight_results',
|
@@ -124,6 +130,10 @@ module TrieveRubyClient
|
|
124
130
|
self.get_collisions = attributes[:'get_collisions']
|
125
131
|
end
|
126
132
|
|
133
|
+
if attributes.key?(:'get_total_pages')
|
134
|
+
self.get_total_pages = attributes[:'get_total_pages']
|
135
|
+
end
|
136
|
+
|
127
137
|
if attributes.key?(:'group_size')
|
128
138
|
self.group_size = attributes[:'group_size']
|
129
139
|
end
|
@@ -244,6 +254,7 @@ module TrieveRubyClient
|
|
244
254
|
self.class == o.class &&
|
245
255
|
filters == o.filters &&
|
246
256
|
get_collisions == o.get_collisions &&
|
257
|
+
get_total_pages == o.get_total_pages &&
|
247
258
|
group_size == o.group_size &&
|
248
259
|
highlight_delimiters == o.highlight_delimiters &&
|
249
260
|
highlight_results == o.highlight_results &&
|
@@ -264,7 +275,7 @@ module TrieveRubyClient
|
|
264
275
|
# Calculates hash code according to all attributes.
|
265
276
|
# @return [Integer] Hash code
|
266
277
|
def hash
|
267
|
-
[filters, get_collisions, group_size, highlight_delimiters, highlight_results, page, page_size, query, score_threshold, search_type, slim_chunks].hash
|
278
|
+
[filters, get_collisions, get_total_pages, group_size, highlight_delimiters, highlight_results, page, page_size, query, score_threshold, search_type, slim_chunks].hash
|
268
279
|
end
|
269
280
|
|
270
281
|
# Builds the object from hash
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -15,11 +15,11 @@ require 'time'
|
|
15
15
|
|
16
16
|
module TrieveRubyClient
|
17
17
|
class SearchWithinGroupData
|
18
|
-
# Set date_bias to true to bias search results towards more recent chunks. This will work best in hybrid search mode.
|
19
|
-
attr_accessor :date_bias
|
20
|
-
|
21
18
|
attr_accessor :filters
|
22
19
|
|
20
|
+
# Get total page count for the query accounting for the applied filters. Defaults to false, but can be set to true when the latency penalty is acceptable (typically 50-200ms).
|
21
|
+
attr_accessor :get_total_pages
|
22
|
+
|
23
23
|
# Group specifies the group to search within. Results will only consist of chunks which are bookmarks within the specified group.
|
24
24
|
attr_accessor :group_id
|
25
25
|
|
@@ -29,7 +29,7 @@ module TrieveRubyClient
|
|
29
29
|
# Set highlight_delimiters to a list of strings to use as delimiters for highlighting. If not specified, this defaults to [\"?\", \",\", \".\", \"!\"].
|
30
30
|
attr_accessor :highlight_delimiters
|
31
31
|
|
32
|
-
# Set highlight_results to
|
32
|
+
# Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add <b><mark> tags to the chunk_html of the chunks to highlight matching sub-sentences.
|
33
33
|
attr_accessor :highlight_results
|
34
34
|
|
35
35
|
# The page of chunks to fetch. Page is 1-indexed.
|
@@ -41,13 +41,16 @@ module TrieveRubyClient
|
|
41
41
|
# The query is the search query. This can be any string. The query will be used to create an embedding vector and/or SPLADE vector which will be used to find the result set.
|
42
42
|
attr_accessor :query
|
43
43
|
|
44
|
+
# Recency Bias lets you determine how much of an effect the recency of chunks will have on the search results. If not specified, this defaults to 0.0.
|
45
|
+
attr_accessor :recency_bias
|
46
|
+
|
44
47
|
# Set score_threshold to a float to filter out chunks with a score below the threshold.
|
45
48
|
attr_accessor :score_threshold
|
46
49
|
|
47
50
|
# Search_type can be either \"semantic\", \"fulltext\", or \"hybrid\". \"hybrid\" will pull in one page (10 chunks) of both semantic and full-text results then re-rank them using BAAI/bge-reranker-large. \"semantic\" will pull in one page (10 chunks) of the nearest cosine distant vectors. \"fulltext\" will pull in one page (10 chunks) of full-text results based on SPLADE.
|
48
51
|
attr_accessor :search_type
|
49
52
|
|
50
|
-
# Set slim_chunks to true to avoid returning the content and chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement. Default is false.
|
53
|
+
# Set slim_chunks to true to avoid returning the content and chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement (typicall 10-50ms). Default is false.
|
51
54
|
attr_accessor :slim_chunks
|
52
55
|
|
53
56
|
# Set use_weights to true to use the weights of the chunks in the result set in order to sort them. If not specified, this defaults to true.
|
@@ -56,8 +59,8 @@ module TrieveRubyClient
|
|
56
59
|
# Attribute mapping from ruby-style variable name to JSON key.
|
57
60
|
def self.attribute_map
|
58
61
|
{
|
59
|
-
:'date_bias' => :'date_bias',
|
60
62
|
:'filters' => :'filters',
|
63
|
+
:'get_total_pages' => :'get_total_pages',
|
61
64
|
:'group_id' => :'group_id',
|
62
65
|
:'group_tracking_id' => :'group_tracking_id',
|
63
66
|
:'highlight_delimiters' => :'highlight_delimiters',
|
@@ -65,6 +68,7 @@ module TrieveRubyClient
|
|
65
68
|
:'page' => :'page',
|
66
69
|
:'page_size' => :'page_size',
|
67
70
|
:'query' => :'query',
|
71
|
+
:'recency_bias' => :'recency_bias',
|
68
72
|
:'score_threshold' => :'score_threshold',
|
69
73
|
:'search_type' => :'search_type',
|
70
74
|
:'slim_chunks' => :'slim_chunks',
|
@@ -80,8 +84,8 @@ module TrieveRubyClient
|
|
80
84
|
# Attribute type mapping.
|
81
85
|
def self.openapi_types
|
82
86
|
{
|
83
|
-
:'date_bias' => :'Boolean',
|
84
87
|
:'filters' => :'ChunkFilter',
|
88
|
+
:'get_total_pages' => :'Boolean',
|
85
89
|
:'group_id' => :'String',
|
86
90
|
:'group_tracking_id' => :'String',
|
87
91
|
:'highlight_delimiters' => :'Array<String>',
|
@@ -89,6 +93,7 @@ module TrieveRubyClient
|
|
89
93
|
:'page' => :'Integer',
|
90
94
|
:'page_size' => :'Integer',
|
91
95
|
:'query' => :'String',
|
96
|
+
:'recency_bias' => :'Float',
|
92
97
|
:'score_threshold' => :'Float',
|
93
98
|
:'search_type' => :'String',
|
94
99
|
:'slim_chunks' => :'Boolean',
|
@@ -99,14 +104,15 @@ module TrieveRubyClient
|
|
99
104
|
# List of attributes with nullable: true
|
100
105
|
def self.openapi_nullable
|
101
106
|
Set.new([
|
102
|
-
:'date_bias',
|
103
107
|
:'filters',
|
108
|
+
:'get_total_pages',
|
104
109
|
:'group_id',
|
105
110
|
:'group_tracking_id',
|
106
111
|
:'highlight_delimiters',
|
107
112
|
:'highlight_results',
|
108
113
|
:'page',
|
109
114
|
:'page_size',
|
115
|
+
:'recency_bias',
|
110
116
|
:'score_threshold',
|
111
117
|
:'slim_chunks',
|
112
118
|
:'use_weights'
|
@@ -128,14 +134,14 @@ module TrieveRubyClient
|
|
128
134
|
h[k.to_sym] = v
|
129
135
|
}
|
130
136
|
|
131
|
-
if attributes.key?(:'date_bias')
|
132
|
-
self.date_bias = attributes[:'date_bias']
|
133
|
-
end
|
134
|
-
|
135
137
|
if attributes.key?(:'filters')
|
136
138
|
self.filters = attributes[:'filters']
|
137
139
|
end
|
138
140
|
|
141
|
+
if attributes.key?(:'get_total_pages')
|
142
|
+
self.get_total_pages = attributes[:'get_total_pages']
|
143
|
+
end
|
144
|
+
|
139
145
|
if attributes.key?(:'group_id')
|
140
146
|
self.group_id = attributes[:'group_id']
|
141
147
|
end
|
@@ -168,6 +174,10 @@ module TrieveRubyClient
|
|
168
174
|
self.query = nil
|
169
175
|
end
|
170
176
|
|
177
|
+
if attributes.key?(:'recency_bias')
|
178
|
+
self.recency_bias = attributes[:'recency_bias']
|
179
|
+
end
|
180
|
+
|
171
181
|
if attributes.key?(:'score_threshold')
|
172
182
|
self.score_threshold = attributes[:'score_threshold']
|
173
183
|
end
|
@@ -247,8 +257,8 @@ module TrieveRubyClient
|
|
247
257
|
def ==(o)
|
248
258
|
return true if self.equal?(o)
|
249
259
|
self.class == o.class &&
|
250
|
-
date_bias == o.date_bias &&
|
251
260
|
filters == o.filters &&
|
261
|
+
get_total_pages == o.get_total_pages &&
|
252
262
|
group_id == o.group_id &&
|
253
263
|
group_tracking_id == o.group_tracking_id &&
|
254
264
|
highlight_delimiters == o.highlight_delimiters &&
|
@@ -256,6 +266,7 @@ module TrieveRubyClient
|
|
256
266
|
page == o.page &&
|
257
267
|
page_size == o.page_size &&
|
258
268
|
query == o.query &&
|
269
|
+
recency_bias == o.recency_bias &&
|
259
270
|
score_threshold == o.score_threshold &&
|
260
271
|
search_type == o.search_type &&
|
261
272
|
slim_chunks == o.slim_chunks &&
|
@@ -271,7 +282,7 @@ module TrieveRubyClient
|
|
271
282
|
# Calculates hash code according to all attributes.
|
272
283
|
# @return [Integer] Hash code
|
273
284
|
def hash
|
274
|
-
[
|
285
|
+
[filters, get_total_pages, group_id, group_tracking_id, highlight_delimiters, highlight_results, page, page_size, query, recency_bias, score_threshold, search_type, slim_chunks, use_weights].hash
|
275
286
|
end
|
276
287
|
|
277
288
|
# Builds the object from hash
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.8.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|