trieve_ruby_client 0.3.4 → 0.4.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 (128) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +78 -81
  3. data/docs/AuthApi.md +29 -40
  4. data/docs/AuthQuery.md +22 -0
  5. data/docs/BatchQueuedChunkResponse.md +20 -0
  6. data/docs/ChunkApi.md +80 -214
  7. data/docs/ChunkData.md +42 -0
  8. data/docs/ChunkGroupApi.md +183 -174
  9. data/docs/CreateChunkData.md +41 -34
  10. data/docs/DatasetApi.md +37 -67
  11. data/docs/EventsApi.md +14 -19
  12. data/docs/FileApi.md +25 -45
  13. data/docs/GetEventsData.md +22 -0
  14. data/docs/HealthApi.md +6 -4
  15. data/docs/InvitationApi.md +7 -12
  16. data/docs/MessageApi.md +25 -45
  17. data/docs/OrganizationApi.md +37 -67
  18. data/docs/ReturnQueuedChunk.md +39 -10
  19. data/docs/SingleQueuedChunkResponse.md +20 -0
  20. data/docs/StripeApi.md +23 -25
  21. data/docs/TopicApi.md +25 -45
  22. data/docs/UserApi.md +19 -34
  23. data/lib/trieve_ruby_client/api/auth_api.rb +28 -35
  24. data/lib/trieve_ruby_client/api/chunk_api.rb +68 -143
  25. data/lib/trieve_ruby_client/api/chunk_group_api.rb +164 -76
  26. data/lib/trieve_ruby_client/api/dataset_api.rb +31 -31
  27. data/lib/trieve_ruby_client/api/events_api.rb +22 -17
  28. data/lib/trieve_ruby_client/api/file_api.rb +21 -21
  29. data/lib/trieve_ruby_client/api/health_api.rb +5 -1
  30. data/lib/trieve_ruby_client/api/invitation_api.rb +6 -6
  31. data/lib/trieve_ruby_client/api/message_api.rb +21 -21
  32. data/lib/trieve_ruby_client/api/organization_api.rb +31 -31
  33. data/lib/trieve_ruby_client/api/stripe_api.rb +19 -3
  34. data/lib/trieve_ruby_client/api/topic_api.rb +21 -21
  35. data/lib/trieve_ruby_client/api/user_api.rb +16 -16
  36. data/lib/trieve_ruby_client/api_client.rb +1 -1
  37. data/lib/trieve_ruby_client/api_error.rb +1 -1
  38. data/lib/trieve_ruby_client/configuration.rb +8 -11
  39. data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +1 -1
  40. data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
  41. data/lib/trieve_ruby_client/models/auth_query.rb +238 -0
  42. data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +240 -0
  43. data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
  44. data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
  45. data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
  46. data/lib/trieve_ruby_client/models/chunk_data.rb +356 -0
  47. data/lib/trieve_ruby_client/models/chunk_filter.rb +1 -1
  48. data/lib/trieve_ruby_client/models/chunk_group.rb +1 -1
  49. data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
  50. data/lib/trieve_ruby_client/models/chunk_metadata.rb +1 -1
  51. data/lib/trieve_ruby_client/models/chunk_metadata_with_file_data.rb +1 -1
  52. data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +1 -1
  53. data/lib/trieve_ruby_client/models/create_chunk_data.rb +79 -330
  54. data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +1 -1
  55. data/lib/trieve_ruby_client/models/create_dataset_request.rb +1 -1
  56. data/lib/trieve_ruby_client/models/create_message_data.rb +1 -1
  57. data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
  58. data/lib/trieve_ruby_client/models/create_topic_data.rb +1 -1
  59. data/lib/trieve_ruby_client/models/dataset.rb +1 -1
  60. data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
  61. data/lib/trieve_ruby_client/models/dataset_dto.rb +1 -1
  62. data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
  63. data/lib/trieve_ruby_client/models/delete_dataset_request.rb +1 -1
  64. data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
  65. data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
  66. data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
  67. data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
  68. data/lib/trieve_ruby_client/models/event.rb +1 -1
  69. data/lib/trieve_ruby_client/models/event_return.rb +1 -1
  70. data/lib/trieve_ruby_client/models/field_condition.rb +1 -1
  71. data/lib/trieve_ruby_client/models/file.rb +1 -1
  72. data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
  73. data/lib/trieve_ruby_client/models/generate_chunks_request.rb +1 -1
  74. data/lib/trieve_ruby_client/models/get_events_data.rb +240 -0
  75. data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
  76. data/lib/trieve_ruby_client/models/group_data.rb +1 -1
  77. data/lib/trieve_ruby_client/models/group_score_chunk_dto.rb +1 -1
  78. data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
  79. data/lib/trieve_ruby_client/models/match_condition.rb +1 -1
  80. data/lib/trieve_ruby_client/models/message.rb +1 -1
  81. data/lib/trieve_ruby_client/models/organization.rb +1 -1
  82. data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
  83. data/lib/trieve_ruby_client/models/range.rb +1 -1
  84. data/lib/trieve_ruby_client/models/reccomend_group_chunks_request.rb +1 -1
  85. data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +1 -1
  86. data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
  87. data/lib/trieve_ruby_client/models/return_queued_chunk.rb +75 -207
  88. data/lib/trieve_ruby_client/models/score_chunk_dto.rb +1 -1
  89. data/lib/trieve_ruby_client/models/search_chunk_data.rb +1 -1
  90. data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
  91. data/lib/trieve_ruby_client/models/search_groups_result.rb +1 -1
  92. data/lib/trieve_ruby_client/models/search_over_groups_data.rb +1 -1
  93. data/lib/trieve_ruby_client/models/search_over_groups_response_body.rb +1 -1
  94. data/lib/trieve_ruby_client/models/search_within_group_data.rb +1 -1
  95. data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +1 -1
  96. data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
  97. data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +238 -0
  98. data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
  99. data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
  100. data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
  101. data/lib/trieve_ruby_client/models/stripe_subscription.rb +1 -1
  102. data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
  103. data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
  104. data/lib/trieve_ruby_client/models/topic.rb +1 -1
  105. data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
  106. data/lib/trieve_ruby_client/models/update_chunk_data.rb +1 -1
  107. data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +1 -1
  108. data/lib/trieve_ruby_client/models/update_dataset_request.rb +1 -1
  109. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
  110. data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
  111. data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
  112. data/lib/trieve_ruby_client/models/update_user_data.rb +1 -1
  113. data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
  114. data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
  115. data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
  116. data/lib/trieve_ruby_client/version.rb +2 -2
  117. data/lib/trieve_ruby_client.rb +6 -2
  118. data/openapi-generator.yaml +2 -2
  119. data/openapi.json +1280 -876
  120. data/spec/models/auth_query_spec.rb +48 -0
  121. data/spec/models/batch_queued_chunk_response_spec.rb +42 -0
  122. data/spec/models/chunk_data_spec.rb +108 -0
  123. data/spec/models/get_events_data_spec.rb +48 -0
  124. data/spec/models/single_queued_chunk_response_spec.rb +42 -0
  125. data/spec/spec_helper.rb +1 -1
  126. data/trieve_ruby_client-0.3.5.gem +0 -0
  127. data/trieve_ruby_client.gemspec +2 -2
  128. metadata +25 -3
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
5
5
 
6
- The version of the OpenAPI document: 0.3.4
6
+ The version of the OpenAPI document: 0.4.0
7
7
  Contact: developers@trieve.ai
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.4.0
@@ -19,83 +19,8 @@ module TrieveRubyClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # bulk_create_chunk
23
- # bulk_create_chunk Create a new chunk from an array of chunks. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint.
24
- # @param tr_dataset [String] The dataset id to use for the request
25
- # @param create_chunk_data [CreateChunkData] JSON request payload to create a new chunk (chunk)
26
- # @param [Hash] opts the optional parameters
27
- # @return [ReturnQueuedChunk]
28
- def bulk_create_chunk(tr_dataset, create_chunk_data, opts = {})
29
- data, _status_code, _headers = bulk_create_chunk_with_http_info(tr_dataset, create_chunk_data, opts)
30
- data
31
- end
32
-
33
- # bulk_create_chunk
34
- # bulk_create_chunk Create a new chunk from an array of chunks. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint.
35
- # @param tr_dataset [String] The dataset id to use for the request
36
- # @param create_chunk_data [CreateChunkData] JSON request payload to create a new chunk (chunk)
37
- # @param [Hash] opts the optional parameters
38
- # @return [Array<(ReturnQueuedChunk, Integer, Hash)>] ReturnQueuedChunk data, response status code and response headers
39
- def bulk_create_chunk_with_http_info(tr_dataset, create_chunk_data, opts = {})
40
- if @api_client.config.debugging
41
- @api_client.config.logger.debug 'Calling API: ChunkApi.bulk_create_chunk ...'
42
- end
43
- # verify the required parameter 'tr_dataset' is set
44
- if @api_client.config.client_side_validation && tr_dataset.nil?
45
- fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.bulk_create_chunk"
46
- end
47
- # verify the required parameter 'create_chunk_data' is set
48
- if @api_client.config.client_side_validation && create_chunk_data.nil?
49
- fail ArgumentError, "Missing the required parameter 'create_chunk_data' when calling ChunkApi.bulk_create_chunk"
50
- end
51
- # resource path
52
- local_var_path = '/api/chunk/bulk'
53
-
54
- # query parameters
55
- query_params = opts[:query_params] || {}
56
-
57
- # header parameters
58
- header_params = opts[:header_params] || {}
59
- # HTTP header 'Accept' (if needed)
60
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
61
- # HTTP header 'Content-Type'
62
- content_type = @api_client.select_header_content_type(['application/json'])
63
- if !content_type.nil?
64
- header_params['Content-Type'] = content_type
65
- end
66
- header_params[:'TR-Dataset'] = tr_dataset
67
-
68
- # form parameters
69
- form_params = opts[:form_params] || {}
70
-
71
- # http body (model)
72
- post_body = opts[:debug_body] || @api_client.object_to_http_body(create_chunk_data)
73
-
74
- # return_type
75
- return_type = opts[:debug_return_type] || 'ReturnQueuedChunk'
76
-
77
- # auth_names
78
- auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
79
-
80
- new_options = opts.merge(
81
- :operation => :"ChunkApi.bulk_create_chunk",
82
- :header_params => header_params,
83
- :query_params => query_params,
84
- :form_params => form_params,
85
- :body => post_body,
86
- :auth_names => auth_names,
87
- :return_type => return_type
88
- )
89
-
90
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
91
- if @api_client.config.debugging
92
- @api_client.config.logger.debug "API called: ChunkApi#bulk_create_chunk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
93
- end
94
- return data, status_code, headers
95
- end
96
-
97
- # create_chunk
98
- # create_chunk Create a new chunk. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint.
22
+ # Create Chunk
23
+ # Create Chunk Create a new chunk. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint.
99
24
  # @param tr_dataset [String] The dataset id to use for the request
100
25
  # @param create_chunk_data [CreateChunkData] JSON request payload to create a new chunk (chunk)
101
26
  # @param [Hash] opts the optional parameters
@@ -105,8 +30,8 @@ module TrieveRubyClient
105
30
  data
106
31
  end
107
32
 
108
- # create_chunk
109
- # create_chunk Create a new chunk. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint.
33
+ # Create Chunk
34
+ # Create Chunk Create a new chunk. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint.
110
35
  # @param tr_dataset [String] The dataset id to use for the request
111
36
  # @param create_chunk_data [CreateChunkData] JSON request payload to create a new chunk (chunk)
112
37
  # @param [Hash] opts the optional parameters
@@ -150,7 +75,7 @@ module TrieveRubyClient
150
75
  return_type = opts[:debug_return_type] || 'ReturnQueuedChunk'
151
76
 
152
77
  # auth_names
153
- auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
78
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
154
79
 
155
80
  new_options = opts.merge(
156
81
  :operation => :"ChunkApi.create_chunk",
@@ -169,8 +94,8 @@ module TrieveRubyClient
169
94
  return data, status_code, headers
170
95
  end
171
96
 
172
- # get_suggested_queries
173
- # get_suggested_queries This endpoint will generate 3 suggested queries based off the query provided in the request body and return them as a JSON object.
97
+ # Generate suggested queries
98
+ # Generate suggested queries This endpoint will generate 3 suggested queries based off the query provided in the request body and return them as a JSON object.
174
99
  # @param tr_dataset [String] The dataset id to use for the request
175
100
  # @param suggested_queries_request [SuggestedQueriesRequest] JSON request payload to get alternative suggested queries
176
101
  # @param [Hash] opts the optional parameters
@@ -180,8 +105,8 @@ module TrieveRubyClient
180
105
  data
181
106
  end
182
107
 
183
- # get_suggested_queries
184
- # get_suggested_queries This endpoint will generate 3 suggested queries based off the query provided in the request body and return them as a JSON object.
108
+ # Generate suggested queries
109
+ # Generate suggested queries This endpoint will generate 3 suggested queries based off the query provided in the request body and return them as a JSON object.
185
110
  # @param tr_dataset [String] The dataset id to use for the request
186
111
  # @param suggested_queries_request [SuggestedQueriesRequest] JSON request payload to get alternative suggested queries
187
112
  # @param [Hash] opts the optional parameters
@@ -225,7 +150,7 @@ module TrieveRubyClient
225
150
  return_type = opts[:debug_return_type] || 'SuggestedQueriesResponse'
226
151
 
227
152
  # auth_names
228
- auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
153
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
229
154
 
230
155
  new_options = opts.merge(
231
156
  :operation => :"ChunkApi.create_suggested_queries_handler",
@@ -244,26 +169,26 @@ module TrieveRubyClient
244
169
  return data, status_code, headers
245
170
  end
246
171
 
247
- # delete_chunk
248
- # delete_chunk Delete a chunk by its id. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.
172
+ # Delete Chunk
173
+ # Delete Chunk Delete a chunk by its id. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.
249
174
  # @param tr_dataset [String] The dataset id to use for the request
250
- # @param chunk_id [Uuid] Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
251
175
  # @param tracking_or_chunk [String] The type of id you are using to search for the chunk. This can be either &#39;chunk&#39; or &#39;tracking_id&#39;
176
+ # @param chunk_id [String] Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
252
177
  # @param [Hash] opts the optional parameters
253
178
  # @return [nil]
254
- def delete_chunk(tr_dataset, chunk_id, tracking_or_chunk, opts = {})
255
- delete_chunk_with_http_info(tr_dataset, chunk_id, tracking_or_chunk, opts)
179
+ def delete_chunk(tr_dataset, tracking_or_chunk, chunk_id, opts = {})
180
+ delete_chunk_with_http_info(tr_dataset, tracking_or_chunk, chunk_id, opts)
256
181
  nil
257
182
  end
258
183
 
259
- # delete_chunk
260
- # delete_chunk Delete a chunk by its id. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.
184
+ # Delete Chunk
185
+ # Delete Chunk Delete a chunk by its id. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.
261
186
  # @param tr_dataset [String] The dataset id to use for the request
262
- # @param chunk_id [Uuid] Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
263
187
  # @param tracking_or_chunk [String] The type of id you are using to search for the chunk. This can be either &#39;chunk&#39; or &#39;tracking_id&#39;
188
+ # @param chunk_id [String] Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
264
189
  # @param [Hash] opts the optional parameters
265
190
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
266
- def delete_chunk_with_http_info(tr_dataset, chunk_id, tracking_or_chunk, opts = {})
191
+ def delete_chunk_with_http_info(tr_dataset, tracking_or_chunk, chunk_id, opts = {})
267
192
  if @api_client.config.debugging
268
193
  @api_client.config.logger.debug 'Calling API: ChunkApi.delete_chunk ...'
269
194
  end
@@ -276,7 +201,7 @@ module TrieveRubyClient
276
201
  fail ArgumentError, "Missing the required parameter 'tracking_or_chunk' when calling ChunkApi.delete_chunk"
277
202
  end
278
203
  # resource path
279
- local_var_path = '/api/{tracking_or_chunk}/{chunk_id}'.sub('{' + 'chunk_id' + '}', CGI.escape(chunk_id.to_s)).sub('{' + 'tracking_or_chunk' + '}', CGI.escape(tracking_or_chunk.to_s))
204
+ local_var_path = '/api/chunk/{tracking_or_chunk}/{chunk_id}'.sub('{' + 'tracking_or_chunk' + '}', CGI.escape(tracking_or_chunk.to_s)).sub('{' + 'chunk_id' + '}', CGI.escape(chunk_id.to_s))
280
205
 
281
206
  # query parameters
282
207
  query_params = opts[:query_params] || {}
@@ -297,7 +222,7 @@ module TrieveRubyClient
297
222
  return_type = opts[:debug_return_type]
298
223
 
299
224
  # auth_names
300
- auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
225
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
301
226
 
302
227
  new_options = opts.merge(
303
228
  :operation => :"ChunkApi.delete_chunk",
@@ -316,8 +241,8 @@ module TrieveRubyClient
316
241
  return data, status_code, headers
317
242
  end
318
243
 
319
- # delete_chunk_by_tracking_id
320
- # delete_chunk_by_tracking_id Delete a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.
244
+ # Delete Chunk By Tracking Id
245
+ # Delete Chunk By Tracking Id Delete a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.
321
246
  # @param tr_dataset [String] The dataset id to use for the request
322
247
  # @param tracking_id [String] tracking_id of the chunk you want to delete
323
248
  # @param [Hash] opts the optional parameters
@@ -327,8 +252,8 @@ module TrieveRubyClient
327
252
  nil
328
253
  end
329
254
 
330
- # delete_chunk_by_tracking_id
331
- # delete_chunk_by_tracking_id Delete a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.
255
+ # Delete Chunk By Tracking Id
256
+ # Delete Chunk By Tracking Id Delete a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.
332
257
  # @param tr_dataset [String] The dataset id to use for the request
333
258
  # @param tracking_id [String] tracking_id of the chunk you want to delete
334
259
  # @param [Hash] opts the optional parameters
@@ -367,7 +292,7 @@ module TrieveRubyClient
367
292
  return_type = opts[:debug_return_type]
368
293
 
369
294
  # auth_names
370
- auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
295
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
371
296
 
372
297
  new_options = opts.merge(
373
298
  :operation => :"ChunkApi.delete_chunk_by_tracking_id",
@@ -386,8 +311,8 @@ module TrieveRubyClient
386
311
  return data, status_code, headers
387
312
  end
388
313
 
389
- # augmented_generation_from_chunks
390
- # augmented_generation_from_chunks This endpoint exists as an alternative to the topic+message concept where our API handles chat memory. With this endpoint, the user is responsible for providing the context window and the prompt. See more in the \"search before generate\" page at docs.trieve.ai.
314
+ # RAG on User Defined Chunks
315
+ # RAG on User Defined Chunks This endpoint exists as an alternative to the topic+message concept where our API handles chat memory. With this endpoint, the user is responsible for providing the context window and the prompt. See more in the \"search before generate\" page at docs.trieve.ai.
391
316
  # @param tr_dataset [String] The dataset id to use for the request
392
317
  # @param generate_chunks_request [GenerateChunksRequest] JSON request payload to perform RAG on some chunks (chunks)
393
318
  # @param [Hash] opts the optional parameters
@@ -397,8 +322,8 @@ module TrieveRubyClient
397
322
  data
398
323
  end
399
324
 
400
- # augmented_generation_from_chunks
401
- # augmented_generation_from_chunks This endpoint exists as an alternative to the topic+message concept where our API handles chat memory. With this endpoint, the user is responsible for providing the context window and the prompt. See more in the \&quot;search before generate\&quot; page at docs.trieve.ai.
325
+ # RAG on User Defined Chunks
326
+ # RAG on User Defined Chunks This endpoint exists as an alternative to the topic+message concept where our API handles chat memory. With this endpoint, the user is responsible for providing the context window and the prompt. See more in the \&quot;search before generate\&quot; page at docs.trieve.ai.
402
327
  # @param tr_dataset [String] The dataset id to use for the request
403
328
  # @param generate_chunks_request [GenerateChunksRequest] JSON request payload to perform RAG on some chunks (chunks)
404
329
  # @param [Hash] opts the optional parameters
@@ -442,7 +367,7 @@ module TrieveRubyClient
442
367
  return_type = opts[:debug_return_type] || 'String'
443
368
 
444
369
  # auth_names
445
- auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
370
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
446
371
 
447
372
  new_options = opts.merge(
448
373
  :operation => :"ChunkApi.generate_off_chunks",
@@ -461,26 +386,26 @@ module TrieveRubyClient
461
386
  return data, status_code, headers
462
387
  end
463
388
 
464
- # get_chunk
465
- # get_chunk Get a singular chunk by id.
389
+ # Get Chunk By Id
390
+ # Get Chunk By Id Get a singular chunk by id.
466
391
  # @param tr_dataset [String] The dataset id to use for the request
467
- # @param chunk_id [Uuid] Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
468
392
  # @param tracking_or_chunk [String] The type of id you are using to search for the chunk. This can be either &#39;chunk&#39; or &#39;tracking_id&#39;
393
+ # @param chunk_id [String] Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
469
394
  # @param [Hash] opts the optional parameters
470
395
  # @return [ChunkMetadata]
471
- def get_chunk_by_id(tr_dataset, chunk_id, tracking_or_chunk, opts = {})
472
- data, _status_code, _headers = get_chunk_by_id_with_http_info(tr_dataset, chunk_id, tracking_or_chunk, opts)
396
+ def get_chunk_by_id(tr_dataset, tracking_or_chunk, chunk_id, opts = {})
397
+ data, _status_code, _headers = get_chunk_by_id_with_http_info(tr_dataset, tracking_or_chunk, chunk_id, opts)
473
398
  data
474
399
  end
475
400
 
476
- # get_chunk
477
- # get_chunk Get a singular chunk by id.
401
+ # Get Chunk By Id
402
+ # Get Chunk By Id Get a singular chunk by id.
478
403
  # @param tr_dataset [String] The dataset id to use for the request
479
- # @param chunk_id [Uuid] Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
480
404
  # @param tracking_or_chunk [String] The type of id you are using to search for the chunk. This can be either &#39;chunk&#39; or &#39;tracking_id&#39;
405
+ # @param chunk_id [String] Id of the chunk you want to fetch. This can be either the chunk_id or the tracking_id.
481
406
  # @param [Hash] opts the optional parameters
482
407
  # @return [Array<(ChunkMetadata, Integer, Hash)>] ChunkMetadata data, response status code and response headers
483
- def get_chunk_by_id_with_http_info(tr_dataset, chunk_id, tracking_or_chunk, opts = {})
408
+ def get_chunk_by_id_with_http_info(tr_dataset, tracking_or_chunk, chunk_id, opts = {})
484
409
  if @api_client.config.debugging
485
410
  @api_client.config.logger.debug 'Calling API: ChunkApi.get_chunk_by_id ...'
486
411
  end
@@ -493,7 +418,7 @@ module TrieveRubyClient
493
418
  fail ArgumentError, "Missing the required parameter 'tracking_or_chunk' when calling ChunkApi.get_chunk_by_id"
494
419
  end
495
420
  # resource path
496
- local_var_path = '/api/{tracking_or_chunk}/{chunk_id}'.sub('{' + 'chunk_id' + '}', CGI.escape(chunk_id.to_s)).sub('{' + 'tracking_or_chunk' + '}', CGI.escape(tracking_or_chunk.to_s))
421
+ local_var_path = '/api/chunk/{tracking_or_chunk}/{chunk_id}'.sub('{' + 'tracking_or_chunk' + '}', CGI.escape(tracking_or_chunk.to_s)).sub('{' + 'chunk_id' + '}', CGI.escape(chunk_id.to_s))
497
422
 
498
423
  # query parameters
499
424
  query_params = opts[:query_params] || {}
@@ -514,7 +439,7 @@ module TrieveRubyClient
514
439
  return_type = opts[:debug_return_type] || 'ChunkMetadata'
515
440
 
516
441
  # auth_names
517
- auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
442
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
518
443
 
519
444
  new_options = opts.merge(
520
445
  :operation => :"ChunkApi.get_chunk_by_id",
@@ -533,8 +458,8 @@ module TrieveRubyClient
533
458
  return data, status_code, headers
534
459
  end
535
460
 
536
- # get_chunk_by_tracking_id
537
- # get_chunk_by_tracking_id Get a singular chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use your own id as the primary reference for a chunk.
461
+ # Get Chunk By Tracking Id
462
+ # Get Chunk By Tracking Id Get a singular chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use your own id as the primary reference for a chunk.
538
463
  # @param tr_dataset [String] The dataset id to use for the request
539
464
  # @param tracking_id [String] tracking_id of the chunk you want to fetch
540
465
  # @param [Hash] opts the optional parameters
@@ -544,8 +469,8 @@ module TrieveRubyClient
544
469
  data
545
470
  end
546
471
 
547
- # get_chunk_by_tracking_id
548
- # get_chunk_by_tracking_id Get a singular chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use your own id as the primary reference for a chunk.
472
+ # Get Chunk By Tracking Id
473
+ # Get Chunk By Tracking Id Get a singular chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use your own id as the primary reference for a chunk.
549
474
  # @param tr_dataset [String] The dataset id to use for the request
550
475
  # @param tracking_id [String] tracking_id of the chunk you want to fetch
551
476
  # @param [Hash] opts the optional parameters
@@ -584,7 +509,7 @@ module TrieveRubyClient
584
509
  return_type = opts[:debug_return_type] || 'ChunkMetadata'
585
510
 
586
511
  # auth_names
587
- auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
512
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
588
513
 
589
514
  new_options = opts.merge(
590
515
  :operation => :"ChunkApi.get_chunk_by_tracking_id",
@@ -603,8 +528,8 @@ module TrieveRubyClient
603
528
  return data, status_code, headers
604
529
  end
605
530
 
606
- # get_recommended_chunks
607
- # get_recommended_chunks Get recommendations of chunks similar to the chunks in the request. Think about this as a feature similar to the \"add to playlist\" recommendation feature on Spotify. This request pairs especially well with our groups endpoint.
531
+ # Get Recommended Chunks
532
+ # Get Recommended Chunks Get recommendations of chunks similar to the chunks in the request. Think about this as a feature similar to the \"add to playlist\" recommendation feature on Spotify. This request pairs especially well with our groups endpoint.
608
533
  # @param tr_dataset [String] The dataset id to use for the request
609
534
  # @param recommend_chunks_request [RecommendChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
610
535
  # @param [Hash] opts the optional parameters
@@ -614,8 +539,8 @@ module TrieveRubyClient
614
539
  data
615
540
  end
616
541
 
617
- # get_recommended_chunks
618
- # get_recommended_chunks Get recommendations of chunks similar to the chunks in the request. Think about this as a feature similar to the \&quot;add to playlist\&quot; recommendation feature on Spotify. This request pairs especially well with our groups endpoint.
542
+ # Get Recommended Chunks
543
+ # Get Recommended Chunks Get recommendations of chunks similar to the chunks in the request. Think about this as a feature similar to the \&quot;add to playlist\&quot; recommendation feature on Spotify. This request pairs especially well with our groups endpoint.
619
544
  # @param tr_dataset [String] The dataset id to use for the request
620
545
  # @param recommend_chunks_request [RecommendChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
621
546
  # @param [Hash] opts the optional parameters
@@ -659,7 +584,7 @@ module TrieveRubyClient
659
584
  return_type = opts[:debug_return_type] || 'Array<ChunkMetadataWithFileData>'
660
585
 
661
586
  # auth_names
662
- auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
587
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
663
588
 
664
589
  new_options = opts.merge(
665
590
  :operation => :"ChunkApi.get_recommended_chunks",
@@ -678,8 +603,8 @@ module TrieveRubyClient
678
603
  return data, status_code, headers
679
604
  end
680
605
 
681
- # search
682
- # search This route provides the primary search functionality for the API. It can be used to search for chunks by semantic similarity, full-text similarity, or a combination of both. Results' `chunk_html` values will be modified with `<b>` tags for sub-sentence highlighting.
606
+ # Search
607
+ # Search This route provides the primary search functionality for the API. It can be used to search for chunks by semantic similarity, full-text similarity, or a combination of both. Results' `chunk_html` values will be modified with `<b>` tags for sub-sentence highlighting.
683
608
  # @param tr_dataset [String] The dataset id to use for the request
684
609
  # @param search_chunk_data [SearchChunkData] JSON request payload to semantically search for chunks (chunks)
685
610
  # @param [Hash] opts the optional parameters
@@ -689,8 +614,8 @@ module TrieveRubyClient
689
614
  data
690
615
  end
691
616
 
692
- # search
693
- # search This route provides the primary search functionality for the API. It can be used to search for chunks by semantic similarity, full-text similarity, or a combination of both. Results&#39; &#x60;chunk_html&#x60; values will be modified with &#x60;&lt;b&gt;&#x60; tags for sub-sentence highlighting.
617
+ # Search
618
+ # Search This route provides the primary search functionality for the API. It can be used to search for chunks by semantic similarity, full-text similarity, or a combination of both. Results&#39; &#x60;chunk_html&#x60; values will be modified with &#x60;&lt;b&gt;&#x60; tags for sub-sentence highlighting.
694
619
  # @param tr_dataset [String] The dataset id to use for the request
695
620
  # @param search_chunk_data [SearchChunkData] JSON request payload to semantically search for chunks (chunks)
696
621
  # @param [Hash] opts the optional parameters
@@ -734,7 +659,7 @@ module TrieveRubyClient
734
659
  return_type = opts[:debug_return_type] || 'SearchChunkQueryResponseBody'
735
660
 
736
661
  # auth_names
737
- auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
662
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
738
663
 
739
664
  new_options = opts.merge(
740
665
  :operation => :"ChunkApi.search_chunk",
@@ -753,8 +678,8 @@ module TrieveRubyClient
753
678
  return data, status_code, headers
754
679
  end
755
680
 
756
- # update_chunk
757
- # update_chunk Update a chunk. If you try to change the tracking_id of the chunk to have the same tracking_id as an existing chunk, the request will fail.
681
+ # Update Chunk
682
+ # Update Chunk Update a chunk. If you try to change the tracking_id of the chunk to have the same tracking_id as an existing chunk, the request will fail.
758
683
  # @param tr_dataset [String] The dataset id to use for the request
759
684
  # @param update_chunk_data [UpdateChunkData] JSON request payload to update a chunk (chunk)
760
685
  # @param [Hash] opts the optional parameters
@@ -764,8 +689,8 @@ module TrieveRubyClient
764
689
  nil
765
690
  end
766
691
 
767
- # update_chunk
768
- # update_chunk Update a chunk. If you try to change the tracking_id of the chunk to have the same tracking_id as an existing chunk, the request will fail.
692
+ # Update Chunk
693
+ # Update Chunk Update a chunk. If you try to change the tracking_id of the chunk to have the same tracking_id as an existing chunk, the request will fail.
769
694
  # @param tr_dataset [String] The dataset id to use for the request
770
695
  # @param update_chunk_data [UpdateChunkData] JSON request payload to update a chunk (chunk)
771
696
  # @param [Hash] opts the optional parameters
@@ -809,7 +734,7 @@ module TrieveRubyClient
809
734
  return_type = opts[:debug_return_type]
810
735
 
811
736
  # auth_names
812
- auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
737
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
813
738
 
814
739
  new_options = opts.merge(
815
740
  :operation => :"ChunkApi.update_chunk",
@@ -828,8 +753,8 @@ module TrieveRubyClient
828
753
  return data, status_code, headers
829
754
  end
830
755
 
831
- # update_chunk_by_tracking_id
832
- # update_chunk_by_tracking_id Update a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk.
756
+ # Update Chunk By Tracking Id
757
+ # Update Chunk By Tracking Id Update a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk.
833
758
  # @param tr_dataset [String] The dataset id to use for the request
834
759
  # @param update_chunk_by_tracking_id_data [UpdateChunkByTrackingIdData] JSON request payload to update a chunk by tracking_id (chunks)
835
760
  # @param [Hash] opts the optional parameters
@@ -839,8 +764,8 @@ module TrieveRubyClient
839
764
  nil
840
765
  end
841
766
 
842
- # update_chunk_by_tracking_id
843
- # update_chunk_by_tracking_id Update a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk.
767
+ # Update Chunk By Tracking Id
768
+ # Update Chunk By Tracking Id Update a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk.
844
769
  # @param tr_dataset [String] The dataset id to use for the request
845
770
  # @param update_chunk_by_tracking_id_data [UpdateChunkByTrackingIdData] JSON request payload to update a chunk by tracking_id (chunks)
846
771
  # @param [Hash] opts the optional parameters
@@ -884,7 +809,7 @@ module TrieveRubyClient
884
809
  return_type = opts[:debug_return_type]
885
810
 
886
811
  # auth_names
887
- auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
812
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
888
813
 
889
814
  new_options = opts.merge(
890
815
  :operation => :"ChunkApi.update_chunk_by_tracking_id",