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.
- checksums.yaml +4 -4
- data/README.md +78 -74
- data/docs/AuthApi.md +28 -34
- data/docs/AuthQuery.md +22 -0
- data/docs/BatchQueuedChunkResponse.md +20 -0
- data/docs/ChunkApi.md +69 -143
- data/docs/ChunkData.md +42 -0
- data/docs/ChunkGroupApi.md +169 -85
- data/docs/CreateChunkData.md +41 -34
- data/docs/DatasetApi.md +31 -31
- data/docs/EventsApi.md +13 -13
- data/docs/FileApi.md +21 -21
- data/docs/GetEventsData.md +22 -0
- data/docs/HealthApi.md +6 -4
- data/docs/InvitationApi.md +6 -6
- data/docs/MessageApi.md +21 -21
- data/docs/OrganizationApi.md +31 -31
- data/docs/ReturnQueuedChunk.md +39 -10
- data/docs/SingleQueuedChunkResponse.md +20 -0
- data/docs/StripeApi.md +21 -13
- data/docs/TopicApi.md +21 -21
- data/docs/UserApi.md +16 -16
- data/lib/trieve_ruby_client/api/auth_api.rb +27 -34
- data/lib/trieve_ruby_client/api/chunk_api.rb +57 -132
- data/lib/trieve_ruby_client/api/chunk_group_api.rb +149 -61
- data/lib/trieve_ruby_client/api/dataset_api.rb +25 -25
- data/lib/trieve_ruby_client/api/events_api.rb +21 -16
- data/lib/trieve_ruby_client/api/file_api.rb +17 -17
- data/lib/trieve_ruby_client/api/health_api.rb +5 -1
- data/lib/trieve_ruby_client/api/invitation_api.rb +5 -5
- data/lib/trieve_ruby_client/api/message_api.rb +17 -17
- data/lib/trieve_ruby_client/api/organization_api.rb +25 -25
- data/lib/trieve_ruby_client/api/stripe_api.rb +17 -1
- data/lib/trieve_ruby_client/api/topic_api.rb +17 -17
- data/lib/trieve_ruby_client/api/user_api.rb +13 -13
- 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 -4
- 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/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 +1 -1
- data/openapi.json +1233 -824
- 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 +1 -1
- metadata +23 -4
- data/trieve_ruby_client-0.3.4.gem +0 -0
- data/trieve_ruby_client-0.3.41.gem +0 -0
data/docs/CreateChunkData.md
CHANGED
@@ -1,42 +1,49 @@
|
|
1
1
|
# TrieveRubyClient::CreateChunkData
|
2
2
|
|
3
|
-
##
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
3
|
+
## Class instance methods
|
4
|
+
|
5
|
+
### `openapi_one_of`
|
6
|
+
|
7
|
+
Returns the list of classes defined in oneOf.
|
8
|
+
|
9
|
+
#### Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'trieve_ruby_client'
|
13
|
+
|
14
|
+
TrieveRubyClient::CreateChunkData.openapi_one_of
|
15
|
+
# =>
|
16
|
+
# [
|
17
|
+
# :'Array<ChunkData>',
|
18
|
+
# :'ChunkData'
|
19
|
+
# ]
|
20
|
+
```
|
21
|
+
|
22
|
+
### build
|
23
|
+
|
24
|
+
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
|
25
|
+
|
26
|
+
#### Example
|
22
27
|
|
23
28
|
```ruby
|
24
29
|
require 'trieve_ruby_client'
|
25
30
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
group_tracking_ids: null,
|
32
|
-
link: null,
|
33
|
-
metadata: null,
|
34
|
-
split_avg: null,
|
35
|
-
tag_set: null,
|
36
|
-
time_stamp: null,
|
37
|
-
tracking_id: null,
|
38
|
-
upsert_by_tracking_id: null,
|
39
|
-
weight: null
|
40
|
-
)
|
31
|
+
TrieveRubyClient::CreateChunkData.build(data)
|
32
|
+
# => #<Array<ChunkData>:0x00007fdd4aab02a0>
|
33
|
+
|
34
|
+
TrieveRubyClient::CreateChunkData.build(data_that_doesnt_match)
|
35
|
+
# => nil
|
41
36
|
```
|
42
37
|
|
38
|
+
#### Parameters
|
39
|
+
|
40
|
+
| Name | Type | Description |
|
41
|
+
| ---- | ---- | ----------- |
|
42
|
+
| **data** | **Mixed** | data to be matched against the list of oneOf items |
|
43
|
+
|
44
|
+
#### Return type
|
45
|
+
|
46
|
+
- `Array<ChunkData>`
|
47
|
+
- `ChunkData`
|
48
|
+
- `nil` (if no type matches)
|
49
|
+
|
data/docs/DatasetApi.md
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
# TrieveRubyClient::DatasetApi
|
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_dataset**](DatasetApi.md#create_dataset) | **POST** /api/dataset |
|
8
|
-
| [**delete_dataset**](DatasetApi.md#delete_dataset) | **DELETE** /api/dataset |
|
9
|
-
| [**get_client_dataset_config**](DatasetApi.md#get_client_dataset_config) | **GET** /api/dataset/envs |
|
10
|
-
| [**get_dataset**](DatasetApi.md#get_dataset) | **GET** /api/dataset/{dataset_id} |
|
11
|
-
| [**get_datasets_from_organization**](DatasetApi.md#get_datasets_from_organization) | **GET** /api/dataset/organization/{organization_id} |
|
12
|
-
| [**update_dataset**](DatasetApi.md#update_dataset) | **PUT** /api/dataset |
|
7
|
+
| [**create_dataset**](DatasetApi.md#create_dataset) | **POST** /api/dataset | Create dataset |
|
8
|
+
| [**delete_dataset**](DatasetApi.md#delete_dataset) | **DELETE** /api/dataset | Delete Dataset |
|
9
|
+
| [**get_client_dataset_config**](DatasetApi.md#get_client_dataset_config) | **GET** /api/dataset/envs | Get Client Configuration |
|
10
|
+
| [**get_dataset**](DatasetApi.md#get_dataset) | **GET** /api/dataset/{dataset_id} | Get Dataset |
|
11
|
+
| [**get_datasets_from_organization**](DatasetApi.md#get_datasets_from_organization) | **GET** /api/dataset/organization/{organization_id} | Get Datasets from Organization |
|
12
|
+
| [**update_dataset**](DatasetApi.md#update_dataset) | **PUT** /api/dataset | Update Dataset |
|
13
13
|
|
14
14
|
|
15
15
|
## create_dataset
|
16
16
|
|
17
17
|
> <Dataset> create_dataset(tr_organization, create_dataset_request)
|
18
18
|
|
19
|
-
|
19
|
+
Create dataset
|
20
20
|
|
21
|
-
|
21
|
+
Create dataset Create a new dataset. The auth'ed user must be an owner of the organization to create a dataset.
|
22
22
|
|
23
23
|
### Examples
|
24
24
|
|
@@ -38,7 +38,7 @@ tr_organization = 'tr_organization_example' # String | The organization id to us
|
|
38
38
|
create_dataset_request = TrieveRubyClient::CreateDatasetRequest.new({client_configuration: 3.56, dataset_name: 'dataset_name_example', organization_id: 'organization_id_example', server_configuration: 3.56}) # CreateDatasetRequest | JSON request payload to create a new dataset
|
39
39
|
|
40
40
|
begin
|
41
|
-
#
|
41
|
+
# Create dataset
|
42
42
|
result = api_instance.create_dataset(tr_organization, create_dataset_request)
|
43
43
|
p result
|
44
44
|
rescue TrieveRubyClient::ApiError => e
|
@@ -54,7 +54,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
54
54
|
|
55
55
|
```ruby
|
56
56
|
begin
|
57
|
-
#
|
57
|
+
# Create dataset
|
58
58
|
data, status_code, headers = api_instance.create_dataset_with_http_info(tr_organization, create_dataset_request)
|
59
59
|
p status_code # => 2xx
|
60
60
|
p headers # => { ... }
|
@@ -89,9 +89,9 @@ end
|
|
89
89
|
|
90
90
|
> delete_dataset(tr_organization, delete_dataset_request)
|
91
91
|
|
92
|
-
|
92
|
+
Delete Dataset
|
93
93
|
|
94
|
-
|
94
|
+
Delete Dataset Delete a dataset. The auth'ed user must be an owner of the organization to delete a dataset.
|
95
95
|
|
96
96
|
### Examples
|
97
97
|
|
@@ -111,7 +111,7 @@ tr_organization = 'tr_organization_example' # String | The organization id to us
|
|
111
111
|
delete_dataset_request = TrieveRubyClient::DeleteDatasetRequest.new({dataset_id: 'dataset_id_example'}) # DeleteDatasetRequest | JSON request payload to delete a dataset
|
112
112
|
|
113
113
|
begin
|
114
|
-
#
|
114
|
+
# Delete Dataset
|
115
115
|
api_instance.delete_dataset(tr_organization, delete_dataset_request)
|
116
116
|
rescue TrieveRubyClient::ApiError => e
|
117
117
|
puts "Error when calling DatasetApi->delete_dataset: #{e}"
|
@@ -126,7 +126,7 @@ This returns an Array which contains the response data (`nil` in this case), sta
|
|
126
126
|
|
127
127
|
```ruby
|
128
128
|
begin
|
129
|
-
#
|
129
|
+
# Delete Dataset
|
130
130
|
data, status_code, headers = api_instance.delete_dataset_with_http_info(tr_organization, delete_dataset_request)
|
131
131
|
p status_code # => 2xx
|
132
132
|
p headers # => { ... }
|
@@ -161,9 +161,9 @@ nil (empty response body)
|
|
161
161
|
|
162
162
|
> <ClientDatasetConfiguration> get_client_dataset_config(tr_dataset)
|
163
163
|
|
164
|
-
|
164
|
+
Get Client Configuration
|
165
165
|
|
166
|
-
|
166
|
+
Get Client Configuration Get the client configuration for a dataset. Will use the TR-D
|
167
167
|
|
168
168
|
### Examples
|
169
169
|
|
@@ -182,7 +182,7 @@ api_instance = TrieveRubyClient::DatasetApi.new
|
|
182
182
|
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
183
183
|
|
184
184
|
begin
|
185
|
-
#
|
185
|
+
# Get Client Configuration
|
186
186
|
result = api_instance.get_client_dataset_config(tr_dataset)
|
187
187
|
p result
|
188
188
|
rescue TrieveRubyClient::ApiError => e
|
@@ -198,7 +198,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
198
198
|
|
199
199
|
```ruby
|
200
200
|
begin
|
201
|
-
#
|
201
|
+
# Get Client Configuration
|
202
202
|
data, status_code, headers = api_instance.get_client_dataset_config_with_http_info(tr_dataset)
|
203
203
|
p status_code # => 2xx
|
204
204
|
p headers # => { ... }
|
@@ -232,9 +232,9 @@ end
|
|
232
232
|
|
233
233
|
> <Dataset> get_dataset(tr_organization, tr_dataset, dataset_id)
|
234
234
|
|
235
|
-
|
235
|
+
Get Dataset
|
236
236
|
|
237
|
-
|
237
|
+
Get Dataset Get a dataset by id. The auth'ed user must be an admin or owner of the organization to get a dataset.
|
238
238
|
|
239
239
|
### Examples
|
240
240
|
|
@@ -255,7 +255,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
|
|
255
255
|
dataset_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the dataset you want to retrieve.
|
256
256
|
|
257
257
|
begin
|
258
|
-
#
|
258
|
+
# Get Dataset
|
259
259
|
result = api_instance.get_dataset(tr_organization, tr_dataset, dataset_id)
|
260
260
|
p result
|
261
261
|
rescue TrieveRubyClient::ApiError => e
|
@@ -271,7 +271,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
271
271
|
|
272
272
|
```ruby
|
273
273
|
begin
|
274
|
-
#
|
274
|
+
# Get Dataset
|
275
275
|
data, status_code, headers = api_instance.get_dataset_with_http_info(tr_organization, tr_dataset, dataset_id)
|
276
276
|
p status_code # => 2xx
|
277
277
|
p headers # => { ... }
|
@@ -307,9 +307,9 @@ end
|
|
307
307
|
|
308
308
|
> <Array<DatasetAndUsage>> get_datasets_from_organization(tr_organization, organization_id)
|
309
309
|
|
310
|
-
|
310
|
+
Get Datasets from Organization
|
311
311
|
|
312
|
-
|
312
|
+
Get Datasets from Organization Get all datasets for an organization. The auth'ed user must be an admin or owner of the organization to get its datasets.
|
313
313
|
|
314
314
|
### Examples
|
315
315
|
|
@@ -329,7 +329,7 @@ tr_organization = 'tr_organization_example' # String | The organization id to us
|
|
329
329
|
organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | id of the organization you want to retrieve datasets for
|
330
330
|
|
331
331
|
begin
|
332
|
-
#
|
332
|
+
# Get Datasets from Organization
|
333
333
|
result = api_instance.get_datasets_from_organization(tr_organization, organization_id)
|
334
334
|
p result
|
335
335
|
rescue TrieveRubyClient::ApiError => e
|
@@ -345,7 +345,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
345
345
|
|
346
346
|
```ruby
|
347
347
|
begin
|
348
|
-
#
|
348
|
+
# Get Datasets from Organization
|
349
349
|
data, status_code, headers = api_instance.get_datasets_from_organization_with_http_info(tr_organization, organization_id)
|
350
350
|
p status_code # => 2xx
|
351
351
|
p headers # => { ... }
|
@@ -380,9 +380,9 @@ end
|
|
380
380
|
|
381
381
|
> <Dataset> update_dataset(tr_organization, update_dataset_request)
|
382
382
|
|
383
|
-
|
383
|
+
Update Dataset
|
384
384
|
|
385
|
-
|
385
|
+
Update Dataset Update a dataset. The auth'ed user must be an owner of the organization to update a dataset.
|
386
386
|
|
387
387
|
### Examples
|
388
388
|
|
@@ -402,7 +402,7 @@ tr_organization = 'tr_organization_example' # String | The organization id to us
|
|
402
402
|
update_dataset_request = TrieveRubyClient::UpdateDatasetRequest.new({dataset_id: 'dataset_id_example'}) # UpdateDatasetRequest | JSON request payload to update a dataset
|
403
403
|
|
404
404
|
begin
|
405
|
-
#
|
405
|
+
# Update Dataset
|
406
406
|
result = api_instance.update_dataset(tr_organization, update_dataset_request)
|
407
407
|
p result
|
408
408
|
rescue TrieveRubyClient::ApiError => e
|
@@ -418,7 +418,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
418
418
|
|
419
419
|
```ruby
|
420
420
|
begin
|
421
|
-
#
|
421
|
+
# Update Dataset
|
422
422
|
data, status_code, headers = api_instance.update_dataset_with_http_info(tr_organization, update_dataset_request)
|
423
423
|
p status_code # => 2xx
|
424
424
|
p headers # => { ... }
|
data/docs/EventsApi.md
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
# TrieveRubyClient::EventsApi
|
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
|
-
| [**get_events**](EventsApi.md#get_events) | **
|
7
|
+
| [**get_events**](EventsApi.md#get_events) | **POST** /api/events | Get events for the dataset |
|
8
8
|
|
9
9
|
|
10
10
|
## get_events
|
11
11
|
|
12
|
-
> <EventReturn> get_events(tr_dataset,
|
12
|
+
> <EventReturn> get_events(tr_dataset, get_events_data)
|
13
13
|
|
14
|
-
|
14
|
+
Get events for the dataset
|
15
15
|
|
16
|
-
|
16
|
+
Get events for the dataset Get events for the auth'ed user. Currently, this is only for events belonging to the auth'ed user. Soon, we plan to associate events to datasets instead of users.
|
17
17
|
|
18
18
|
### Examples
|
19
19
|
|
@@ -30,11 +30,11 @@ end
|
|
30
30
|
|
31
31
|
api_instance = TrieveRubyClient::EventsApi.new
|
32
32
|
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
33
|
-
|
33
|
+
get_events_data = TrieveRubyClient::GetEventsData.new # GetEventsData | JSON request payload to get events for a dataset
|
34
34
|
|
35
35
|
begin
|
36
|
-
#
|
37
|
-
result = api_instance.get_events(tr_dataset,
|
36
|
+
# Get events for the dataset
|
37
|
+
result = api_instance.get_events(tr_dataset, get_events_data)
|
38
38
|
p result
|
39
39
|
rescue TrieveRubyClient::ApiError => e
|
40
40
|
puts "Error when calling EventsApi->get_events: #{e}"
|
@@ -45,12 +45,12 @@ end
|
|
45
45
|
|
46
46
|
This returns an Array which contains the response data, status code and headers.
|
47
47
|
|
48
|
-
> <Array(<EventReturn>, Integer, Hash)> get_events_with_http_info(tr_dataset,
|
48
|
+
> <Array(<EventReturn>, Integer, Hash)> get_events_with_http_info(tr_dataset, get_events_data)
|
49
49
|
|
50
50
|
```ruby
|
51
51
|
begin
|
52
|
-
#
|
53
|
-
data, status_code, headers = api_instance.get_events_with_http_info(tr_dataset,
|
52
|
+
# Get events for the dataset
|
53
|
+
data, status_code, headers = api_instance.get_events_with_http_info(tr_dataset, get_events_data)
|
54
54
|
p status_code # => 2xx
|
55
55
|
p headers # => { ... }
|
56
56
|
p data # => <EventReturn>
|
@@ -64,7 +64,7 @@ end
|
|
64
64
|
| Name | Type | Description | Notes |
|
65
65
|
| ---- | ---- | ----------- | ----- |
|
66
66
|
| **tr_dataset** | **String** | The dataset id to use for the request | |
|
67
|
-
| **
|
67
|
+
| **get_events_data** | [**GetEventsData**](GetEventsData.md) | JSON request payload to get events for a dataset | |
|
68
68
|
|
69
69
|
### Return type
|
70
70
|
|
@@ -76,6 +76,6 @@ end
|
|
76
76
|
|
77
77
|
### HTTP request headers
|
78
78
|
|
79
|
-
- **Content-Type**:
|
79
|
+
- **Content-Type**: application/json
|
80
80
|
- **Accept**: application/json
|
81
81
|
|
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
|
|
@@ -37,7 +37,7 @@ file_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the file t
|
|
37
37
|
delete_chunks = true # Boolean | Whether or not to delete the chunks associated with the file
|
38
38
|
|
39
39
|
begin
|
40
|
-
#
|
40
|
+
# Delete File
|
41
41
|
api_instance.delete_file_handler(tr_dataset, file_id, delete_chunks)
|
42
42
|
rescue TrieveRubyClient::ApiError => e
|
43
43
|
puts "Error when calling FileApi->delete_file_handler: #{e}"
|
@@ -52,7 +52,7 @@ This returns an Array which contains the response data (`nil` in this case), sta
|
|
52
52
|
|
53
53
|
```ruby
|
54
54
|
begin
|
55
|
-
#
|
55
|
+
# Delete File
|
56
56
|
data, status_code, headers = api_instance.delete_file_handler_with_http_info(tr_dataset, file_id, delete_chunks)
|
57
57
|
p status_code # => 2xx
|
58
58
|
p headers # => { ... }
|
@@ -88,9 +88,9 @@ nil (empty response body)
|
|
88
88
|
|
89
89
|
> Array<File> get_dataset_files_handler(tr_dataset, dataset_id, page)
|
90
90
|
|
91
|
-
|
91
|
+
Get Files for Dataset
|
92
92
|
|
93
|
-
|
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.
|
94
94
|
|
95
95
|
### Examples
|
96
96
|
|
@@ -111,7 +111,7 @@ dataset_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the dat
|
|
111
111
|
page = 789 # Integer | The page number of files you wish to fetch. Each page contains at most 10 files.
|
112
112
|
|
113
113
|
begin
|
114
|
-
#
|
114
|
+
# Get Files for Dataset
|
115
115
|
result = api_instance.get_dataset_files_handler(tr_dataset, dataset_id, page)
|
116
116
|
p result
|
117
117
|
rescue TrieveRubyClient::ApiError => e
|
@@ -127,7 +127,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
127
127
|
|
128
128
|
```ruby
|
129
129
|
begin
|
130
|
-
#
|
130
|
+
# Get Files for Dataset
|
131
131
|
data, status_code, headers = api_instance.get_dataset_files_handler_with_http_info(tr_dataset, dataset_id, page)
|
132
132
|
p status_code # => 2xx
|
133
133
|
p headers # => { ... }
|
@@ -163,9 +163,9 @@ end
|
|
163
163
|
|
164
164
|
> <FileDTO> get_file_handler(tr_dataset, file_id)
|
165
165
|
|
166
|
-
|
166
|
+
Get File
|
167
167
|
|
168
|
-
|
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.
|
169
169
|
|
170
170
|
### Examples
|
171
171
|
|
@@ -185,7 +185,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
|
|
185
185
|
file_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the file to fetch
|
186
186
|
|
187
187
|
begin
|
188
|
-
#
|
188
|
+
# Get File
|
189
189
|
result = api_instance.get_file_handler(tr_dataset, file_id)
|
190
190
|
p result
|
191
191
|
rescue TrieveRubyClient::ApiError => e
|
@@ -201,7 +201,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
201
201
|
|
202
202
|
```ruby
|
203
203
|
begin
|
204
|
-
#
|
204
|
+
# Get File
|
205
205
|
data, status_code, headers = api_instance.get_file_handler_with_http_info(tr_dataset, file_id)
|
206
206
|
p status_code # => 2xx
|
207
207
|
p headers # => { ... }
|
@@ -236,9 +236,9 @@ end
|
|
236
236
|
|
237
237
|
> <UploadFileResult> upload_file_handler(tr_dataset, upload_file_data)
|
238
238
|
|
239
|
-
|
239
|
+
Upload File
|
240
240
|
|
241
|
-
|
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.
|
242
242
|
|
243
243
|
### Examples
|
244
244
|
|
@@ -258,7 +258,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
|
|
258
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
|
259
259
|
|
260
260
|
begin
|
261
|
-
#
|
261
|
+
# Upload File
|
262
262
|
result = api_instance.upload_file_handler(tr_dataset, upload_file_data)
|
263
263
|
p result
|
264
264
|
rescue TrieveRubyClient::ApiError => e
|
@@ -274,7 +274,7 @@ This returns an Array which contains the response data, status code and headers.
|
|
274
274
|
|
275
275
|
```ruby
|
276
276
|
begin
|
277
|
-
#
|
277
|
+
# Upload File
|
278
278
|
data, status_code, headers = api_instance.upload_file_handler_with_http_info(tr_dataset, upload_file_data)
|
279
279
|
p status_code # => 2xx
|
280
280
|
p headers # => { ... }
|
@@ -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
|
|
@@ -33,7 +33,7 @@ tr_organization = 'tr_organization_example' # String | The organization id to us
|
|
33
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
|
34
34
|
|
35
35
|
begin
|
36
|
-
#
|
36
|
+
# Send Invitation
|
37
37
|
api_instance.post_invitation(tr_organization, invitation_data)
|
38
38
|
rescue TrieveRubyClient::ApiError => e
|
39
39
|
puts "Error when calling InvitationApi->post_invitation: #{e}"
|
@@ -48,7 +48,7 @@ This returns an Array which contains the response data (`nil` in this case), sta
|
|
48
48
|
|
49
49
|
```ruby
|
50
50
|
begin
|
51
|
-
#
|
51
|
+
# Send Invitation
|
52
52
|
data, status_code, headers = api_instance.post_invitation_with_http_info(tr_organization, invitation_data)
|
53
53
|
p status_code # => 2xx
|
54
54
|
p headers # => { ... }
|