trieve_ruby_client 0.8.2 → 0.10.7

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 (219) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +39 -30
  3. data/docs/ApiKeyRespBody.md +32 -0
  4. data/docs/AutocompleteData.md +42 -0
  5. data/docs/AutocompleteReqPayload.md +50 -0
  6. data/docs/BoostPhrase.md +20 -0
  7. data/docs/ChunkApi.md +140 -66
  8. data/docs/ChunkData.md +3 -1
  9. data/docs/ChunkFilter.md +3 -3
  10. data/docs/ChunkGroup.md +1 -1
  11. data/docs/ChunkGroupApi.md +35 -33
  12. data/docs/ChunkMetadata.md +5 -1
  13. data/docs/ChunkMetadataStringTagSet.md +46 -0
  14. data/docs/ChunkMetadataTypes.md +51 -0
  15. data/docs/ChunkReqPayload.md +50 -0
  16. data/docs/ClientDatasetConfiguration.md +0 -2
  17. data/docs/ConditionType.md +49 -0
  18. data/docs/ContentChunkMetadata.md +32 -0
  19. data/docs/CreateChunkGroupReqPayload.md +28 -0
  20. data/docs/CreateChunkReqPayloadEnum.md +49 -0
  21. data/docs/CreateDatasetRequest.md +2 -2
  22. data/docs/CreateMessageData.md +2 -2
  23. data/docs/CreateMessageReqPayload.md +42 -0
  24. data/docs/CreateTopicReqPayload.md +22 -0
  25. data/docs/Dataset.md +2 -0
  26. data/docs/DatasetApi.md +236 -12
  27. data/docs/DateRange.md +24 -0
  28. data/docs/EditMessageReqPayload.md +44 -0
  29. data/docs/FieldCondition.md +2 -0
  30. data/docs/File.md +1 -1
  31. data/docs/FileApi.md +7 -7
  32. data/docs/GenerateChunksRequest.md +2 -0
  33. data/docs/GetDatasetsPagination.md +20 -0
  34. data/docs/HasIDCondition.md +20 -0
  35. data/docs/InvitationApi.md +1 -1
  36. data/docs/MatchCondition.md +3 -1
  37. data/docs/MessageApi.md +42 -42
  38. data/docs/Organization.md +2 -0
  39. data/docs/OrganizationApi.md +24 -25
  40. data/docs/RangeCondition.md +1 -3
  41. data/docs/RegenerateMessageReqPayload.md +40 -0
  42. data/docs/RemoveChunkFromGroupReqPayload.md +18 -0
  43. data/docs/ScoreChunkDTO.md +3 -1
  44. data/docs/SearchChunkData.md +9 -3
  45. data/docs/SearchChunksReqPayload.md +54 -0
  46. data/docs/SearchOverGroupsData.md +10 -2
  47. data/docs/SearchWithinGroupData.md +12 -2
  48. data/docs/SetUserApiKeyRequest.md +4 -0
  49. data/docs/SlimChunkMetadata.md +4 -0
  50. data/docs/SuggestedQueriesReqPayload.md +18 -0
  51. data/docs/TopicApi.md +16 -16
  52. data/docs/UpdateChunkData.md +2 -0
  53. data/docs/UpdateChunkReqPayload.md +46 -0
  54. data/docs/UpdateDatasetRequest.md +2 -0
  55. data/docs/UpdateGroupByTrackingIDReqPayload.md +26 -0
  56. data/docs/UpdateTopicReqPayload.md +20 -0
  57. data/docs/UpdateUserOrgRoleData.md +1 -1
  58. data/docs/UploadFileReqPayload.md +40 -0
  59. data/docs/UserApi.md +7 -8
  60. data/lib/trieve_ruby_client/api/auth_api.rb +1 -1
  61. data/lib/trieve_ruby_client/api/chunk_api.rb +158 -83
  62. data/lib/trieve_ruby_client/api/chunk_group_api.rb +58 -51
  63. data/lib/trieve_ruby_client/api/dataset_api.rb +224 -15
  64. data/lib/trieve_ruby_client/api/events_api.rb +1 -1
  65. data/lib/trieve_ruby_client/api/file_api.rb +12 -12
  66. data/lib/trieve_ruby_client/api/health_api.rb +1 -1
  67. data/lib/trieve_ruby_client/api/invitation_api.rb +3 -3
  68. data/lib/trieve_ruby_client/api/message_api.rb +50 -50
  69. data/lib/trieve_ruby_client/api/organization_api.rb +27 -27
  70. data/lib/trieve_ruby_client/api/stripe_api.rb +1 -1
  71. data/lib/trieve_ruby_client/api/topic_api.rb +27 -27
  72. data/lib/trieve_ruby_client/api/user_api.rb +8 -8
  73. data/lib/trieve_ruby_client/api_client.rb +1 -1
  74. data/lib/trieve_ruby_client/api_error.rb +1 -1
  75. data/lib/trieve_ruby_client/configuration.rb +1 -1
  76. data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +1 -1
  77. data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
  78. data/lib/trieve_ruby_client/models/api_key_resp_body.rb +325 -0
  79. data/lib/trieve_ruby_client/models/auth_query.rb +1 -1
  80. data/lib/trieve_ruby_client/models/autocomplete_data.rb +378 -0
  81. data/lib/trieve_ruby_client/models/autocomplete_req_payload.rb +467 -0
  82. data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +1 -1
  83. data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
  84. data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
  85. data/lib/trieve_ruby_client/models/boost_phrase.rb +240 -0
  86. data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
  87. data/lib/trieve_ruby_client/models/chunk_data.rb +16 -9
  88. data/lib/trieve_ruby_client/models/chunk_filter.rb +4 -4
  89. data/lib/trieve_ruby_client/models/chunk_group.rb +5 -3
  90. data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
  91. data/lib/trieve_ruby_client/models/chunk_metadata.rb +28 -4
  92. data/lib/trieve_ruby_client/models/chunk_metadata_string_tag_set.rb +387 -0
  93. data/lib/trieve_ruby_client/models/chunk_metadata_types.rb +106 -0
  94. data/lib/trieve_ruby_client/models/chunk_metadata_with_score.rb +1 -1
  95. data/lib/trieve_ruby_client/models/chunk_req_payload.rb +400 -0
  96. data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +2 -18
  97. data/lib/trieve_ruby_client/models/condition_type.rb +105 -0
  98. data/lib/trieve_ruby_client/models/content_chunk_metadata.rb +299 -0
  99. data/lib/trieve_ruby_client/models/create_chunk_data.rb +1 -1
  100. data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +1 -1
  101. data/lib/trieve_ruby_client/models/create_chunk_group_req_payload.rb +273 -0
  102. data/lib/trieve_ruby_client/models/create_chunk_req_payload_enum.rb +105 -0
  103. data/lib/trieve_ruby_client/models/create_dataset_request.rb +3 -3
  104. data/lib/trieve_ruby_client/models/create_message_data.rb +13 -13
  105. data/lib/trieve_ruby_client/models/create_message_req_payload.rb +378 -0
  106. data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
  107. data/lib/trieve_ruby_client/models/create_topic_data.rb +1 -1
  108. data/lib/trieve_ruby_client/models/create_topic_req_payload.rb +244 -0
  109. data/lib/trieve_ruby_client/models/dataset.rb +18 -2
  110. data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
  111. data/lib/trieve_ruby_client/models/dataset_dto.rb +1 -1
  112. data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
  113. data/lib/trieve_ruby_client/models/date_range.rb +245 -0
  114. data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
  115. data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
  116. data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
  117. data/lib/trieve_ruby_client/models/edit_message_req_payload.rb +395 -0
  118. data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
  119. data/lib/trieve_ruby_client/models/event.rb +1 -1
  120. data/lib/trieve_ruby_client/models/event_return.rb +1 -1
  121. data/lib/trieve_ruby_client/models/field_condition.rb +12 -2
  122. data/lib/trieve_ruby_client/models/file.rb +5 -3
  123. data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
  124. data/lib/trieve_ruby_client/models/generate_chunks_request.rb +13 -2
  125. data/lib/trieve_ruby_client/models/geo_info.rb +1 -1
  126. data/lib/trieve_ruby_client/models/geo_types.rb +1 -1
  127. data/lib/trieve_ruby_client/models/get_chunks_data.rb +1 -1
  128. data/lib/trieve_ruby_client/models/get_datasets_pagination.rb +225 -0
  129. data/lib/trieve_ruby_client/models/get_events_data.rb +1 -1
  130. data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
  131. data/lib/trieve_ruby_client/models/get_tracking_chunks_data.rb +1 -1
  132. data/lib/trieve_ruby_client/models/group_data.rb +1 -1
  133. data/lib/trieve_ruby_client/models/group_score_chunk.rb +1 -1
  134. data/lib/trieve_ruby_client/models/has_id_condition.rb +229 -0
  135. data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
  136. data/lib/trieve_ruby_client/models/location_bounding_box.rb +1 -1
  137. data/lib/trieve_ruby_client/models/location_polygon.rb +1 -1
  138. data/lib/trieve_ruby_client/models/location_radius.rb +1 -1
  139. data/lib/trieve_ruby_client/models/match_condition.rb +2 -1
  140. data/lib/trieve_ruby_client/models/message.rb +1 -1
  141. data/lib/trieve_ruby_client/models/organization.rb +18 -2
  142. data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
  143. data/lib/trieve_ruby_client/models/range.rb +1 -1
  144. data/lib/trieve_ruby_client/models/range_condition.rb +2 -3
  145. data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +1 -1
  146. data/lib/trieve_ruby_client/models/recommend_group_chunks_request.rb +1 -1
  147. data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
  148. data/lib/trieve_ruby_client/models/regenerate_message_req_payload.rb +361 -0
  149. data/lib/trieve_ruby_client/models/remove_chunk_from_group_req_payload.rb +222 -0
  150. data/lib/trieve_ruby_client/models/return_queued_chunk.rb +1 -1
  151. data/lib/trieve_ruby_client/models/score_chunk_dto.rb +15 -3
  152. data/lib/trieve_ruby_client/models/search_chunk_data.rb +40 -5
  153. data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
  154. data/lib/trieve_ruby_client/models/search_chunks_req_payload.rb +504 -0
  155. data/lib/trieve_ruby_client/models/search_over_groups_data.rb +93 -4
  156. data/lib/trieve_ruby_client/models/search_over_groups_results.rb +1 -1
  157. data/lib/trieve_ruby_client/models/search_within_group_data.rb +106 -4
  158. data/lib/trieve_ruby_client/models/search_within_group_results.rb +1 -1
  159. data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +28 -2
  160. data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
  161. data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +1 -1
  162. data/lib/trieve_ruby_client/models/slim_chunk_metadata.rb +24 -2
  163. data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_score.rb +1 -1
  164. data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
  165. data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
  166. data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
  167. data/lib/trieve_ruby_client/models/suggested_queries_req_payload.rb +222 -0
  168. data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
  169. data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
  170. data/lib/trieve_ruby_client/models/topic.rb +1 -1
  171. data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
  172. data/lib/trieve_ruby_client/models/update_chunk_data.rb +15 -2
  173. data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +1 -1
  174. data/lib/trieve_ruby_client/models/update_chunk_req_payload.rb +376 -0
  175. data/lib/trieve_ruby_client/models/update_dataset_request.rb +13 -2
  176. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
  177. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_req_payload.rb +268 -0
  178. data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
  179. data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
  180. data/lib/trieve_ruby_client/models/update_topic_req_payload.rb +239 -0
  181. data/lib/trieve_ruby_client/models/update_user_org_role_data.rb +2 -2
  182. data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
  183. data/lib/trieve_ruby_client/models/upload_file_req_payload.rb +368 -0
  184. data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
  185. data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
  186. data/lib/trieve_ruby_client/version.rb +2 -2
  187. data/lib/trieve_ruby_client.rb +25 -20
  188. data/openapi-generator.yaml +1 -1
  189. data/openapi.json +1 -7789
  190. data/spec/models/api_key_resp_body_spec.rb +78 -0
  191. data/spec/models/autocomplete_data_spec.rb +108 -0
  192. data/spec/models/autocomplete_req_payload_spec.rb +132 -0
  193. data/spec/models/boost_phrase_spec.rb +42 -0
  194. data/spec/models/chunk_metadata_string_tag_set_spec.rb +120 -0
  195. data/spec/models/chunk_metadata_types_spec.rb +32 -0
  196. data/spec/models/chunk_req_payload_spec.rb +132 -0
  197. data/spec/models/condition_type_spec.rb +32 -0
  198. data/spec/models/content_chunk_metadata_spec.rb +72 -0
  199. data/spec/models/create_chunk_group_req_payload_spec.rb +66 -0
  200. data/spec/models/create_chunk_req_payload_enum_spec.rb +32 -0
  201. data/spec/models/create_message_req_payload_spec.rb +108 -0
  202. data/spec/models/create_topic_req_payload_spec.rb +48 -0
  203. data/spec/models/date_range_spec.rb +54 -0
  204. data/spec/models/edit_message_req_payload_spec.rb +114 -0
  205. data/spec/models/get_datasets_pagination_spec.rb +42 -0
  206. data/spec/models/has_id_condition_spec.rb +42 -0
  207. data/spec/models/regenerate_message_req_payload_spec.rb +102 -0
  208. data/spec/models/remove_chunk_from_group_req_payload_spec.rb +36 -0
  209. data/spec/models/search_chunks_req_payload_spec.rb +144 -0
  210. data/spec/models/suggested_queries_req_payload_spec.rb +36 -0
  211. data/spec/models/update_chunk_req_payload_spec.rb +120 -0
  212. data/spec/models/update_group_by_tracking_id_req_payload_spec.rb +60 -0
  213. data/spec/models/update_topic_req_payload_spec.rb +42 -0
  214. data/spec/models/upload_file_req_payload_spec.rb +102 -0
  215. data/spec/spec_helper.rb +1 -1
  216. data/trieve_ruby_client-0.8.2.gem +0 -0
  217. data/trieve_ruby_client-0.8.5.gem +0 -0
  218. data/trieve_ruby_client.gemspec +1 -1
  219. metadata +104 -2
@@ -14,6 +14,7 @@ require 'trieve_ruby_client'
14
14
  TrieveRubyClient::MatchCondition.openapi_one_of
15
15
  # =>
16
16
  # [
17
+ # :'Float',
17
18
  # :'Integer',
18
19
  # :'String'
19
20
  # ]
@@ -29,7 +30,7 @@ Find the appropriate object from the `openapi_one_of` list and casts the data in
29
30
  require 'trieve_ruby_client'
30
31
 
31
32
  TrieveRubyClient::MatchCondition.build(data)
32
- # => #<Integer:0x00007fdd4aab02a0>
33
+ # => #<Float:0x00007fdd4aab02a0>
33
34
 
34
35
  TrieveRubyClient::MatchCondition.build(data_that_doesnt_match)
35
36
  # => nil
@@ -43,6 +44,7 @@ TrieveRubyClient::MatchCondition.build(data_that_doesnt_match)
43
44
 
44
45
  #### Return type
45
46
 
47
+ - `Float`
46
48
  - `Integer`
47
49
  - `String`
48
50
  - `nil` (if no type matches)
data/docs/MessageApi.md CHANGED
@@ -4,19 +4,19 @@ All URIs are relative to *https://api.trieve.ai*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
- | [**create_message_completion_handler**](MessageApi.md#create_message_completion_handler) | **POST** /api/message | Create a message |
8
- | [**edit_message_handler**](MessageApi.md#edit_message_handler) | **PUT** /api/message | Edit a message |
7
+ | [**create_message**](MessageApi.md#create_message) | **POST** /api/message | Create message |
8
+ | [**edit_message**](MessageApi.md#edit_message) | **PUT** /api/message | Edit message |
9
9
  | [**get_all_topic_messages**](MessageApi.md#get_all_topic_messages) | **GET** /api/messages/{messages_topic_id} | Get all messages for a given topic |
10
- | [**regenerate_message_handler**](MessageApi.md#regenerate_message_handler) | **DELETE** /api/message | Regenerate message |
10
+ | [**regenerate_message**](MessageApi.md#regenerate_message) | **DELETE** /api/message | Regenerate message |
11
11
 
12
12
 
13
- ## create_message_completion_handler
13
+ ## create_message
14
14
 
15
- > String create_message_completion_handler(tr_dataset, create_message_data)
15
+ > String create_message(tr_dataset, create_message_req_payload)
16
16
 
17
- Create a message
17
+ Create message
18
18
 
19
- Create a message Create a message. Messages are attached to topics in order to coordinate memory of gen-AI chat sessions. We are considering refactoring this resource of the API soon. Currently, you can only send user messages. If the topic is a RAG topic then the response will include Chunks first on the stream. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.
19
+ Create message Create message. Messages are attached to topics in order to coordinate memory of gen-AI chat sessions. We are considering refactoring this resource of the API soon. Currently, you can only send user messages. If the topic is a RAG topic then the response will include Chunks first on the stream. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
20
20
 
21
21
  ### Examples
22
22
 
@@ -33,32 +33,32 @@ end
33
33
 
34
34
  api_instance = TrieveRubyClient::MessageApi.new
35
35
  tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
36
- create_message_data = TrieveRubyClient::CreateMessageData.new({new_message_content: 'new_message_content_example', topic_id: 'topic_id_example'}) # CreateMessageData | JSON request payload to create a message completion
36
+ create_message_req_payload = TrieveRubyClient::CreateMessageReqPayload.new({new_message_content: 'new_message_content_example', topic_id: 'topic_id_example'}) # CreateMessageReqPayload | JSON request payload to create a message completion
37
37
 
38
38
  begin
39
- # Create a message
40
- result = api_instance.create_message_completion_handler(tr_dataset, create_message_data)
39
+ # Create message
40
+ result = api_instance.create_message(tr_dataset, create_message_req_payload)
41
41
  p result
42
42
  rescue TrieveRubyClient::ApiError => e
43
- puts "Error when calling MessageApi->create_message_completion_handler: #{e}"
43
+ puts "Error when calling MessageApi->create_message: #{e}"
44
44
  end
45
45
  ```
46
46
 
47
- #### Using the create_message_completion_handler_with_http_info variant
47
+ #### Using the create_message_with_http_info variant
48
48
 
49
49
  This returns an Array which contains the response data, status code and headers.
50
50
 
51
- > <Array(String, Integer, Hash)> create_message_completion_handler_with_http_info(tr_dataset, create_message_data)
51
+ > <Array(String, Integer, Hash)> create_message_with_http_info(tr_dataset, create_message_req_payload)
52
52
 
53
53
  ```ruby
54
54
  begin
55
- # Create a message
56
- data, status_code, headers = api_instance.create_message_completion_handler_with_http_info(tr_dataset, create_message_data)
55
+ # Create message
56
+ data, status_code, headers = api_instance.create_message_with_http_info(tr_dataset, create_message_req_payload)
57
57
  p status_code # => 2xx
58
58
  p headers # => { ... }
59
59
  p data # => String
60
60
  rescue TrieveRubyClient::ApiError => e
61
- puts "Error when calling MessageApi->create_message_completion_handler_with_http_info: #{e}"
61
+ puts "Error when calling MessageApi->create_message_with_http_info: #{e}"
62
62
  end
63
63
  ```
64
64
 
@@ -67,7 +67,7 @@ end
67
67
  | Name | Type | Description | Notes |
68
68
  | ---- | ---- | ----------- | ----- |
69
69
  | **tr_dataset** | **String** | The dataset id to use for the request | |
70
- | **create_message_data** | [**CreateMessageData**](CreateMessageData.md) | JSON request payload to create a message completion | |
70
+ | **create_message_req_payload** | [**CreateMessageReqPayload**](CreateMessageReqPayload.md) | JSON request payload to create a message completion | |
71
71
 
72
72
  ### Return type
73
73
 
@@ -83,13 +83,13 @@ end
83
83
  - **Accept**: text/plain, application/json
84
84
 
85
85
 
86
- ## edit_message_handler
86
+ ## edit_message
87
87
 
88
- > edit_message_handler(tr_dataset, edit_message_data)
88
+ > edit_message(tr_dataset, edit_message_req_payload)
89
89
 
90
- Edit a message
90
+ Edit message
91
91
 
92
- Edit a message Edit a message which exists within the topic's chat history. This will delete the message and replace it with a new message. The new message will be generated by the AI based on the new content provided in the request body. The response will include Chunks first on the stream if the topic is using RAG. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.
92
+ Edit message Edit message which exists within the topic's chat history. This will delete the message and replace it with a new message. The new message will be generated by the AI based on the new content provided in the request body. The response will include Chunks first on the stream if the topic is using RAG. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
93
93
 
94
94
  ### Examples
95
95
 
@@ -106,31 +106,31 @@ end
106
106
 
107
107
  api_instance = TrieveRubyClient::MessageApi.new
108
108
  tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
109
- edit_message_data = TrieveRubyClient::EditMessageData.new({message_sort_order: 37, new_message_content: 'new_message_content_example', topic_id: 'topic_id_example'}) # EditMessageData | JSON request payload to edit a message and get a new stream
109
+ edit_message_req_payload = TrieveRubyClient::EditMessageReqPayload.new({message_sort_order: 37, new_message_content: 'new_message_content_example', topic_id: 'topic_id_example'}) # EditMessageReqPayload | JSON request payload to edit a message and get a new stream
110
110
 
111
111
  begin
112
- # Edit a message
113
- api_instance.edit_message_handler(tr_dataset, edit_message_data)
112
+ # Edit message
113
+ api_instance.edit_message(tr_dataset, edit_message_req_payload)
114
114
  rescue TrieveRubyClient::ApiError => e
115
- puts "Error when calling MessageApi->edit_message_handler: #{e}"
115
+ puts "Error when calling MessageApi->edit_message: #{e}"
116
116
  end
117
117
  ```
118
118
 
119
- #### Using the edit_message_handler_with_http_info variant
119
+ #### Using the edit_message_with_http_info variant
120
120
 
121
121
  This returns an Array which contains the response data (`nil` in this case), status code and headers.
122
122
 
123
- > <Array(nil, Integer, Hash)> edit_message_handler_with_http_info(tr_dataset, edit_message_data)
123
+ > <Array(nil, Integer, Hash)> edit_message_with_http_info(tr_dataset, edit_message_req_payload)
124
124
 
125
125
  ```ruby
126
126
  begin
127
- # Edit a message
128
- data, status_code, headers = api_instance.edit_message_handler_with_http_info(tr_dataset, edit_message_data)
127
+ # Edit message
128
+ data, status_code, headers = api_instance.edit_message_with_http_info(tr_dataset, edit_message_req_payload)
129
129
  p status_code # => 2xx
130
130
  p headers # => { ... }
131
131
  p data # => nil
132
132
  rescue TrieveRubyClient::ApiError => e
133
- puts "Error when calling MessageApi->edit_message_handler_with_http_info: #{e}"
133
+ puts "Error when calling MessageApi->edit_message_with_http_info: #{e}"
134
134
  end
135
135
  ```
136
136
 
@@ -139,7 +139,7 @@ end
139
139
  | Name | Type | Description | Notes |
140
140
  | ---- | ---- | ----------- | ----- |
141
141
  | **tr_dataset** | **String** | The dataset id to use for the request | |
142
- | **edit_message_data** | [**EditMessageData**](EditMessageData.md) | JSON request payload to edit a message and get a new stream | |
142
+ | **edit_message_req_payload** | [**EditMessageReqPayload**](EditMessageReqPayload.md) | JSON request payload to edit a message and get a new stream | |
143
143
 
144
144
  ### Return type
145
145
 
@@ -228,13 +228,13 @@ end
228
228
  - **Accept**: application/json
229
229
 
230
230
 
231
- ## regenerate_message_handler
231
+ ## regenerate_message
232
232
 
233
- > String regenerate_message_handler(tr_dataset, regenerate_message_data)
233
+ > String regenerate_message(tr_dataset, regenerate_message_req_payload)
234
234
 
235
235
  Regenerate message
236
236
 
237
- Regenerate message Regenerate the assistant response to the last user message of a topic. This will delete the last message and replace it with a new message. The response will include Chunks first on the stream if the topic is using RAG. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.
237
+ Regenerate message Regenerate the assistant response to the last user message of a topic. This will delete the last message and replace it with a new message. The response will include Chunks first on the stream if the topic is using RAG. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
238
238
 
239
239
  ### Examples
240
240
 
@@ -251,32 +251,32 @@ end
251
251
 
252
252
  api_instance = TrieveRubyClient::MessageApi.new
253
253
  tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
254
- regenerate_message_data = TrieveRubyClient::RegenerateMessageData.new({topic_id: 'topic_id_example'}) # RegenerateMessageData | JSON request payload to delete an agent message then regenerate it in a strem
254
+ regenerate_message_req_payload = TrieveRubyClient::RegenerateMessageReqPayload.new({topic_id: 'topic_id_example'}) # RegenerateMessageReqPayload | JSON request payload to delete an agent message then regenerate it in a strem
255
255
 
256
256
  begin
257
257
  # Regenerate message
258
- result = api_instance.regenerate_message_handler(tr_dataset, regenerate_message_data)
258
+ result = api_instance.regenerate_message(tr_dataset, regenerate_message_req_payload)
259
259
  p result
260
260
  rescue TrieveRubyClient::ApiError => e
261
- puts "Error when calling MessageApi->regenerate_message_handler: #{e}"
261
+ puts "Error when calling MessageApi->regenerate_message: #{e}"
262
262
  end
263
263
  ```
264
264
 
265
- #### Using the regenerate_message_handler_with_http_info variant
265
+ #### Using the regenerate_message_with_http_info variant
266
266
 
267
267
  This returns an Array which contains the response data, status code and headers.
268
268
 
269
- > <Array(String, Integer, Hash)> regenerate_message_handler_with_http_info(tr_dataset, regenerate_message_data)
269
+ > <Array(String, Integer, Hash)> regenerate_message_with_http_info(tr_dataset, regenerate_message_req_payload)
270
270
 
271
271
  ```ruby
272
272
  begin
273
273
  # Regenerate message
274
- data, status_code, headers = api_instance.regenerate_message_handler_with_http_info(tr_dataset, regenerate_message_data)
274
+ data, status_code, headers = api_instance.regenerate_message_with_http_info(tr_dataset, regenerate_message_req_payload)
275
275
  p status_code # => 2xx
276
276
  p headers # => { ... }
277
277
  p data # => String
278
278
  rescue TrieveRubyClient::ApiError => e
279
- puts "Error when calling MessageApi->regenerate_message_handler_with_http_info: #{e}"
279
+ puts "Error when calling MessageApi->regenerate_message_with_http_info: #{e}"
280
280
  end
281
281
  ```
282
282
 
@@ -285,7 +285,7 @@ end
285
285
  | Name | Type | Description | Notes |
286
286
  | ---- | ---- | ----------- | ----- |
287
287
  | **tr_dataset** | **String** | The dataset id to use for the request | |
288
- | **regenerate_message_data** | [**RegenerateMessageData**](RegenerateMessageData.md) | JSON request payload to delete an agent message then regenerate it in a strem | |
288
+ | **regenerate_message_req_payload** | [**RegenerateMessageReqPayload**](RegenerateMessageReqPayload.md) | JSON request payload to delete an agent message then regenerate it in a strem | |
289
289
 
290
290
  ### Return type
291
291
 
data/docs/Organization.md CHANGED
@@ -5,6 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **created_at** | **Time** | | |
8
+ | **deleted** | **Integer** | | |
8
9
  | **id** | **String** | | |
9
10
  | **name** | **String** | | |
10
11
  | **registerable** | **Boolean** | | [optional] |
@@ -17,6 +18,7 @@ require 'trieve_ruby_client'
17
18
 
18
19
  instance = TrieveRubyClient::Organization.new(
19
20
  created_at: null,
21
+ deleted: null,
20
22
  id: null,
21
23
  name: null,
22
24
  registerable: null,
@@ -5,8 +5,8 @@ All URIs are relative to *https://api.trieve.ai*
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
7
  | [**create_organization**](OrganizationApi.md#create_organization) | **POST** /api/organization | Create Organization |
8
- | [**delete_organization_by_id**](OrganizationApi.md#delete_organization_by_id) | **DELETE** /api/organization/{organization_id} | Delete Organization |
9
- | [**get_organization_by_id**](OrganizationApi.md#get_organization_by_id) | **GET** /api/organization/{organization_id} | Get Organization |
8
+ | [**delete_organization**](OrganizationApi.md#delete_organization) | **DELETE** /api/organization/{organization_id} | Delete Organization |
9
+ | [**get_organization**](OrganizationApi.md#get_organization) | **GET** /api/organization/{organization_id} | Get Organization |
10
10
  | [**get_organization_usage**](OrganizationApi.md#get_organization_usage) | **GET** /api/organization/usage/{organization_id} | Get Organization Usage |
11
11
  | [**get_organization_users**](OrganizationApi.md#get_organization_users) | **GET** /api/organization/users/{organization_id} | Get Organization Users |
12
12
  | [**update_organization**](OrganizationApi.md#update_organization) | **PUT** /api/organization | Update Organization |
@@ -83,9 +83,9 @@ end
83
83
  - **Accept**: application/json
84
84
 
85
85
 
86
- ## delete_organization_by_id
86
+ ## delete_organization
87
87
 
88
- > <Organization> delete_organization_by_id(tr_organization, organization_id)
88
+ > delete_organization(tr_organization, organization_id)
89
89
 
90
90
  Delete Organization
91
91
 
@@ -110,28 +110,27 @@ organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of th
110
110
 
111
111
  begin
112
112
  # Delete Organization
113
- result = api_instance.delete_organization_by_id(tr_organization, organization_id)
114
- p result
113
+ api_instance.delete_organization(tr_organization, organization_id)
115
114
  rescue TrieveRubyClient::ApiError => e
116
- puts "Error when calling OrganizationApi->delete_organization_by_id: #{e}"
115
+ puts "Error when calling OrganizationApi->delete_organization: #{e}"
117
116
  end
118
117
  ```
119
118
 
120
- #### Using the delete_organization_by_id_with_http_info variant
119
+ #### Using the delete_organization_with_http_info variant
121
120
 
122
- This returns an Array which contains the response data, status code and headers.
121
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
123
122
 
124
- > <Array(<Organization>, Integer, Hash)> delete_organization_by_id_with_http_info(tr_organization, organization_id)
123
+ > <Array(nil, Integer, Hash)> delete_organization_with_http_info(tr_organization, organization_id)
125
124
 
126
125
  ```ruby
127
126
  begin
128
127
  # Delete Organization
129
- data, status_code, headers = api_instance.delete_organization_by_id_with_http_info(tr_organization, organization_id)
128
+ data, status_code, headers = api_instance.delete_organization_with_http_info(tr_organization, organization_id)
130
129
  p status_code # => 2xx
131
130
  p headers # => { ... }
132
- p data # => <Organization>
131
+ p data # => nil
133
132
  rescue TrieveRubyClient::ApiError => e
134
- puts "Error when calling OrganizationApi->delete_organization_by_id_with_http_info: #{e}"
133
+ puts "Error when calling OrganizationApi->delete_organization_with_http_info: #{e}"
135
134
  end
136
135
  ```
137
136
 
@@ -144,7 +143,7 @@ end
144
143
 
145
144
  ### Return type
146
145
 
147
- [**Organization**](Organization.md)
146
+ nil (empty response body)
148
147
 
149
148
  ### Authorization
150
149
 
@@ -156,13 +155,13 @@ end
156
155
  - **Accept**: application/json
157
156
 
158
157
 
159
- ## get_organization_by_id
158
+ ## get_organization
160
159
 
161
- > <Organization> get_organization_by_id(tr_organization, organization_id)
160
+ > <Organization> get_organization(tr_organization, organization_id)
162
161
 
163
162
  Get Organization
164
163
 
165
- Get Organization Fetch the details of an organization by its id. The auth'ed user must be an admin or owner of the organization to fetch it.
164
+ Get Organization Fetch the details of an organization by its id. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
166
165
 
167
166
  ### Examples
168
167
 
@@ -183,28 +182,28 @@ organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of th
183
182
 
184
183
  begin
185
184
  # Get Organization
186
- result = api_instance.get_organization_by_id(tr_organization, organization_id)
185
+ result = api_instance.get_organization(tr_organization, organization_id)
187
186
  p result
188
187
  rescue TrieveRubyClient::ApiError => e
189
- puts "Error when calling OrganizationApi->get_organization_by_id: #{e}"
188
+ puts "Error when calling OrganizationApi->get_organization: #{e}"
190
189
  end
191
190
  ```
192
191
 
193
- #### Using the get_organization_by_id_with_http_info variant
192
+ #### Using the get_organization_with_http_info variant
194
193
 
195
194
  This returns an Array which contains the response data, status code and headers.
196
195
 
197
- > <Array(<Organization>, Integer, Hash)> get_organization_by_id_with_http_info(tr_organization, organization_id)
196
+ > <Array(<Organization>, Integer, Hash)> get_organization_with_http_info(tr_organization, organization_id)
198
197
 
199
198
  ```ruby
200
199
  begin
201
200
  # Get Organization
202
- data, status_code, headers = api_instance.get_organization_by_id_with_http_info(tr_organization, organization_id)
201
+ data, status_code, headers = api_instance.get_organization_with_http_info(tr_organization, organization_id)
203
202
  p status_code # => 2xx
204
203
  p headers # => { ... }
205
204
  p data # => <Organization>
206
205
  rescue TrieveRubyClient::ApiError => e
207
- puts "Error when calling OrganizationApi->get_organization_by_id_with_http_info: #{e}"
206
+ puts "Error when calling OrganizationApi->get_organization_with_http_info: #{e}"
208
207
  end
209
208
  ```
210
209
 
@@ -235,7 +234,7 @@ end
235
234
 
236
235
  Get Organization Usage
237
236
 
238
- Get Organization Usage Fetch the current usage specification of an organization by its id. The auth'ed user must be an admin or owner of the organization to fetch it.
237
+ Get Organization Usage Fetch the current usage specification of an organization by its id. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
239
238
 
240
239
  ### Examples
241
240
 
@@ -308,7 +307,7 @@ end
308
307
 
309
308
  Get Organization Users
310
309
 
311
- Get Organization Users Fetch the users of an organization by its id. The auth'ed user must be an admin or owner of the organization to fetch it.
310
+ Get Organization Users Fetch the users of an organization by its id. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
312
311
 
313
312
  ### Examples
314
313
 
@@ -15,8 +15,7 @@ TrieveRubyClient::RangeCondition.openapi_one_of
15
15
  # =>
16
16
  # [
17
17
  # :'Float',
18
- # :'Integer',
19
- # :'String'
18
+ # :'Integer'
20
19
  # ]
21
20
  ```
22
21
 
@@ -46,6 +45,5 @@ TrieveRubyClient::RangeCondition.build(data_that_doesnt_match)
46
45
 
47
46
  - `Float`
48
47
  - `Integer`
49
- - `String`
50
48
  - `nil` (if no type matches)
51
49
 
@@ -0,0 +1,40 @@
1
+ # TrieveRubyClient::RegenerateMessageReqPayload
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **completion_first** | **Boolean** | Completion first decides whether the stream should contain the stream of the completion response or the chunks first. Default is false. Keep in mind that || is used to separate the chunks from the completion response. If || is in the completion then you may want to split on ||{ instead. | [optional] |
8
+ | **filters** | [**ChunkFilter**](ChunkFilter.md) | | [optional] |
9
+ | **frequency_penalty** | **Float** | Frequency penalty is a number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model&#39;s likelihood to repeat the same line verbatim. Default is 0.7. | [optional] |
10
+ | **highlight_citations** | **Boolean** | Whether or not to highlight the citations in the response. If this is set to true or not included, the citations will be highlighted. If this is set to false, the citations will not be highlighted. Default is true. | [optional] |
11
+ | **highlight_delimiters** | **Array&lt;String&gt;** | The delimiters to use for highlighting the citations. If this is not included, the default delimiters will be used. Default is &#x60;[\&quot;.\&quot;, \&quot;!\&quot;, \&quot;?\&quot;, \&quot;\\n\&quot;, \&quot;\\t\&quot;, \&quot;,\&quot;]&#x60;. | [optional] |
12
+ | **max_tokens** | **Integer** | The maximum number of tokens to generate in the chat completion. | [optional] |
13
+ | **presence_penalty** | **Float** | Presence penalty is a number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model&#39;s likelihood to talk about new topics. | [optional] |
14
+ | **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. | [optional] |
15
+ | **stop_tokens** | **Array&lt;String&gt;** | Stop tokens are up to 4 sequences where the API will stop generating further tokens. | [optional] |
16
+ | **stream_response** | **Boolean** | Whether or not to stream the response. If this is set to true or not included, the response will be a stream. If this is set to false, the response will be a normal JSON response. Default is true. | [optional] |
17
+ | **temperature** | **Float** | What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. Default is 0.7. | [optional] |
18
+ | **topic_id** | **String** | The id of the topic to regenerate the last message for. | |
19
+
20
+ ## Example
21
+
22
+ ```ruby
23
+ require 'trieve_ruby_client'
24
+
25
+ instance = TrieveRubyClient::RegenerateMessageReqPayload.new(
26
+ completion_first: null,
27
+ filters: null,
28
+ frequency_penalty: null,
29
+ highlight_citations: null,
30
+ highlight_delimiters: null,
31
+ max_tokens: null,
32
+ presence_penalty: null,
33
+ search_type: null,
34
+ stop_tokens: null,
35
+ stream_response: null,
36
+ temperature: null,
37
+ topic_id: null
38
+ )
39
+ ```
40
+
@@ -0,0 +1,18 @@
1
+ # TrieveRubyClient::RemoveChunkFromGroupReqPayload
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **chunk_id** | **String** | Id of the chunk to remove from the group. | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'trieve_ruby_client'
13
+
14
+ instance = TrieveRubyClient::RemoveChunkFromGroupReqPayload.new(
15
+ chunk_id: null
16
+ )
17
+ ```
18
+
@@ -4,7 +4,8 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **metadata** | [**Array&lt;ChunkMetadata&gt;**](ChunkMetadata.md) | | |
7
+ | **highlights** | **Array&lt;String&gt;** | | [optional] |
8
+ | **metadata** | [**Array&lt;ChunkMetadataTypes&gt;**](ChunkMetadataTypes.md) | | |
8
9
  | **score** | **Float** | | |
9
10
 
10
11
  ## Example
@@ -13,6 +14,7 @@
13
14
  require 'trieve_ruby_client'
14
15
 
15
16
  instance = TrieveRubyClient::ScoreChunkDTO.new(
17
+ highlights: null,
16
18
  metadata: null,
17
19
  score: null
18
20
  )
@@ -4,18 +4,21 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
+ | **content_only** | **Boolean** | Set content_only to true to only returning the chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement (typically 10-50ms). Default is false. | [optional] |
7
8
  | **filters** | [**ChunkFilter**](ChunkFilter.md) | | [optional] |
8
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] |
9
10
  | **get_total_pages** | **Boolean** | 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). | [optional] |
10
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] |
11
- | **highlight_results** | **Boolean** | Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add &lt;b&gt;&lt;mark&gt; tags to the chunk_html of the chunks to highlight matching sub-sentences. | [optional] |
12
+ | **highlight_results** | **Boolean** | Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add &#x60;&lt;b&gt;&lt;mark&gt;&#x60; tags to the chunk_html of the chunks to highlight matching sub-sentences. | [optional] |
13
+ | **highlight_threshold** | **Float** | Set highlight_threshold to a lower or higher value to adjust the sensitivity of the highlights applied to the chunk html. If not specified, this defaults to 0.8. The range is 0.0 to 1.0. | [optional] |
12
14
  | **page** | **Integer** | Page of chunks to fetch. Page is 1-indexed. | [optional] |
13
15
  | **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
16
  | **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
17
  | **recency_bias** | **Float** | 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, &gt;3.0 for a strong reranking of the results. | [optional] |
16
18
  | **score_threshold** | **Float** | Set score_threshold to a float to filter out chunks with a score below the threshold. | [optional] |
17
- | **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. | |
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 (typicall 10-50ms). Default is false. | [optional] |
19
+ | **search_type** | **String** | Can be either \&quot;semantic\&quot;, \&quot;fulltext\&quot;, or \&quot;hybrid\&quot;. If specified as \&quot;hybrid\&quot;, it 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. | |
20
+ | **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 (typically 10-50ms). Default is false. | [optional] |
21
+ | **tag_weights** | **Hash&lt;String, Float&gt;** | Tag weights is a JSON object which can be used to boost the ranking of chunks with certain tags. This is useful for when you want to be able to bias towards chunks with a certain tag on the fly. The keys are the tag names and the values are the weights. | [optional] |
19
22
  | **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] |
20
23
 
21
24
  ## Example
@@ -24,11 +27,13 @@
24
27
  require 'trieve_ruby_client'
25
28
 
26
29
  instance = TrieveRubyClient::SearchChunkData.new(
30
+ content_only: null,
27
31
  filters: null,
28
32
  get_collisions: null,
29
33
  get_total_pages: null,
30
34
  highlight_delimiters: null,
31
35
  highlight_results: null,
36
+ highlight_threshold: null,
32
37
  page: null,
33
38
  page_size: null,
34
39
  query: null,
@@ -36,6 +41,7 @@ instance = TrieveRubyClient::SearchChunkData.new(
36
41
  score_threshold: null,
37
42
  search_type: null,
38
43
  slim_chunks: null,
44
+ tag_weights: null,
39
45
  use_weights: null
40
46
  )
41
47
  ```
@@ -0,0 +1,54 @@
1
+ # TrieveRubyClient::SearchChunksReqPayload
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **content_only** | **Boolean** | Set content_only to true to only returning the chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement (typically 10-50ms). Default is false. | [optional] |
8
+ | **filters** | [**ChunkFilter**](ChunkFilter.md) | | [optional] |
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
+ | **get_total_pages** | **Boolean** | 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). | [optional] |
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;]. These are the characters that will be used to split the chunk_html into splits for highlighting. These are the characters that will be used to split the chunk_html into splits for highlighting. | [optional] |
12
+ | **highlight_max_length** | **Integer** | Set highlight_max_length to control the maximum number of tokens (typically whitespace separated strings, but sometimes also word stems) which can be present within a single highlight. If not specified, this defaults to 8. This is useful to shorten large splits which may have low scores due to length compared to the query. Set to something very large like 100 to highlight entire splits. | [optional] |
13
+ | **highlight_max_num** | **Integer** | Set highlight_max_num to control the maximum number of highlights per chunk. If not specified, this defaults to 3. It may be less than 3 if no snippets score above the highlight_threshold. | [optional] |
14
+ | **highlight_results** | **Boolean** | Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add &#x60;&lt;b&gt;&lt;mark&gt;&#x60; tags to the chunk_html of the chunks to highlight matching splits and return the highlights on each scored chunk in the response. | [optional] |
15
+ | **highlight_threshold** | **Float** | Set highlight_threshold to a lower or higher value to adjust the sensitivity of the highlights applied to the chunk html. If not specified, this defaults to 0.8. The range is 0.0 to 1.0. | [optional] |
16
+ | **highlight_window** | **Integer** | Set highlight_window to a number to control the amount of words that are returned around the matched phrases. If not specified, this defaults to 0. This is useful for when you want to show more context around the matched words. When specified, window/2 whitespace separated words are added before and after each highlight in the response&#39;s highlights array. If an extended highlight overlaps with another highlight, the overlapping words are only included once. | [optional] |
17
+ | **page** | **Integer** | Page of chunks to fetch. Page is 1-indexed. | [optional] |
18
+ | **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] |
19
+ | **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. | |
20
+ | **recency_bias** | **Float** | 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, &gt;3.0 for a strong reranking of the results. | [optional] |
21
+ | **score_threshold** | **Float** | Set score_threshold to a float to filter out chunks with a score below the threshold. | [optional] |
22
+ | **search_type** | **String** | Can be either \&quot;semantic\&quot;, \&quot;fulltext\&quot;, or \&quot;hybrid\&quot;. If specified as \&quot;hybrid\&quot;, it 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. | |
23
+ | **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 (typically 10-50ms). Default is false. | [optional] |
24
+ | **tag_weights** | **Hash&lt;String, Float&gt;** | Tag weights is a JSON object which can be used to boost the ranking of chunks with certain tags. This is useful for when you want to be able to bias towards chunks with a certain tag on the fly. The keys are the tag names and the values are the weights. | [optional] |
25
+ | **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] |
26
+
27
+ ## Example
28
+
29
+ ```ruby
30
+ require 'trieve_ruby_client'
31
+
32
+ instance = TrieveRubyClient::SearchChunksReqPayload.new(
33
+ content_only: null,
34
+ filters: null,
35
+ get_collisions: null,
36
+ get_total_pages: null,
37
+ highlight_delimiters: null,
38
+ highlight_max_length: null,
39
+ highlight_max_num: null,
40
+ highlight_results: null,
41
+ highlight_threshold: null,
42
+ highlight_window: null,
43
+ page: null,
44
+ page_size: null,
45
+ query: null,
46
+ recency_bias: null,
47
+ score_threshold: null,
48
+ search_type: null,
49
+ slim_chunks: null,
50
+ tag_weights: null,
51
+ use_weights: null
52
+ )
53
+ ```
54
+
@@ -8,8 +8,12 @@
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
9
  | **get_total_pages** | **Boolean** | 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). | [optional] |
10
10
  | **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] |
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
- | **highlight_results** | **Boolean** | Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add &lt;b&gt;&lt;mark&gt; tags to the chunk_html of the chunks to highlight matching sub-sentences. | [optional] |
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;]. These are the characters that will be used to split the chunk_html into splits for highlighting. | [optional] |
12
+ | **highlight_max_length** | **Integer** | Set highlight_max_length to control the maximum number of tokens (typically whitespace separated strings, but sometimes also word stems) which can be present within a single highlight. If not specified, this defaults to 8. This is useful to shorten large splits which may have low scores due to length compared to the query. Set to something very large like 100 to highlight entire splits. | [optional] |
13
+ | **highlight_max_num** | **Integer** | Set highlight_max_num to control the maximum number of highlights per chunk. If not specified, this defaults to 3. It may be less than 3 if no snippets score above the highlight_threshold. | [optional] |
14
+ | **highlight_results** | **Boolean** | Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add &#x60;&lt;b&gt;&lt;mark&gt;&#x60; tags to the chunk_html of the chunks to highlight matching splits and return the highlights on each scored chunk in the response. | [optional] |
15
+ | **highlight_threshold** | **Float** | Set highlight_threshold to a lower or higher value to adjust the sensitivity of the highlights applied to the chunk html. If not specified, this defaults to 0.8. The range is 0.0 to 1.0. | [optional] |
16
+ | **highlight_window** | **Integer** | Set highlight_window to a number to control the amount of words that are returned around the matched phrases. If not specified, this defaults to 0. This is useful for when you want to show more context around the matched words. When specified, window/2 whitespace separated words are added before and after each highlight in the response&#39;s highlights array. If an extended highlight overlaps with another highlight, the overlapping words are only included once. | [optional] |
13
17
  | **page** | **Integer** | Page of group results to fetch. Page is 1-indexed. | [optional] |
14
18
  | **page_size** | **Integer** | Page size is the number of group results to fetch. The default is 10. | [optional] |
15
19
  | **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. | |
@@ -28,7 +32,11 @@ instance = TrieveRubyClient::SearchOverGroupsData.new(
28
32
  get_total_pages: null,
29
33
  group_size: null,
30
34
  highlight_delimiters: null,
35
+ highlight_max_length: null,
36
+ highlight_max_num: null,
31
37
  highlight_results: null,
38
+ highlight_threshold: null,
39
+ highlight_window: null,
32
40
  page: null,
33
41
  page_size: null,
34
42
  query: null,