trieve_ruby_client 0.3.5 → 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 (129) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +78 -74
  3. data/docs/AuthApi.md +28 -34
  4. data/docs/AuthQuery.md +22 -0
  5. data/docs/BatchQueuedChunkResponse.md +20 -0
  6. data/docs/ChunkApi.md +69 -143
  7. data/docs/ChunkData.md +42 -0
  8. data/docs/ChunkGroupApi.md +169 -85
  9. data/docs/CreateChunkData.md +41 -34
  10. data/docs/DatasetApi.md +31 -31
  11. data/docs/EventsApi.md +13 -13
  12. data/docs/FileApi.md +21 -21
  13. data/docs/GetEventsData.md +22 -0
  14. data/docs/HealthApi.md +6 -4
  15. data/docs/InvitationApi.md +6 -6
  16. data/docs/MessageApi.md +21 -21
  17. data/docs/OrganizationApi.md +31 -31
  18. data/docs/ReturnQueuedChunk.md +39 -10
  19. data/docs/SingleQueuedChunkResponse.md +20 -0
  20. data/docs/StripeApi.md +21 -13
  21. data/docs/TopicApi.md +21 -21
  22. data/docs/UserApi.md +16 -16
  23. data/lib/trieve_ruby_client/api/auth_api.rb +27 -34
  24. data/lib/trieve_ruby_client/api/chunk_api.rb +57 -132
  25. data/lib/trieve_ruby_client/api/chunk_group_api.rb +149 -61
  26. data/lib/trieve_ruby_client/api/dataset_api.rb +25 -25
  27. data/lib/trieve_ruby_client/api/events_api.rb +21 -16
  28. data/lib/trieve_ruby_client/api/file_api.rb +17 -17
  29. data/lib/trieve_ruby_client/api/health_api.rb +5 -1
  30. data/lib/trieve_ruby_client/api/invitation_api.rb +5 -5
  31. data/lib/trieve_ruby_client/api/message_api.rb +17 -17
  32. data/lib/trieve_ruby_client/api/organization_api.rb +25 -25
  33. data/lib/trieve_ruby_client/api/stripe_api.rb +17 -1
  34. data/lib/trieve_ruby_client/api/topic_api.rb +17 -17
  35. data/lib/trieve_ruby_client/api/user_api.rb +13 -13
  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 -4
  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/suggested_queries_request.rb +1 -1
  102. data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
  103. data/lib/trieve_ruby_client/models/topic.rb +1 -1
  104. data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
  105. data/lib/trieve_ruby_client/models/update_chunk_data.rb +1 -1
  106. data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +1 -1
  107. data/lib/trieve_ruby_client/models/update_dataset_request.rb +1 -1
  108. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
  109. data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
  110. data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
  111. data/lib/trieve_ruby_client/models/update_user_data.rb +1 -1
  112. data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
  113. data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
  114. data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
  115. data/lib/trieve_ruby_client/version.rb +2 -2
  116. data/lib/trieve_ruby_client.rb +6 -2
  117. data/openapi-generator.yaml +1 -1
  118. data/openapi.json +1233 -824
  119. data/spec/models/auth_query_spec.rb +48 -0
  120. data/spec/models/batch_queued_chunk_response_spec.rb +42 -0
  121. data/spec/models/chunk_data_spec.rb +108 -0
  122. data/spec/models/get_events_data_spec.rb +48 -0
  123. data/spec/models/single_queued_chunk_response_spec.rb +42 -0
  124. data/spec/spec_helper.rb +1 -1
  125. data/trieve_ruby_client-0.3.5.gem +0 -0
  126. data/trieve_ruby_client.gemspec +1 -1
  127. metadata +23 -4
  128. data/trieve_ruby_client-0.3.4.gem +0 -0
  129. data/trieve_ruby_client-0.3.41.gem +0 -0
data/docs/UserApi.md CHANGED
@@ -1,21 +1,21 @@
1
1
  # TrieveRubyClient::UserApi
2
2
 
3
- All URIs are relative to *http://localhost*
3
+ All URIs are relative to *http://localhost:8090*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
- | [**delete_user_api_key**](UserApi.md#delete_user_api_key) | **DELETE** /api/user/delete_api_key | delete_user_api_key |
8
- | [**set_user_api_key**](UserApi.md#set_user_api_key) | **POST** /api/user/set_api_key | set_user_api_key |
9
- | [**update_user**](UserApi.md#update_user) | **PUT** /api/user | update_user |
7
+ | [**delete_user_api_key**](UserApi.md#delete_user_api_key) | **DELETE** /api/user/delete_api_key | Delete User Api Key |
8
+ | [**set_user_api_key**](UserApi.md#set_user_api_key) | **POST** /api/user/set_api_key | Set User Api Key |
9
+ | [**update_user**](UserApi.md#update_user) | **PUT** /api/user | Update User |
10
10
 
11
11
 
12
12
  ## delete_user_api_key
13
13
 
14
14
  > <Array<ApiKeyDTO>> delete_user_api_key(delete_user_api_key_request)
15
15
 
16
- delete_user_api_key
16
+ Delete User Api Key
17
17
 
18
- delete_user_api_key Delete an api key for the auth'ed user.
18
+ Delete User Api Key Delete an api key for the auth'ed user.
19
19
 
20
20
  ### Examples
21
21
 
@@ -34,7 +34,7 @@ api_instance = TrieveRubyClient::UserApi.new
34
34
  delete_user_api_key_request = TrieveRubyClient::DeleteUserApiKeyRequest.new({api_key_id: 'api_key_id_example'}) # DeleteUserApiKeyRequest | JSON request payload to delete a user api key
35
35
 
36
36
  begin
37
- # delete_user_api_key
37
+ # Delete User Api Key
38
38
  result = api_instance.delete_user_api_key(delete_user_api_key_request)
39
39
  p result
40
40
  rescue TrieveRubyClient::ApiError => e
@@ -50,7 +50,7 @@ This returns an Array which contains the response data, status code and headers.
50
50
 
51
51
  ```ruby
52
52
  begin
53
- # delete_user_api_key
53
+ # Delete User Api Key
54
54
  data, status_code, headers = api_instance.delete_user_api_key_with_http_info(delete_user_api_key_request)
55
55
  p status_code # => 2xx
56
56
  p headers # => { ... }
@@ -84,9 +84,9 @@ end
84
84
 
85
85
  > <SetUserApiKeyResponse> set_user_api_key(set_user_api_key_request)
86
86
 
87
- set_user_api_key
87
+ Set User Api Key
88
88
 
89
- set_user_api_key Create a new api key for the auth'ed user. Successful response will contain the newly created api key. If a write role is assigned the api key will have permission level of the auth'ed user who calls this endpoint.
89
+ Set User Api Key Create a new api key for the auth'ed user. Successful response will contain the newly created api key. If a write role is assigned the api key will have permission level of the auth'ed user who calls this endpoint.
90
90
 
91
91
  ### Examples
92
92
 
@@ -105,7 +105,7 @@ api_instance = TrieveRubyClient::UserApi.new
105
105
  set_user_api_key_request = TrieveRubyClient::SetUserApiKeyRequest.new({name: 'name_example', role: 37}) # SetUserApiKeyRequest | JSON request payload to create a new user api key
106
106
 
107
107
  begin
108
- # set_user_api_key
108
+ # Set User Api Key
109
109
  result = api_instance.set_user_api_key(set_user_api_key_request)
110
110
  p result
111
111
  rescue TrieveRubyClient::ApiError => e
@@ -121,7 +121,7 @@ This returns an Array which contains the response data, status code and headers.
121
121
 
122
122
  ```ruby
123
123
  begin
124
- # set_user_api_key
124
+ # Set User Api Key
125
125
  data, status_code, headers = api_instance.set_user_api_key_with_http_info(set_user_api_key_request)
126
126
  p status_code # => 2xx
127
127
  p headers # => { ... }
@@ -155,9 +155,9 @@ end
155
155
 
156
156
  > <SlimUser> update_user(update_user_data)
157
157
 
158
- update_user
158
+ Update User
159
159
 
160
- update_user Update a user's information. If the user_id is not provided, the auth'ed user will be updated. If the user_id is provided, the auth'ed user must be an admin (1) or owner (2) of the organization.
160
+ Update User Update a user's information. If the user_id is not provided, the auth'ed user will be updated. If the user_id is provided, the auth'ed user must be an admin (1) or owner (2) of the organization.
161
161
 
162
162
  ### Examples
163
163
 
@@ -176,7 +176,7 @@ api_instance = TrieveRubyClient::UserApi.new
176
176
  update_user_data = TrieveRubyClient::UpdateUserData.new({organization_id: 'organization_id_example'}) # UpdateUserData | JSON request payload to update user information for the auth'ed user
177
177
 
178
178
  begin
179
- # update_user
179
+ # Update User
180
180
  result = api_instance.update_user(update_user_data)
181
181
  p result
182
182
  rescue TrieveRubyClient::ApiError => e
@@ -192,7 +192,7 @@ This returns an Array which contains the response data, status code and headers.
192
192
 
193
193
  ```ruby
194
194
  begin
195
- # update_user
195
+ # Update User
196
196
  data, status_code, headers = api_instance.update_user_with_http_info(update_user_data)
197
197
  p status_code # => 2xx
198
198
  p headers # => { ... }
@@ -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.5
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,8 +19,8 @@ module TrieveRubyClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # openid_callback
23
- # openid_callback This is the callback route for the OAuth provider, it should not be called directly. Redirects to browser with set-cookie header.
22
+ # OpenID Connect callback
23
+ # OpenID Connect callback This is the callback route for the OAuth provider, it should not be called directly. Redirects to browser with set-cookie header.
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @return [SlimUser]
26
26
  def callback(opts = {})
@@ -28,8 +28,8 @@ module TrieveRubyClient
28
28
  data
29
29
  end
30
30
 
31
- # openid_callback
32
- # openid_callback This is the callback route for the OAuth provider, it should not be called directly. Redirects to browser with set-cookie header.
31
+ # OpenID Connect callback
32
+ # OpenID Connect callback This is the callback route for the OAuth provider, it should not be called directly. Redirects to browser with set-cookie header.
33
33
  # @param [Hash] opts the optional parameters
34
34
  # @return [Array<(SlimUser, Integer, Hash)>] SlimUser data, response status code and response headers
35
35
  def callback_with_http_info(opts = {})
@@ -76,8 +76,8 @@ module TrieveRubyClient
76
76
  return data, status_code, headers
77
77
  end
78
78
 
79
- # get_me
80
- # get_me Get the user corresponding to your current auth credentials.
79
+ # Get Me
80
+ # Get Me Get the user corresponding to your current auth credentials.
81
81
  # @param [Hash] opts the optional parameters
82
82
  # @return [SlimUser]
83
83
  def get_me(opts = {})
@@ -85,8 +85,8 @@ module TrieveRubyClient
85
85
  data
86
86
  end
87
87
 
88
- # get_me
89
- # get_me Get the user corresponding to your current auth credentials.
88
+ # Get Me
89
+ # Get Me Get the user corresponding to your current auth credentials.
90
90
  # @param [Hash] opts the optional parameters
91
91
  # @return [Array<(SlimUser, Integer, Hash)>] SlimUser data, response status code and response headers
92
92
  def get_me_with_http_info(opts = {})
@@ -133,50 +133,43 @@ module TrieveRubyClient
133
133
  return data, status_code, headers
134
134
  end
135
135
 
136
- # login
137
- # login This will redirect you to the OAuth provider for authentication with email/pass, SSO, Google, Github, etc.
136
+ # Login
137
+ # Login This will redirect you to the OAuth provider for authentication with email/pass, SSO, Google, Github, etc.
138
+ # @param content [AuthQuery] Query parameters for login to be included as kv pairs after ? on the request URL.
138
139
  # @param [Hash] opts the optional parameters
139
- # @option opts [String] :inv_code Code sent via email as a result of successful call to send_invitation
140
- # @option opts [String] :organization_id ID of organization to authenticate into
141
- # @option opts [String] :redirect_uri URL to redirect to after successful login
142
140
  # @return [nil]
143
- def login(opts = {})
144
- login_with_http_info(opts)
141
+ def login(content, opts = {})
142
+ login_with_http_info(content, opts)
145
143
  nil
146
144
  end
147
145
 
148
- # login
149
- # login This will redirect you to the OAuth provider for authentication with email/pass, SSO, Google, Github, etc.
146
+ # Login
147
+ # Login This will redirect you to the OAuth provider for authentication with email/pass, SSO, Google, Github, etc.
148
+ # @param content [AuthQuery] Query parameters for login to be included as kv pairs after ? on the request URL.
150
149
  # @param [Hash] opts the optional parameters
151
- # @option opts [String] :inv_code Code sent via email as a result of successful call to send_invitation
152
- # @option opts [String] :organization_id ID of organization to authenticate into
153
- # @option opts [String] :redirect_uri URL to redirect to after successful login
154
150
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
155
- def login_with_http_info(opts = {})
151
+ def login_with_http_info(content, opts = {})
156
152
  if @api_client.config.debugging
157
153
  @api_client.config.logger.debug 'Calling API: AuthApi.login ...'
158
154
  end
155
+ # verify the required parameter 'content' is set
156
+ if @api_client.config.client_side_validation && content.nil?
157
+ fail ArgumentError, "Missing the required parameter 'content' when calling AuthApi.login"
158
+ end
159
159
  # resource path
160
160
  local_var_path = '/api/auth'
161
161
 
162
162
  # query parameters
163
163
  query_params = opts[:query_params] || {}
164
+ query_params[:'content'] = content
164
165
 
165
166
  # header parameters
166
167
  header_params = opts[:header_params] || {}
167
168
  # HTTP header 'Accept' (if needed)
168
169
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
169
- # HTTP header 'Content-Type'
170
- content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
171
- if !content_type.nil?
172
- header_params['Content-Type'] = content_type
173
- end
174
170
 
175
171
  # form parameters
176
172
  form_params = opts[:form_params] || {}
177
- form_params['inv_code'] = opts[:'inv_code'] if !opts[:'inv_code'].nil?
178
- form_params['organization_id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
179
- form_params['redirect_uri'] = opts[:'redirect_uri'] if !opts[:'redirect_uri'].nil?
180
173
 
181
174
  # http body (model)
182
175
  post_body = opts[:debug_body]
@@ -204,8 +197,8 @@ module TrieveRubyClient
204
197
  return data, status_code, headers
205
198
  end
206
199
 
207
- # logout
208
- # logout Invalidate your current auth credential stored typically stored in a cookie. This does not invalidate your API key.
200
+ # Logout
201
+ # Logout Invalidate your current auth credential stored typically stored in a cookie. This does not invalidate your API key.
209
202
  # @param [Hash] opts the optional parameters
210
203
  # @return [nil]
211
204
  def logout(opts = {})
@@ -213,8 +206,8 @@ module TrieveRubyClient
213
206
  nil
214
207
  end
215
208
 
216
- # logout
217
- # logout Invalidate your current auth credential stored typically stored in a cookie. This does not invalidate your API key.
209
+ # Logout
210
+ # Logout Invalidate your current auth credential stored typically stored in a cookie. This does not invalidate your API key.
218
211
  # @param [Hash] opts the optional parameters
219
212
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
220
213
  def logout_with_http_info(opts = {})
@@ -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.5
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] || ['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
@@ -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
@@ -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] || {}
@@ -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
@@ -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
@@ -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] || {}
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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