trieve_ruby_client 0.6.9 → 0.7.2
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 +7 -7
- data/docs/ChunkData.md +0 -2
- data/docs/ClientDatasetConfiguration.md +2 -0
- data/docs/CreateTopicData.md +3 -1
- data/docs/FileApi.md +4 -6
- data/docs/GetEventsData.md +1 -1
- data/docs/Topic.md +3 -3
- data/docs/TopicApi.md +17 -17
- data/docs/UpdateUserOrgRoleData.md +22 -0
- data/docs/UserApi.md +9 -10
- data/lib/trieve_ruby_client/api/auth_api.rb +1 -1
- data/lib/trieve_ruby_client/api/chunk_api.rb +1 -1
- data/lib/trieve_ruby_client/api/chunk_group_api.rb +1 -1
- data/lib/trieve_ruby_client/api/dataset_api.rb +1 -1
- data/lib/trieve_ruby_client/api/events_api.rb +1 -1
- data/lib/trieve_ruby_client/api/file_api.rb +4 -11
- data/lib/trieve_ruby_client/api/health_api.rb +1 -1
- data/lib/trieve_ruby_client/api/invitation_api.rb +1 -1
- data/lib/trieve_ruby_client/api/message_api.rb +1 -1
- data/lib/trieve_ruby_client/api/organization_api.rb +1 -1
- data/lib/trieve_ruby_client/api/stripe_api.rb +1 -1
- data/lib/trieve_ruby_client/api/topic_api.rb +20 -20
- data/lib/trieve_ruby_client/api/user_api.rb +14 -14
- 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 +1 -1
- 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 +1 -1
- data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +1 -1
- 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 +2 -13
- 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_score.rb +1 -1
- data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +18 -2
- data/lib/trieve_ruby_client/models/create_chunk_data.rb +1 -1
- 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 +23 -6
- 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_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 +2 -2
- 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.rb +1 -1
- data/lib/trieve_ruby_client/models/group_score_slim_chunks.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/range_condition.rb +1 -1
- data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +1 -1
- data/lib/trieve_ruby_client/models/recommend_group_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 +1 -1
- data/lib/trieve_ruby_client/models/score_chunk_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/score_slim_chunks.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_over_groups_data.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_results.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_slim_results.rb +1 -1
- data/lib/trieve_ruby_client/models/search_slim_chunk_query_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_within_group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/search_within_group_results.rb +1 -1
- data/lib/trieve_ruby_client/models/search_within_group_slim_results.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 +1 -1
- data/lib/trieve_ruby_client/models/slim_chunk_metadata.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_score.rb +1 -1
- 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 +21 -21
- 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_org_role_data.rb +250 -0
- 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 +2 -2
- data/openapi-generator.yaml +1 -1
- data/openapi.json +39 -56
- data/spec/models/update_user_org_role_data_spec.rb +48 -0
- data/spec/spec_helper.rb +1 -1
- data/trieve_ruby_client-0.6.9.gem +0 -0
- data/trieve_ruby_client.gemspec +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 298bbf313b485fb5ab27425b449001c36689fd364c5cd02c2592c24754160d51
|
4
|
+
data.tar.gz: d7e6af2863cd04d2b68113f8a1169deabb16d84bdff6070180a8a94d77515a82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29c07c6847806f0e20dd1bf49e9c19c6986b150ec8f6706c3139527e243d9de45d93be12367628a6f2f7b1064ea8dc8d9ca19e9b8157cdb560fc3908956a31b8
|
7
|
+
data.tar.gz: f1f8d988c47a8bb8ce706e5ffd235326e4e445f5f44b25fe614ea247bd5bc5b33c48909c8e7d15ac12bb1de4e7f18764b55e58ad976e3bead1b91b76a58c99ee
|
data/README.md
CHANGED
@@ -6,8 +6,8 @@ Trieve OpenAPI Specification. This document describes all of the operations avai
|
|
6
6
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
|
-
- API version: 0.
|
10
|
-
- Package version: 0.
|
9
|
+
- API version: 0.7.2
|
10
|
+
- Package version: 0.7.2
|
11
11
|
- Generator version: 7.4.0
|
12
12
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
13
13
|
For more information, please visit [https://trieve.ai](https://trieve.ai)
|
@@ -25,16 +25,16 @@ gem build trieve_ruby_client.gemspec
|
|
25
25
|
Then either install the gem locally:
|
26
26
|
|
27
27
|
```shell
|
28
|
-
gem install ./trieve_ruby_client-0.
|
28
|
+
gem install ./trieve_ruby_client-0.7.2.gem
|
29
29
|
```
|
30
30
|
|
31
|
-
(for development, run `gem install --dev ./trieve_ruby_client-0.
|
31
|
+
(for development, run `gem install --dev ./trieve_ruby_client-0.7.2.gem` to install the development dependencies)
|
32
32
|
|
33
33
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
34
34
|
|
35
35
|
Finally add this to the Gemfile:
|
36
36
|
|
37
|
-
gem 'trieve_ruby_client', '~> 0.
|
37
|
+
gem 'trieve_ruby_client', '~> 0.7.2'
|
38
38
|
|
39
39
|
### Install from Git
|
40
40
|
|
@@ -137,7 +137,7 @@ Class | Method | HTTP request | Description
|
|
137
137
|
*TrieveRubyClient::StripeApi* | [**update_subscription_plan**](docs/StripeApi.md#update_subscription_plan) | **PATCH** /api/stripe/subscription_plan/{subscription_id}/{plan_id} | Update Subscription Plan
|
138
138
|
*TrieveRubyClient::TopicApi* | [**create_topic**](docs/TopicApi.md#create_topic) | **POST** /api/topic | Create Topic
|
139
139
|
*TrieveRubyClient::TopicApi* | [**delete_topic**](docs/TopicApi.md#delete_topic) | **DELETE** /api/topic/{topic_id} | Delete Topic
|
140
|
-
*TrieveRubyClient::TopicApi* | [**
|
140
|
+
*TrieveRubyClient::TopicApi* | [**get_all_topics_for_owner_id**](docs/TopicApi.md#get_all_topics_for_owner_id) | **GET** /api/topic/owner/{owner_id} | Get All Topics for Owner ID
|
141
141
|
*TrieveRubyClient::TopicApi* | [**update_topic**](docs/TopicApi.md#update_topic) | **PUT** /api/topic | Update Topic
|
142
142
|
*TrieveRubyClient::UserApi* | [**delete_user_api_key**](docs/UserApi.md#delete_user_api_key) | **DELETE** /api/user/api_key/{api_key_id} | Delete User Api Key
|
143
143
|
*TrieveRubyClient::UserApi* | [**set_user_api_key**](docs/UserApi.md#set_user_api_key) | **POST** /api/user/api_key | Set User Api Key
|
@@ -225,7 +225,7 @@ Class | Method | HTTP request | Description
|
|
225
225
|
- [TrieveRubyClient::UpdateGroupByTrackingIDData](docs/UpdateGroupByTrackingIDData.md)
|
226
226
|
- [TrieveRubyClient::UpdateOrganizationData](docs/UpdateOrganizationData.md)
|
227
227
|
- [TrieveRubyClient::UpdateTopicData](docs/UpdateTopicData.md)
|
228
|
-
- [TrieveRubyClient::
|
228
|
+
- [TrieveRubyClient::UpdateUserOrgRoleData](docs/UpdateUserOrgRoleData.md)
|
229
229
|
- [TrieveRubyClient::UploadFileData](docs/UploadFileData.md)
|
230
230
|
- [TrieveRubyClient::UploadFileResult](docs/UploadFileResult.md)
|
231
231
|
- [TrieveRubyClient::UserOrganization](docs/UserOrganization.md)
|
data/docs/ChunkData.md
CHANGED
@@ -7,7 +7,6 @@
|
|
7
7
|
| **chunk_html** | **String** | HTML content of the chunk. This can also be plaintext. The innerText of the HTML will be used to create the embedding vector. The point of using HTML is for convienience, as some users have applications where users submit HTML content. | [optional] |
|
8
8
|
| **chunk_vector** | **Array<Float>** | Chunk_vector is a vector of floats which can be used instead of generating a new embedding. This is useful for when you are using a pre-embedded dataset. If this is not provided, the innerText of the chunk_html will be used to create the embedding. | [optional] |
|
9
9
|
| **convert_html_to_text** | **Boolean** | Convert HTML to raw text before processing to avoid adding noise to the vector embeddings. By default this is true. If you are using HTML content that you want to be included in the vector embeddings, set this to false. | [optional] |
|
10
|
-
| **file_id** | **String** | File_uuid is the uuid of the file that the chunk is associated with. This is used to associate chunks with files. This is useful for when you want to delete a file and all of its associated chunks. | [optional] |
|
11
10
|
| **group_ids** | **Array<String>** | Group ids are the ids of the groups that the chunk should be placed into. This is useful for when you want to create a chunk and add it to a group or multiple groups in one request. Necessary because this route queues the chunk for ingestion and the chunk may not exist yet immediately after response. | [optional] |
|
12
11
|
| **group_tracking_ids** | **Array<String>** | Group tracking_ids are the tracking_ids of the groups that the chunk should be placed into. This is useful for when you want to create a chunk and add it to a group or multiple groups in one request. Necessary because this route queues the chunk for ingestion and the chunk may not exist yet immediately after response. | [optional] |
|
13
12
|
| **link** | **String** | Link to the chunk. This can also be any string. Frequently, this is a link to the source of the chunk. The link value will not affect the embedding creation. | [optional] |
|
@@ -28,7 +27,6 @@ instance = TrieveRubyClient::ChunkData.new(
|
|
28
27
|
chunk_html: null,
|
29
28
|
chunk_vector: null,
|
30
29
|
convert_html_to_text: null,
|
31
|
-
file_id: null,
|
32
30
|
group_ids: null,
|
33
31
|
group_tracking_ids: null,
|
34
32
|
link: null,
|
@@ -10,6 +10,7 @@
|
|
10
10
|
| **file_name_key** | **String** | | |
|
11
11
|
| **filter_items** | **Object** | | [optional] |
|
12
12
|
| **frontmatter_vals** | **String** | | [optional] |
|
13
|
+
| **image_metadata_key** | **String** | | |
|
13
14
|
| **image_range_end_key** | **String** | | [optional] |
|
14
15
|
| **image_range_start_key** | **String** | | [optional] |
|
15
16
|
| **lines_before_show_more** | **Integer** | | [optional] |
|
@@ -28,6 +29,7 @@ instance = TrieveRubyClient::ClientDatasetConfiguration.new(
|
|
28
29
|
file_name_key: null,
|
29
30
|
filter_items: null,
|
30
31
|
frontmatter_vals: null,
|
32
|
+
image_metadata_key: null,
|
31
33
|
image_range_end_key: null,
|
32
34
|
image_range_start_key: null,
|
33
35
|
lines_before_show_more: null,
|
data/docs/CreateTopicData.md
CHANGED
@@ -7,6 +7,7 @@
|
|
7
7
|
| **first_user_message** | **String** | The first message which will belong to the topic. The topic name is generated based on this message similar to how it works in the OpenAI chat UX if a name is not explicitly provided on the name request body key. | [optional] |
|
8
8
|
| **model** | **String** | The model to use for the assistant's messages. This can be any model from the openrouter model list. If no model is provided, the gpt-3.5-turbo will be used. | [optional] |
|
9
9
|
| **name** | **String** | The name of the topic. If this is not provided, the topic name is generated from the first_user_message. | [optional] |
|
10
|
+
| **owner_id** | **String** | The owner_id of the topic. This is typically a browser fingerprint or your user's id. It is used to group topics together for a user. | |
|
10
11
|
|
11
12
|
## Example
|
12
13
|
|
@@ -16,7 +17,8 @@ require 'trieve_ruby_client'
|
|
16
17
|
instance = TrieveRubyClient::CreateTopicData.new(
|
17
18
|
first_user_message: null,
|
18
19
|
model: null,
|
19
|
-
name: null
|
20
|
+
name: null,
|
21
|
+
owner_id: null
|
20
22
|
)
|
21
23
|
```
|
22
24
|
|
data/docs/FileApi.md
CHANGED
@@ -12,7 +12,7 @@ All URIs are relative to *https://api.trieve.ai*
|
|
12
12
|
|
13
13
|
## delete_file_handler
|
14
14
|
|
15
|
-
> delete_file_handler(tr_dataset, file_id
|
15
|
+
> delete_file_handler(tr_dataset, file_id)
|
16
16
|
|
17
17
|
Delete File
|
18
18
|
|
@@ -34,11 +34,10 @@ end
|
|
34
34
|
api_instance = TrieveRubyClient::FileApi.new
|
35
35
|
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
36
36
|
file_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the file to delete
|
37
|
-
delete_chunks = true # Boolean | Whether or not to delete the chunks associated with the file
|
38
37
|
|
39
38
|
begin
|
40
39
|
# Delete File
|
41
|
-
api_instance.delete_file_handler(tr_dataset, file_id
|
40
|
+
api_instance.delete_file_handler(tr_dataset, file_id)
|
42
41
|
rescue TrieveRubyClient::ApiError => e
|
43
42
|
puts "Error when calling FileApi->delete_file_handler: #{e}"
|
44
43
|
end
|
@@ -48,12 +47,12 @@ end
|
|
48
47
|
|
49
48
|
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
50
49
|
|
51
|
-
> <Array(nil, Integer, Hash)> delete_file_handler_with_http_info(tr_dataset, file_id
|
50
|
+
> <Array(nil, Integer, Hash)> delete_file_handler_with_http_info(tr_dataset, file_id)
|
52
51
|
|
53
52
|
```ruby
|
54
53
|
begin
|
55
54
|
# Delete File
|
56
|
-
data, status_code, headers = api_instance.delete_file_handler_with_http_info(tr_dataset, file_id
|
55
|
+
data, status_code, headers = api_instance.delete_file_handler_with_http_info(tr_dataset, file_id)
|
57
56
|
p status_code # => 2xx
|
58
57
|
p headers # => { ... }
|
59
58
|
p data # => nil
|
@@ -68,7 +67,6 @@ end
|
|
68
67
|
| ---- | ---- | ----------- | ----- |
|
69
68
|
| **tr_dataset** | **String** | The dataset id to use for the request | |
|
70
69
|
| **file_id** | **String** | The id of the file to delete | |
|
71
|
-
| **delete_chunks** | **Boolean** | Whether or not to delete the chunks associated with the file | |
|
72
70
|
|
73
71
|
### Return type
|
74
72
|
|
data/docs/GetEventsData.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **event_types** | **Array<String>** | The types of events to get. Any combination of file_uploaded, chunk_uploaded, chunk_action_failed, or
|
7
|
+
| **event_types** | **Array<String>** | The types of events to get. Any combination of file_uploaded, chunk_uploaded, chunk_action_failed, chunk_updated, or qdrant_index_failed. Leave undefined to get all events. | [optional] |
|
8
8
|
| **page** | **Integer** | The page number to get. Default is 1. | [optional] |
|
9
9
|
| **page_size** | **Integer** | The number of items per page. Default is 10. | [optional] |
|
10
10
|
|
data/docs/Topic.md
CHANGED
@@ -9,8 +9,8 @@
|
|
9
9
|
| **deleted** | **Boolean** | | |
|
10
10
|
| **id** | **String** | | |
|
11
11
|
| **name** | **String** | | |
|
12
|
+
| **owner_id** | **String** | | |
|
12
13
|
| **updated_at** | **Time** | | |
|
13
|
-
| **user_id** | **String** | | |
|
14
14
|
|
15
15
|
## Example
|
16
16
|
|
@@ -23,8 +23,8 @@ instance = TrieveRubyClient::Topic.new(
|
|
23
23
|
deleted: null,
|
24
24
|
id: null,
|
25
25
|
name: null,
|
26
|
-
|
27
|
-
|
26
|
+
owner_id: null,
|
27
|
+
updated_at: null
|
28
28
|
)
|
29
29
|
```
|
30
30
|
|
data/docs/TopicApi.md
CHANGED
@@ -6,7 +6,7 @@ All URIs are relative to *https://api.trieve.ai*
|
|
6
6
|
| ------ | ------------ | ----------- |
|
7
7
|
| [**create_topic**](TopicApi.md#create_topic) | **POST** /api/topic | Create Topic |
|
8
8
|
| [**delete_topic**](TopicApi.md#delete_topic) | **DELETE** /api/topic/{topic_id} | Delete Topic |
|
9
|
-
| [**
|
9
|
+
| [**get_all_topics_for_owner_id**](TopicApi.md#get_all_topics_for_owner_id) | **GET** /api/topic/owner/{owner_id} | Get All Topics for Owner ID |
|
10
10
|
| [**update_topic**](TopicApi.md#update_topic) | **PUT** /api/topic | Update Topic |
|
11
11
|
|
12
12
|
|
@@ -16,7 +16,7 @@ All URIs are relative to *https://api.trieve.ai*
|
|
16
16
|
|
17
17
|
Create Topic
|
18
18
|
|
19
|
-
Create Topic Create a new chat topic. Topics are attached to a
|
19
|
+
Create Topic Create a new chat topic. Topics are attached to a owner_id's and act as a coordinator for conversation message history of gen-AI chat sessions.
|
20
20
|
|
21
21
|
### Examples
|
22
22
|
|
@@ -33,7 +33,7 @@ end
|
|
33
33
|
|
34
34
|
api_instance = TrieveRubyClient::TopicApi.new
|
35
35
|
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
36
|
-
create_topic_data = TrieveRubyClient::CreateTopicData.new # CreateTopicData | JSON request payload to create chat topic
|
36
|
+
create_topic_data = TrieveRubyClient::CreateTopicData.new({owner_id: 'owner_id_example'}) # CreateTopicData | JSON request payload to create chat topic
|
37
37
|
|
38
38
|
begin
|
39
39
|
# Create Topic
|
@@ -155,13 +155,13 @@ nil (empty response body)
|
|
155
155
|
- **Accept**: application/json
|
156
156
|
|
157
157
|
|
158
|
-
##
|
158
|
+
## get_all_topics_for_owner_id
|
159
159
|
|
160
|
-
> <Array<Topic>>
|
160
|
+
> <Array<Topic>> get_all_topics_for_owner_id(owner_id, tr_dataset)
|
161
161
|
|
162
|
-
Get All Topics for
|
162
|
+
Get All Topics for Owner ID
|
163
163
|
|
164
|
-
Get All Topics for
|
164
|
+
Get All Topics for Owner ID Get all topics belonging to an arbitary owner_id. This is useful for managing message history and chat sessions. It is common to use a browser fingerprint or your user's id as the owner_id.
|
165
165
|
|
166
166
|
### Examples
|
167
167
|
|
@@ -177,33 +177,33 @@ TrieveRubyClient.configure do |config|
|
|
177
177
|
end
|
178
178
|
|
179
179
|
api_instance = TrieveRubyClient::TopicApi.new
|
180
|
-
|
180
|
+
owner_id = 'owner_id_example' # String | The owner_id to get topics of; A common approach is to use a browser fingerprint or your user's id
|
181
181
|
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
182
182
|
|
183
183
|
begin
|
184
|
-
# Get All Topics for
|
185
|
-
result = api_instance.
|
184
|
+
# Get All Topics for Owner ID
|
185
|
+
result = api_instance.get_all_topics_for_owner_id(owner_id, tr_dataset)
|
186
186
|
p result
|
187
187
|
rescue TrieveRubyClient::ApiError => e
|
188
|
-
puts "Error when calling TopicApi->
|
188
|
+
puts "Error when calling TopicApi->get_all_topics_for_owner_id: #{e}"
|
189
189
|
end
|
190
190
|
```
|
191
191
|
|
192
|
-
#### Using the
|
192
|
+
#### Using the get_all_topics_for_owner_id_with_http_info variant
|
193
193
|
|
194
194
|
This returns an Array which contains the response data, status code and headers.
|
195
195
|
|
196
|
-
> <Array(<Array<Topic>>, Integer, Hash)>
|
196
|
+
> <Array(<Array<Topic>>, Integer, Hash)> get_all_topics_for_owner_id_with_http_info(owner_id, tr_dataset)
|
197
197
|
|
198
198
|
```ruby
|
199
199
|
begin
|
200
|
-
# Get All Topics for
|
201
|
-
data, status_code, headers = api_instance.
|
200
|
+
# Get All Topics for Owner ID
|
201
|
+
data, status_code, headers = api_instance.get_all_topics_for_owner_id_with_http_info(owner_id, tr_dataset)
|
202
202
|
p status_code # => 2xx
|
203
203
|
p headers # => { ... }
|
204
204
|
p data # => <Array<Topic>>
|
205
205
|
rescue TrieveRubyClient::ApiError => e
|
206
|
-
puts "Error when calling TopicApi->
|
206
|
+
puts "Error when calling TopicApi->get_all_topics_for_owner_id_with_http_info: #{e}"
|
207
207
|
end
|
208
208
|
```
|
209
209
|
|
@@ -211,7 +211,7 @@ end
|
|
211
211
|
|
212
212
|
| Name | Type | Description | Notes |
|
213
213
|
| ---- | ---- | ----------- | ----- |
|
214
|
-
| **
|
214
|
+
| **owner_id** | **String** | The owner_id to get topics of; A common approach is to use a browser fingerprint or your user's id | |
|
215
215
|
| **tr_dataset** | **String** | The dataset id to use for the request | |
|
216
216
|
|
217
217
|
### Return type
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# TrieveRubyClient::UpdateUserOrgRoleData
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **organization_id** | **String** | The id of the organization to update the user for. | |
|
8
|
+
| **role** | **Integer** | Either 0 (user), 1 (admin), or 2 (owner). If not provided, the current role will be used. The auth'ed user must have a role greater than or equal to the role being assigned. | |
|
9
|
+
| **user_id** | **String** | The id of the user to update, if not provided, the auth'ed user will be updated. If provided, the auth'ed user must be an admin (1) or owner (2) of the organization. | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'trieve_ruby_client'
|
15
|
+
|
16
|
+
instance = TrieveRubyClient::UpdateUserOrgRoleData.new(
|
17
|
+
organization_id: null,
|
18
|
+
role: null,
|
19
|
+
user_id: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
data/docs/UserApi.md
CHANGED
@@ -153,7 +153,7 @@ end
|
|
153
153
|
|
154
154
|
## update_user
|
155
155
|
|
156
|
-
>
|
156
|
+
> update_user(update_user_org_role_data)
|
157
157
|
|
158
158
|
Update User
|
159
159
|
|
@@ -173,12 +173,11 @@ TrieveRubyClient.configure do |config|
|
|
173
173
|
end
|
174
174
|
|
175
175
|
api_instance = TrieveRubyClient::UserApi.new
|
176
|
-
|
176
|
+
update_user_org_role_data = TrieveRubyClient::UpdateUserOrgRoleData.new({organization_id: 'organization_id_example', role: 37}) # UpdateUserOrgRoleData | JSON request payload to update user information for the auth'ed user
|
177
177
|
|
178
178
|
begin
|
179
179
|
# Update User
|
180
|
-
|
181
|
-
p result
|
180
|
+
api_instance.update_user(update_user_org_role_data)
|
182
181
|
rescue TrieveRubyClient::ApiError => e
|
183
182
|
puts "Error when calling UserApi->update_user: #{e}"
|
184
183
|
end
|
@@ -186,17 +185,17 @@ end
|
|
186
185
|
|
187
186
|
#### Using the update_user_with_http_info variant
|
188
187
|
|
189
|
-
This returns an Array which contains the response data, status code and headers.
|
188
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
190
189
|
|
191
|
-
> <Array(
|
190
|
+
> <Array(nil, Integer, Hash)> update_user_with_http_info(update_user_org_role_data)
|
192
191
|
|
193
192
|
```ruby
|
194
193
|
begin
|
195
194
|
# Update User
|
196
|
-
data, status_code, headers = api_instance.update_user_with_http_info(
|
195
|
+
data, status_code, headers = api_instance.update_user_with_http_info(update_user_org_role_data)
|
197
196
|
p status_code # => 2xx
|
198
197
|
p headers # => { ... }
|
199
|
-
p data # =>
|
198
|
+
p data # => nil
|
200
199
|
rescue TrieveRubyClient::ApiError => e
|
201
200
|
puts "Error when calling UserApi->update_user_with_http_info: #{e}"
|
202
201
|
end
|
@@ -206,11 +205,11 @@ end
|
|
206
205
|
|
207
206
|
| Name | Type | Description | Notes |
|
208
207
|
| ---- | ---- | ----------- | ----- |
|
209
|
-
| **
|
208
|
+
| **update_user_org_role_data** | [**UpdateUserOrgRoleData**](UpdateUserOrgRoleData.md) | JSON request payload to update user information for the auth'ed user | |
|
210
209
|
|
211
210
|
### Return type
|
212
211
|
|
213
|
-
|
212
|
+
nil (empty response body)
|
214
213
|
|
215
214
|
### Authorization
|
216
215
|
|
@@ -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.
|
6
|
+
The version of the OpenAPI document: 0.7.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -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.
|
6
|
+
The version of the OpenAPI document: 0.7.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -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.
|
6
|
+
The version of the OpenAPI document: 0.7.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -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.
|
6
|
+
The version of the OpenAPI document: 0.7.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -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.
|
6
|
+
The version of the OpenAPI document: 0.7.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -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.
|
6
|
+
The version of the OpenAPI document: 0.7.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -23,11 +23,10 @@ module TrieveRubyClient
|
|
23
23
|
# Delete File Delete a file from S3 attached to the server based on its id. This will disassociate chunks from the file, but only delete them all together if you specify delete_chunks to be true. Auth'ed user must be an admin or owner of the dataset's organization to delete a file.
|
24
24
|
# @param tr_dataset [String] The dataset id to use for the request
|
25
25
|
# @param file_id [String] The id of the file to delete
|
26
|
-
# @param delete_chunks [Boolean] Whether or not to delete the chunks associated with the file
|
27
26
|
# @param [Hash] opts the optional parameters
|
28
27
|
# @return [nil]
|
29
|
-
def delete_file_handler(tr_dataset, file_id,
|
30
|
-
delete_file_handler_with_http_info(tr_dataset, file_id,
|
28
|
+
def delete_file_handler(tr_dataset, file_id, opts = {})
|
29
|
+
delete_file_handler_with_http_info(tr_dataset, file_id, opts)
|
31
30
|
nil
|
32
31
|
end
|
33
32
|
|
@@ -35,10 +34,9 @@ module TrieveRubyClient
|
|
35
34
|
# Delete File Delete a file from S3 attached to the server based on its id. This will disassociate chunks from the file, but only delete them all together if you specify delete_chunks to be true. Auth'ed user must be an admin or owner of the dataset's organization to delete a file.
|
36
35
|
# @param tr_dataset [String] The dataset id to use for the request
|
37
36
|
# @param file_id [String] The id of the file to delete
|
38
|
-
# @param delete_chunks [Boolean] Whether or not to delete the chunks associated with the file
|
39
37
|
# @param [Hash] opts the optional parameters
|
40
38
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
41
|
-
def delete_file_handler_with_http_info(tr_dataset, file_id,
|
39
|
+
def delete_file_handler_with_http_info(tr_dataset, file_id, opts = {})
|
42
40
|
if @api_client.config.debugging
|
43
41
|
@api_client.config.logger.debug 'Calling API: FileApi.delete_file_handler ...'
|
44
42
|
end
|
@@ -50,16 +48,11 @@ module TrieveRubyClient
|
|
50
48
|
if @api_client.config.client_side_validation && file_id.nil?
|
51
49
|
fail ArgumentError, "Missing the required parameter 'file_id' when calling FileApi.delete_file_handler"
|
52
50
|
end
|
53
|
-
# verify the required parameter 'delete_chunks' is set
|
54
|
-
if @api_client.config.client_side_validation && delete_chunks.nil?
|
55
|
-
fail ArgumentError, "Missing the required parameter 'delete_chunks' when calling FileApi.delete_file_handler"
|
56
|
-
end
|
57
51
|
# resource path
|
58
52
|
local_var_path = '/api/file/{file_id}'.sub('{' + 'file_id' + '}', CGI.escape(file_id.to_s))
|
59
53
|
|
60
54
|
# query parameters
|
61
55
|
query_params = opts[:query_params] || {}
|
62
|
-
query_params[:'delete_chunks'] = delete_chunks
|
63
56
|
|
64
57
|
# header parameters
|
65
58
|
header_params = opts[:header_params] || {}
|
@@ -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.
|
6
|
+
The version of the OpenAPI document: 0.7.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -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.
|
6
|
+
The version of the OpenAPI document: 0.7.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -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.
|
6
|
+
The version of the OpenAPI document: 0.7.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -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.
|
6
|
+
The version of the OpenAPI document: 0.7.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -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.
|
6
|
+
The version of the OpenAPI document: 0.7.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -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.
|
6
|
+
The version of the OpenAPI document: 0.7.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -20,7 +20,7 @@ module TrieveRubyClient
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# Create Topic
|
23
|
-
# Create Topic Create a new chat topic. Topics are attached to a
|
23
|
+
# Create Topic Create a new chat topic. Topics are attached to a owner_id's and act as a coordinator for conversation message history of gen-AI chat sessions.
|
24
24
|
# @param tr_dataset [String] The dataset id to use for the request
|
25
25
|
# @param create_topic_data [CreateTopicData] JSON request payload to create chat topic
|
26
26
|
# @param [Hash] opts the optional parameters
|
@@ -31,7 +31,7 @@ module TrieveRubyClient
|
|
31
31
|
end
|
32
32
|
|
33
33
|
# Create Topic
|
34
|
-
# Create Topic Create a new chat topic. Topics are attached to a
|
34
|
+
# Create Topic Create a new chat topic. Topics are attached to a owner_id's and act as a coordinator for conversation message history of gen-AI chat sessions.
|
35
35
|
# @param tr_dataset [String] The dataset id to use for the request
|
36
36
|
# @param create_topic_data [CreateTopicData] JSON request payload to create chat topic
|
37
37
|
# @param [Hash] opts the optional parameters
|
@@ -164,37 +164,37 @@ module TrieveRubyClient
|
|
164
164
|
return data, status_code, headers
|
165
165
|
end
|
166
166
|
|
167
|
-
# Get All Topics for
|
168
|
-
# Get All Topics for
|
169
|
-
# @param
|
167
|
+
# Get All Topics for Owner ID
|
168
|
+
# Get All Topics for Owner ID Get all topics belonging to an arbitary owner_id. This is useful for managing message history and chat sessions. It is common to use a browser fingerprint or your user's id as the owner_id.
|
169
|
+
# @param owner_id [String] The owner_id to get topics of; A common approach is to use a browser fingerprint or your user's id
|
170
170
|
# @param tr_dataset [String] The dataset id to use for the request
|
171
171
|
# @param [Hash] opts the optional parameters
|
172
172
|
# @return [Array<Topic>]
|
173
|
-
def
|
174
|
-
data, _status_code, _headers =
|
173
|
+
def get_all_topics_for_owner_id(owner_id, tr_dataset, opts = {})
|
174
|
+
data, _status_code, _headers = get_all_topics_for_owner_id_with_http_info(owner_id, tr_dataset, opts)
|
175
175
|
data
|
176
176
|
end
|
177
177
|
|
178
|
-
# Get All Topics for
|
179
|
-
# Get All Topics for
|
180
|
-
# @param
|
178
|
+
# Get All Topics for Owner ID
|
179
|
+
# Get All Topics for Owner ID Get all topics belonging to an arbitary owner_id. This is useful for managing message history and chat sessions. It is common to use a browser fingerprint or your user's id as the owner_id.
|
180
|
+
# @param owner_id [String] The owner_id to get topics of; A common approach is to use a browser fingerprint or your user's id
|
181
181
|
# @param tr_dataset [String] The dataset id to use for the request
|
182
182
|
# @param [Hash] opts the optional parameters
|
183
183
|
# @return [Array<(Array<Topic>, Integer, Hash)>] Array<Topic> data, response status code and response headers
|
184
|
-
def
|
184
|
+
def get_all_topics_for_owner_id_with_http_info(owner_id, tr_dataset, opts = {})
|
185
185
|
if @api_client.config.debugging
|
186
|
-
@api_client.config.logger.debug 'Calling API: TopicApi.
|
186
|
+
@api_client.config.logger.debug 'Calling API: TopicApi.get_all_topics_for_owner_id ...'
|
187
187
|
end
|
188
|
-
# verify the required parameter '
|
189
|
-
if @api_client.config.client_side_validation &&
|
190
|
-
fail ArgumentError, "Missing the required parameter '
|
188
|
+
# verify the required parameter 'owner_id' is set
|
189
|
+
if @api_client.config.client_side_validation && owner_id.nil?
|
190
|
+
fail ArgumentError, "Missing the required parameter 'owner_id' when calling TopicApi.get_all_topics_for_owner_id"
|
191
191
|
end
|
192
192
|
# verify the required parameter 'tr_dataset' is set
|
193
193
|
if @api_client.config.client_side_validation && tr_dataset.nil?
|
194
|
-
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling TopicApi.
|
194
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling TopicApi.get_all_topics_for_owner_id"
|
195
195
|
end
|
196
196
|
# resource path
|
197
|
-
local_var_path = '/api/topic/
|
197
|
+
local_var_path = '/api/topic/owner/{owner_id}'.sub('{' + 'owner_id' + '}', CGI.escape(owner_id.to_s))
|
198
198
|
|
199
199
|
# query parameters
|
200
200
|
query_params = opts[:query_params] || {}
|
@@ -218,7 +218,7 @@ module TrieveRubyClient
|
|
218
218
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
219
219
|
|
220
220
|
new_options = opts.merge(
|
221
|
-
:operation => :"TopicApi.
|
221
|
+
:operation => :"TopicApi.get_all_topics_for_owner_id",
|
222
222
|
:header_params => header_params,
|
223
223
|
:query_params => query_params,
|
224
224
|
:form_params => form_params,
|
@@ -229,7 +229,7 @@ module TrieveRubyClient
|
|
229
229
|
|
230
230
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
231
231
|
if @api_client.config.debugging
|
232
|
-
@api_client.config.logger.debug "API called: TopicApi#
|
232
|
+
@api_client.config.logger.debug "API called: TopicApi#get_all_topics_for_owner_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
233
233
|
end
|
234
234
|
return data, status_code, headers
|
235
235
|
end
|