trieve_ruby_client 0.6.7 → 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.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -7
  3. data/docs/ChunkData.md +0 -2
  4. data/docs/ClientDatasetConfiguration.md +2 -0
  5. data/docs/CreateDatasetRequest.md +3 -1
  6. data/docs/CreateTopicData.md +3 -1
  7. data/docs/Dataset.md +2 -0
  8. data/docs/DatasetApi.md +1 -1
  9. data/docs/DatasetDTO.md +2 -0
  10. data/docs/FileApi.md +4 -6
  11. data/docs/GetEventsData.md +1 -1
  12. data/docs/RecommendChunksRequest.md +2 -0
  13. data/docs/RecommendGroupChunksRequest.md +2 -0
  14. data/docs/Topic.md +3 -3
  15. data/docs/TopicApi.md +17 -17
  16. data/docs/UpdateDatasetRequest.md +4 -2
  17. data/docs/UpdateUserOrgRoleData.md +22 -0
  18. data/docs/UserApi.md +9 -10
  19. data/lib/trieve_ruby_client/api/auth_api.rb +1 -1
  20. data/lib/trieve_ruby_client/api/chunk_api.rb +1 -1
  21. data/lib/trieve_ruby_client/api/chunk_group_api.rb +1 -1
  22. data/lib/trieve_ruby_client/api/dataset_api.rb +1 -1
  23. data/lib/trieve_ruby_client/api/events_api.rb +1 -1
  24. data/lib/trieve_ruby_client/api/file_api.rb +4 -11
  25. data/lib/trieve_ruby_client/api/health_api.rb +1 -1
  26. data/lib/trieve_ruby_client/api/invitation_api.rb +1 -1
  27. data/lib/trieve_ruby_client/api/message_api.rb +1 -1
  28. data/lib/trieve_ruby_client/api/organization_api.rb +1 -1
  29. data/lib/trieve_ruby_client/api/stripe_api.rb +1 -1
  30. data/lib/trieve_ruby_client/api/topic_api.rb +20 -20
  31. data/lib/trieve_ruby_client/api/user_api.rb +14 -14
  32. data/lib/trieve_ruby_client/api_client.rb +1 -1
  33. data/lib/trieve_ruby_client/api_error.rb +1 -1
  34. data/lib/trieve_ruby_client/configuration.rb +1 -1
  35. data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +1 -1
  36. data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
  37. data/lib/trieve_ruby_client/models/auth_query.rb +1 -1
  38. data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +1 -1
  39. data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
  40. data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
  41. data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
  42. data/lib/trieve_ruby_client/models/chunk_data.rb +2 -13
  43. data/lib/trieve_ruby_client/models/chunk_filter.rb +1 -1
  44. data/lib/trieve_ruby_client/models/chunk_group.rb +1 -1
  45. data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
  46. data/lib/trieve_ruby_client/models/chunk_metadata.rb +1 -1
  47. data/lib/trieve_ruby_client/models/chunk_metadata_with_score.rb +1 -1
  48. data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +18 -2
  49. data/lib/trieve_ruby_client/models/create_chunk_data.rb +1 -1
  50. data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +1 -1
  51. data/lib/trieve_ruby_client/models/create_dataset_request.rb +17 -6
  52. data/lib/trieve_ruby_client/models/create_message_data.rb +1 -1
  53. data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
  54. data/lib/trieve_ruby_client/models/create_topic_data.rb +23 -6
  55. data/lib/trieve_ruby_client/models/dataset.rb +12 -2
  56. data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
  57. data/lib/trieve_ruby_client/models/dataset_dto.rb +12 -2
  58. data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
  59. data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
  60. data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
  61. data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
  62. data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
  63. data/lib/trieve_ruby_client/models/event.rb +1 -1
  64. data/lib/trieve_ruby_client/models/event_return.rb +1 -1
  65. data/lib/trieve_ruby_client/models/field_condition.rb +1 -1
  66. data/lib/trieve_ruby_client/models/file.rb +1 -1
  67. data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
  68. data/lib/trieve_ruby_client/models/generate_chunks_request.rb +1 -1
  69. data/lib/trieve_ruby_client/models/get_events_data.rb +2 -2
  70. data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
  71. data/lib/trieve_ruby_client/models/group_data.rb +1 -1
  72. data/lib/trieve_ruby_client/models/group_score_chunk.rb +1 -1
  73. data/lib/trieve_ruby_client/models/group_score_slim_chunks.rb +1 -1
  74. data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
  75. data/lib/trieve_ruby_client/models/match_condition.rb +1 -1
  76. data/lib/trieve_ruby_client/models/message.rb +1 -1
  77. data/lib/trieve_ruby_client/models/organization.rb +1 -1
  78. data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
  79. data/lib/trieve_ruby_client/models/range.rb +1 -1
  80. data/lib/trieve_ruby_client/models/range_condition.rb +1 -1
  81. data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +13 -2
  82. data/lib/trieve_ruby_client/models/recommend_group_chunks_request.rb +13 -2
  83. data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
  84. data/lib/trieve_ruby_client/models/return_queued_chunk.rb +1 -1
  85. data/lib/trieve_ruby_client/models/score_chunk_dto.rb +1 -1
  86. data/lib/trieve_ruby_client/models/score_slim_chunks.rb +1 -1
  87. data/lib/trieve_ruby_client/models/search_chunk_data.rb +1 -1
  88. data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
  89. data/lib/trieve_ruby_client/models/search_over_groups_data.rb +1 -1
  90. data/lib/trieve_ruby_client/models/search_over_groups_results.rb +1 -1
  91. data/lib/trieve_ruby_client/models/search_over_groups_slim_results.rb +1 -1
  92. data/lib/trieve_ruby_client/models/search_slim_chunk_query_response_body.rb +1 -1
  93. data/lib/trieve_ruby_client/models/search_within_group_data.rb +1 -1
  94. data/lib/trieve_ruby_client/models/search_within_group_results.rb +1 -1
  95. data/lib/trieve_ruby_client/models/search_within_group_slim_results.rb +1 -1
  96. data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +1 -1
  97. data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
  98. data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +1 -1
  99. data/lib/trieve_ruby_client/models/slim_chunk_metadata.rb +1 -1
  100. data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_score.rb +1 -1
  101. data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
  102. data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
  103. data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
  104. data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
  105. data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
  106. data/lib/trieve_ruby_client/models/topic.rb +21 -21
  107. data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
  108. data/lib/trieve_ruby_client/models/update_chunk_data.rb +1 -1
  109. data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +1 -1
  110. data/lib/trieve_ruby_client/models/update_dataset_request.rb +18 -13
  111. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
  112. data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
  113. data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
  114. data/lib/trieve_ruby_client/models/update_user_data.rb +1 -1
  115. data/lib/trieve_ruby_client/models/update_user_org_role_data.rb +250 -0
  116. data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
  117. data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
  118. data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
  119. data/lib/trieve_ruby_client/version.rb +2 -2
  120. data/lib/trieve_ruby_client.rb +2 -2
  121. data/openapi-generator.yaml +1 -1
  122. data/openapi.json +71 -60
  123. data/spec/models/update_user_org_role_data_spec.rb +48 -0
  124. data/spec/spec_helper.rb +1 -1
  125. data/trieve_ruby_client-0.6.7.gem +0 -0
  126. data/trieve_ruby_client-0.6.9.gem +0 -0
  127. data/trieve_ruby_client.gemspec +1 -1
  128. metadata +8 -2
@@ -0,0 +1,250 @@
1
+ =begin
2
+ #Trieve API
3
+
4
+ #Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
5
+
6
+ The version of the OpenAPI document: 0.7.2
7
+ Contact: developers@trieve.ai
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.4.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TrieveRubyClient
17
+ class UpdateUserOrgRoleData
18
+ # The id of the organization to update the user for.
19
+ attr_accessor :organization_id
20
+
21
+ # 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.
22
+ attr_accessor :role
23
+
24
+ # 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.
25
+ attr_accessor :user_id
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'organization_id' => :'organization_id',
31
+ :'role' => :'role',
32
+ :'user_id' => :'user_id'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'organization_id' => :'String',
45
+ :'role' => :'Integer',
46
+ :'user_id' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ :'user_id'
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrieveRubyClient::UpdateUserOrgRoleData` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrieveRubyClient::UpdateUserOrgRoleData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'organization_id')
73
+ self.organization_id = attributes[:'organization_id']
74
+ else
75
+ self.organization_id = nil
76
+ end
77
+
78
+ if attributes.key?(:'role')
79
+ self.role = attributes[:'role']
80
+ else
81
+ self.role = nil
82
+ end
83
+
84
+ if attributes.key?(:'user_id')
85
+ self.user_id = attributes[:'user_id']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
+ invalid_properties = Array.new
94
+ if @organization_id.nil?
95
+ invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
96
+ end
97
+
98
+ if @role.nil?
99
+ invalid_properties.push('invalid value for "role", role cannot be nil.')
100
+ end
101
+
102
+ invalid_properties
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
109
+ return false if @organization_id.nil?
110
+ return false if @role.nil?
111
+ true
112
+ end
113
+
114
+ # Checks equality by comparing each attribute.
115
+ # @param [Object] Object to be compared
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ organization_id == o.organization_id &&
120
+ role == o.role &&
121
+ user_id == o.user_id
122
+ end
123
+
124
+ # @see the `==` method
125
+ # @param [Object] Object to be compared
126
+ def eql?(o)
127
+ self == o
128
+ end
129
+
130
+ # Calculates hash code according to all attributes.
131
+ # @return [Integer] Hash code
132
+ def hash
133
+ [organization_id, role, user_id].hash
134
+ end
135
+
136
+ # Builds the object from hash
137
+ # @param [Hash] attributes Model attributes in the form of hash
138
+ # @return [Object] Returns the model itself
139
+ def self.build_from_hash(attributes)
140
+ return nil unless attributes.is_a?(Hash)
141
+ attributes = attributes.transform_keys(&:to_sym)
142
+ transformed_hash = {}
143
+ openapi_types.each_pair do |key, type|
144
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
145
+ transformed_hash["#{key}"] = nil
146
+ elsif type =~ /\AArray<(.*)>/i
147
+ # check to ensure the input is an array given that the attribute
148
+ # is documented as an array but the input is not
149
+ if attributes[attribute_map[key]].is_a?(Array)
150
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
151
+ end
152
+ elsif !attributes[attribute_map[key]].nil?
153
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
154
+ end
155
+ end
156
+ new(transformed_hash)
157
+ end
158
+
159
+ # Deserializes the data based on type
160
+ # @param string type Data type
161
+ # @param string value Value to be deserialized
162
+ # @return [Object] Deserialized data
163
+ def self._deserialize(type, value)
164
+ case type.to_sym
165
+ when :Time
166
+ Time.parse(value)
167
+ when :Date
168
+ Date.parse(value)
169
+ when :String
170
+ value.to_s
171
+ when :Integer
172
+ value.to_i
173
+ when :Float
174
+ value.to_f
175
+ when :Boolean
176
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
177
+ true
178
+ else
179
+ false
180
+ end
181
+ when :Object
182
+ # generic object (usually a Hash), return directly
183
+ value
184
+ when /\AArray<(?<inner_type>.+)>\z/
185
+ inner_type = Regexp.last_match[:inner_type]
186
+ value.map { |v| _deserialize(inner_type, v) }
187
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
188
+ k_type = Regexp.last_match[:k_type]
189
+ v_type = Regexp.last_match[:v_type]
190
+ {}.tap do |hash|
191
+ value.each do |k, v|
192
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
193
+ end
194
+ end
195
+ else # model
196
+ # models (e.g. Pet) or oneOf
197
+ klass = TrieveRubyClient.const_get(type)
198
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
199
+ end
200
+ end
201
+
202
+ # Returns the string representation of the object
203
+ # @return [String] String presentation of the object
204
+ def to_s
205
+ to_hash.to_s
206
+ end
207
+
208
+ # to_body is an alias to to_hash (backward compatibility)
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_body
211
+ to_hash
212
+ end
213
+
214
+ # Returns the object in the form of hash
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_hash
217
+ hash = {}
218
+ self.class.attribute_map.each_pair do |attr, param|
219
+ value = self.send(attr)
220
+ if value.nil?
221
+ is_nullable = self.class.openapi_nullable.include?(attr)
222
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
223
+ end
224
+
225
+ hash[param] = _to_hash(value)
226
+ end
227
+ hash
228
+ end
229
+
230
+ # Outputs non-array value in the form of hash
231
+ # For object, use to_hash. Otherwise, just return the value
232
+ # @param [Object] value Any valid value
233
+ # @return [Hash] Returns the value in the form of hash
234
+ def _to_hash(value)
235
+ if value.is_a?(Array)
236
+ value.compact.map { |v| _to_hash(v) }
237
+ elsif value.is_a?(Hash)
238
+ {}.tap do |hash|
239
+ value.each { |k, v| hash[k] = _to_hash(v) }
240
+ end
241
+ elsif value.respond_to? :to_hash
242
+ value.to_hash
243
+ else
244
+ value
245
+ end
246
+ end
247
+
248
+ end
249
+
250
+ end
@@ -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.7
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.7
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.7
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.7
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
@@ -11,5 +11,5 @@ Generator version: 7.4.0
11
11
  =end
12
12
 
13
13
  module TrieveRubyClient
14
- VERSION = '0.6.7'
14
+ VERSION = '0.7.2'
15
15
  end
@@ -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.7
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
@@ -96,7 +96,7 @@ require 'trieve_ruby_client/models/update_dataset_request'
96
96
  require 'trieve_ruby_client/models/update_group_by_tracking_id_data'
97
97
  require 'trieve_ruby_client/models/update_organization_data'
98
98
  require 'trieve_ruby_client/models/update_topic_data'
99
- require 'trieve_ruby_client/models/update_user_data'
99
+ require 'trieve_ruby_client/models/update_user_org_role_data'
100
100
  require 'trieve_ruby_client/models/upload_file_data'
101
101
  require 'trieve_ruby_client/models/upload_file_result'
102
102
  require 'trieve_ruby_client/models/user_organization'
@@ -5,5 +5,5 @@ gemHomepage: "https://trieve.ai"
5
5
  gemLicense: "MIT"
6
6
  gemName: "trieve_ruby_client"
7
7
  gemSummary: "Trieve Ruby API client"
8
- gemVersion: "0.6.7"
8
+ gemVersion: "0.7.2"
9
9
  moduleName: "TrieveRubyClient"
data/openapi.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "name": "BSL",
13
13
  "url": "https://github.com/devflowinc/trieve/blob/main/LICENSE.txt"
14
14
  },
15
- "version": "0.6.7"
15
+ "version": "0.7.2"
16
16
  },
17
17
  "servers": [
18
18
  {
@@ -2558,15 +2558,6 @@
2558
2558
  "type": "string",
2559
2559
  "format": "uuid"
2560
2560
  }
2561
- },
2562
- {
2563
- "name": "delete_chunks",
2564
- "in": "query",
2565
- "description": "Whether or not to delete the chunks associated with the file",
2566
- "required": true,
2567
- "schema": {
2568
- "type": "boolean"
2569
- }
2570
2561
  }
2571
2562
  ],
2572
2563
  "responses": {
@@ -3461,7 +3452,7 @@
3461
3452
  "topic"
3462
3453
  ],
3463
3454
  "summary": "Create Topic",
3464
- "description": "Create Topic\n\nCreate a new chat topic. Topics are attached to a user and act as a coordinator for memory of gen-AI chat sessions. We are considering refactoring this resource of the API soon.",
3455
+ "description": "Create Topic\n\nCreate 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.",
3465
3456
  "operationId": "create_topic",
3466
3457
  "parameters": [
3467
3458
  {
@@ -3568,23 +3559,22 @@
3568
3559
  ]
3569
3560
  }
3570
3561
  },
3571
- "/api/topic/user/{user_id}": {
3562
+ "/api/topic/owner/{owner_id}": {
3572
3563
  "get": {
3573
3564
  "tags": [
3574
3565
  "topic"
3575
3566
  ],
3576
- "summary": "Get All Topics for User",
3577
- "description": "Get All Topics for User\n\nGet all topics belonging to a the auth'ed user. Soon, we plan to allow specification of the user for this route and include pagination.",
3578
- "operationId": "get_all_topics_for_user",
3567
+ "summary": "Get All Topics for Owner ID",
3568
+ "description": "Get All Topics for Owner ID\n\nGet 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.",
3569
+ "operationId": "get_all_topics_for_owner_id",
3579
3570
  "parameters": [
3580
3571
  {
3581
- "name": "user_id",
3572
+ "name": "owner_id",
3582
3573
  "in": "path",
3583
- "description": "The id of the user to get topics for",
3574
+ "description": "The owner_id to get topics of; A common approach is to use a browser fingerprint or your user's id",
3584
3575
  "required": true,
3585
3576
  "schema": {
3586
- "type": "string",
3587
- "format": "uuid"
3577
+ "type": "string"
3588
3578
  }
3589
3579
  },
3590
3580
  {
@@ -3599,7 +3589,7 @@
3599
3589
  ],
3600
3590
  "responses": {
3601
3591
  "200": {
3602
- "description": "All topics belonging to a given user",
3592
+ "description": "All topics belonging to a given owner_id",
3603
3593
  "content": {
3604
3594
  "application/json": {
3605
3595
  "schema": {
@@ -3612,7 +3602,7 @@
3612
3602
  }
3613
3603
  },
3614
3604
  "400": {
3615
- "description": "Service error relating to topic get",
3605
+ "description": "Service error relating to getting topics for the owner_id",
3616
3606
  "content": {
3617
3607
  "application/json": {
3618
3608
  "schema": {
@@ -3697,22 +3687,15 @@
3697
3687
  "content": {
3698
3688
  "application/json": {
3699
3689
  "schema": {
3700
- "$ref": "#/components/schemas/UpdateUserData"
3690
+ "$ref": "#/components/schemas/UpdateUserOrgRoleData"
3701
3691
  }
3702
3692
  }
3703
3693
  },
3704
3694
  "required": true
3705
3695
  },
3706
3696
  "responses": {
3707
- "200": {
3708
- "description": "JSON body representing the updated user information",
3709
- "content": {
3710
- "application/json": {
3711
- "schema": {
3712
- "$ref": "#/components/schemas/SlimUser"
3713
- }
3714
- }
3715
- }
3697
+ "204": {
3698
+ "description": "Confirmation that the user's role was updated"
3716
3699
  },
3717
3700
  "400": {
3718
3701
  "description": "Service error relating to updating the user",
@@ -4078,12 +4061,6 @@
4078
4061
  "description": "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.",
4079
4062
  "nullable": true
4080
4063
  },
4081
- "file_id": {
4082
- "type": "string",
4083
- "format": "uuid",
4084
- "description": "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.",
4085
- "nullable": true
4086
- },
4087
4064
  "group_ids": {
4088
4065
  "type": "array",
4089
4066
  "items": {
@@ -4532,7 +4509,8 @@
4532
4509
  "ClientDatasetConfiguration": {
4533
4510
  "type": "object",
4534
4511
  "required": [
4535
- "FILE_NAME_KEY"
4512
+ "FILE_NAME_KEY",
4513
+ "IMAGE_METADATA_KEY"
4536
4514
  ],
4537
4515
  "properties": {
4538
4516
  "CREATE_CHUNK_FEATURE": {
@@ -4557,6 +4535,9 @@
4557
4535
  "type": "string",
4558
4536
  "nullable": true
4559
4537
  },
4538
+ "IMAGE_METADATA_KEY": {
4539
+ "type": "string"
4540
+ },
4560
4541
  "IMAGE_RANGE_END_KEY": {
4561
4542
  "type": "string",
4562
4543
  "nullable": true
@@ -4586,6 +4567,7 @@
4586
4567
  "FILE_NAME_KEY": "file_name_key",
4587
4568
  "FILTER_ITEMS": [],
4588
4569
  "FRONTMATTER_VALS": "frontmatter vals",
4570
+ "IMAGE_METADATA_KEY": ".image_url",
4589
4571
  "IMAGE_RANGE_END_KEY": "image range end key",
4590
4572
  "IMAGE_RANGE_START_KEY": "image range start key",
4591
4573
  "LINES_BEFORE_SHOW_MORE": 10,
@@ -4726,6 +4708,11 @@
4726
4708
  },
4727
4709
  "server_configuration": {
4728
4710
  "description": "Server configuration for the dataset, can be arbitrary JSON. We recommend setting to `{}` to start. See docs.trieve.ai for more information or adjust with the admin dashboard."
4711
+ },
4712
+ "tracking_id": {
4713
+ "type": "string",
4714
+ "description": "Optional tracking ID for the dataset. Can be used to track the dataset in external systems.",
4715
+ "nullable": true
4729
4716
  }
4730
4717
  },
4731
4718
  "example": {
@@ -4793,6 +4780,9 @@
4793
4780
  },
4794
4781
  "CreateTopicData": {
4795
4782
  "type": "object",
4783
+ "required": [
4784
+ "owner_id"
4785
+ ],
4796
4786
  "properties": {
4797
4787
  "first_user_message": {
4798
4788
  "type": "string",
@@ -4808,6 +4798,10 @@
4808
4798
  "type": "string",
4809
4799
  "description": "The name of the topic. If this is not provided, the topic name is generated from the first_user_message.",
4810
4800
  "nullable": true
4801
+ },
4802
+ "owner_id": {
4803
+ "type": "string",
4804
+ "description": "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."
4811
4805
  }
4812
4806
  }
4813
4807
  },
@@ -4840,6 +4834,10 @@
4840
4834
  "format": "uuid"
4841
4835
  },
4842
4836
  "server_configuration": {},
4837
+ "tracking_id": {
4838
+ "type": "string",
4839
+ "nullable": true
4840
+ },
4843
4841
  "updated_at": {
4844
4842
  "type": "string",
4845
4843
  "format": "date-time"
@@ -4856,6 +4854,7 @@
4856
4854
  "server_configuration": {
4857
4855
  "key": "value"
4858
4856
  },
4857
+ "tracking_id": "3",
4859
4858
  "updated_at": "2021-01-01T00:00:00"
4860
4859
  }
4861
4860
  },
@@ -4918,6 +4917,10 @@
4918
4917
  "type": "string",
4919
4918
  "format": "uuid"
4920
4919
  },
4920
+ "tracking_id": {
4921
+ "type": "string",
4922
+ "nullable": true
4923
+ },
4921
4924
  "updated_at": {
4922
4925
  "type": "string",
4923
4926
  "format": "date-time"
@@ -4931,6 +4934,7 @@
4931
4934
  "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4932
4935
  "name": "Trieve",
4933
4936
  "organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
4937
+ "tracking_id": "3",
4934
4938
  "updated_at": "2021-01-01T00:00:00"
4935
4939
  }
4936
4940
  },
@@ -5333,7 +5337,7 @@
5333
5337
  "items": {
5334
5338
  "type": "string"
5335
5339
  },
5336
- "description": "The types of events to get. Any combination of file_uploaded, chunk_uploaded, chunk_action_failed, or chunk_updated. Leave undefined to get all events.",
5340
+ "description": "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.",
5337
5341
  "nullable": true
5338
5342
  },
5339
5343
  "page": {
@@ -5788,6 +5792,11 @@
5788
5792
  "description": "The tracking_ids of the chunks to be used as positive examples for the recommendation. The chunks in this array will be used to find similar chunks.",
5789
5793
  "nullable": true
5790
5794
  },
5795
+ "recommend_type": {
5796
+ "type": "string",
5797
+ "description": "The type of recommendation to make. This lets you choose whether to recommend based off of `semantic` or `fulltext` similarity. The default is `semantic`.",
5798
+ "nullable": true
5799
+ },
5791
5800
  "slim_chunks": {
5792
5801
  "type": "boolean",
5793
5802
  "description": "Set slim_chunks to true to avoid returning the content and chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement. Default is false.",
@@ -5859,6 +5868,11 @@
5859
5868
  "description": "The ids of the groups to be used as positive examples for the recommendation. The groups in this array will be used to find similar groups.",
5860
5869
  "nullable": true
5861
5870
  },
5871
+ "recommend_type": {
5872
+ "type": "string",
5873
+ "description": "The type of recommendation to make. This lets you choose whether to recommend based off of `semantic` or `fulltext` similarity. The default is `semantic`.",
5874
+ "nullable": true
5875
+ },
5862
5876
  "slim_chunks": {
5863
5877
  "type": "boolean",
5864
5878
  "description": "Set slim_chunks to true to avoid returning the content and chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement. Default is false.",
@@ -6819,12 +6833,12 @@
6819
6833
  "type": "object",
6820
6834
  "required": [
6821
6835
  "id",
6822
- "user_id",
6823
6836
  "name",
6824
6837
  "deleted",
6825
6838
  "created_at",
6826
6839
  "updated_at",
6827
- "dataset_id"
6840
+ "dataset_id",
6841
+ "owner_id"
6828
6842
  ],
6829
6843
  "properties": {
6830
6844
  "created_at": {
@@ -6845,13 +6859,12 @@
6845
6859
  "name": {
6846
6860
  "type": "string"
6847
6861
  },
6862
+ "owner_id": {
6863
+ "type": "string"
6864
+ },
6848
6865
  "updated_at": {
6849
6866
  "type": "string",
6850
6867
  "format": "date-time"
6851
- },
6852
- "user_id": {
6853
- "type": "string",
6854
- "format": "uuid"
6855
6868
  }
6856
6869
  },
6857
6870
  "example": {
@@ -6860,8 +6873,8 @@
6860
6873
  "deleted": false,
6861
6874
  "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6862
6875
  "name": "Trieve",
6863
- "updated_at": "2021-01-01T00:00:00",
6864
- "user_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
6876
+ "owner_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6877
+ "updated_at": "2021-01-01T00:00:00"
6865
6878
  }
6866
6879
  },
6867
6880
  "UpdateChunkByTrackingIdData": {
@@ -7048,9 +7061,6 @@
7048
7061
  },
7049
7062
  "UpdateDatasetRequest": {
7050
7063
  "type": "object",
7051
- "required": [
7052
- "dataset_id"
7053
- ],
7054
7064
  "properties": {
7055
7065
  "client_configuration": {
7056
7066
  "description": "The new client configuration of the dataset, can be arbitrary JSON. See docs.trieve.ai for more information. If not provided, the client configuration will not be updated.",
@@ -7059,7 +7069,8 @@
7059
7069
  "dataset_id": {
7060
7070
  "type": "string",
7061
7071
  "format": "uuid",
7062
- "description": "The id of the dataset you want to update."
7072
+ "description": "The id of the dataset you want to update.",
7073
+ "nullable": true
7063
7074
  },
7064
7075
  "dataset_name": {
7065
7076
  "type": "string",
@@ -7069,6 +7080,11 @@
7069
7080
  "server_configuration": {
7070
7081
  "description": "The new server configuration of the dataset, can be arbitrary JSON. See docs.trieve.ai for more information. If not provided, the server configuration will not be updated.",
7071
7082
  "nullable": true
7083
+ },
7084
+ "tracking_id": {
7085
+ "type": "string",
7086
+ "description": "tracking ID for the dataset. Can be used to track the dataset in external systems.",
7087
+ "nullable": true
7072
7088
  }
7073
7089
  },
7074
7090
  "example": {
@@ -7148,17 +7164,13 @@
7148
7164
  }
7149
7165
  }
7150
7166
  },
7151
- "UpdateUserData": {
7167
+ "UpdateUserOrgRoleData": {
7152
7168
  "type": "object",
7153
7169
  "required": [
7154
- "organization_id"
7170
+ "organization_id",
7171
+ "role"
7155
7172
  ],
7156
7173
  "properties": {
7157
- "name": {
7158
- "type": "string",
7159
- "description": "In the sense of a legal name, not a username. The new name to assign to the user, if not provided, the current name will be used.",
7160
- "nullable": true
7161
- },
7162
7174
  "organization_id": {
7163
7175
  "type": "string",
7164
7176
  "format": "uuid",
@@ -7167,8 +7179,7 @@
7167
7179
  "role": {
7168
7180
  "type": "integer",
7169
7181
  "format": "int32",
7170
- "description": "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.",
7171
- "nullable": true
7182
+ "description": "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."
7172
7183
  },
7173
7184
  "user_id": {
7174
7185
  "type": "string",