carbon_ruby_sdk 0.1.12 → 0.1.14
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 +43 -2
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +92 -20
- data/lib/carbon_ruby_sdk/models/document_response.rb +15 -5
- data/lib/carbon_ruby_sdk/models/embedding_and_chunk.rb +15 -5
- 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/o_auth_url_request.rb +41 -5
- data/lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb +11 -1
- 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 +39 -5
- data/lib/carbon_ruby_sdk/models/sync_files_request.rb +38 -4
- data/lib/carbon_ruby_sdk/models/user_file.rb +11 -1
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/spec/models/document_response_spec.rb +6 -0
- data/spec/models/embedding_and_chunk_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/o_auth_url_request_spec.rb +18 -0
- data/spec/models/organization_user_data_source_api_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 +18 -0
- data/spec/models/sync_files_request_spec.rb +18 -0
- data/spec/models/user_file_spec.rb +6 -0
- metadata +3 -3
@@ -31,6 +31,8 @@ module Carbon
|
|
31
31
|
|
32
32
|
attr_accessor :sync_files_on_connection
|
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
|
-
:'sync_files_on_connection' => :'sync_files_on_connection'
|
48
|
+
:'sync_files_on_connection' => :'sync_files_on_connection',
|
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
|
-
:'sync_files_on_connection' => :'Boolean'
|
70
|
+
:'sync_files_on_connection' => :'Boolean',
|
71
|
+
:'request_id' => :'String'
|
68
72
|
}
|
69
73
|
end
|
70
74
|
|
@@ -77,7 +81,8 @@ module Carbon
|
|
77
81
|
:'skip_embedding_generation',
|
78
82
|
:'generate_sparse_vectors',
|
79
83
|
:'prepend_filename_to_chunks',
|
80
|
-
:'sync_files_on_connection'
|
84
|
+
:'sync_files_on_connection',
|
85
|
+
:'request_id'
|
81
86
|
])
|
82
87
|
end
|
83
88
|
|
@@ -149,6 +154,10 @@ module Carbon
|
|
149
154
|
else
|
150
155
|
self.sync_files_on_connection = true
|
151
156
|
end
|
157
|
+
|
158
|
+
if attributes.key?(:'request_id')
|
159
|
+
self.request_id = attributes[:'request_id']
|
160
|
+
end
|
152
161
|
end
|
153
162
|
|
154
163
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -188,7 +197,8 @@ module Carbon
|
|
188
197
|
embedding_model == o.embedding_model &&
|
189
198
|
generate_sparse_vectors == o.generate_sparse_vectors &&
|
190
199
|
prepend_filename_to_chunks == o.prepend_filename_to_chunks &&
|
191
|
-
sync_files_on_connection == o.sync_files_on_connection
|
200
|
+
sync_files_on_connection == o.sync_files_on_connection &&
|
201
|
+
request_id == o.request_id
|
192
202
|
end
|
193
203
|
|
194
204
|
# @see the `==` method
|
@@ -200,7 +210,7 @@ module Carbon
|
|
200
210
|
# Calculates hash code according to all attributes.
|
201
211
|
# @return [Integer] Hash code
|
202
212
|
def hash
|
203
|
-
[tags, organization, access_token, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, sync_files_on_connection].hash
|
213
|
+
[tags, organization, access_token, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, sync_files_on_connection, request_id].hash
|
204
214
|
end
|
205
215
|
|
206
216
|
# Builds the object from hash
|
@@ -29,6 +29,8 @@ module Carbon
|
|
29
29
|
|
30
30
|
attr_accessor :prepend_filename_to_chunks
|
31
31
|
|
32
|
+
attr_accessor :request_id
|
33
|
+
|
32
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
35
|
def self.attribute_map
|
34
36
|
{
|
@@ -40,7 +42,8 @@ module Carbon
|
|
40
42
|
:'skip_embedding_generation' => :'skip_embedding_generation',
|
41
43
|
:'embedding_model' => :'embedding_model',
|
42
44
|
:'generate_sparse_vectors' => :'generate_sparse_vectors',
|
43
|
-
:'prepend_filename_to_chunks' => :'prepend_filename_to_chunks'
|
45
|
+
:'prepend_filename_to_chunks' => :'prepend_filename_to_chunks',
|
46
|
+
:'request_id' => :'request_id'
|
44
47
|
}
|
45
48
|
end
|
46
49
|
|
@@ -60,7 +63,8 @@ module Carbon
|
|
60
63
|
:'skip_embedding_generation' => :'Boolean',
|
61
64
|
:'embedding_model' => :'EmbeddingGenerators',
|
62
65
|
:'generate_sparse_vectors' => :'Boolean',
|
63
|
-
:'prepend_filename_to_chunks' => :'Boolean'
|
66
|
+
:'prepend_filename_to_chunks' => :'Boolean',
|
67
|
+
:'request_id' => :'String'
|
64
68
|
}
|
65
69
|
end
|
66
70
|
|
@@ -72,7 +76,8 @@ module Carbon
|
|
72
76
|
:'chunk_overlap',
|
73
77
|
:'skip_embedding_generation',
|
74
78
|
:'generate_sparse_vectors',
|
75
|
-
:'prepend_filename_to_chunks'
|
79
|
+
:'prepend_filename_to_chunks',
|
80
|
+
:'request_id'
|
76
81
|
])
|
77
82
|
end
|
78
83
|
|
@@ -140,6 +145,10 @@ module Carbon
|
|
140
145
|
else
|
141
146
|
self.prepend_filename_to_chunks = false
|
142
147
|
end
|
148
|
+
|
149
|
+
if attributes.key?(:'request_id')
|
150
|
+
self.request_id = attributes[:'request_id']
|
151
|
+
end
|
143
152
|
end
|
144
153
|
|
145
154
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -197,7 +206,8 @@ module Carbon
|
|
197
206
|
skip_embedding_generation == o.skip_embedding_generation &&
|
198
207
|
embedding_model == o.embedding_model &&
|
199
208
|
generate_sparse_vectors == o.generate_sparse_vectors &&
|
200
|
-
prepend_filename_to_chunks == o.prepend_filename_to_chunks
|
209
|
+
prepend_filename_to_chunks == o.prepend_filename_to_chunks &&
|
210
|
+
request_id == o.request_id
|
201
211
|
end
|
202
212
|
|
203
213
|
# @see the `==` method
|
@@ -209,7 +219,7 @@ module Carbon
|
|
209
219
|
# Calculates hash code according to all attributes.
|
210
220
|
# @return [Integer] Hash code
|
211
221
|
def hash
|
212
|
-
[tags, space_ids, data_source_id, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks].hash
|
222
|
+
[tags, space_ids, data_source_id, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, request_id].hash
|
213
223
|
end
|
214
224
|
|
215
225
|
# Builds the object from hash
|
@@ -29,6 +29,8 @@ module Carbon
|
|
29
29
|
|
30
30
|
attr_accessor :data_source_id
|
31
31
|
|
32
|
+
attr_accessor :request_id
|
33
|
+
|
32
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
35
|
def self.attribute_map
|
34
36
|
{
|
@@ -40,7 +42,8 @@ module Carbon
|
|
40
42
|
:'embedding_model' => :'embedding_model',
|
41
43
|
:'generate_sparse_vectors' => :'generate_sparse_vectors',
|
42
44
|
:'prepend_filename_to_chunks' => :'prepend_filename_to_chunks',
|
43
|
-
:'data_source_id' => :'data_source_id'
|
45
|
+
:'data_source_id' => :'data_source_id',
|
46
|
+
:'request_id' => :'request_id'
|
44
47
|
}
|
45
48
|
end
|
46
49
|
|
@@ -60,7 +63,8 @@ module Carbon
|
|
60
63
|
:'embedding_model' => :'EmbeddingGenerators',
|
61
64
|
:'generate_sparse_vectors' => :'Boolean',
|
62
65
|
:'prepend_filename_to_chunks' => :'Boolean',
|
63
|
-
:'data_source_id' => :'Integer'
|
66
|
+
:'data_source_id' => :'Integer',
|
67
|
+
:'request_id' => :'String'
|
64
68
|
}
|
65
69
|
end
|
66
70
|
|
@@ -73,7 +77,8 @@ module Carbon
|
|
73
77
|
:'skip_embedding_generation',
|
74
78
|
:'generate_sparse_vectors',
|
75
79
|
:'prepend_filename_to_chunks',
|
76
|
-
:'data_source_id'
|
80
|
+
:'data_source_id',
|
81
|
+
:'request_id'
|
77
82
|
])
|
78
83
|
end
|
79
84
|
|
@@ -139,6 +144,10 @@ module Carbon
|
|
139
144
|
if attributes.key?(:'data_source_id')
|
140
145
|
self.data_source_id = attributes[:'data_source_id']
|
141
146
|
end
|
147
|
+
|
148
|
+
if attributes.key?(:'request_id')
|
149
|
+
self.request_id = attributes[:'request_id']
|
150
|
+
end
|
142
151
|
end
|
143
152
|
|
144
153
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -172,7 +181,8 @@ module Carbon
|
|
172
181
|
embedding_model == o.embedding_model &&
|
173
182
|
generate_sparse_vectors == o.generate_sparse_vectors &&
|
174
183
|
prepend_filename_to_chunks == o.prepend_filename_to_chunks &&
|
175
|
-
data_source_id == o.data_source_id
|
184
|
+
data_source_id == o.data_source_id &&
|
185
|
+
request_id == o.request_id
|
176
186
|
end
|
177
187
|
|
178
188
|
# @see the `==` method
|
@@ -184,7 +194,7 @@ module Carbon
|
|
184
194
|
# Calculates hash code according to all attributes.
|
185
195
|
# @return [Integer] Hash code
|
186
196
|
def hash
|
187
|
-
[tags, filters, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, data_source_id].hash
|
197
|
+
[tags, filters, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, data_source_id, request_id].hash
|
188
198
|
end
|
189
199
|
|
190
200
|
# Builds the object from hash
|
@@ -53,6 +53,14 @@ 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
|
+
|
59
|
+
# Enable OCR for files that support it. Supported formats: pdf
|
60
|
+
attr_accessor :use_ocr
|
61
|
+
|
62
|
+
attr_accessor :parse_pdf_tables_with_ocr
|
63
|
+
|
56
64
|
# Attribute mapping from ruby-style variable name to JSON key.
|
57
65
|
def self.attribute_map
|
58
66
|
{
|
@@ -74,7 +82,10 @@ module Carbon
|
|
74
82
|
:'sync_files_on_connection' => :'sync_files_on_connection',
|
75
83
|
:'set_page_as_boundary' => :'set_page_as_boundary',
|
76
84
|
:'data_source_id' => :'data_source_id',
|
77
|
-
:'connecting_new_account' => :'connecting_new_account'
|
85
|
+
:'connecting_new_account' => :'connecting_new_account',
|
86
|
+
:'request_id' => :'request_id',
|
87
|
+
:'use_ocr' => :'use_ocr',
|
88
|
+
:'parse_pdf_tables_with_ocr' => :'parse_pdf_tables_with_ocr'
|
78
89
|
}
|
79
90
|
end
|
80
91
|
|
@@ -104,7 +115,10 @@ module Carbon
|
|
104
115
|
:'sync_files_on_connection' => :'Boolean',
|
105
116
|
:'set_page_as_boundary' => :'Boolean',
|
106
117
|
:'data_source_id' => :'Integer',
|
107
|
-
:'connecting_new_account' => :'Boolean'
|
118
|
+
:'connecting_new_account' => :'Boolean',
|
119
|
+
:'request_id' => :'String',
|
120
|
+
:'use_ocr' => :'Boolean',
|
121
|
+
:'parse_pdf_tables_with_ocr' => :'Boolean'
|
108
122
|
}
|
109
123
|
end
|
110
124
|
|
@@ -127,7 +141,10 @@ module Carbon
|
|
127
141
|
:'salesforce_domain',
|
128
142
|
:'sync_files_on_connection',
|
129
143
|
:'data_source_id',
|
130
|
-
:'connecting_new_account'
|
144
|
+
:'connecting_new_account',
|
145
|
+
:'request_id',
|
146
|
+
:'use_ocr',
|
147
|
+
:'parse_pdf_tables_with_ocr'
|
131
148
|
])
|
132
149
|
end
|
133
150
|
|
@@ -239,6 +256,22 @@ module Carbon
|
|
239
256
|
else
|
240
257
|
self.connecting_new_account = false
|
241
258
|
end
|
259
|
+
|
260
|
+
if attributes.key?(:'request_id')
|
261
|
+
self.request_id = attributes[:'request_id']
|
262
|
+
end
|
263
|
+
|
264
|
+
if attributes.key?(:'use_ocr')
|
265
|
+
self.use_ocr = attributes[:'use_ocr']
|
266
|
+
else
|
267
|
+
self.use_ocr = false
|
268
|
+
end
|
269
|
+
|
270
|
+
if attributes.key?(:'parse_pdf_tables_with_ocr')
|
271
|
+
self.parse_pdf_tables_with_ocr = attributes[:'parse_pdf_tables_with_ocr']
|
272
|
+
else
|
273
|
+
self.parse_pdf_tables_with_ocr = false
|
274
|
+
end
|
242
275
|
end
|
243
276
|
|
244
277
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -282,7 +315,10 @@ module Carbon
|
|
282
315
|
sync_files_on_connection == o.sync_files_on_connection &&
|
283
316
|
set_page_as_boundary == o.set_page_as_boundary &&
|
284
317
|
data_source_id == o.data_source_id &&
|
285
|
-
connecting_new_account == o.connecting_new_account
|
318
|
+
connecting_new_account == o.connecting_new_account &&
|
319
|
+
request_id == o.request_id &&
|
320
|
+
use_ocr == o.use_ocr &&
|
321
|
+
parse_pdf_tables_with_ocr == o.parse_pdf_tables_with_ocr
|
286
322
|
end
|
287
323
|
|
288
324
|
# @see the `==` method
|
@@ -294,7 +330,7 @@ module Carbon
|
|
294
330
|
# Calculates hash code according to all attributes.
|
295
331
|
# @return [Integer] Hash code
|
296
332
|
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
|
333
|
+
[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, use_ocr, parse_pdf_tables_with_ocr].hash
|
298
334
|
end
|
299
335
|
|
300
336
|
# Builds the object from hash
|
@@ -35,6 +35,8 @@ module Carbon
|
|
35
35
|
|
36
36
|
attr_accessor :last_sync_action
|
37
37
|
|
38
|
+
attr_accessor :enable_auto_sync
|
39
|
+
|
38
40
|
attr_accessor :created_at
|
39
41
|
|
40
42
|
attr_accessor :updated_at
|
@@ -54,6 +56,7 @@ module Carbon
|
|
54
56
|
:'revoked_access' => :'revoked_access',
|
55
57
|
:'last_synced_at' => :'last_synced_at',
|
56
58
|
:'last_sync_action' => :'last_sync_action',
|
59
|
+
:'enable_auto_sync' => :'enable_auto_sync',
|
57
60
|
:'created_at' => :'created_at',
|
58
61
|
:'updated_at' => :'updated_at'
|
59
62
|
}
|
@@ -79,6 +82,7 @@ module Carbon
|
|
79
82
|
:'revoked_access' => :'Boolean',
|
80
83
|
:'last_synced_at' => :'Time',
|
81
84
|
:'last_sync_action' => :'DataSourceLastSyncActions',
|
85
|
+
:'enable_auto_sync' => :'Boolean',
|
82
86
|
:'created_at' => :'Time',
|
83
87
|
:'updated_at' => :'Time'
|
84
88
|
}
|
@@ -90,6 +94,7 @@ module Carbon
|
|
90
94
|
:'data_source_external_id',
|
91
95
|
:'token',
|
92
96
|
:'source_items_synced_at',
|
97
|
+
:'enable_auto_sync',
|
93
98
|
])
|
94
99
|
end
|
95
100
|
|
@@ -156,6 +161,10 @@ module Carbon
|
|
156
161
|
self.last_sync_action = attributes[:'last_sync_action']
|
157
162
|
end
|
158
163
|
|
164
|
+
if attributes.key?(:'enable_auto_sync')
|
165
|
+
self.enable_auto_sync = attributes[:'enable_auto_sync']
|
166
|
+
end
|
167
|
+
|
159
168
|
if attributes.key?(:'created_at')
|
160
169
|
self.created_at = attributes[:'created_at']
|
161
170
|
end
|
@@ -250,6 +259,7 @@ module Carbon
|
|
250
259
|
revoked_access == o.revoked_access &&
|
251
260
|
last_synced_at == o.last_synced_at &&
|
252
261
|
last_sync_action == o.last_sync_action &&
|
262
|
+
enable_auto_sync == o.enable_auto_sync &&
|
253
263
|
created_at == o.created_at &&
|
254
264
|
updated_at == o.updated_at
|
255
265
|
end
|
@@ -263,7 +273,7 @@ module Carbon
|
|
263
273
|
# Calculates hash code according to all attributes.
|
264
274
|
# @return [Integer] Hash code
|
265
275
|
def hash
|
266
|
-
[id, data_source_external_id, data_source_type, token, sync_status, source_items_synced_at, organization_user_id, organization_id, organization_supplied_user_id, revoked_access, last_synced_at, last_sync_action, created_at, updated_at].hash
|
276
|
+
[id, data_source_external_id, data_source_type, token, sync_status, source_items_synced_at, organization_user_id, organization_id, organization_supplied_user_id, revoked_access, last_synced_at, last_sync_action, enable_auto_sync, created_at, updated_at].hash
|
267
277
|
end
|
268
278
|
|
269
279
|
# 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,12 @@ module Carbon
|
|
34
34
|
|
35
35
|
attr_accessor :data_source_id
|
36
36
|
|
37
|
+
attr_accessor :request_id
|
38
|
+
|
39
|
+
attr_accessor :use_ocr
|
40
|
+
|
41
|
+
attr_accessor :parse_pdf_tables_with_ocr
|
42
|
+
|
37
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
38
44
|
def self.attribute_map
|
39
45
|
{
|
@@ -47,7 +53,10 @@ module Carbon
|
|
47
53
|
:'prepend_filename_to_chunks' => :'prepend_filename_to_chunks',
|
48
54
|
:'max_items_per_chunk' => :'max_items_per_chunk',
|
49
55
|
:'set_page_as_boundary' => :'set_page_as_boundary',
|
50
|
-
:'data_source_id' => :'data_source_id'
|
56
|
+
:'data_source_id' => :'data_source_id',
|
57
|
+
:'request_id' => :'request_id',
|
58
|
+
:'use_ocr' => :'use_ocr',
|
59
|
+
:'parse_pdf_tables_with_ocr' => :'parse_pdf_tables_with_ocr'
|
51
60
|
}
|
52
61
|
end
|
53
62
|
|
@@ -69,7 +78,10 @@ module Carbon
|
|
69
78
|
:'prepend_filename_to_chunks' => :'Boolean',
|
70
79
|
:'max_items_per_chunk' => :'Integer',
|
71
80
|
:'set_page_as_boundary' => :'Boolean',
|
72
|
-
:'data_source_id' => :'Integer'
|
81
|
+
:'data_source_id' => :'Integer',
|
82
|
+
:'request_id' => :'String',
|
83
|
+
:'use_ocr' => :'Boolean',
|
84
|
+
:'parse_pdf_tables_with_ocr' => :'Boolean'
|
73
85
|
}
|
74
86
|
end
|
75
87
|
|
@@ -83,7 +95,10 @@ module Carbon
|
|
83
95
|
:'generate_sparse_vectors',
|
84
96
|
:'prepend_filename_to_chunks',
|
85
97
|
:'max_items_per_chunk',
|
86
|
-
:'data_source_id'
|
98
|
+
:'data_source_id',
|
99
|
+
:'request_id',
|
100
|
+
:'use_ocr',
|
101
|
+
:'parse_pdf_tables_with_ocr'
|
87
102
|
])
|
88
103
|
end
|
89
104
|
|
@@ -161,6 +176,22 @@ module Carbon
|
|
161
176
|
if attributes.key?(:'data_source_id')
|
162
177
|
self.data_source_id = attributes[:'data_source_id']
|
163
178
|
end
|
179
|
+
|
180
|
+
if attributes.key?(:'request_id')
|
181
|
+
self.request_id = attributes[:'request_id']
|
182
|
+
end
|
183
|
+
|
184
|
+
if attributes.key?(:'use_ocr')
|
185
|
+
self.use_ocr = attributes[:'use_ocr']
|
186
|
+
else
|
187
|
+
self.use_ocr = false
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes.key?(:'parse_pdf_tables_with_ocr')
|
191
|
+
self.parse_pdf_tables_with_ocr = attributes[:'parse_pdf_tables_with_ocr']
|
192
|
+
else
|
193
|
+
self.parse_pdf_tables_with_ocr = false
|
194
|
+
end
|
164
195
|
end
|
165
196
|
|
166
197
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -196,7 +227,10 @@ module Carbon
|
|
196
227
|
prepend_filename_to_chunks == o.prepend_filename_to_chunks &&
|
197
228
|
max_items_per_chunk == o.max_items_per_chunk &&
|
198
229
|
set_page_as_boundary == o.set_page_as_boundary &&
|
199
|
-
data_source_id == o.data_source_id
|
230
|
+
data_source_id == o.data_source_id &&
|
231
|
+
request_id == o.request_id &&
|
232
|
+
use_ocr == o.use_ocr &&
|
233
|
+
parse_pdf_tables_with_ocr == o.parse_pdf_tables_with_ocr
|
200
234
|
end
|
201
235
|
|
202
236
|
# @see the `==` method
|
@@ -208,7 +242,7 @@ module Carbon
|
|
208
242
|
# Calculates hash code according to all attributes.
|
209
243
|
# @return [Integer] Hash code
|
210
244
|
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
|
245
|
+
[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, use_ocr, parse_pdf_tables_with_ocr].hash
|
212
246
|
end
|
213
247
|
|
214
248
|
# Builds the object from hash
|