trieve_ruby_client 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. checksums.yaml +4 -4
  2. data/GENERATE_COMMAND.txt +1 -0
  3. data/README.md +22 -11
  4. data/docs/AddChunkToGroupData.md +4 -2
  5. data/docs/AuthApi.md +13 -7
  6. data/docs/ChunkApi.md +9 -9
  7. data/docs/ChunkGroup.md +4 -0
  8. data/docs/ChunkGroupApi.md +36 -27
  9. data/docs/CreateChunkGroupData.md +4 -0
  10. data/docs/DatasetApi.md +11 -11
  11. data/docs/EventsApi.md +2 -2
  12. data/docs/FileApi.md +3 -3
  13. data/docs/GroupScoreChunkDTO.md +2 -0
  14. data/docs/GroupSlimChunksDTO.md +20 -0
  15. data/docs/HealthApi.md +1 -1
  16. data/docs/InvitationApi.md +1 -1
  17. data/docs/MessageApi.md +1 -1
  18. data/docs/OrganizationApi.md +1 -1
  19. data/docs/Range.md +4 -4
  20. data/docs/RangeCondition.md +49 -0
  21. data/docs/ReccomendGroupChunksRequest.md +3 -1
  22. data/docs/RecommendChunksRequest.md +5 -1
  23. data/docs/RecommendChunksResponseTypes.md +49 -0
  24. data/docs/RecommendGroupChunkResponseTypes.md +49 -0
  25. data/docs/RecommendGroupChunksRequest.md +34 -0
  26. data/docs/ScoreSlimChunks.md +20 -0
  27. data/docs/SearchChunkData.md +3 -1
  28. data/docs/SearchChunkResponseTypes.md +49 -0
  29. data/docs/SearchGroupSlimChunksResult.md +22 -0
  30. data/docs/SearchOverGroupsData.md +6 -4
  31. data/docs/SearchOverGroupsResponseTypes.md +49 -0
  32. data/docs/SearchOverGroupsSlimChunksResponseBody.md +20 -0
  33. data/docs/SearchSlimChunkQueryResponseBody.md +20 -0
  34. data/docs/SearchWithinGroupData.md +3 -1
  35. data/docs/SearchWithinGroupResponseTypes.md +49 -0
  36. data/docs/SlimChunkMetadata.md +36 -0
  37. data/docs/SlimUser.md +1 -7
  38. data/docs/StripeApi.md +1 -1
  39. data/docs/TopicApi.md +9 -9
  40. data/docs/UpdateChunkData.md +2 -0
  41. data/docs/UpdateChunkGroupData.md +4 -0
  42. data/docs/UpdateGroupByTrackingIDData.md +4 -0
  43. data/docs/UpdateUserData.md +1 -7
  44. data/docs/UserApi.md +9 -9
  45. data/lib/trieve_ruby_client/api/auth_api.rb +13 -11
  46. data/lib/trieve_ruby_client/api/chunk_api.rb +7 -7
  47. data/lib/trieve_ruby_client/api/chunk_group_api.rb +38 -31
  48. data/lib/trieve_ruby_client/api/dataset_api.rb +17 -22
  49. data/lib/trieve_ruby_client/api/events_api.rb +3 -3
  50. data/lib/trieve_ruby_client/api/file_api.rb +5 -5
  51. data/lib/trieve_ruby_client/api/health_api.rb +1 -1
  52. data/lib/trieve_ruby_client/api/invitation_api.rb +1 -1
  53. data/lib/trieve_ruby_client/api/message_api.rb +1 -1
  54. data/lib/trieve_ruby_client/api/organization_api.rb +1 -1
  55. data/lib/trieve_ruby_client/api/stripe_api.rb +1 -1
  56. data/lib/trieve_ruby_client/api/topic_api.rb +11 -16
  57. data/lib/trieve_ruby_client/api/user_api.rb +11 -16
  58. data/lib/trieve_ruby_client/api_client.rb +1 -1
  59. data/lib/trieve_ruby_client/api_error.rb +1 -1
  60. data/lib/trieve_ruby_client/configuration.rb +7 -7
  61. data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +17 -12
  62. data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
  63. data/lib/trieve_ruby_client/models/auth_query.rb +1 -1
  64. data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +1 -1
  65. data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
  66. data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
  67. data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
  68. data/lib/trieve_ruby_client/models/chunk_data.rb +1 -1
  69. data/lib/trieve_ruby_client/models/chunk_filter.rb +1 -1
  70. data/lib/trieve_ruby_client/models/chunk_group.rb +22 -2
  71. data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
  72. data/lib/trieve_ruby_client/models/chunk_metadata.rb +1 -1
  73. data/lib/trieve_ruby_client/models/chunk_metadata_with_file_data.rb +1 -1
  74. data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +1 -1
  75. data/lib/trieve_ruby_client/models/create_chunk_data.rb +1 -1
  76. data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +26 -2
  77. data/lib/trieve_ruby_client/models/create_dataset_request.rb +1 -1
  78. data/lib/trieve_ruby_client/models/create_message_data.rb +1 -1
  79. data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
  80. data/lib/trieve_ruby_client/models/create_topic_data.rb +1 -1
  81. data/lib/trieve_ruby_client/models/dataset.rb +1 -1
  82. data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
  83. data/lib/trieve_ruby_client/models/dataset_dto.rb +1 -1
  84. data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
  85. data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
  86. data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
  87. data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
  88. data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
  89. data/lib/trieve_ruby_client/models/event.rb +1 -1
  90. data/lib/trieve_ruby_client/models/event_return.rb +1 -1
  91. data/lib/trieve_ruby_client/models/field_condition.rb +1 -1
  92. data/lib/trieve_ruby_client/models/file.rb +1 -1
  93. data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
  94. data/lib/trieve_ruby_client/models/generate_chunks_request.rb +1 -1
  95. data/lib/trieve_ruby_client/models/get_events_data.rb +1 -1
  96. data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
  97. data/lib/trieve_ruby_client/models/group_data.rb +1 -1
  98. data/lib/trieve_ruby_client/models/group_score_chunk_dto.rb +12 -2
  99. data/lib/trieve_ruby_client/models/group_slim_chunks_dto.rb +239 -0
  100. data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
  101. data/lib/trieve_ruby_client/models/match_condition.rb +1 -1
  102. data/lib/trieve_ruby_client/models/message.rb +1 -1
  103. data/lib/trieve_ruby_client/models/organization.rb +1 -1
  104. data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
  105. data/lib/trieve_ruby_client/models/range.rb +5 -5
  106. data/lib/trieve_ruby_client/models/range_condition.rb +105 -0
  107. data/lib/trieve_ruby_client/models/reccomend_group_chunks_request.rb +17 -6
  108. data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +28 -6
  109. data/lib/trieve_ruby_client/models/recommend_chunks_response_types.rb +105 -0
  110. data/lib/trieve_ruby_client/models/recommend_group_chunk_response_types.rb +105 -0
  111. data/lib/trieve_ruby_client/models/recommend_group_chunks_request.rb +341 -0
  112. data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
  113. data/lib/trieve_ruby_client/models/return_queued_chunk.rb +1 -1
  114. data/lib/trieve_ruby_client/models/score_chunk_dto.rb +1 -1
  115. data/lib/trieve_ruby_client/models/score_slim_chunks.rb +239 -0
  116. data/lib/trieve_ruby_client/models/search_chunk_data.rb +14 -3
  117. data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
  118. data/lib/trieve_ruby_client/models/search_chunk_response_types.rb +105 -0
  119. data/lib/trieve_ruby_client/models/search_group_slim_chunks_result.rb +255 -0
  120. data/lib/trieve_ruby_client/models/search_groups_result.rb +1 -1
  121. data/lib/trieve_ruby_client/models/search_over_groups_data.rb +19 -7
  122. data/lib/trieve_ruby_client/models/search_over_groups_response_body.rb +1 -1
  123. data/lib/trieve_ruby_client/models/search_over_groups_response_types.rb +105 -0
  124. data/lib/trieve_ruby_client/models/search_over_groups_slim_chunks_response_body.rb +239 -0
  125. data/lib/trieve_ruby_client/models/search_slim_chunk_query_response_body.rb +239 -0
  126. data/lib/trieve_ruby_client/models/search_within_group_data.rb +14 -3
  127. data/lib/trieve_ruby_client/models/search_within_group_response_types.rb +105 -0
  128. data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +1 -1
  129. data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
  130. data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +1 -1
  131. data/lib/trieve_ruby_client/models/slim_chunk_metadata.rb +329 -0
  132. data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
  133. data/lib/trieve_ruby_client/models/slim_user.rb +5 -41
  134. data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
  135. data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
  136. data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
  137. data/lib/trieve_ruby_client/models/topic.rb +1 -1
  138. data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
  139. data/lib/trieve_ruby_client/models/update_chunk_data.rb +15 -2
  140. data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +26 -2
  141. data/lib/trieve_ruby_client/models/update_dataset_request.rb +1 -1
  142. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +26 -2
  143. data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
  144. data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
  145. data/lib/trieve_ruby_client/models/update_user_data.rb +6 -39
  146. data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
  147. data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
  148. data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
  149. data/lib/trieve_ruby_client/version.rb +2 -2
  150. data/lib/trieve_ruby_client.rb +14 -3
  151. data/openapi-generator.yaml +1 -1
  152. data/openapi.json +679 -261
  153. data/spec/models/group_slim_chunks_dto_spec.rb +42 -0
  154. data/spec/models/range_condition_spec.rb +32 -0
  155. data/spec/models/recommend_chunks_response_types_spec.rb +32 -0
  156. data/spec/models/recommend_group_chunk_response_types_spec.rb +32 -0
  157. data/spec/models/recommend_group_chunks_request_spec.rb +84 -0
  158. data/spec/models/score_slim_chunks_spec.rb +42 -0
  159. data/spec/models/search_chunk_response_types_spec.rb +32 -0
  160. data/spec/models/search_group_slim_chunks_result_spec.rb +48 -0
  161. data/spec/models/search_over_groups_response_types_spec.rb +32 -0
  162. data/spec/models/search_over_groups_slim_chunks_response_body_spec.rb +42 -0
  163. data/spec/models/search_slim_chunk_query_response_body_spec.rb +42 -0
  164. data/spec/models/search_within_group_response_types_spec.rb +32 -0
  165. data/spec/models/slim_chunk_metadata_spec.rb +90 -0
  166. data/spec/spec_helper.rb +1 -1
  167. data/trieve_ruby_client-0.5.0.gem +0 -0
  168. data/trieve_ruby_client-0.5.7.gem +0 -0
  169. data/trieve_ruby_client.gemspec +1 -1
  170. metadata +57 -4
  171. data/trieve_ruby_client-0.3.5.gem +0 -0
  172. data/trieve_ruby_client-0.4.0.gem +0 -0
data/docs/FileApi.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TrieveRubyClient::FileApi
2
2
 
3
- All URIs are relative to *http://localhost:8090*
3
+ All URIs are relative to *https://api.trieve.ai*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
@@ -16,7 +16,7 @@ All URIs are relative to *http://localhost:8090*
16
16
 
17
17
  Delete File
18
18
 
19
- Delete File Delete a file from S3 attached to the server based on its id. This will disassociate chunks from the file, but will not delete the chunks. We plan to add support for deleting chunks in a release soon. Auth'ed user must be an admin or owner of the dataset's organization to upload a file.
19
+ Delete File Delete a file from S3 attached to the server based on its id. This will disassociate chunks from the file, but only delete them all together if you specify delete_chunks to be true. Auth'ed user must be an admin or owner of the dataset's organization to delete a file.
20
20
 
21
21
  ### Examples
22
22
 
@@ -165,7 +165,7 @@ end
165
165
 
166
166
  Get File
167
167
 
168
- Get File Download a file from S3 attached to the server based on its id. We plan to add support for getting signed S3 URLs to download from S3 directly in a release soon.
168
+ Get File Download a file based on its id.
169
169
 
170
170
  ### Examples
171
171
 
@@ -5,6 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **group_id** | **String** | | |
8
+ | **group_tracking_id** | **String** | | [optional] |
8
9
  | **metadata** | [**Array<ScoreChunkDTO>**](ScoreChunkDTO.md) | | |
9
10
 
10
11
  ## Example
@@ -14,6 +15,7 @@ require 'trieve_ruby_client'
14
15
 
15
16
  instance = TrieveRubyClient::GroupScoreChunkDTO.new(
16
17
  group_id: null,
18
+ group_tracking_id: null,
17
19
  metadata: null
18
20
  )
19
21
  ```
@@ -0,0 +1,20 @@
1
+ # TrieveRubyClient::GroupSlimChunksDTO
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **group_id** | **String** | | |
8
+ | **metadata** | [**Array<ScoreSlimChunks>**](ScoreSlimChunks.md) | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'trieve_ruby_client'
14
+
15
+ instance = TrieveRubyClient::GroupSlimChunksDTO.new(
16
+ group_id: null,
17
+ metadata: null
18
+ )
19
+ ```
20
+
data/docs/HealthApi.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TrieveRubyClient::HealthApi
2
2
 
3
- All URIs are relative to *http://localhost:8090*
3
+ All URIs are relative to *https://api.trieve.ai*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
@@ -1,6 +1,6 @@
1
1
  # TrieveRubyClient::InvitationApi
2
2
 
3
- All URIs are relative to *http://localhost:8090*
3
+ All URIs are relative to *https://api.trieve.ai*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
data/docs/MessageApi.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TrieveRubyClient::MessageApi
2
2
 
3
- All URIs are relative to *http://localhost:8090*
3
+ All URIs are relative to *https://api.trieve.ai*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
@@ -1,6 +1,6 @@
1
1
  # TrieveRubyClient::OrganizationApi
2
2
 
3
- All URIs are relative to *http://localhost:8090*
3
+ All URIs are relative to *https://api.trieve.ai*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
data/docs/Range.md CHANGED
@@ -4,10 +4,10 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **gt** | **Float** | | [optional] |
8
- | **gte** | **Float** | | [optional] |
9
- | **lt** | **Float** | | [optional] |
10
- | **lte** | **Float** | | [optional] |
7
+ | **gt** | [**RangeCondition**](RangeCondition.md) | | [optional] |
8
+ | **gte** | [**RangeCondition**](RangeCondition.md) | | [optional] |
9
+ | **lt** | [**RangeCondition**](RangeCondition.md) | | [optional] |
10
+ | **lte** | [**RangeCondition**](RangeCondition.md) | | [optional] |
11
11
 
12
12
  ## Example
13
13
 
@@ -0,0 +1,49 @@
1
+ # TrieveRubyClient::RangeCondition
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'trieve_ruby_client'
13
+
14
+ TrieveRubyClient::RangeCondition.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'Float',
18
+ # :'String'
19
+ # ]
20
+ ```
21
+
22
+ ### build
23
+
24
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
25
+
26
+ #### Example
27
+
28
+ ```ruby
29
+ require 'trieve_ruby_client'
30
+
31
+ TrieveRubyClient::RangeCondition.build(data)
32
+ # => #<Float:0x00007fdd4aab02a0>
33
+
34
+ TrieveRubyClient::RangeCondition.build(data_that_doesnt_match)
35
+ # => nil
36
+ ```
37
+
38
+ #### Parameters
39
+
40
+ | Name | Type | Description |
41
+ | ---- | ---- | ----------- |
42
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
43
+
44
+ #### Return type
45
+
46
+ - `Float`
47
+ - `String`
48
+ - `nil` (if no type matches)
49
+
@@ -11,6 +11,7 @@
11
11
  | **negative_group_tracking_ids** | **Array&lt;String&gt;** | The ids of the groups to be used as negative examples for the recommendation. The groups in this array will be used to filter out similar groups. | [optional] |
12
12
  | **positive_group_ids** | **Array&lt;String&gt;** | The ids of the groups to be used as positive examples for the recommendation. The groups in this array will be used to find similar groups. | [optional] |
13
13
  | **positive_group_tracking_ids** | **Array&lt;String&gt;** | The ids of the groups to be used as positive examples for the recommendation. The groups in this array will be used to find similar groups. | [optional] |
14
+ | **slim_chunks** | **Boolean** | 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. | [optional] |
14
15
 
15
16
  ## Example
16
17
 
@@ -24,7 +25,8 @@ instance = TrieveRubyClient::ReccomendGroupChunksRequest.new(
24
25
  negative_group_ids: null,
25
26
  negative_group_tracking_ids: null,
26
27
  positive_group_ids: null,
27
- positive_group_tracking_ids: null
28
+ positive_group_tracking_ids: null,
29
+ slim_chunks: null
28
30
  )
29
31
  ```
30
32
 
@@ -10,6 +10,8 @@
10
10
  | **negative_tracking_ids** | **Array&lt;String&gt;** | The tracking_ids of the chunks to be used as negative examples for the recommendation. The chunks in this array will be used to filter out similar chunks. | [optional] |
11
11
  | **positive_chunk_ids** | **Array&lt;String&gt;** | The ids of the chunks to be used as positive examples for the recommendation. The chunks in this array will be used to find similar chunks. | [optional] |
12
12
  | **positive_tracking_ids** | **Array&lt;String&gt;** | The tracking_ids of the chunks to be used as positive examples for the recommendation. The chunks in this array will be used to find similar chunks. | [optional] |
13
+ | **slim_chunks** | **Boolean** | 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. | [optional] |
14
+ | **strategy** | **String** | Strategy to use for recommendations, either \&quot;average_vector\&quot; or \&quot;best_score\&quot;. The default is \&quot;average_vector\&quot;. The \&quot;average_vector\&quot; strategy will construct a single average vector from the positive and negative samples then use it to perform a pseudo-search. The \&quot;best_score\&quot; 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. | [optional] |
13
15
 
14
16
  ## Example
15
17
 
@@ -22,7 +24,9 @@ instance = TrieveRubyClient::RecommendChunksRequest.new(
22
24
  negative_chunk_ids: null,
23
25
  negative_tracking_ids: null,
24
26
  positive_chunk_ids: null,
25
- positive_tracking_ids: null
27
+ positive_tracking_ids: null,
28
+ slim_chunks: null,
29
+ strategy: null
26
30
  )
27
31
  ```
28
32
 
@@ -0,0 +1,49 @@
1
+ # TrieveRubyClient::RecommendChunksResponseTypes
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'trieve_ruby_client'
13
+
14
+ TrieveRubyClient::RecommendChunksResponseTypes.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'Array<ChunkMetadata>',
18
+ # :'Array<SlimChunkMetadata>'
19
+ # ]
20
+ ```
21
+
22
+ ### build
23
+
24
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
25
+
26
+ #### Example
27
+
28
+ ```ruby
29
+ require 'trieve_ruby_client'
30
+
31
+ TrieveRubyClient::RecommendChunksResponseTypes.build(data)
32
+ # => #<Array<ChunkMetadata>:0x00007fdd4aab02a0>
33
+
34
+ TrieveRubyClient::RecommendChunksResponseTypes.build(data_that_doesnt_match)
35
+ # => nil
36
+ ```
37
+
38
+ #### Parameters
39
+
40
+ | Name | Type | Description |
41
+ | ---- | ---- | ----------- |
42
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
43
+
44
+ #### Return type
45
+
46
+ - `Array<ChunkMetadata>`
47
+ - `Array<SlimChunkMetadata>`
48
+ - `nil` (if no type matches)
49
+
@@ -0,0 +1,49 @@
1
+ # TrieveRubyClient::RecommendGroupChunkResponseTypes
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'trieve_ruby_client'
13
+
14
+ TrieveRubyClient::RecommendGroupChunkResponseTypes.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'Array<GroupScoreChunkDTO>',
18
+ # :'Array<GroupSlimChunksDTO>'
19
+ # ]
20
+ ```
21
+
22
+ ### build
23
+
24
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
25
+
26
+ #### Example
27
+
28
+ ```ruby
29
+ require 'trieve_ruby_client'
30
+
31
+ TrieveRubyClient::RecommendGroupChunkResponseTypes.build(data)
32
+ # => #<Array<GroupScoreChunkDTO>:0x00007fdd4aab02a0>
33
+
34
+ TrieveRubyClient::RecommendGroupChunkResponseTypes.build(data_that_doesnt_match)
35
+ # => nil
36
+ ```
37
+
38
+ #### Parameters
39
+
40
+ | Name | Type | Description |
41
+ | ---- | ---- | ----------- |
42
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
43
+
44
+ #### Return type
45
+
46
+ - `Array<GroupScoreChunkDTO>`
47
+ - `Array<GroupSlimChunksDTO>`
48
+ - `nil` (if no type matches)
49
+
@@ -0,0 +1,34 @@
1
+ # TrieveRubyClient::RecommendGroupChunksRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **filters** | [**ChunkFilter**](ChunkFilter.md) | | [optional] |
8
+ | **group_size** | **Integer** | The number of chunks to fetch for each group. This is the number of chunks which will be returned in the response for each group. The default is 3. 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 reduce latency due to content download and serialization. | [optional] |
9
+ | **limit** | **Integer** | The number of groups to return. This is the number of groups which will be returned in the response. The default is 10. | [optional] |
10
+ | **negative_group_ids** | **Array&lt;String&gt;** | The ids of the groups to be used as negative examples for the recommendation. The groups in this array will be used to filter out similar groups. | [optional] |
11
+ | **negative_group_tracking_ids** | **Array&lt;String&gt;** | The ids of the groups to be used as negative examples for the recommendation. The groups in this array will be used to filter out similar groups. | [optional] |
12
+ | **positive_group_ids** | **Array&lt;String&gt;** | The ids of the groups to be used as positive examples for the recommendation. The groups in this array will be used to find similar groups. | [optional] |
13
+ | **positive_group_tracking_ids** | **Array&lt;String&gt;** | The ids of the groups to be used as positive examples for the recommendation. The groups in this array will be used to find similar groups. | [optional] |
14
+ | **slim_chunks** | **Boolean** | 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. | [optional] |
15
+ | **strategy** | **String** | Strategy to use for recommendations, either \&quot;average_vector\&quot; or \&quot;best_score\&quot;. The default is \&quot;average_vector\&quot;. The \&quot;average_vector\&quot; strategy will construct a single average vector from the positive and negative samples then use it to perform a pseudo-search. The \&quot;best_score\&quot; 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. | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'trieve_ruby_client'
21
+
22
+ instance = TrieveRubyClient::RecommendGroupChunksRequest.new(
23
+ filters: null,
24
+ group_size: null,
25
+ limit: null,
26
+ negative_group_ids: null,
27
+ negative_group_tracking_ids: null,
28
+ positive_group_ids: null,
29
+ positive_group_tracking_ids: null,
30
+ slim_chunks: null,
31
+ strategy: null
32
+ )
33
+ ```
34
+
@@ -0,0 +1,20 @@
1
+ # TrieveRubyClient::ScoreSlimChunks
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **metadata** | [**Array&lt;SlimChunkMetadata&gt;**](SlimChunkMetadata.md) | | |
8
+ | **score** | **Float** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'trieve_ruby_client'
14
+
15
+ instance = TrieveRubyClient::ScoreSlimChunks.new(
16
+ metadata: null,
17
+ score: null
18
+ )
19
+ ```
20
+
@@ -9,11 +9,12 @@
9
9
  | **get_collisions** | **Boolean** | 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. | [optional] |
10
10
  | **highlight_delimiters** | **Array&lt;String&gt;** | Set highlight_delimiters to a list of strings to use as delimiters for highlighting. If not specified, this defaults to [\&quot;?\&quot;, \&quot;,\&quot;, \&quot;.\&quot;, \&quot;!\&quot;]. | [optional] |
11
11
  | **highlight_results** | **Boolean** | Set highlight_results to true to highlight the results. If not specified, this defaults to true. | [optional] |
12
- | **page** | **Integer** | Page of chunks to fetch. Each page is 10 chunks. Support for custom page size is coming soon. | [optional] |
12
+ | **page** | **Integer** | Page of chunks to fetch. Page is 1-indexed. | [optional] |
13
13
  | **page_size** | **Integer** | Page size is the number of chunks to fetch. This can be used to fetch more than 10 chunks at a time. | [optional] |
14
14
  | **query** | **String** | 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. | |
15
15
  | **score_threshold** | **Float** | Set score_threshold to a float to filter out chunks with a score below the threshold. | [optional] |
16
16
  | **search_type** | **String** | Can be either \&quot;semantic\&quot;, \&quot;fulltext\&quot;, or \&quot;hybrid\&quot;. \&quot;hybrid\&quot; will pull in one page (10 chunks) of both semantic and full-text results then re-rank them using BAAI/bge-reranker-large. \&quot;semantic\&quot; will pull in one page (10 chunks) of the nearest cosine distant vectors. \&quot;fulltext\&quot; will pull in one page (10 chunks) of full-text results based on SPLADE. | |
17
+ | **slim_chunks** | **Boolean** | 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. | [optional] |
17
18
  | **use_weights** | **Boolean** | 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. | [optional] |
18
19
 
19
20
  ## Example
@@ -32,6 +33,7 @@ instance = TrieveRubyClient::SearchChunkData.new(
32
33
  query: null,
33
34
  score_threshold: null,
34
35
  search_type: null,
36
+ slim_chunks: null,
35
37
  use_weights: null
36
38
  )
37
39
  ```
@@ -0,0 +1,49 @@
1
+ # TrieveRubyClient::SearchChunkResponseTypes
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'trieve_ruby_client'
13
+
14
+ TrieveRubyClient::SearchChunkResponseTypes.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'SearchChunkQueryResponseBody',
18
+ # :'SearchSlimChunkQueryResponseBody'
19
+ # ]
20
+ ```
21
+
22
+ ### build
23
+
24
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
25
+
26
+ #### Example
27
+
28
+ ```ruby
29
+ require 'trieve_ruby_client'
30
+
31
+ TrieveRubyClient::SearchChunkResponseTypes.build(data)
32
+ # => #<SearchChunkQueryResponseBody:0x00007fdd4aab02a0>
33
+
34
+ TrieveRubyClient::SearchChunkResponseTypes.build(data_that_doesnt_match)
35
+ # => nil
36
+ ```
37
+
38
+ #### Parameters
39
+
40
+ | Name | Type | Description |
41
+ | ---- | ---- | ----------- |
42
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
43
+
44
+ #### Return type
45
+
46
+ - `SearchChunkQueryResponseBody`
47
+ - `SearchSlimChunkQueryResponseBody`
48
+ - `nil` (if no type matches)
49
+
@@ -0,0 +1,22 @@
1
+ # TrieveRubyClient::SearchGroupSlimChunksResult
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **bookmarks** | [**Array&lt;ScoreSlimChunks&gt;**](ScoreSlimChunks.md) | | |
8
+ | **group** | [**ChunkGroup**](ChunkGroup.md) | | |
9
+ | **total_pages** | **Integer** | | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'trieve_ruby_client'
15
+
16
+ instance = TrieveRubyClient::SearchGroupSlimChunksResult.new(
17
+ bookmarks: null,
18
+ group: null,
19
+ total_pages: null
20
+ )
21
+ ```
22
+
@@ -6,14 +6,15 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **filters** | [**ChunkFilter**](ChunkFilter.md) | | [optional] |
8
8
  | **get_collisions** | **Boolean** | 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. | [optional] |
9
- | **group_size** | **Integer** | | [optional] |
9
+ | **group_size** | **Integer** | 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. | [optional] |
10
10
  | **highlight_delimiters** | **Array&lt;String&gt;** | Set highlight_delimiters to a list of strings to use as delimiters for highlighting. If not specified, this defaults to [\&quot;?\&quot;, \&quot;,\&quot;, \&quot;.\&quot;, \&quot;!\&quot;]. | [optional] |
11
11
  | **highlight_results** | **Boolean** | Set highlight_results to true to highlight the results. If not specified, this defaults to true. | [optional] |
12
- | **page** | **Integer** | Page of chunks to fetch. Each page is 10 chunks. Support for custom page size is coming soon. | [optional] |
13
- | **page_size** | **Integer** | Page size is the number of chunks to fetch. This can be used to fetch more than 10 chunks at a time. | [optional] |
12
+ | **page** | **Integer** | Page of group results to fetch. Page is 1-indexed. | [optional] |
13
+ | **page_size** | **Integer** | Page size is the number of group results to fetch. The default is 10. | [optional] |
14
14
  | **query** | **String** | 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. | |
15
15
  | **score_threshold** | **Float** | Set score_threshold to a float to filter out chunks with a score below the threshold. | [optional] |
16
16
  | **search_type** | **String** | Can be either \&quot;semantic\&quot;, \&quot;fulltext\&quot;, or \&quot;hybrid\&quot;. \&quot;hybrid\&quot; will pull in one page (10 chunks) of both semantic and full-text results then re-rank them using BAAI/bge-reranker-large. \&quot;semantic\&quot; will pull in one page (10 chunks) of the nearest cosine distant vectors. \&quot;fulltext\&quot; will pull in one page (10 chunks) of full-text results based on SPLADE. | |
17
+ | **slim_chunks** | **Boolean** | 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. | [optional] |
17
18
 
18
19
  ## Example
19
20
 
@@ -30,7 +31,8 @@ instance = TrieveRubyClient::SearchOverGroupsData.new(
30
31
  page_size: null,
31
32
  query: null,
32
33
  score_threshold: null,
33
- search_type: null
34
+ search_type: null,
35
+ slim_chunks: null
34
36
  )
35
37
  ```
36
38
 
@@ -0,0 +1,49 @@
1
+ # TrieveRubyClient::SearchOverGroupsResponseTypes
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'trieve_ruby_client'
13
+
14
+ TrieveRubyClient::SearchOverGroupsResponseTypes.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'SearchOverGroupsResponseBody',
18
+ # :'SearchOverGroupsSlimChunksResponseBody'
19
+ # ]
20
+ ```
21
+
22
+ ### build
23
+
24
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
25
+
26
+ #### Example
27
+
28
+ ```ruby
29
+ require 'trieve_ruby_client'
30
+
31
+ TrieveRubyClient::SearchOverGroupsResponseTypes.build(data)
32
+ # => #<SearchOverGroupsResponseBody:0x00007fdd4aab02a0>
33
+
34
+ TrieveRubyClient::SearchOverGroupsResponseTypes.build(data_that_doesnt_match)
35
+ # => nil
36
+ ```
37
+
38
+ #### Parameters
39
+
40
+ | Name | Type | Description |
41
+ | ---- | ---- | ----------- |
42
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
43
+
44
+ #### Return type
45
+
46
+ - `SearchOverGroupsResponseBody`
47
+ - `SearchOverGroupsSlimChunksResponseBody`
48
+ - `nil` (if no type matches)
49
+
@@ -0,0 +1,20 @@
1
+ # TrieveRubyClient::SearchOverGroupsSlimChunksResponseBody
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **group_chunks** | [**Array&lt;GroupSlimChunksDTO&gt;**](GroupSlimChunksDTO.md) | | |
8
+ | **total_chunk_pages** | **Integer** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'trieve_ruby_client'
14
+
15
+ instance = TrieveRubyClient::SearchOverGroupsSlimChunksResponseBody.new(
16
+ group_chunks: null,
17
+ total_chunk_pages: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # TrieveRubyClient::SearchSlimChunkQueryResponseBody
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **score_chunks** | [**Array&lt;ScoreSlimChunks&gt;**](ScoreSlimChunks.md) | | |
8
+ | **total_chunk_pages** | **Integer** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'trieve_ruby_client'
14
+
15
+ instance = TrieveRubyClient::SearchSlimChunkQueryResponseBody.new(
16
+ score_chunks: null,
17
+ total_chunk_pages: null
18
+ )
19
+ ```
20
+
@@ -10,11 +10,12 @@
10
10
  | **group_tracking_id** | **String** | Group_tracking_id specifies the group to search within by tracking id. Results will only consist of chunks which are bookmarks within the specified group. If both group_id and group_tracking_id are provided, group_id will be used. | [optional] |
11
11
  | **highlight_delimiters** | **Array&lt;String&gt;** | Set highlight_delimiters to a list of strings to use as delimiters for highlighting. If not specified, this defaults to [\&quot;?\&quot;, \&quot;,\&quot;, \&quot;.\&quot;, \&quot;!\&quot;]. | [optional] |
12
12
  | **highlight_results** | **Boolean** | Set highlight_results to true to highlight the results. If not specified, this defaults to true. | [optional] |
13
- | **page** | **Integer** | The page of chunks to fetch. Each page is 10 chunks. Support for custom page size is coming soon. | [optional] |
13
+ | **page** | **Integer** | The page of chunks to fetch. Page is 1-indexed. | [optional] |
14
14
  | **page_size** | **Integer** | The page size is the number of chunks to fetch. This can be used to fetch more than 10 chunks at a time. | [optional] |
15
15
  | **query** | **String** | 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. | |
16
16
  | **score_threshold** | **Float** | Set score_threshold to a float to filter out chunks with a score below the threshold. | [optional] |
17
17
  | **search_type** | **String** | Search_type can be either \&quot;semantic\&quot;, \&quot;fulltext\&quot;, or \&quot;hybrid\&quot;. \&quot;hybrid\&quot; will pull in one page (10 chunks) of both semantic and full-text results then re-rank them using BAAI/bge-reranker-large. \&quot;semantic\&quot; will pull in one page (10 chunks) of the nearest cosine distant vectors. \&quot;fulltext\&quot; will pull in one page (10 chunks) of full-text results based on SPLADE. | |
18
+ | **slim_chunks** | **Boolean** | 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. | [optional] |
18
19
  | **use_weights** | **Boolean** | 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. | [optional] |
19
20
 
20
21
  ## Example
@@ -34,6 +35,7 @@ instance = TrieveRubyClient::SearchWithinGroupData.new(
34
35
  query: null,
35
36
  score_threshold: null,
36
37
  search_type: null,
38
+ slim_chunks: null,
37
39
  use_weights: null
38
40
  )
39
41
  ```
@@ -0,0 +1,49 @@
1
+ # TrieveRubyClient::SearchWithinGroupResponseTypes
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'trieve_ruby_client'
13
+
14
+ TrieveRubyClient::SearchWithinGroupResponseTypes.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'SearchGroupSlimChunksResult',
18
+ # :'SearchGroupsResult'
19
+ # ]
20
+ ```
21
+
22
+ ### build
23
+
24
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
25
+
26
+ #### Example
27
+
28
+ ```ruby
29
+ require 'trieve_ruby_client'
30
+
31
+ TrieveRubyClient::SearchWithinGroupResponseTypes.build(data)
32
+ # => #<SearchGroupSlimChunksResult:0x00007fdd4aab02a0>
33
+
34
+ TrieveRubyClient::SearchWithinGroupResponseTypes.build(data_that_doesnt_match)
35
+ # => nil
36
+ ```
37
+
38
+ #### Parameters
39
+
40
+ | Name | Type | Description |
41
+ | ---- | ---- | ----------- |
42
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
43
+
44
+ #### Return type
45
+
46
+ - `SearchGroupSlimChunksResult`
47
+ - `SearchGroupsResult`
48
+ - `nil` (if no type matches)
49
+