carbon_ruby_sdk 0.1.11 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -6
- data/README.md +28 -2
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +66 -22
- data/lib/carbon_ruby_sdk/models/embedding_and_chunk.rb +15 -5
- data/lib/carbon_ruby_sdk/models/external_source_item.rb +11 -1
- data/lib/carbon_ruby_sdk/models/fresh_desk_connect_request.rb +15 -5
- data/lib/carbon_ruby_sdk/models/gitbook_connect_request.rb +15 -5
- data/lib/carbon_ruby_sdk/models/gitbook_sync_request.rb +15 -5
- data/lib/carbon_ruby_sdk/models/gmail_sync_input.rb +15 -5
- data/lib/carbon_ruby_sdk/models/list_data_source_items_request.rb +11 -1
- data/lib/carbon_ruby_sdk/models/list_items_filters.rb +250 -0
- data/lib/carbon_ruby_sdk/models/list_items_filters_nullable.rb +250 -0
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +16 -5
- data/lib/carbon_ruby_sdk/models/organization_user_files_to_sync_filters.rb +32 -4
- data/lib/carbon_ruby_sdk/models/outlook_sync_input.rb +15 -5
- data/lib/carbon_ruby_sdk/models/rss_feed_input.rb +15 -5
- data/lib/carbon_ruby_sdk/models/s3_file_sync_input.rb +15 -5
- data/lib/carbon_ruby_sdk/models/sync_files_request.rb +14 -4
- data/lib/carbon_ruby_sdk/models/user_file.rb +11 -1
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +2 -0
- data/spec/models/embedding_and_chunk_spec.rb +6 -0
- data/spec/models/external_source_item_spec.rb +6 -0
- data/spec/models/fresh_desk_connect_request_spec.rb +6 -0
- data/spec/models/gitbook_connect_request_spec.rb +6 -0
- data/spec/models/gitbook_sync_request_spec.rb +6 -0
- data/spec/models/gmail_sync_input_spec.rb +6 -0
- data/spec/models/list_data_source_items_request_spec.rb +6 -0
- data/spec/models/list_items_filters_nullable_spec.rb +46 -0
- data/spec/models/list_items_filters_spec.rb +46 -0
- data/spec/models/o_auth_url_request_spec.rb +6 -0
- data/spec/models/organization_user_files_to_sync_filters_spec.rb +6 -0
- data/spec/models/outlook_sync_input_spec.rb +6 -0
- data/spec/models/rss_feed_input_spec.rb +6 -0
- data/spec/models/s3_file_sync_input_spec.rb +6 -0
- data/spec/models/sync_files_request_spec.rb +6 -0
- data/spec/models/user_file_spec.rb +6 -0
- metadata +9 -3
@@ -0,0 +1,250 @@
|
|
1
|
+
=begin
|
2
|
+
#Carbon
|
3
|
+
|
4
|
+
#Connect external data to LLMs, no matter the source.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'date'
|
10
|
+
require 'time'
|
11
|
+
|
12
|
+
module Carbon
|
13
|
+
class ListItemsFiltersNullable
|
14
|
+
attr_accessor :external_ids
|
15
|
+
|
16
|
+
attr_accessor :ids
|
17
|
+
|
18
|
+
attr_accessor :name
|
19
|
+
|
20
|
+
attr_accessor :root_files_only
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'external_ids' => :'external_ids',
|
26
|
+
:'ids' => :'ids',
|
27
|
+
:'name' => :'name',
|
28
|
+
:'root_files_only' => :'root_files_only'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'external_ids' => :'Array<String>',
|
41
|
+
:'ids' => :'Array<Integer>',
|
42
|
+
:'name' => :'String',
|
43
|
+
:'root_files_only' => :'Boolean'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# List of attributes with nullable: true
|
48
|
+
def self.openapi_nullable
|
49
|
+
Set.new([
|
50
|
+
:'external_ids',
|
51
|
+
:'ids',
|
52
|
+
:'name',
|
53
|
+
:'root_files_only'
|
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 `Carbon::ListItemsFiltersNullable` 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 `Carbon::ListItemsFiltersNullable`. 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?(:'external_ids')
|
73
|
+
if (value = attributes[:'external_ids']).is_a?(Array)
|
74
|
+
self.external_ids = value
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'ids')
|
79
|
+
if (value = attributes[:'ids']).is_a?(Array)
|
80
|
+
self.ids = value
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'name')
|
85
|
+
self.name = attributes[:'name']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'root_files_only')
|
89
|
+
self.root_files_only = attributes[:'root_files_only']
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
94
|
+
# @return Array for valid properties with the reasons
|
95
|
+
def list_invalid_properties
|
96
|
+
invalid_properties = Array.new
|
97
|
+
invalid_properties
|
98
|
+
end
|
99
|
+
|
100
|
+
# Check to see if the all the properties in the model are valid
|
101
|
+
# @return true if the model is valid
|
102
|
+
def valid?
|
103
|
+
true
|
104
|
+
end
|
105
|
+
|
106
|
+
# Checks equality by comparing each attribute.
|
107
|
+
# @param [Object] Object to be compared
|
108
|
+
def ==(o)
|
109
|
+
return true if self.equal?(o)
|
110
|
+
self.class == o.class &&
|
111
|
+
external_ids == o.external_ids &&
|
112
|
+
ids == o.ids &&
|
113
|
+
name == o.name &&
|
114
|
+
root_files_only == o.root_files_only
|
115
|
+
end
|
116
|
+
|
117
|
+
# @see the `==` method
|
118
|
+
# @param [Object] Object to be compared
|
119
|
+
def eql?(o)
|
120
|
+
self == o
|
121
|
+
end
|
122
|
+
|
123
|
+
# Calculates hash code according to all attributes.
|
124
|
+
# @return [Integer] Hash code
|
125
|
+
def hash
|
126
|
+
[external_ids, ids, name, root_files_only].hash
|
127
|
+
end
|
128
|
+
|
129
|
+
# Builds the object from hash
|
130
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
131
|
+
# @return [Object] Returns the model itself
|
132
|
+
def self.build_from_hash(attributes)
|
133
|
+
new.build_from_hash(attributes)
|
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 build_from_hash(attributes)
|
140
|
+
return nil unless attributes.is_a?(Hash)
|
141
|
+
attributes = attributes.transform_keys(&:to_sym)
|
142
|
+
self.class.openapi_types.each_pair do |key, type|
|
143
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
144
|
+
self.send("#{key}=", nil)
|
145
|
+
elsif type =~ /\AArray<(.*)>/i
|
146
|
+
# check to ensure the input is an array given that the attribute
|
147
|
+
# is documented as an array but the input is not
|
148
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
149
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
150
|
+
end
|
151
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
152
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
self
|
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 _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 = Carbon.const_get(type)
|
198
|
+
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
|
@@ -53,6 +53,9 @@ module Carbon
|
|
53
53
|
# Used to connect a new data source. If not specified, we will attempt to create a sync URL for an existing data source based on type and ID.
|
54
54
|
attr_accessor :connecting_new_account
|
55
55
|
|
56
|
+
# This request id will be added to all files that get synced using the generated OAuth URL
|
57
|
+
attr_accessor :request_id
|
58
|
+
|
56
59
|
# Attribute mapping from ruby-style variable name to JSON key.
|
57
60
|
def self.attribute_map
|
58
61
|
{
|
@@ -74,7 +77,8 @@ module Carbon
|
|
74
77
|
:'sync_files_on_connection' => :'sync_files_on_connection',
|
75
78
|
:'set_page_as_boundary' => :'set_page_as_boundary',
|
76
79
|
:'data_source_id' => :'data_source_id',
|
77
|
-
:'connecting_new_account' => :'connecting_new_account'
|
80
|
+
:'connecting_new_account' => :'connecting_new_account',
|
81
|
+
:'request_id' => :'request_id'
|
78
82
|
}
|
79
83
|
end
|
80
84
|
|
@@ -104,7 +108,8 @@ module Carbon
|
|
104
108
|
:'sync_files_on_connection' => :'Boolean',
|
105
109
|
:'set_page_as_boundary' => :'Boolean',
|
106
110
|
:'data_source_id' => :'Integer',
|
107
|
-
:'connecting_new_account' => :'Boolean'
|
111
|
+
:'connecting_new_account' => :'Boolean',
|
112
|
+
:'request_id' => :'String'
|
108
113
|
}
|
109
114
|
end
|
110
115
|
|
@@ -127,7 +132,8 @@ module Carbon
|
|
127
132
|
:'salesforce_domain',
|
128
133
|
:'sync_files_on_connection',
|
129
134
|
:'data_source_id',
|
130
|
-
:'connecting_new_account'
|
135
|
+
:'connecting_new_account',
|
136
|
+
:'request_id'
|
131
137
|
])
|
132
138
|
end
|
133
139
|
|
@@ -239,6 +245,10 @@ module Carbon
|
|
239
245
|
else
|
240
246
|
self.connecting_new_account = false
|
241
247
|
end
|
248
|
+
|
249
|
+
if attributes.key?(:'request_id')
|
250
|
+
self.request_id = attributes[:'request_id']
|
251
|
+
end
|
242
252
|
end
|
243
253
|
|
244
254
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -282,7 +292,8 @@ module Carbon
|
|
282
292
|
sync_files_on_connection == o.sync_files_on_connection &&
|
283
293
|
set_page_as_boundary == o.set_page_as_boundary &&
|
284
294
|
data_source_id == o.data_source_id &&
|
285
|
-
connecting_new_account == o.connecting_new_account
|
295
|
+
connecting_new_account == o.connecting_new_account &&
|
296
|
+
request_id == o.request_id
|
286
297
|
end
|
287
298
|
|
288
299
|
# @see the `==` method
|
@@ -294,7 +305,7 @@ module Carbon
|
|
294
305
|
# Calculates hash code according to all attributes.
|
295
306
|
# @return [Integer] Hash code
|
296
307
|
def hash
|
297
|
-
[tags, scope, service, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, zendesk_subdomain, microsoft_tenant, sharepoint_site_name, confluence_subdomain, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, salesforce_domain, sync_files_on_connection, set_page_as_boundary, data_source_id, connecting_new_account].hash
|
308
|
+
[tags, scope, service, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, zendesk_subdomain, microsoft_tenant, sharepoint_site_name, confluence_subdomain, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, salesforce_domain, sync_files_on_connection, set_page_as_boundary, data_source_id, connecting_new_account, request_id].hash
|
298
309
|
end
|
299
310
|
|
300
311
|
# Builds the object from hash
|
@@ -47,6 +47,9 @@ module Carbon
|
|
47
47
|
# If true, the query will return only files that have not been synced yet.
|
48
48
|
attr_accessor :non_synced_only
|
49
49
|
|
50
|
+
# Filter by request ID(s) which were used to sync the files
|
51
|
+
attr_accessor :request_ids
|
52
|
+
|
50
53
|
# Attribute mapping from ruby-style variable name to JSON key.
|
51
54
|
def self.attribute_map
|
52
55
|
{
|
@@ -62,7 +65,8 @@ module Carbon
|
|
62
65
|
:'embedding_generators' => :'embedding_generators',
|
63
66
|
:'root_files_only' => :'root_files_only',
|
64
67
|
:'include_all_children' => :'include_all_children',
|
65
|
-
:'non_synced_only' => :'non_synced_only'
|
68
|
+
:'non_synced_only' => :'non_synced_only',
|
69
|
+
:'request_ids' => :'request_ids'
|
66
70
|
}
|
67
71
|
end
|
68
72
|
|
@@ -86,7 +90,8 @@ module Carbon
|
|
86
90
|
:'embedding_generators' => :'Array<EmbeddingGenerators>',
|
87
91
|
:'root_files_only' => :'Boolean',
|
88
92
|
:'include_all_children' => :'Boolean',
|
89
|
-
:'non_synced_only' => :'Boolean'
|
93
|
+
:'non_synced_only' => :'Boolean',
|
94
|
+
:'request_ids' => :'Array<String>'
|
90
95
|
}
|
91
96
|
end
|
92
97
|
|
@@ -104,6 +109,7 @@ module Carbon
|
|
104
109
|
:'organization_user_data_source_id',
|
105
110
|
:'embedding_generators',
|
106
111
|
:'root_files_only',
|
112
|
+
:'request_ids'
|
107
113
|
])
|
108
114
|
end
|
109
115
|
|
@@ -191,21 +197,42 @@ module Carbon
|
|
191
197
|
else
|
192
198
|
self.non_synced_only = false
|
193
199
|
end
|
200
|
+
|
201
|
+
if attributes.key?(:'request_ids')
|
202
|
+
if (value = attributes[:'request_ids']).is_a?(Array)
|
203
|
+
self.request_ids = value
|
204
|
+
end
|
205
|
+
end
|
194
206
|
end
|
195
207
|
|
196
208
|
# Show invalid properties with the reasons. Usually used together with valid?
|
197
209
|
# @return Array for valid properties with the reasons
|
198
210
|
def list_invalid_properties
|
199
211
|
invalid_properties = Array.new
|
212
|
+
if !@request_ids.nil? && @request_ids.length > 100
|
213
|
+
invalid_properties.push('invalid value for "request_ids", number of items must be less than or equal to 100.')
|
214
|
+
end
|
215
|
+
|
200
216
|
invalid_properties
|
201
217
|
end
|
202
218
|
|
203
219
|
# Check to see if the all the properties in the model are valid
|
204
220
|
# @return true if the model is valid
|
205
221
|
def valid?
|
222
|
+
return false if !@request_ids.nil? && @request_ids.length > 100
|
206
223
|
true
|
207
224
|
end
|
208
225
|
|
226
|
+
# Custom attribute writer method with validation
|
227
|
+
# @param [Object] request_ids Value to be assigned
|
228
|
+
def request_ids=(request_ids)
|
229
|
+
if !request_ids.nil? && request_ids.length > 100
|
230
|
+
fail ArgumentError, 'invalid value for "request_ids", number of items must be less than or equal to 100.'
|
231
|
+
end
|
232
|
+
|
233
|
+
@request_ids = request_ids
|
234
|
+
end
|
235
|
+
|
209
236
|
# Checks equality by comparing each attribute.
|
210
237
|
# @param [Object] Object to be compared
|
211
238
|
def ==(o)
|
@@ -223,7 +250,8 @@ module Carbon
|
|
223
250
|
embedding_generators == o.embedding_generators &&
|
224
251
|
root_files_only == o.root_files_only &&
|
225
252
|
include_all_children == o.include_all_children &&
|
226
|
-
non_synced_only == o.non_synced_only
|
253
|
+
non_synced_only == o.non_synced_only &&
|
254
|
+
request_ids == o.request_ids
|
227
255
|
end
|
228
256
|
|
229
257
|
# @see the `==` method
|
@@ -235,7 +263,7 @@ module Carbon
|
|
235
263
|
# Calculates hash code according to all attributes.
|
236
264
|
# @return [Integer] Hash code
|
237
265
|
def hash
|
238
|
-
[tags, source, name, tags_v2, ids, external_file_ids, sync_statuses, parent_file_ids, organization_user_data_source_id, embedding_generators, root_files_only, include_all_children, non_synced_only].hash
|
266
|
+
[tags, source, name, tags_v2, ids, external_file_ids, sync_statuses, parent_file_ids, organization_user_data_source_id, embedding_generators, root_files_only, include_all_children, non_synced_only, request_ids].hash
|
239
267
|
end
|
240
268
|
|
241
269
|
# Builds the object from hash
|
@@ -31,6 +31,8 @@ module Carbon
|
|
31
31
|
|
32
32
|
attr_accessor :data_source_id
|
33
33
|
|
34
|
+
attr_accessor :request_id
|
35
|
+
|
34
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
35
37
|
def self.attribute_map
|
36
38
|
{
|
@@ -43,7 +45,8 @@ module Carbon
|
|
43
45
|
:'embedding_model' => :'embedding_model',
|
44
46
|
:'generate_sparse_vectors' => :'generate_sparse_vectors',
|
45
47
|
:'prepend_filename_to_chunks' => :'prepend_filename_to_chunks',
|
46
|
-
:'data_source_id' => :'data_source_id'
|
48
|
+
:'data_source_id' => :'data_source_id',
|
49
|
+
:'request_id' => :'request_id'
|
47
50
|
}
|
48
51
|
end
|
49
52
|
|
@@ -64,7 +67,8 @@ module Carbon
|
|
64
67
|
:'embedding_model' => :'EmbeddingGenerators',
|
65
68
|
:'generate_sparse_vectors' => :'Boolean',
|
66
69
|
:'prepend_filename_to_chunks' => :'Boolean',
|
67
|
-
:'data_source_id' => :'Integer'
|
70
|
+
:'data_source_id' => :'Integer',
|
71
|
+
:'request_id' => :'String'
|
68
72
|
}
|
69
73
|
end
|
70
74
|
|
@@ -78,7 +82,8 @@ module Carbon
|
|
78
82
|
:'skip_embedding_generation',
|
79
83
|
:'generate_sparse_vectors',
|
80
84
|
:'prepend_filename_to_chunks',
|
81
|
-
:'data_source_id'
|
85
|
+
:'data_source_id',
|
86
|
+
:'request_id'
|
82
87
|
])
|
83
88
|
end
|
84
89
|
|
@@ -150,6 +155,10 @@ module Carbon
|
|
150
155
|
if attributes.key?(:'data_source_id')
|
151
156
|
self.data_source_id = attributes[:'data_source_id']
|
152
157
|
end
|
158
|
+
|
159
|
+
if attributes.key?(:'request_id')
|
160
|
+
self.request_id = attributes[:'request_id']
|
161
|
+
end
|
153
162
|
end
|
154
163
|
|
155
164
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -184,7 +193,8 @@ module Carbon
|
|
184
193
|
embedding_model == o.embedding_model &&
|
185
194
|
generate_sparse_vectors == o.generate_sparse_vectors &&
|
186
195
|
prepend_filename_to_chunks == o.prepend_filename_to_chunks &&
|
187
|
-
data_source_id == o.data_source_id
|
196
|
+
data_source_id == o.data_source_id &&
|
197
|
+
request_id == o.request_id
|
188
198
|
end
|
189
199
|
|
190
200
|
# @see the `==` method
|
@@ -196,7 +206,7 @@ module Carbon
|
|
196
206
|
# Calculates hash code according to all attributes.
|
197
207
|
# @return [Integer] Hash code
|
198
208
|
def hash
|
199
|
-
[tags, folder, filters, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, data_source_id].hash
|
209
|
+
[tags, folder, filters, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, data_source_id, request_id].hash
|
200
210
|
end
|
201
211
|
|
202
212
|
# Builds the object from hash
|
@@ -27,6 +27,8 @@ module Carbon
|
|
27
27
|
|
28
28
|
attr_accessor :prepend_filename_to_chunks
|
29
29
|
|
30
|
+
attr_accessor :request_id
|
31
|
+
|
30
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
33
|
def self.attribute_map
|
32
34
|
{
|
@@ -37,7 +39,8 @@ module Carbon
|
|
37
39
|
:'skip_embedding_generation' => :'skip_embedding_generation',
|
38
40
|
:'embedding_model' => :'embedding_model',
|
39
41
|
:'generate_sparse_vectors' => :'generate_sparse_vectors',
|
40
|
-
:'prepend_filename_to_chunks' => :'prepend_filename_to_chunks'
|
42
|
+
:'prepend_filename_to_chunks' => :'prepend_filename_to_chunks',
|
43
|
+
:'request_id' => :'request_id'
|
41
44
|
}
|
42
45
|
end
|
43
46
|
|
@@ -56,7 +59,8 @@ module Carbon
|
|
56
59
|
:'skip_embedding_generation' => :'Boolean',
|
57
60
|
:'embedding_model' => :'EmbeddingGenerators',
|
58
61
|
:'generate_sparse_vectors' => :'Boolean',
|
59
|
-
:'prepend_filename_to_chunks' => :'Boolean'
|
62
|
+
:'prepend_filename_to_chunks' => :'Boolean',
|
63
|
+
:'request_id' => :'String'
|
60
64
|
}
|
61
65
|
end
|
62
66
|
|
@@ -68,7 +72,8 @@ module Carbon
|
|
68
72
|
:'chunk_overlap',
|
69
73
|
:'skip_embedding_generation',
|
70
74
|
:'generate_sparse_vectors',
|
71
|
-
:'prepend_filename_to_chunks'
|
75
|
+
:'prepend_filename_to_chunks',
|
76
|
+
:'request_id'
|
72
77
|
])
|
73
78
|
end
|
74
79
|
|
@@ -130,6 +135,10 @@ module Carbon
|
|
130
135
|
else
|
131
136
|
self.prepend_filename_to_chunks = false
|
132
137
|
end
|
138
|
+
|
139
|
+
if attributes.key?(:'request_id')
|
140
|
+
self.request_id = attributes[:'request_id']
|
141
|
+
end
|
133
142
|
end
|
134
143
|
|
135
144
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -162,7 +171,8 @@ module Carbon
|
|
162
171
|
skip_embedding_generation == o.skip_embedding_generation &&
|
163
172
|
embedding_model == o.embedding_model &&
|
164
173
|
generate_sparse_vectors == o.generate_sparse_vectors &&
|
165
|
-
prepend_filename_to_chunks == o.prepend_filename_to_chunks
|
174
|
+
prepend_filename_to_chunks == o.prepend_filename_to_chunks &&
|
175
|
+
request_id == o.request_id
|
166
176
|
end
|
167
177
|
|
168
178
|
# @see the `==` method
|
@@ -174,7 +184,7 @@ module Carbon
|
|
174
184
|
# Calculates hash code according to all attributes.
|
175
185
|
# @return [Integer] Hash code
|
176
186
|
def hash
|
177
|
-
[tags, url, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks].hash
|
187
|
+
[tags, url, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, request_id].hash
|
178
188
|
end
|
179
189
|
|
180
190
|
# Builds the object from hash
|
@@ -34,6 +34,8 @@ module Carbon
|
|
34
34
|
|
35
35
|
attr_accessor :data_source_id
|
36
36
|
|
37
|
+
attr_accessor :request_id
|
38
|
+
|
37
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
38
40
|
def self.attribute_map
|
39
41
|
{
|
@@ -47,7 +49,8 @@ module Carbon
|
|
47
49
|
:'prepend_filename_to_chunks' => :'prepend_filename_to_chunks',
|
48
50
|
:'max_items_per_chunk' => :'max_items_per_chunk',
|
49
51
|
:'set_page_as_boundary' => :'set_page_as_boundary',
|
50
|
-
:'data_source_id' => :'data_source_id'
|
52
|
+
:'data_source_id' => :'data_source_id',
|
53
|
+
:'request_id' => :'request_id'
|
51
54
|
}
|
52
55
|
end
|
53
56
|
|
@@ -69,7 +72,8 @@ module Carbon
|
|
69
72
|
:'prepend_filename_to_chunks' => :'Boolean',
|
70
73
|
:'max_items_per_chunk' => :'Integer',
|
71
74
|
:'set_page_as_boundary' => :'Boolean',
|
72
|
-
:'data_source_id' => :'Integer'
|
75
|
+
:'data_source_id' => :'Integer',
|
76
|
+
:'request_id' => :'String'
|
73
77
|
}
|
74
78
|
end
|
75
79
|
|
@@ -83,7 +87,8 @@ module Carbon
|
|
83
87
|
:'generate_sparse_vectors',
|
84
88
|
:'prepend_filename_to_chunks',
|
85
89
|
:'max_items_per_chunk',
|
86
|
-
:'data_source_id'
|
90
|
+
:'data_source_id',
|
91
|
+
:'request_id'
|
87
92
|
])
|
88
93
|
end
|
89
94
|
|
@@ -161,6 +166,10 @@ module Carbon
|
|
161
166
|
if attributes.key?(:'data_source_id')
|
162
167
|
self.data_source_id = attributes[:'data_source_id']
|
163
168
|
end
|
169
|
+
|
170
|
+
if attributes.key?(:'request_id')
|
171
|
+
self.request_id = attributes[:'request_id']
|
172
|
+
end
|
164
173
|
end
|
165
174
|
|
166
175
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -196,7 +205,8 @@ module Carbon
|
|
196
205
|
prepend_filename_to_chunks == o.prepend_filename_to_chunks &&
|
197
206
|
max_items_per_chunk == o.max_items_per_chunk &&
|
198
207
|
set_page_as_boundary == o.set_page_as_boundary &&
|
199
|
-
data_source_id == o.data_source_id
|
208
|
+
data_source_id == o.data_source_id &&
|
209
|
+
request_id == o.request_id
|
200
210
|
end
|
201
211
|
|
202
212
|
# @see the `==` method
|
@@ -208,7 +218,7 @@ module Carbon
|
|
208
218
|
# Calculates hash code according to all attributes.
|
209
219
|
# @return [Integer] Hash code
|
210
220
|
def hash
|
211
|
-
[tags, ids, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, set_page_as_boundary, data_source_id].hash
|
221
|
+
[tags, ids, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, set_page_as_boundary, data_source_id, request_id].hash
|
212
222
|
end
|
213
223
|
|
214
224
|
# Builds the object from hash
|
@@ -34,6 +34,8 @@ module Carbon
|
|
34
34
|
|
35
35
|
attr_accessor :set_page_as_boundary
|
36
36
|
|
37
|
+
attr_accessor :request_id
|
38
|
+
|
37
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
38
40
|
def self.attribute_map
|
39
41
|
{
|
@@ -47,7 +49,8 @@ module Carbon
|
|
47
49
|
:'generate_sparse_vectors' => :'generate_sparse_vectors',
|
48
50
|
:'prepend_filename_to_chunks' => :'prepend_filename_to_chunks',
|
49
51
|
:'max_items_per_chunk' => :'max_items_per_chunk',
|
50
|
-
:'set_page_as_boundary' => :'set_page_as_boundary'
|
52
|
+
:'set_page_as_boundary' => :'set_page_as_boundary',
|
53
|
+
:'request_id' => :'request_id'
|
51
54
|
}
|
52
55
|
end
|
53
56
|
|
@@ -69,7 +72,8 @@ module Carbon
|
|
69
72
|
:'generate_sparse_vectors' => :'Boolean',
|
70
73
|
:'prepend_filename_to_chunks' => :'Boolean',
|
71
74
|
:'max_items_per_chunk' => :'Integer',
|
72
|
-
:'set_page_as_boundary' => :'Boolean'
|
75
|
+
:'set_page_as_boundary' => :'Boolean',
|
76
|
+
:'request_id' => :'String'
|
73
77
|
}
|
74
78
|
end
|
75
79
|
|
@@ -84,6 +88,7 @@ module Carbon
|
|
84
88
|
:'generate_sparse_vectors',
|
85
89
|
:'prepend_filename_to_chunks',
|
86
90
|
:'max_items_per_chunk',
|
91
|
+
:'request_id'
|
87
92
|
])
|
88
93
|
end
|
89
94
|
|
@@ -159,6 +164,10 @@ module Carbon
|
|
159
164
|
else
|
160
165
|
self.set_page_as_boundary = false
|
161
166
|
end
|
167
|
+
|
168
|
+
if attributes.key?(:'request_id')
|
169
|
+
self.request_id = attributes[:'request_id']
|
170
|
+
end
|
162
171
|
end
|
163
172
|
|
164
173
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -199,7 +208,8 @@ module Carbon
|
|
199
208
|
generate_sparse_vectors == o.generate_sparse_vectors &&
|
200
209
|
prepend_filename_to_chunks == o.prepend_filename_to_chunks &&
|
201
210
|
max_items_per_chunk == o.max_items_per_chunk &&
|
202
|
-
set_page_as_boundary == o.set_page_as_boundary
|
211
|
+
set_page_as_boundary == o.set_page_as_boundary &&
|
212
|
+
request_id == o.request_id
|
203
213
|
end
|
204
214
|
|
205
215
|
# @see the `==` method
|
@@ -211,7 +221,7 @@ module Carbon
|
|
211
221
|
# Calculates hash code according to all attributes.
|
212
222
|
# @return [Integer] Hash code
|
213
223
|
def hash
|
214
|
-
[tags, data_source_id, ids, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, set_page_as_boundary].hash
|
224
|
+
[tags, data_source_id, ids, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, set_page_as_boundary, request_id].hash
|
215
225
|
end
|
216
226
|
|
217
227
|
# Builds the object from hash
|