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.
- checksums.yaml +4 -4
- data/README.md +78 -81
- data/docs/AuthApi.md +29 -40
- data/docs/AuthQuery.md +22 -0
- data/docs/BatchQueuedChunkResponse.md +20 -0
- data/docs/ChunkApi.md +80 -214
- data/docs/ChunkData.md +42 -0
- data/docs/ChunkGroupApi.md +183 -174
- data/docs/CreateChunkData.md +41 -34
- data/docs/DatasetApi.md +37 -67
- data/docs/EventsApi.md +14 -19
- data/docs/FileApi.md +25 -45
- data/docs/GetEventsData.md +22 -0
- data/docs/HealthApi.md +6 -4
- data/docs/InvitationApi.md +7 -12
- data/docs/MessageApi.md +25 -45
- data/docs/OrganizationApi.md +37 -67
- data/docs/ReturnQueuedChunk.md +39 -10
- data/docs/SingleQueuedChunkResponse.md +20 -0
- data/docs/StripeApi.md +23 -25
- data/docs/TopicApi.md +25 -45
- data/docs/UserApi.md +19 -34
- data/lib/trieve_ruby_client/api/auth_api.rb +28 -35
- data/lib/trieve_ruby_client/api/chunk_api.rb +68 -143
- data/lib/trieve_ruby_client/api/chunk_group_api.rb +164 -76
- data/lib/trieve_ruby_client/api/dataset_api.rb +31 -31
- data/lib/trieve_ruby_client/api/events_api.rb +22 -17
- data/lib/trieve_ruby_client/api/file_api.rb +21 -21
- data/lib/trieve_ruby_client/api/health_api.rb +5 -1
- data/lib/trieve_ruby_client/api/invitation_api.rb +6 -6
- data/lib/trieve_ruby_client/api/message_api.rb +21 -21
- data/lib/trieve_ruby_client/api/organization_api.rb +31 -31
- data/lib/trieve_ruby_client/api/stripe_api.rb +19 -3
- data/lib/trieve_ruby_client/api/topic_api.rb +21 -21
- data/lib/trieve_ruby_client/api/user_api.rb +16 -16
- data/lib/trieve_ruby_client/api_client.rb +1 -1
- data/lib/trieve_ruby_client/api_error.rb +1 -1
- data/lib/trieve_ruby_client/configuration.rb +8 -11
- data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/auth_query.rb +238 -0
- data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +240 -0
- data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
- data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
- data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_data.rb +356 -0
- data/lib/trieve_ruby_client/models/chunk_filter.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_group.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_metadata.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_metadata_with_file_data.rb +1 -1
- data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +1 -1
- data/lib/trieve_ruby_client/models/create_chunk_data.rb +79 -330
- data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_dataset_request.rb +1 -1
- data/lib/trieve_ruby_client/models/create_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
- data/lib/trieve_ruby_client/models/delete_dataset_request.rb +1 -1
- data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
- data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/event.rb +1 -1
- data/lib/trieve_ruby_client/models/event_return.rb +1 -1
- data/lib/trieve_ruby_client/models/field_condition.rb +1 -1
- data/lib/trieve_ruby_client/models/file.rb +1 -1
- data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/generate_chunks_request.rb +1 -1
- data/lib/trieve_ruby_client/models/get_events_data.rb +240 -0
- data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
- data/lib/trieve_ruby_client/models/group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/group_score_chunk_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
- data/lib/trieve_ruby_client/models/match_condition.rb +1 -1
- data/lib/trieve_ruby_client/models/message.rb +1 -1
- data/lib/trieve_ruby_client/models/organization.rb +1 -1
- data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
- data/lib/trieve_ruby_client/models/range.rb +1 -1
- data/lib/trieve_ruby_client/models/reccomend_group_chunks_request.rb +1 -1
- data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +1 -1
- data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/return_queued_chunk.rb +75 -207
- data/lib/trieve_ruby_client/models/score_chunk_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/search_chunk_data.rb +1 -1
- data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_groups_result.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_data.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_within_group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +1 -1
- data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
- data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +238 -0
- data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
- data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
- data/lib/trieve_ruby_client/models/stripe_subscription.rb +1 -1
- data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
- data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
- data/lib/trieve_ruby_client/models/topic.rb +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_dataset_request.rb +1 -1
- data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_user_data.rb +1 -1
- data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
- data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
- data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
- data/lib/trieve_ruby_client/version.rb +2 -2
- data/lib/trieve_ruby_client.rb +6 -2
- data/openapi-generator.yaml +2 -2
- data/openapi.json +1280 -876
- data/spec/models/auth_query_spec.rb +48 -0
- data/spec/models/batch_queued_chunk_response_spec.rb +42 -0
- data/spec/models/chunk_data_spec.rb +108 -0
- data/spec/models/get_events_data_spec.rb +48 -0
- data/spec/models/single_queued_chunk_response_spec.rb +42 -0
- data/spec/spec_helper.rb +1 -1
- data/trieve_ruby_client-0.3.5.gem +0 -0
- data/trieve_ruby_client.gemspec +2 -2
- metadata +25 -3
data/docs/FileApi.md
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
# TrieveRubyClient::FileApi
|
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_file_handler**](FileApi.md#delete_file_handler) | **DELETE** /api/file/{file_id} |
|
8
|
-
| [**get_dataset_files_handler**](FileApi.md#get_dataset_files_handler) | **GET** /api/dataset/files/{dataset_id}/{page} |
|
9
|
-
| [**get_file_handler**](FileApi.md#get_file_handler) | **GET** /api/file/{file_id} |
|
10
|
-
| [**upload_file_handler**](FileApi.md#upload_file_handler) | **POST** /api/file |
|
7
|
+
| [**delete_file_handler**](FileApi.md#delete_file_handler) | **DELETE** /api/file/{file_id} | Delete File |
|
8
|
+
| [**get_dataset_files_handler**](FileApi.md#get_dataset_files_handler) | **GET** /api/dataset/files/{dataset_id}/{page} | Get Files for Dataset |
|
9
|
+
| [**get_file_handler**](FileApi.md#get_file_handler) | **GET** /api/file/{file_id} | Get File |
|
10
|
+
| [**upload_file_handler**](FileApi.md#upload_file_handler) | **POST** /api/file | Upload File |
|
11
11
|
|
12
12
|
|
13
13
|
## delete_file_handler
|
14
14
|
|
15
15
|
> delete_file_handler(tr_dataset, file_id, delete_chunks)
|
16
16
|
|
17
|
-
|
17
|
+
Delete File
|
18
18
|
|
19
|
-
|
19
|
+
Delete File Delete a file from S3 attached to the server based on its id. This will disassociate chunks from the file, but will not delete the chunks. We plan to add support for deleting chunks in a release soon. Auth'ed user must be an admin or owner of the dataset's organization to upload a file.
|
20
20
|
|
21
21
|
### Examples
|
22
22
|
|
@@ -25,11 +25,6 @@ require 'time'
|
|
25
25
|
require 'trieve_ruby_client'
|
26
26
|
# setup authorization
|
27
27
|
TrieveRubyClient.configure do |config|
|
28
|
-
# Configure API key authorization: Cookie
|
29
|
-
config.api_key['Cookie'] = 'YOUR API KEY'
|
30
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
31
|
-
# config.api_key_prefix['Cookie'] = 'Bearer'
|
32
|
-
|
33
28
|
# Configure API key authorization: ApiKey
|
34
29
|
config.api_key['ApiKey'] = 'YOUR API KEY'
|
35
30
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
@@ -42,7 +37,7 @@ file_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the file t
|
|
42
37
|
delete_chunks = true # Boolean | Whether or not to delete the chunks associated with the file
|
43
38
|
|
44
39
|
begin
|
45
|
-
#
|
40
|
+
# Delete File
|
46
41
|
api_instance.delete_file_handler(tr_dataset, file_id, delete_chunks)
|
47
42
|
rescue TrieveRubyClient::ApiError => e
|
48
43
|
puts "Error when calling FileApi->delete_file_handler: #{e}"
|
@@ -57,7 +52,7 @@ This returns an Array which contains the response data (`nil` in this case), sta
|
|
57
52
|
|
58
53
|
```ruby
|
59
54
|
begin
|
60
|
-
#
|
55
|
+
# Delete File
|
61
56
|
data, status_code, headers = api_instance.delete_file_handler_with_http_info(tr_dataset, file_id, delete_chunks)
|
62
57
|
p status_code # => 2xx
|
63
58
|
p headers # => { ... }
|
@@ -81,7 +76,7 @@ nil (empty response body)
|
|
81
76
|
|
82
77
|
### Authorization
|
83
78
|
|
84
|
-
[
|
79
|
+
[ApiKey](../README.md#ApiKey)
|
85
80
|
|
86
81
|
### HTTP request headers
|
87
82
|
|
@@ -93,9 +88,9 @@ nil (empty response body)
|
|
93
88
|
|
94
89
|
> Array<File> get_dataset_files_handler(tr_dataset, dataset_id, page)
|
95
90
|
|
96
|
-
|
91
|
+
Get Files for Dataset
|
97
92
|
|
98
|
-
|
93
|
+
Get Files for Dataset Get all files which belong to a given dataset specified by the dataset_id parameter. 10 files are returned per page.
|
99
94
|
|
100
95
|
### Examples
|
101
96
|
|
@@ -104,11 +99,6 @@ require 'time'
|
|
104
99
|
require 'trieve_ruby_client'
|
105
100
|
# setup authorization
|
106
101
|
TrieveRubyClient.configure do |config|
|
107
|
-
# Configure API key authorization: Cookie
|
108
|
-
config.api_key['Cookie'] = 'YOUR API KEY'
|
109
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
110
|
-
# config.api_key_prefix['Cookie'] = 'Bearer'
|
111
|
-
|
112
102
|
# Configure API key authorization: ApiKey
|
113
103
|
config.api_key['ApiKey'] = 'YOUR API KEY'
|
114
104
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
@@ -121,7 +111,7 @@ dataset_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the dat
|
|
121
111
|
page = 789 # Integer | The page number of files you wish to fetch. Each page contains at most 10 files.
|
122
112
|
|
123
113
|
begin
|
124
|
-
#
|
114
|
+
# Get Files for Dataset
|
125
115
|
result = api_instance.get_dataset_files_handler(tr_dataset, dataset_id, page)
|
126
116
|
p result
|
127
117
|
rescue TrieveRubyClient::ApiError => e
|
@@ -137,7 +127,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
137
127
|
|
138
128
|
```ruby
|
139
129
|
begin
|
140
|
-
#
|
130
|
+
# Get Files for Dataset
|
141
131
|
data, status_code, headers = api_instance.get_dataset_files_handler_with_http_info(tr_dataset, dataset_id, page)
|
142
132
|
p status_code # => 2xx
|
143
133
|
p headers # => { ... }
|
@@ -161,7 +151,7 @@ end
|
|
161
151
|
|
162
152
|
### Authorization
|
163
153
|
|
164
|
-
[
|
154
|
+
[ApiKey](../README.md#ApiKey)
|
165
155
|
|
166
156
|
### HTTP request headers
|
167
157
|
|
@@ -173,9 +163,9 @@ end
|
|
173
163
|
|
174
164
|
> <FileDTO> get_file_handler(tr_dataset, file_id)
|
175
165
|
|
176
|
-
|
166
|
+
Get File
|
177
167
|
|
178
|
-
|
168
|
+
Get File Download a file from S3 attached to the server based on its id. We plan to add support for getting signed S3 URLs to download from S3 directly in a release soon.
|
179
169
|
|
180
170
|
### Examples
|
181
171
|
|
@@ -184,11 +174,6 @@ require 'time'
|
|
184
174
|
require 'trieve_ruby_client'
|
185
175
|
# setup authorization
|
186
176
|
TrieveRubyClient.configure do |config|
|
187
|
-
# Configure API key authorization: Cookie
|
188
|
-
config.api_key['Cookie'] = 'YOUR API KEY'
|
189
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
190
|
-
# config.api_key_prefix['Cookie'] = 'Bearer'
|
191
|
-
|
192
177
|
# Configure API key authorization: ApiKey
|
193
178
|
config.api_key['ApiKey'] = 'YOUR API KEY'
|
194
179
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
@@ -200,7 +185,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
|
|
200
185
|
file_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the file to fetch
|
201
186
|
|
202
187
|
begin
|
203
|
-
#
|
188
|
+
# Get File
|
204
189
|
result = api_instance.get_file_handler(tr_dataset, file_id)
|
205
190
|
p result
|
206
191
|
rescue TrieveRubyClient::ApiError => e
|
@@ -216,7 +201,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
216
201
|
|
217
202
|
```ruby
|
218
203
|
begin
|
219
|
-
#
|
204
|
+
# Get File
|
220
205
|
data, status_code, headers = api_instance.get_file_handler_with_http_info(tr_dataset, file_id)
|
221
206
|
p status_code # => 2xx
|
222
207
|
p headers # => { ... }
|
@@ -239,7 +224,7 @@ end
|
|
239
224
|
|
240
225
|
### Authorization
|
241
226
|
|
242
|
-
[
|
227
|
+
[ApiKey](../README.md#ApiKey)
|
243
228
|
|
244
229
|
### HTTP request headers
|
245
230
|
|
@@ -251,9 +236,9 @@ end
|
|
251
236
|
|
252
237
|
> <UploadFileResult> upload_file_handler(tr_dataset, upload_file_data)
|
253
238
|
|
254
|
-
|
239
|
+
Upload File
|
255
240
|
|
256
|
-
|
241
|
+
Upload File Upload a file to S3 attached to the server. The file will be converted to HTML with tika and chunked algorithmically, images will be OCR'ed with tesseract. The resulting chunks will be indexed and searchable. Optionally, you can only upload the file and manually create chunks associated to the file after. See docs.trieve.ai and/or contact us for more details and tips. Auth'ed user must be an admin or owner of the dataset's organization to upload a file.
|
257
242
|
|
258
243
|
### Examples
|
259
244
|
|
@@ -262,11 +247,6 @@ require 'time'
|
|
262
247
|
require 'trieve_ruby_client'
|
263
248
|
# setup authorization
|
264
249
|
TrieveRubyClient.configure do |config|
|
265
|
-
# Configure API key authorization: Cookie
|
266
|
-
config.api_key['Cookie'] = 'YOUR API KEY'
|
267
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
268
|
-
# config.api_key_prefix['Cookie'] = 'Bearer'
|
269
|
-
|
270
250
|
# Configure API key authorization: ApiKey
|
271
251
|
config.api_key['ApiKey'] = 'YOUR API KEY'
|
272
252
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
@@ -278,7 +258,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
|
|
278
258
|
upload_file_data = TrieveRubyClient::UploadFileData.new({base64_file: 'base64_file_example', file_mime_type: 'file_mime_type_example', file_name: 'file_name_example'}) # UploadFileData | JSON request payload to upload a file
|
279
259
|
|
280
260
|
begin
|
281
|
-
#
|
261
|
+
# Upload File
|
282
262
|
result = api_instance.upload_file_handler(tr_dataset, upload_file_data)
|
283
263
|
p result
|
284
264
|
rescue TrieveRubyClient::ApiError => e
|
@@ -294,7 +274,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
294
274
|
|
295
275
|
```ruby
|
296
276
|
begin
|
297
|
-
#
|
277
|
+
# Upload File
|
298
278
|
data, status_code, headers = api_instance.upload_file_handler_with_http_info(tr_dataset, upload_file_data)
|
299
279
|
p status_code # => 2xx
|
300
280
|
p headers # => { ... }
|
@@ -317,7 +297,7 @@ end
|
|
317
297
|
|
318
298
|
### Authorization
|
319
299
|
|
320
|
-
[
|
300
|
+
[ApiKey](../README.md#ApiKey)
|
321
301
|
|
322
302
|
### HTTP request headers
|
323
303
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# TrieveRubyClient::GetEventsData
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **event_types** | **Array<String>** | The type of events to get. Any combination of file_uploaded, card_uploaded, card_action_failed, or card_updated. Leave undefined to get all events. | [optional] |
|
8
|
+
| **page** | **Integer** | The page number to get. Default is 1. | [optional] |
|
9
|
+
| **page_size** | **Integer** | The number of items per page. Default is 10. | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'trieve_ruby_client'
|
15
|
+
|
16
|
+
instance = TrieveRubyClient::GetEventsData.new(
|
17
|
+
event_types: null,
|
18
|
+
page: null,
|
19
|
+
page_size: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
data/docs/HealthApi.md
CHANGED
@@ -1,17 +1,19 @@
|
|
1
1
|
# TrieveRubyClient::HealthApi
|
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
|
-
| [**health_check**](HealthApi.md#health_check) | **GET** /api/health |
|
7
|
+
| [**health_check**](HealthApi.md#health_check) | **GET** /api/health | Health Check |
|
8
8
|
|
9
9
|
|
10
10
|
## health_check
|
11
11
|
|
12
12
|
> health_check
|
13
13
|
|
14
|
+
Health Check
|
14
15
|
|
16
|
+
Health Check Confirmation that the service is healthy and can make embedding vectors
|
15
17
|
|
16
18
|
### Examples
|
17
19
|
|
@@ -22,7 +24,7 @@ require 'trieve_ruby_client'
|
|
22
24
|
api_instance = TrieveRubyClient::HealthApi.new
|
23
25
|
|
24
26
|
begin
|
25
|
-
|
27
|
+
# Health Check
|
26
28
|
api_instance.health_check
|
27
29
|
rescue TrieveRubyClient::ApiError => e
|
28
30
|
puts "Error when calling HealthApi->health_check: #{e}"
|
@@ -37,7 +39,7 @@ This returns an Array which contains the response data (`nil` in this case), sta
|
|
37
39
|
|
38
40
|
```ruby
|
39
41
|
begin
|
40
|
-
|
42
|
+
# Health Check
|
41
43
|
data, status_code, headers = api_instance.health_check_with_http_info
|
42
44
|
p status_code # => 2xx
|
43
45
|
p headers # => { ... }
|
data/docs/InvitationApi.md
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
# TrieveRubyClient::InvitationApi
|
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
|
-
| [**post_invitation**](InvitationApi.md#post_invitation) | **POST** /api/invitation |
|
7
|
+
| [**post_invitation**](InvitationApi.md#post_invitation) | **POST** /api/invitation | Send Invitation |
|
8
8
|
|
9
9
|
|
10
10
|
## post_invitation
|
11
11
|
|
12
12
|
> post_invitation(tr_organization, invitation_data)
|
13
13
|
|
14
|
-
|
14
|
+
Send Invitation
|
15
15
|
|
16
|
-
|
16
|
+
Send Invitation Invitations act as a way to invite users to join an organization. After a user is invited, they will automatically be added to the organization with the role specified in the invitation once they set their.
|
17
17
|
|
18
18
|
### Examples
|
19
19
|
|
@@ -22,11 +22,6 @@ require 'time'
|
|
22
22
|
require 'trieve_ruby_client'
|
23
23
|
# setup authorization
|
24
24
|
TrieveRubyClient.configure do |config|
|
25
|
-
# Configure API key authorization: Cookie
|
26
|
-
config.api_key['Cookie'] = 'YOUR API KEY'
|
27
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
28
|
-
# config.api_key_prefix['Cookie'] = 'Bearer'
|
29
|
-
|
30
25
|
# Configure API key authorization: ApiKey
|
31
26
|
config.api_key['ApiKey'] = 'YOUR API KEY'
|
32
27
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
@@ -38,7 +33,7 @@ tr_organization = 'tr_organization_example' # String | The organization id to us
|
|
38
33
|
invitation_data = TrieveRubyClient::InvitationData.new({app_url: 'app_url_example', email: 'email_example', organization_id: 'organization_id_example', redirect_uri: 'redirect_uri_example', user_role: 37}) # InvitationData | JSON request payload to send an invitation
|
39
34
|
|
40
35
|
begin
|
41
|
-
#
|
36
|
+
# Send Invitation
|
42
37
|
api_instance.post_invitation(tr_organization, invitation_data)
|
43
38
|
rescue TrieveRubyClient::ApiError => e
|
44
39
|
puts "Error when calling InvitationApi->post_invitation: #{e}"
|
@@ -53,7 +48,7 @@ This returns an Array which contains the response data (`nil` in this case), sta
|
|
53
48
|
|
54
49
|
```ruby
|
55
50
|
begin
|
56
|
-
#
|
51
|
+
# Send Invitation
|
57
52
|
data, status_code, headers = api_instance.post_invitation_with_http_info(tr_organization, invitation_data)
|
58
53
|
p status_code # => 2xx
|
59
54
|
p headers # => { ... }
|
@@ -76,7 +71,7 @@ nil (empty response body)
|
|
76
71
|
|
77
72
|
### Authorization
|
78
73
|
|
79
|
-
[
|
74
|
+
[ApiKey](../README.md#ApiKey)
|
80
75
|
|
81
76
|
### HTTP request headers
|
82
77
|
|
data/docs/MessageApi.md
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
# TrieveRubyClient::MessageApi
|
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
|
-
| [**create_message_completion_handler**](MessageApi.md#create_message_completion_handler) | **POST** /api/message |
|
8
|
-
| [**edit_message_handler**](MessageApi.md#edit_message_handler) | **PUT** /api/message |
|
9
|
-
| [**get_all_topic_messages**](MessageApi.md#get_all_topic_messages) | **GET** /api/messages/{messages_topic_id} |
|
10
|
-
| [**regenerate_message_handler**](MessageApi.md#regenerate_message_handler) | **DELETE** /api/message |
|
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 |
|
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 |
|
11
11
|
|
12
12
|
|
13
13
|
## create_message_completion_handler
|
14
14
|
|
15
15
|
> String create_message_completion_handler(tr_dataset, create_message_data)
|
16
16
|
|
17
|
-
|
17
|
+
Create a message
|
18
18
|
|
19
|
-
|
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.
|
20
20
|
|
21
21
|
### Examples
|
22
22
|
|
@@ -25,11 +25,6 @@ require 'time'
|
|
25
25
|
require 'trieve_ruby_client'
|
26
26
|
# setup authorization
|
27
27
|
TrieveRubyClient.configure do |config|
|
28
|
-
# Configure API key authorization: Cookie
|
29
|
-
config.api_key['Cookie'] = 'YOUR API KEY'
|
30
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
31
|
-
# config.api_key_prefix['Cookie'] = 'Bearer'
|
32
|
-
|
33
28
|
# Configure API key authorization: ApiKey
|
34
29
|
config.api_key['ApiKey'] = 'YOUR API KEY'
|
35
30
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
@@ -41,7 +36,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
|
|
41
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
|
42
37
|
|
43
38
|
begin
|
44
|
-
#
|
39
|
+
# Create a message
|
45
40
|
result = api_instance.create_message_completion_handler(tr_dataset, create_message_data)
|
46
41
|
p result
|
47
42
|
rescue TrieveRubyClient::ApiError => e
|
@@ -57,7 +52,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
57
52
|
|
58
53
|
```ruby
|
59
54
|
begin
|
60
|
-
#
|
55
|
+
# Create a message
|
61
56
|
data, status_code, headers = api_instance.create_message_completion_handler_with_http_info(tr_dataset, create_message_data)
|
62
57
|
p status_code # => 2xx
|
63
58
|
p headers # => { ... }
|
@@ -80,7 +75,7 @@ end
|
|
80
75
|
|
81
76
|
### Authorization
|
82
77
|
|
83
|
-
[
|
78
|
+
[ApiKey](../README.md#ApiKey)
|
84
79
|
|
85
80
|
### HTTP request headers
|
86
81
|
|
@@ -92,9 +87,9 @@ end
|
|
92
87
|
|
93
88
|
> edit_message_handler(tr_dataset, edit_message_data)
|
94
89
|
|
95
|
-
|
90
|
+
Edit a message
|
96
91
|
|
97
|
-
|
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.
|
98
93
|
|
99
94
|
### Examples
|
100
95
|
|
@@ -103,11 +98,6 @@ require 'time'
|
|
103
98
|
require 'trieve_ruby_client'
|
104
99
|
# setup authorization
|
105
100
|
TrieveRubyClient.configure do |config|
|
106
|
-
# Configure API key authorization: Cookie
|
107
|
-
config.api_key['Cookie'] = 'YOUR API KEY'
|
108
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
109
|
-
# config.api_key_prefix['Cookie'] = 'Bearer'
|
110
|
-
|
111
101
|
# Configure API key authorization: ApiKey
|
112
102
|
config.api_key['ApiKey'] = 'YOUR API KEY'
|
113
103
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
@@ -119,7 +109,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
|
|
119
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
|
120
110
|
|
121
111
|
begin
|
122
|
-
#
|
112
|
+
# Edit a message
|
123
113
|
api_instance.edit_message_handler(tr_dataset, edit_message_data)
|
124
114
|
rescue TrieveRubyClient::ApiError => e
|
125
115
|
puts "Error when calling MessageApi->edit_message_handler: #{e}"
|
@@ -134,7 +124,7 @@ This returns an Array which contains the response data (`nil` in this case), sta
|
|
134
124
|
|
135
125
|
```ruby
|
136
126
|
begin
|
137
|
-
#
|
127
|
+
# Edit a message
|
138
128
|
data, status_code, headers = api_instance.edit_message_handler_with_http_info(tr_dataset, edit_message_data)
|
139
129
|
p status_code # => 2xx
|
140
130
|
p headers # => { ... }
|
@@ -157,7 +147,7 @@ nil (empty response body)
|
|
157
147
|
|
158
148
|
### Authorization
|
159
149
|
|
160
|
-
[
|
150
|
+
[ApiKey](../README.md#ApiKey)
|
161
151
|
|
162
152
|
### HTTP request headers
|
163
153
|
|
@@ -169,9 +159,9 @@ nil (empty response body)
|
|
169
159
|
|
170
160
|
> <Array<Message>> get_all_topic_messages(tr_dataset, messages_topic_id)
|
171
161
|
|
172
|
-
|
162
|
+
Get all messages for a given topic
|
173
163
|
|
174
|
-
|
164
|
+
Get all messages for a given topic Get all messages for a given topic. If the topic is a RAG topic then the response will include Chunks first on each message. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.
|
175
165
|
|
176
166
|
### Examples
|
177
167
|
|
@@ -180,11 +170,6 @@ require 'time'
|
|
180
170
|
require 'trieve_ruby_client'
|
181
171
|
# setup authorization
|
182
172
|
TrieveRubyClient.configure do |config|
|
183
|
-
# Configure API key authorization: Cookie
|
184
|
-
config.api_key['Cookie'] = 'YOUR API KEY'
|
185
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
186
|
-
# config.api_key_prefix['Cookie'] = 'Bearer'
|
187
|
-
|
188
173
|
# Configure API key authorization: ApiKey
|
189
174
|
config.api_key['ApiKey'] = 'YOUR API KEY'
|
190
175
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
@@ -196,7 +181,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
|
|
196
181
|
messages_topic_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The ID of the topic to get messages for.
|
197
182
|
|
198
183
|
begin
|
199
|
-
#
|
184
|
+
# Get all messages for a given topic
|
200
185
|
result = api_instance.get_all_topic_messages(tr_dataset, messages_topic_id)
|
201
186
|
p result
|
202
187
|
rescue TrieveRubyClient::ApiError => e
|
@@ -212,7 +197,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
212
197
|
|
213
198
|
```ruby
|
214
199
|
begin
|
215
|
-
#
|
200
|
+
# Get all messages for a given topic
|
216
201
|
data, status_code, headers = api_instance.get_all_topic_messages_with_http_info(tr_dataset, messages_topic_id)
|
217
202
|
p status_code # => 2xx
|
218
203
|
p headers # => { ... }
|
@@ -235,7 +220,7 @@ end
|
|
235
220
|
|
236
221
|
### Authorization
|
237
222
|
|
238
|
-
[
|
223
|
+
[ApiKey](../README.md#ApiKey)
|
239
224
|
|
240
225
|
### HTTP request headers
|
241
226
|
|
@@ -247,9 +232,9 @@ end
|
|
247
232
|
|
248
233
|
> String regenerate_message_handler(tr_dataset, regenerate_message_data)
|
249
234
|
|
250
|
-
|
235
|
+
Regenerate message
|
251
236
|
|
252
|
-
|
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.
|
253
238
|
|
254
239
|
### Examples
|
255
240
|
|
@@ -258,11 +243,6 @@ require 'time'
|
|
258
243
|
require 'trieve_ruby_client'
|
259
244
|
# setup authorization
|
260
245
|
TrieveRubyClient.configure do |config|
|
261
|
-
# Configure API key authorization: Cookie
|
262
|
-
config.api_key['Cookie'] = 'YOUR API KEY'
|
263
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
264
|
-
# config.api_key_prefix['Cookie'] = 'Bearer'
|
265
|
-
|
266
246
|
# Configure API key authorization: ApiKey
|
267
247
|
config.api_key['ApiKey'] = 'YOUR API KEY'
|
268
248
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
@@ -274,7 +254,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
|
|
274
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
|
275
255
|
|
276
256
|
begin
|
277
|
-
#
|
257
|
+
# Regenerate message
|
278
258
|
result = api_instance.regenerate_message_handler(tr_dataset, regenerate_message_data)
|
279
259
|
p result
|
280
260
|
rescue TrieveRubyClient::ApiError => e
|
@@ -290,7 +270,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
290
270
|
|
291
271
|
```ruby
|
292
272
|
begin
|
293
|
-
#
|
273
|
+
# Regenerate message
|
294
274
|
data, status_code, headers = api_instance.regenerate_message_handler_with_http_info(tr_dataset, regenerate_message_data)
|
295
275
|
p status_code # => 2xx
|
296
276
|
p headers # => { ... }
|
@@ -313,7 +293,7 @@ end
|
|
313
293
|
|
314
294
|
### Authorization
|
315
295
|
|
316
|
-
[
|
296
|
+
[ApiKey](../README.md#ApiKey)
|
317
297
|
|
318
298
|
### HTTP request headers
|
319
299
|
|