trieve_ruby_client 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +21 -0
  4. data/README.md +240 -0
  5. data/Rakefile +10 -0
  6. data/docs/AddChunkToGroupData.md +18 -0
  7. data/docs/ApiKeyDTO.md +28 -0
  8. data/docs/AuthApi.md +274 -0
  9. data/docs/BookmarkData.md +22 -0
  10. data/docs/BookmarkGroupResult.md +20 -0
  11. data/docs/ChatMessageProxy.md +20 -0
  12. data/docs/ChunkApi.md +955 -0
  13. data/docs/ChunkFilter.md +22 -0
  14. data/docs/ChunkGroup.md +30 -0
  15. data/docs/ChunkGroupAndFile.md +32 -0
  16. data/docs/ChunkGroupApi.md +1262 -0
  17. data/docs/ChunkMetadata.md +42 -0
  18. data/docs/ChunkMetadataWithFileData.md +44 -0
  19. data/docs/ClientDatasetConfiguration.md +38 -0
  20. data/docs/CreateChunkData.md +42 -0
  21. data/docs/CreateChunkGroupData.md +22 -0
  22. data/docs/CreateDatasetRequest.md +24 -0
  23. data/docs/CreateMessageData.md +28 -0
  24. data/docs/CreateOrganizationData.md +18 -0
  25. data/docs/CreateTopicData.md +22 -0
  26. data/docs/Dataset.md +30 -0
  27. data/docs/DatasetAndUsage.md +20 -0
  28. data/docs/DatasetApi.md +480 -0
  29. data/docs/DatasetDTO.md +28 -0
  30. data/docs/DatasetUsageCount.md +22 -0
  31. data/docs/DeleteDatasetRequest.md +18 -0
  32. data/docs/DeleteTopicData.md +18 -0
  33. data/docs/DeleteUserApiKeyRequest.md +18 -0
  34. data/docs/EditMessageData.md +30 -0
  35. data/docs/ErrorResponseBody.md +18 -0
  36. data/docs/Event.md +28 -0
  37. data/docs/EventReturn.md +20 -0
  38. data/docs/EventsApi.md +86 -0
  39. data/docs/FieldCondition.md +22 -0
  40. data/docs/File.md +36 -0
  41. data/docs/FileApi.md +326 -0
  42. data/docs/FileDTO.md +32 -0
  43. data/docs/GenerateChunksRequest.md +26 -0
  44. data/docs/GetGroupsForChunksData.md +18 -0
  45. data/docs/GroupData.md +20 -0
  46. data/docs/GroupScoreChunkDTO.md +20 -0
  47. data/docs/HealthApi.md +66 -0
  48. data/docs/InvitationApi.md +85 -0
  49. data/docs/InvitationData.md +26 -0
  50. data/docs/MatchCondition.md +49 -0
  51. data/docs/Message.md +38 -0
  52. data/docs/MessageApi.md +322 -0
  53. data/docs/Organization.md +26 -0
  54. data/docs/OrganizationApi.md +479 -0
  55. data/docs/OrganizationUsageCount.md +28 -0
  56. data/docs/Range.md +24 -0
  57. data/docs/ReccomendGroupChunksRequest.md +30 -0
  58. data/docs/RecommendChunksRequest.md +28 -0
  59. data/docs/RegenerateMessageData.md +26 -0
  60. data/docs/ReturnQueuedChunk.md +20 -0
  61. data/docs/ScoreChunkDTO.md +20 -0
  62. data/docs/SearchChunkData.md +38 -0
  63. data/docs/SearchChunkQueryResponseBody.md +20 -0
  64. data/docs/SearchGroupsResult.md +22 -0
  65. data/docs/SearchOverGroupsData.md +36 -0
  66. data/docs/SearchOverGroupsResponseBody.md +20 -0
  67. data/docs/SearchWithinGroupData.md +40 -0
  68. data/docs/SetUserApiKeyRequest.md +20 -0
  69. data/docs/SetUserApiKeyResponse.md +18 -0
  70. data/docs/SlimGroup.md +24 -0
  71. data/docs/SlimUser.md +32 -0
  72. data/docs/StripeApi.md +285 -0
  73. data/docs/StripePlan.md +38 -0
  74. data/docs/StripeSubscription.md +30 -0
  75. data/docs/SuggestedQueriesRequest.md +18 -0
  76. data/docs/SuggestedQueriesResponse.md +18 -0
  77. data/docs/Topic.md +30 -0
  78. data/docs/TopicApi.md +321 -0
  79. data/docs/UpdateChunkByTrackingIdData.md +32 -0
  80. data/docs/UpdateChunkData.md +34 -0
  81. data/docs/UpdateChunkGroupData.md +24 -0
  82. data/docs/UpdateDatasetRequest.md +24 -0
  83. data/docs/UpdateGroupByTrackingIDData.md +22 -0
  84. data/docs/UpdateOrganizationData.md +20 -0
  85. data/docs/UpdateTopicData.md +20 -0
  86. data/docs/UpdateUserData.md +30 -0
  87. data/docs/UploadFileData.md +34 -0
  88. data/docs/UploadFileResult.md +18 -0
  89. data/docs/UserApi.md +238 -0
  90. data/docs/UserOrganization.md +28 -0
  91. data/git_push.sh +57 -0
  92. data/lib/trieve_ruby_client/api/auth_api.rb +262 -0
  93. data/lib/trieve_ruby_client/api/chunk_api.rb +906 -0
  94. data/lib/trieve_ruby_client/api/chunk_group_api.rb +1230 -0
  95. data/lib/trieve_ruby_client/api/dataset_api.rb +458 -0
  96. data/lib/trieve_ruby_client/api/events_api.rb +92 -0
  97. data/lib/trieve_ruby_client/api/file_api.rb +324 -0
  98. data/lib/trieve_ruby_client/api/health_api.rb +75 -0
  99. data/lib/trieve_ruby_client/api/invitation_api.rb +97 -0
  100. data/lib/trieve_ruby_client/api/message_api.rb +317 -0
  101. data/lib/trieve_ruby_client/api/organization_api.rb +445 -0
  102. data/lib/trieve_ruby_client/api/stripe_api.rb +278 -0
  103. data/lib/trieve_ruby_client/api/topic_api.rb +317 -0
  104. data/lib/trieve_ruby_client/api/user_api.rb +226 -0
  105. data/lib/trieve_ruby_client/api_client.rb +394 -0
  106. data/lib/trieve_ruby_client/api_error.rb +58 -0
  107. data/lib/trieve_ruby_client/configuration.rb +305 -0
  108. data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +222 -0
  109. data/lib/trieve_ruby_client/models/api_key_dto.rb +301 -0
  110. data/lib/trieve_ruby_client/models/bookmark_data.rb +255 -0
  111. data/lib/trieve_ruby_client/models/bookmark_group_result.rb +239 -0
  112. data/lib/trieve_ruby_client/models/chat_message_proxy.rb +237 -0
  113. data/lib/trieve_ruby_client/models/chunk_filter.rb +244 -0
  114. data/lib/trieve_ruby_client/models/chunk_group.rb +311 -0
  115. data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +321 -0
  116. data/lib/trieve_ruby_client/models/chunk_metadata.rb +371 -0
  117. data/lib/trieve_ruby_client/models/chunk_metadata_with_file_data.rb +381 -0
  118. data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +336 -0
  119. data/lib/trieve_ruby_client/models/create_chunk_data.rb +356 -0
  120. data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +250 -0
  121. data/lib/trieve_ruby_client/models/create_dataset_request.rb +265 -0
  122. data/lib/trieve_ruby_client/models/create_message_data.rb +285 -0
  123. data/lib/trieve_ruby_client/models/create_organization_data.rb +222 -0
  124. data/lib/trieve_ruby_client/models/create_topic_data.rb +238 -0
  125. data/lib/trieve_ruby_client/models/dataset.rb +309 -0
  126. data/lib/trieve_ruby_client/models/dataset_and_usage.rb +237 -0
  127. data/lib/trieve_ruby_client/models/dataset_dto.rb +297 -0
  128. data/lib/trieve_ruby_client/models/dataset_usage_count.rb +253 -0
  129. data/lib/trieve_ruby_client/models/delete_dataset_request.rb +222 -0
  130. data/lib/trieve_ruby_client/models/delete_topic_data.rb +222 -0
  131. data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +222 -0
  132. data/lib/trieve_ruby_client/models/edit_message_data.rb +302 -0
  133. data/lib/trieve_ruby_client/models/error_response_body.rb +221 -0
  134. data/lib/trieve_ruby_client/models/event.rb +297 -0
  135. data/lib/trieve_ruby_client/models/event_return.rb +239 -0
  136. data/lib/trieve_ruby_client/models/field_condition.rb +245 -0
  137. data/lib/trieve_ruby_client/models/file.rb +341 -0
  138. data/lib/trieve_ruby_client/models/file_dto.rb +321 -0
  139. data/lib/trieve_ruby_client/models/generate_chunks_request.rb +276 -0
  140. data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +223 -0
  141. data/lib/trieve_ruby_client/models/group_data.rb +239 -0
  142. data/lib/trieve_ruby_client/models/group_score_chunk_dto.rb +239 -0
  143. data/lib/trieve_ruby_client/models/invitation_data.rb +290 -0
  144. data/lib/trieve_ruby_client/models/match_condition.rb +105 -0
  145. data/lib/trieve_ruby_client/models/message.rb +369 -0
  146. data/lib/trieve_ruby_client/models/organization.rb +279 -0
  147. data/lib/trieve_ruby_client/models/organization_usage_count.rb +301 -0
  148. data/lib/trieve_ruby_client/models/range.rb +245 -0
  149. data/lib/trieve_ruby_client/models/reccomend_group_chunks_request.rb +319 -0
  150. data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +293 -0
  151. data/lib/trieve_ruby_client/models/regenerate_message_data.rb +268 -0
  152. data/lib/trieve_ruby_client/models/return_queued_chunk.rb +237 -0
  153. data/lib/trieve_ruby_client/models/score_chunk_dto.rb +239 -0
  154. data/lib/trieve_ruby_client/models/search_chunk_data.rb +369 -0
  155. data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +239 -0
  156. data/lib/trieve_ruby_client/models/search_groups_result.rb +255 -0
  157. data/lib/trieve_ruby_client/models/search_over_groups_data.rb +372 -0
  158. data/lib/trieve_ruby_client/models/search_over_groups_response_body.rb +239 -0
  159. data/lib/trieve_ruby_client/models/search_within_group_data.rb +380 -0
  160. data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +239 -0
  161. data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +222 -0
  162. data/lib/trieve_ruby_client/models/slim_group.rb +269 -0
  163. data/lib/trieve_ruby_client/models/slim_user.rb +319 -0
  164. data/lib/trieve_ruby_client/models/stripe_plan.rb +381 -0
  165. data/lib/trieve_ruby_client/models/stripe_subscription.rb +311 -0
  166. data/lib/trieve_ruby_client/models/suggested_queries_request.rb +222 -0
  167. data/lib/trieve_ruby_client/models/suggested_queries_response.rb +223 -0
  168. data/lib/trieve_ruby_client/models/topic.rb +317 -0
  169. data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +303 -0
  170. data/lib/trieve_ruby_client/models/update_chunk_data.rb +308 -0
  171. data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +249 -0
  172. data/lib/trieve_ruby_client/models/update_dataset_request.rb +255 -0
  173. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +244 -0
  174. data/lib/trieve_ruby_client/models/update_organization_data.rb +233 -0
  175. data/lib/trieve_ruby_client/models/update_topic_data.rb +239 -0
  176. data/lib/trieve_ruby_client/models/update_user_data.rb +288 -0
  177. data/lib/trieve_ruby_client/models/upload_file_data.rb +324 -0
  178. data/lib/trieve_ruby_client/models/upload_file_result.rb +221 -0
  179. data/lib/trieve_ruby_client/models/user_organization.rb +301 -0
  180. data/lib/trieve_ruby_client/version.rb +15 -0
  181. data/lib/trieve_ruby_client.rb +124 -0
  182. data/openapi-generator.yaml +9 -0
  183. data/openapi.json +6530 -0
  184. data/openapitools.json +7 -0
  185. data/spec/api/auth_api_spec.rb +82 -0
  186. data/spec/api/chunk_api_spec.rb +191 -0
  187. data/spec/api/chunk_group_api_spec.rb +242 -0
  188. data/spec/api/dataset_api_spec.rb +113 -0
  189. data/spec/api/events_api_spec.rb +48 -0
  190. data/spec/api/file_api_spec.rb +89 -0
  191. data/spec/api/health_api_spec.rb +44 -0
  192. data/spec/api/invitation_api_spec.rb +48 -0
  193. data/spec/api/message_api_spec.rb +87 -0
  194. data/spec/api/organization_api_spec.rb +112 -0
  195. data/spec/api/stripe_api_spec.rb +78 -0
  196. data/spec/api/topic_api_spec.rb +87 -0
  197. data/spec/api/user_api_spec.rb +71 -0
  198. data/spec/models/add_chunk_to_group_data_spec.rb +36 -0
  199. data/spec/models/api_key_dto_spec.rb +66 -0
  200. data/spec/models/bookmark_data_spec.rb +48 -0
  201. data/spec/models/bookmark_group_result_spec.rb +42 -0
  202. data/spec/models/chat_message_proxy_spec.rb +42 -0
  203. data/spec/models/chunk_filter_spec.rb +48 -0
  204. data/spec/models/chunk_group_and_file_spec.rb +78 -0
  205. data/spec/models/chunk_group_spec.rb +72 -0
  206. data/spec/models/chunk_metadata_spec.rb +108 -0
  207. data/spec/models/chunk_metadata_with_file_data_spec.rb +114 -0
  208. data/spec/models/client_dataset_configuration_spec.rb +96 -0
  209. data/spec/models/create_chunk_data_spec.rb +108 -0
  210. data/spec/models/create_chunk_group_data_spec.rb +48 -0
  211. data/spec/models/create_dataset_request_spec.rb +54 -0
  212. data/spec/models/create_message_data_spec.rb +66 -0
  213. data/spec/models/create_organization_data_spec.rb +36 -0
  214. data/spec/models/create_topic_data_spec.rb +48 -0
  215. data/spec/models/dataset_and_usage_spec.rb +42 -0
  216. data/spec/models/dataset_dto_spec.rb +66 -0
  217. data/spec/models/dataset_spec.rb +72 -0
  218. data/spec/models/dataset_usage_count_spec.rb +48 -0
  219. data/spec/models/delete_dataset_request_spec.rb +36 -0
  220. data/spec/models/delete_topic_data_spec.rb +36 -0
  221. data/spec/models/delete_user_api_key_request_spec.rb +36 -0
  222. data/spec/models/edit_message_data_spec.rb +72 -0
  223. data/spec/models/error_response_body_spec.rb +36 -0
  224. data/spec/models/event_return_spec.rb +42 -0
  225. data/spec/models/event_spec.rb +66 -0
  226. data/spec/models/field_condition_spec.rb +48 -0
  227. data/spec/models/file_dto_spec.rb +78 -0
  228. data/spec/models/file_spec.rb +90 -0
  229. data/spec/models/generate_chunks_request_spec.rb +60 -0
  230. data/spec/models/get_groups_for_chunks_data_spec.rb +36 -0
  231. data/spec/models/group_data_spec.rb +42 -0
  232. data/spec/models/group_score_chunk_dto_spec.rb +42 -0
  233. data/spec/models/invitation_data_spec.rb +60 -0
  234. data/spec/models/match_condition_spec.rb +32 -0
  235. data/spec/models/message_spec.rb +96 -0
  236. data/spec/models/organization_spec.rb +60 -0
  237. data/spec/models/organization_usage_count_spec.rb +66 -0
  238. data/spec/models/range_spec.rb +54 -0
  239. data/spec/models/reccomend_group_chunks_request_spec.rb +72 -0
  240. data/spec/models/recommend_chunks_request_spec.rb +66 -0
  241. data/spec/models/regenerate_message_data_spec.rb +60 -0
  242. data/spec/models/return_queued_chunk_spec.rb +42 -0
  243. data/spec/models/score_chunk_dto_spec.rb +42 -0
  244. data/spec/models/search_chunk_data_spec.rb +96 -0
  245. data/spec/models/search_chunk_query_response_body_spec.rb +42 -0
  246. data/spec/models/search_groups_result_spec.rb +48 -0
  247. data/spec/models/search_over_groups_data_spec.rb +90 -0
  248. data/spec/models/search_over_groups_response_body_spec.rb +42 -0
  249. data/spec/models/search_within_group_data_spec.rb +102 -0
  250. data/spec/models/set_user_api_key_request_spec.rb +42 -0
  251. data/spec/models/set_user_api_key_response_spec.rb +36 -0
  252. data/spec/models/slim_group_spec.rb +54 -0
  253. data/spec/models/slim_user_spec.rb +78 -0
  254. data/spec/models/stripe_plan_spec.rb +96 -0
  255. data/spec/models/stripe_subscription_spec.rb +72 -0
  256. data/spec/models/suggested_queries_request_spec.rb +36 -0
  257. data/spec/models/suggested_queries_response_spec.rb +36 -0
  258. data/spec/models/topic_spec.rb +72 -0
  259. data/spec/models/update_chunk_by_tracking_id_data_spec.rb +66 -0
  260. data/spec/models/update_chunk_data_spec.rb +72 -0
  261. data/spec/models/update_chunk_group_data_spec.rb +48 -0
  262. data/spec/models/update_dataset_request_spec.rb +54 -0
  263. data/spec/models/update_group_by_tracking_id_data_spec.rb +48 -0
  264. data/spec/models/update_organization_data_spec.rb +42 -0
  265. data/spec/models/update_topic_data_spec.rb +42 -0
  266. data/spec/models/update_user_data_spec.rb +72 -0
  267. data/spec/models/upload_file_data_spec.rb +84 -0
  268. data/spec/models/upload_file_result_spec.rb +36 -0
  269. data/spec/models/user_organization_spec.rb +66 -0
  270. data/spec/spec_helper.rb +111 -0
  271. data/trieve_ruby_client.gemspec +39 -0
  272. metadata +439 -0
data/docs/EventsApi.md ADDED
@@ -0,0 +1,86 @@
1
+ # TrieveRubyClient::EventsApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_events**](EventsApi.md#get_events) | **GET** /api/events/{page} | get_events |
8
+
9
+
10
+ ## get_events
11
+
12
+ > <EventReturn> get_events(tr_dataset, page)
13
+
14
+ get_events
15
+
16
+ get_events 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. Each page contains 10 events.
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'trieve_ruby_client'
23
+ # setup authorization
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
+ # Configure API key authorization: ApiKey
31
+ config.api_key['ApiKey'] = 'YOUR API KEY'
32
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
33
+ # config.api_key_prefix['ApiKey'] = 'Bearer'
34
+ end
35
+
36
+ api_instance = TrieveRubyClient::EventsApi.new
37
+ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
38
+ page = 789 # Integer | Page number of events to get
39
+
40
+ begin
41
+ # get_events
42
+ result = api_instance.get_events(tr_dataset, page)
43
+ p result
44
+ rescue TrieveRubyClient::ApiError => e
45
+ puts "Error when calling EventsApi->get_events: #{e}"
46
+ end
47
+ ```
48
+
49
+ #### Using the get_events_with_http_info variant
50
+
51
+ This returns an Array which contains the response data, status code and headers.
52
+
53
+ > <Array(<EventReturn>, Integer, Hash)> get_events_with_http_info(tr_dataset, page)
54
+
55
+ ```ruby
56
+ begin
57
+ # get_events
58
+ data, status_code, headers = api_instance.get_events_with_http_info(tr_dataset, page)
59
+ p status_code # => 2xx
60
+ p headers # => { ... }
61
+ p data # => <EventReturn>
62
+ rescue TrieveRubyClient::ApiError => e
63
+ puts "Error when calling EventsApi->get_events_with_http_info: #{e}"
64
+ end
65
+ ```
66
+
67
+ ### Parameters
68
+
69
+ | Name | Type | Description | Notes |
70
+ | ---- | ---- | ----------- | ----- |
71
+ | **tr_dataset** | **String** | The dataset id to use for the request | |
72
+ | **page** | **Integer** | Page number of events to get | |
73
+
74
+ ### Return type
75
+
76
+ [**EventReturn**](EventReturn.md)
77
+
78
+ ### Authorization
79
+
80
+ [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
81
+
82
+ ### HTTP request headers
83
+
84
+ - **Content-Type**: Not defined
85
+ - **Accept**: application/json
86
+
@@ -0,0 +1,22 @@
1
+ # TrieveRubyClient::FieldCondition
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **field** | **String** | Field is the name of the field to filter on. The field value will be used to check for an exact substring match on the metadata values for each existing chunk. This is useful for when you want to filter chunks by arbitrary metadata. To access fields inside of the metadata that you provide with the card, prefix the field name with &#x60;metadata.&#x60;. | |
8
+ | **match** | [**Array&lt;MatchCondition&gt;**](MatchCondition.md) | Match is the value to match on the field. The match value will be used to check for an exact substring match on the metadata values for each existing chunk. This is useful for when you want to filter chunks by arbitrary metadata. | [optional] |
9
+ | **range** | [**Range**](Range.md) | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'trieve_ruby_client'
15
+
16
+ instance = TrieveRubyClient::FieldCondition.new(
17
+ field: null,
18
+ match: null,
19
+ range: null
20
+ )
21
+ ```
22
+
data/docs/File.md ADDED
@@ -0,0 +1,36 @@
1
+ # TrieveRubyClient::File
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **created_at** | **Time** | | |
8
+ | **dataset_id** | **String** | | |
9
+ | **file_name** | **String** | | |
10
+ | **id** | **String** | | |
11
+ | **link** | **String** | | [optional] |
12
+ | **metadata** | **Object** | | [optional] |
13
+ | **size** | **Integer** | | |
14
+ | **tag_set** | **String** | | [optional] |
15
+ | **time_stamp** | **Time** | | [optional] |
16
+ | **updated_at** | **Time** | | |
17
+
18
+ ## Example
19
+
20
+ ```ruby
21
+ require 'trieve_ruby_client'
22
+
23
+ instance = TrieveRubyClient::File.new(
24
+ created_at: null,
25
+ dataset_id: null,
26
+ file_name: null,
27
+ id: null,
28
+ link: null,
29
+ metadata: null,
30
+ size: null,
31
+ tag_set: null,
32
+ time_stamp: null,
33
+ updated_at: null
34
+ )
35
+ ```
36
+
data/docs/FileApi.md ADDED
@@ -0,0 +1,326 @@
1
+ # TrieveRubyClient::FileApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
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_dataset_files |
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
+
12
+
13
+ ## delete_file_handler
14
+
15
+ > delete_file_handler(tr_dataset, file_id, delete_chunks)
16
+
17
+ delete_file
18
+
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
+
21
+ ### Examples
22
+
23
+ ```ruby
24
+ require 'time'
25
+ require 'trieve_ruby_client'
26
+ # setup authorization
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
+ # Configure API key authorization: ApiKey
34
+ config.api_key['ApiKey'] = 'YOUR API KEY'
35
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
36
+ # config.api_key_prefix['ApiKey'] = 'Bearer'
37
+ end
38
+
39
+ api_instance = TrieveRubyClient::FileApi.new
40
+ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
41
+ file_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the file to delete
42
+ delete_chunks = true # Boolean | Whether or not to delete the chunks associated with the file
43
+
44
+ begin
45
+ # delete_file
46
+ api_instance.delete_file_handler(tr_dataset, file_id, delete_chunks)
47
+ rescue TrieveRubyClient::ApiError => e
48
+ puts "Error when calling FileApi->delete_file_handler: #{e}"
49
+ end
50
+ ```
51
+
52
+ #### Using the delete_file_handler_with_http_info variant
53
+
54
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
55
+
56
+ > <Array(nil, Integer, Hash)> delete_file_handler_with_http_info(tr_dataset, file_id, delete_chunks)
57
+
58
+ ```ruby
59
+ begin
60
+ # delete_file
61
+ data, status_code, headers = api_instance.delete_file_handler_with_http_info(tr_dataset, file_id, delete_chunks)
62
+ p status_code # => 2xx
63
+ p headers # => { ... }
64
+ p data # => nil
65
+ rescue TrieveRubyClient::ApiError => e
66
+ puts "Error when calling FileApi->delete_file_handler_with_http_info: #{e}"
67
+ end
68
+ ```
69
+
70
+ ### Parameters
71
+
72
+ | Name | Type | Description | Notes |
73
+ | ---- | ---- | ----------- | ----- |
74
+ | **tr_dataset** | **String** | The dataset id to use for the request | |
75
+ | **file_id** | **String** | The id of the file to delete | |
76
+ | **delete_chunks** | **Boolean** | Whether or not to delete the chunks associated with the file | |
77
+
78
+ ### Return type
79
+
80
+ nil (empty response body)
81
+
82
+ ### Authorization
83
+
84
+ [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
85
+
86
+ ### HTTP request headers
87
+
88
+ - **Content-Type**: Not defined
89
+ - **Accept**: application/json
90
+
91
+
92
+ ## get_dataset_files_handler
93
+
94
+ > Array&lt;File&gt; get_dataset_files_handler(tr_dataset, dataset_id, page)
95
+
96
+ get_dataset_files
97
+
98
+ get_dataset_files Get all files which belong to a given dataset specified by the dataset_id parameter. 10 files are returned per page.
99
+
100
+ ### Examples
101
+
102
+ ```ruby
103
+ require 'time'
104
+ require 'trieve_ruby_client'
105
+ # setup authorization
106
+ 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
+ # Configure API key authorization: ApiKey
113
+ config.api_key['ApiKey'] = 'YOUR API KEY'
114
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
115
+ # config.api_key_prefix['ApiKey'] = 'Bearer'
116
+ end
117
+
118
+ api_instance = TrieveRubyClient::FileApi.new
119
+ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
120
+ dataset_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the dataset to fetch files for.
121
+ page = 789 # Integer | The page number of files you wish to fetch. Each page contains at most 10 files.
122
+
123
+ begin
124
+ # get_dataset_files
125
+ result = api_instance.get_dataset_files_handler(tr_dataset, dataset_id, page)
126
+ p result
127
+ rescue TrieveRubyClient::ApiError => e
128
+ puts "Error when calling FileApi->get_dataset_files_handler: #{e}"
129
+ end
130
+ ```
131
+
132
+ #### Using the get_dataset_files_handler_with_http_info variant
133
+
134
+ This returns an Array which contains the response data, status code and headers.
135
+
136
+ > <Array(Array&lt;File&gt;, Integer, Hash)> get_dataset_files_handler_with_http_info(tr_dataset, dataset_id, page)
137
+
138
+ ```ruby
139
+ begin
140
+ # get_dataset_files
141
+ data, status_code, headers = api_instance.get_dataset_files_handler_with_http_info(tr_dataset, dataset_id, page)
142
+ p status_code # => 2xx
143
+ p headers # => { ... }
144
+ p data # => Array&lt;File&gt;
145
+ rescue TrieveRubyClient::ApiError => e
146
+ puts "Error when calling FileApi->get_dataset_files_handler_with_http_info: #{e}"
147
+ end
148
+ ```
149
+
150
+ ### Parameters
151
+
152
+ | Name | Type | Description | Notes |
153
+ | ---- | ---- | ----------- | ----- |
154
+ | **tr_dataset** | **String** | The dataset id to use for the request | |
155
+ | **dataset_id** | **String** | The id of the dataset to fetch files for. | |
156
+ | **page** | **Integer** | The page number of files you wish to fetch. Each page contains at most 10 files. | |
157
+
158
+ ### Return type
159
+
160
+ **Array&lt;File&gt;**
161
+
162
+ ### Authorization
163
+
164
+ [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
165
+
166
+ ### HTTP request headers
167
+
168
+ - **Content-Type**: Not defined
169
+ - **Accept**: application/json
170
+
171
+
172
+ ## get_file_handler
173
+
174
+ > <FileDTO> get_file_handler(tr_dataset, file_id)
175
+
176
+ get_file
177
+
178
+ 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
+
180
+ ### Examples
181
+
182
+ ```ruby
183
+ require 'time'
184
+ require 'trieve_ruby_client'
185
+ # setup authorization
186
+ 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
+ # Configure API key authorization: ApiKey
193
+ config.api_key['ApiKey'] = 'YOUR API KEY'
194
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
195
+ # config.api_key_prefix['ApiKey'] = 'Bearer'
196
+ end
197
+
198
+ api_instance = TrieveRubyClient::FileApi.new
199
+ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
200
+ file_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the file to fetch
201
+
202
+ begin
203
+ # get_file
204
+ result = api_instance.get_file_handler(tr_dataset, file_id)
205
+ p result
206
+ rescue TrieveRubyClient::ApiError => e
207
+ puts "Error when calling FileApi->get_file_handler: #{e}"
208
+ end
209
+ ```
210
+
211
+ #### Using the get_file_handler_with_http_info variant
212
+
213
+ This returns an Array which contains the response data, status code and headers.
214
+
215
+ > <Array(<FileDTO>, Integer, Hash)> get_file_handler_with_http_info(tr_dataset, file_id)
216
+
217
+ ```ruby
218
+ begin
219
+ # get_file
220
+ data, status_code, headers = api_instance.get_file_handler_with_http_info(tr_dataset, file_id)
221
+ p status_code # => 2xx
222
+ p headers # => { ... }
223
+ p data # => <FileDTO>
224
+ rescue TrieveRubyClient::ApiError => e
225
+ puts "Error when calling FileApi->get_file_handler_with_http_info: #{e}"
226
+ end
227
+ ```
228
+
229
+ ### Parameters
230
+
231
+ | Name | Type | Description | Notes |
232
+ | ---- | ---- | ----------- | ----- |
233
+ | **tr_dataset** | **String** | The dataset id to use for the request | |
234
+ | **file_id** | **String** | The id of the file to fetch | |
235
+
236
+ ### Return type
237
+
238
+ [**FileDTO**](FileDTO.md)
239
+
240
+ ### Authorization
241
+
242
+ [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
243
+
244
+ ### HTTP request headers
245
+
246
+ - **Content-Type**: Not defined
247
+ - **Accept**: application/json
248
+
249
+
250
+ ## upload_file_handler
251
+
252
+ > <UploadFileResult> upload_file_handler(tr_dataset, upload_file_data)
253
+
254
+ upload_file
255
+
256
+ 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
+
258
+ ### Examples
259
+
260
+ ```ruby
261
+ require 'time'
262
+ require 'trieve_ruby_client'
263
+ # setup authorization
264
+ 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
+ # Configure API key authorization: ApiKey
271
+ config.api_key['ApiKey'] = 'YOUR API KEY'
272
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
273
+ # config.api_key_prefix['ApiKey'] = 'Bearer'
274
+ end
275
+
276
+ api_instance = TrieveRubyClient::FileApi.new
277
+ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
278
+ 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
+
280
+ begin
281
+ # upload_file
282
+ result = api_instance.upload_file_handler(tr_dataset, upload_file_data)
283
+ p result
284
+ rescue TrieveRubyClient::ApiError => e
285
+ puts "Error when calling FileApi->upload_file_handler: #{e}"
286
+ end
287
+ ```
288
+
289
+ #### Using the upload_file_handler_with_http_info variant
290
+
291
+ This returns an Array which contains the response data, status code and headers.
292
+
293
+ > <Array(<UploadFileResult>, Integer, Hash)> upload_file_handler_with_http_info(tr_dataset, upload_file_data)
294
+
295
+ ```ruby
296
+ begin
297
+ # upload_file
298
+ data, status_code, headers = api_instance.upload_file_handler_with_http_info(tr_dataset, upload_file_data)
299
+ p status_code # => 2xx
300
+ p headers # => { ... }
301
+ p data # => <UploadFileResult>
302
+ rescue TrieveRubyClient::ApiError => e
303
+ puts "Error when calling FileApi->upload_file_handler_with_http_info: #{e}"
304
+ end
305
+ ```
306
+
307
+ ### Parameters
308
+
309
+ | Name | Type | Description | Notes |
310
+ | ---- | ---- | ----------- | ----- |
311
+ | **tr_dataset** | **String** | The dataset id to use for the request | |
312
+ | **upload_file_data** | [**UploadFileData**](UploadFileData.md) | JSON request payload to upload a file | |
313
+
314
+ ### Return type
315
+
316
+ [**UploadFileResult**](UploadFileResult.md)
317
+
318
+ ### Authorization
319
+
320
+ [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
321
+
322
+ ### HTTP request headers
323
+
324
+ - **Content-Type**: application/json
325
+ - **Accept**: application/json
326
+
data/docs/FileDTO.md ADDED
@@ -0,0 +1,32 @@
1
+ # TrieveRubyClient::FileDTO
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **created_at** | **Time** | | |
8
+ | **file_name** | **String** | | |
9
+ | **id** | **String** | | |
10
+ | **link** | **String** | | [optional] |
11
+ | **metadata** | **Object** | | [optional] |
12
+ | **s3_url** | **String** | | |
13
+ | **size** | **Integer** | | |
14
+ | **updated_at** | **Time** | | |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'trieve_ruby_client'
20
+
21
+ instance = TrieveRubyClient::FileDTO.new(
22
+ created_at: null,
23
+ file_name: null,
24
+ id: null,
25
+ link: null,
26
+ metadata: null,
27
+ s3_url: null,
28
+ size: null,
29
+ updated_at: null
30
+ )
31
+ ```
32
+
@@ -0,0 +1,26 @@
1
+ # TrieveRubyClient::GenerateChunksRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **chunk_ids** | **Array&lt;String&gt;** | The ids of the chunks to be retrieved and injected into the context window for RAG. | |
8
+ | **model** | **String** | The model to use for the chat. This can be any model from the openrouter model list. If no model is provided, gpt-3.5-turbo will be used. | [optional] |
9
+ | **prev_messages** | [**Array&lt;ChatMessageProxy&gt;**](ChatMessageProxy.md) | The previous messages to be placed into the chat history. The last message in this array will be the prompt for the model to inference on. The length of this array must be at least 1. | |
10
+ | **prompt** | **String** | Prompt for the last message in the prev_messages array. This will be used to generate the next message in the chat. The default is &#39;Respond to the instruction and include the doc numbers that you used in square brackets at the end of the sentences that you used the docs for:&#39;. You can also specify an empty string to leave the final message alone such that your user&#39;s final message can be used as the prompt. See docs.trieve.ai or contact us for more information. | [optional] |
11
+ | **stream_response** | **Boolean** | Whether or not to stream the response. If this is set to true or not included, the response will be a stream. If this is set to false, the response will be a normal JSON response. Default is true. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'trieve_ruby_client'
17
+
18
+ instance = TrieveRubyClient::GenerateChunksRequest.new(
19
+ chunk_ids: null,
20
+ model: null,
21
+ prev_messages: null,
22
+ prompt: null,
23
+ stream_response: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,18 @@
1
+ # TrieveRubyClient::GetGroupsForChunksData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **chunk_ids** | **Array&lt;String&gt;** | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'trieve_ruby_client'
13
+
14
+ instance = TrieveRubyClient::GetGroupsForChunksData.new(
15
+ chunk_ids: null
16
+ )
17
+ ```
18
+
data/docs/GroupData.md ADDED
@@ -0,0 +1,20 @@
1
+ # TrieveRubyClient::GroupData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **groups** | [**Array&lt;ChunkGroupAndFile&gt;**](ChunkGroupAndFile.md) | | |
8
+ | **total_pages** | **Integer** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'trieve_ruby_client'
14
+
15
+ instance = TrieveRubyClient::GroupData.new(
16
+ groups: null,
17
+ total_pages: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # TrieveRubyClient::GroupScoreChunkDTO
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **group_id** | **String** | | |
8
+ | **metadata** | [**Array&lt;ScoreChunkDTO&gt;**](ScoreChunkDTO.md) | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'trieve_ruby_client'
14
+
15
+ instance = TrieveRubyClient::GroupScoreChunkDTO.new(
16
+ group_id: null,
17
+ metadata: null
18
+ )
19
+ ```
20
+
data/docs/HealthApi.md ADDED
@@ -0,0 +1,66 @@
1
+ # TrieveRubyClient::HealthApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**health_check**](HealthApi.md#health_check) | **GET** /api/health | |
8
+
9
+
10
+ ## health_check
11
+
12
+ > health_check
13
+
14
+
15
+
16
+ ### Examples
17
+
18
+ ```ruby
19
+ require 'time'
20
+ require 'trieve_ruby_client'
21
+
22
+ api_instance = TrieveRubyClient::HealthApi.new
23
+
24
+ begin
25
+
26
+ api_instance.health_check
27
+ rescue TrieveRubyClient::ApiError => e
28
+ puts "Error when calling HealthApi->health_check: #{e}"
29
+ end
30
+ ```
31
+
32
+ #### Using the health_check_with_http_info variant
33
+
34
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
35
+
36
+ > <Array(nil, Integer, Hash)> health_check_with_http_info
37
+
38
+ ```ruby
39
+ begin
40
+
41
+ data, status_code, headers = api_instance.health_check_with_http_info
42
+ p status_code # => 2xx
43
+ p headers # => { ... }
44
+ p data # => nil
45
+ rescue TrieveRubyClient::ApiError => e
46
+ puts "Error when calling HealthApi->health_check_with_http_info: #{e}"
47
+ end
48
+ ```
49
+
50
+ ### Parameters
51
+
52
+ This endpoint does not need any parameter.
53
+
54
+ ### Return type
55
+
56
+ nil (empty response body)
57
+
58
+ ### Authorization
59
+
60
+ No authorization required
61
+
62
+ ### HTTP request headers
63
+
64
+ - **Content-Type**: Not defined
65
+ - **Accept**: application/json
66
+