carbon_ruby_sdk 0.2.20 → 0.2.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/README.md +107 -2
- data/lib/carbon_ruby_sdk/api/embeddings_api.rb +6 -2
- data/lib/carbon_ruby_sdk/api/files_api.rb +231 -6
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +6 -2
- data/lib/carbon_ruby_sdk/models/cold_storage_props.rb +229 -0
- data/lib/carbon_ruby_sdk/models/embedding_storage_status.rb +38 -0
- data/lib/carbon_ruby_sdk/models/file_sync_config.rb +13 -1
- data/lib/carbon_ruby_sdk/models/file_sync_config_nullable.rb +13 -1
- data/lib/carbon_ruby_sdk/models/get_embedding_documents_body.rb +17 -5
- data/lib/carbon_ruby_sdk/models/modify_cold_storage_parameters_query_input.rb +235 -0
- data/lib/carbon_ruby_sdk/models/move_to_hot_storage_query_input.rb +215 -0
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +16 -5
- data/lib/carbon_ruby_sdk/models/raw_text_input.rb +14 -5
- data/lib/carbon_ruby_sdk/models/sent_webhook_payload.rb +2 -2
- data/lib/carbon_ruby_sdk/models/sync_options.rb +16 -5
- data/lib/carbon_ruby_sdk/models/upload_file_from_url_input.rb +24 -4
- data/lib/carbon_ruby_sdk/models/user_file.rb +39 -1
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +4 -0
- data/spec/api/files_api_spec.rb +25 -0
- data/spec/models/cold_storage_props_spec.rb +34 -0
- data/spec/models/embedding_storage_status_spec.rb +22 -0
- data/spec/models/file_sync_config_nullable_spec.rb +6 -0
- data/spec/models/file_sync_config_spec.rb +6 -0
- data/spec/models/get_embedding_documents_body_spec.rb +6 -0
- data/spec/models/modify_cold_storage_parameters_query_input_spec.rb +40 -0
- data/spec/models/move_to_hot_storage_query_input_spec.rb +28 -0
- data/spec/models/o_auth_url_request_spec.rb +6 -0
- data/spec/models/raw_text_input_spec.rb +6 -0
- data/spec/models/sent_webhook_payload_spec.rb +1 -1
- data/spec/models/sync_options_spec.rb +6 -0
- data/spec/models/upload_file_from_url_input_spec.rb +12 -0
- data/spec/models/user_file_spec.rb +18 -0
- metadata +14 -2
@@ -72,6 +72,9 @@ module Carbon
|
|
72
72
|
|
73
73
|
attr_accessor :file_sync_config
|
74
74
|
|
75
|
+
# Automatically open source file picker after the OAuth flow is complete. This flag is currently supported by BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT. It will be ignored for other data sources.
|
76
|
+
attr_accessor :automatically_open_file_picker
|
77
|
+
|
75
78
|
# Attribute mapping from ruby-style variable name to JSON key.
|
76
79
|
def self.attribute_map
|
77
80
|
{
|
@@ -100,7 +103,8 @@ module Carbon
|
|
100
103
|
:'enable_file_picker' => :'enable_file_picker',
|
101
104
|
:'sync_source_items' => :'sync_source_items',
|
102
105
|
:'incremental_sync' => :'incremental_sync',
|
103
|
-
:'file_sync_config' => :'file_sync_config'
|
106
|
+
:'file_sync_config' => :'file_sync_config',
|
107
|
+
:'automatically_open_file_picker' => :'automatically_open_file_picker'
|
104
108
|
}
|
105
109
|
end
|
106
110
|
|
@@ -137,7 +141,8 @@ module Carbon
|
|
137
141
|
:'enable_file_picker' => :'Boolean',
|
138
142
|
:'sync_source_items' => :'Boolean',
|
139
143
|
:'incremental_sync' => :'Boolean',
|
140
|
-
:'file_sync_config' => :'FileSyncConfigNullable'
|
144
|
+
:'file_sync_config' => :'FileSyncConfigNullable',
|
145
|
+
:'automatically_open_file_picker' => :'Boolean'
|
141
146
|
}
|
142
147
|
end
|
143
148
|
|
@@ -164,7 +169,8 @@ module Carbon
|
|
164
169
|
:'request_id',
|
165
170
|
:'use_ocr',
|
166
171
|
:'parse_pdf_tables_with_ocr',
|
167
|
-
:'file_sync_config'
|
172
|
+
:'file_sync_config',
|
173
|
+
:'automatically_open_file_picker'
|
168
174
|
])
|
169
175
|
end
|
170
176
|
|
@@ -314,6 +320,10 @@ module Carbon
|
|
314
320
|
if attributes.key?(:'file_sync_config')
|
315
321
|
self.file_sync_config = attributes[:'file_sync_config']
|
316
322
|
end
|
323
|
+
|
324
|
+
if attributes.key?(:'automatically_open_file_picker')
|
325
|
+
self.automatically_open_file_picker = attributes[:'automatically_open_file_picker']
|
326
|
+
end
|
317
327
|
end
|
318
328
|
|
319
329
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -364,7 +374,8 @@ module Carbon
|
|
364
374
|
enable_file_picker == o.enable_file_picker &&
|
365
375
|
sync_source_items == o.sync_source_items &&
|
366
376
|
incremental_sync == o.incremental_sync &&
|
367
|
-
file_sync_config == o.file_sync_config
|
377
|
+
file_sync_config == o.file_sync_config &&
|
378
|
+
automatically_open_file_picker == o.automatically_open_file_picker
|
368
379
|
end
|
369
380
|
|
370
381
|
# @see the `==` method
|
@@ -376,7 +387,7 @@ module Carbon
|
|
376
387
|
# Calculates hash code according to all attributes.
|
377
388
|
# @return [Integer] Hash code
|
378
389
|
def hash
|
379
|
-
[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, enable_file_picker, sync_source_items, incremental_sync, file_sync_config].hash
|
390
|
+
[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, enable_file_picker, sync_source_items, incremental_sync, file_sync_config, automatically_open_file_picker].hash
|
380
391
|
end
|
381
392
|
|
382
393
|
# Builds the object from hash
|
@@ -27,6 +27,8 @@ module Carbon
|
|
27
27
|
|
28
28
|
attr_accessor :generate_sparse_vectors
|
29
29
|
|
30
|
+
attr_accessor :cold_storage_params
|
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
|
:'overwrite_file_id' => :'overwrite_file_id',
|
39
41
|
:'embedding_model' => :'embedding_model',
|
40
|
-
:'generate_sparse_vectors' => :'generate_sparse_vectors'
|
42
|
+
:'generate_sparse_vectors' => :'generate_sparse_vectors',
|
43
|
+
:'cold_storage_params' => :'cold_storage_params'
|
41
44
|
}
|
42
45
|
end
|
43
46
|
|
@@ -56,7 +59,8 @@ module Carbon
|
|
56
59
|
:'skip_embedding_generation' => :'Boolean',
|
57
60
|
:'overwrite_file_id' => :'Integer',
|
58
61
|
:'embedding_model' => :'EmbeddingGeneratorsNullable',
|
59
|
-
:'generate_sparse_vectors' => :'Boolean'
|
62
|
+
:'generate_sparse_vectors' => :'Boolean',
|
63
|
+
:'cold_storage_params' => :'ColdStorageProps'
|
60
64
|
}
|
61
65
|
end
|
62
66
|
|
@@ -68,7 +72,7 @@ module Carbon
|
|
68
72
|
:'chunk_overlap',
|
69
73
|
:'overwrite_file_id',
|
70
74
|
:'embedding_model',
|
71
|
-
:'generate_sparse_vectors'
|
75
|
+
:'generate_sparse_vectors',
|
72
76
|
])
|
73
77
|
end
|
74
78
|
|
@@ -124,6 +128,10 @@ module Carbon
|
|
124
128
|
else
|
125
129
|
self.generate_sparse_vectors = false
|
126
130
|
end
|
131
|
+
|
132
|
+
if attributes.key?(:'cold_storage_params')
|
133
|
+
self.cold_storage_params = attributes[:'cold_storage_params']
|
134
|
+
end
|
127
135
|
end
|
128
136
|
|
129
137
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -175,7 +183,8 @@ module Carbon
|
|
175
183
|
skip_embedding_generation == o.skip_embedding_generation &&
|
176
184
|
overwrite_file_id == o.overwrite_file_id &&
|
177
185
|
embedding_model == o.embedding_model &&
|
178
|
-
generate_sparse_vectors == o.generate_sparse_vectors
|
186
|
+
generate_sparse_vectors == o.generate_sparse_vectors &&
|
187
|
+
cold_storage_params == o.cold_storage_params
|
179
188
|
end
|
180
189
|
|
181
190
|
# @see the `==` method
|
@@ -187,7 +196,7 @@ module Carbon
|
|
187
196
|
# Calculates hash code according to all attributes.
|
188
197
|
# @return [Integer] Hash code
|
189
198
|
def hash
|
190
|
-
[contents, name, chunk_size, chunk_overlap, skip_embedding_generation, overwrite_file_id, embedding_model, generate_sparse_vectors].hash
|
199
|
+
[contents, name, chunk_size, chunk_overlap, skip_embedding_generation, overwrite_file_id, embedding_model, generate_sparse_vectors, cold_storage_params].hash
|
191
200
|
end
|
192
201
|
|
193
202
|
# Builds the object from hash
|
@@ -114,7 +114,7 @@ module Carbon
|
|
114
114
|
# Check to see if the all the properties in the model are valid
|
115
115
|
# @return true if the model is valid
|
116
116
|
def valid?
|
117
|
-
webhook_type_validator = EnumAttributeValidator.new('String', ["ADD", "ALL_UPLOADED_FILES_QUEUED", "CANCEL", "CHECKUP", "DATA_SOURCE_READY", "FILES_CREATED", "FILES_SKIPPED", "FILE_DELETED", "FILE_ERROR", "FILE_READY", "FILE_STATISTICS_AGGREGATED", "FILE_SYNC_LIMIT_REACHED", "ORGANIZATION_USER_DELETED", "RATE_LIMIT_ERROR", "REVOKE", "SPARSE_VECTOR_QUEUE_STATUS", "UPDATE", "WEBPAGE_ERROR", "WEBPAGE_READY", "WEBSCRAPE_URLS_READY"])
|
117
|
+
webhook_type_validator = EnumAttributeValidator.new('String', ["ADD", "ALL_UPLOADED_FILES_QUEUED", "CANCEL", "CHECKUP", "DATA_SOURCE_READY", "EMBEDDING_STORAGE_MODIFIED", "FILES_CREATED", "FILES_SKIPPED", "FILE_DELETED", "FILE_ERROR", "FILE_READY", "FILE_STATISTICS_AGGREGATED", "FILE_SYNC_LIMIT_REACHED", "MOVED_TO_COLD_STORAGE", "MOVED_TO_HOT_STORAGE", "ORGANIZATION_USER_DELETED", "RATE_LIMIT_ERROR", "REVOKE", "SPARSE_VECTOR_QUEUE_STATUS", "UPDATE", "WEBPAGE_ERROR", "WEBPAGE_READY", "WEBSCRAPE_URLS_READY"])
|
118
118
|
return false unless webhook_type_validator.valid?(@webhook_type)
|
119
119
|
true
|
120
120
|
end
|
@@ -122,7 +122,7 @@ module Carbon
|
|
122
122
|
# Custom attribute writer method checking allowed values (enum).
|
123
123
|
# @param [Object] webhook_type Object to be assigned
|
124
124
|
def webhook_type=(webhook_type)
|
125
|
-
validator = EnumAttributeValidator.new('String', ["ADD", "ALL_UPLOADED_FILES_QUEUED", "CANCEL", "CHECKUP", "DATA_SOURCE_READY", "FILES_CREATED", "FILES_SKIPPED", "FILE_DELETED", "FILE_ERROR", "FILE_READY", "FILE_STATISTICS_AGGREGATED", "FILE_SYNC_LIMIT_REACHED", "ORGANIZATION_USER_DELETED", "RATE_LIMIT_ERROR", "REVOKE", "SPARSE_VECTOR_QUEUE_STATUS", "UPDATE", "WEBPAGE_ERROR", "WEBPAGE_READY", "WEBSCRAPE_URLS_READY"])
|
125
|
+
validator = EnumAttributeValidator.new('String', ["ADD", "ALL_UPLOADED_FILES_QUEUED", "CANCEL", "CHECKUP", "DATA_SOURCE_READY", "EMBEDDING_STORAGE_MODIFIED", "FILES_CREATED", "FILES_SKIPPED", "FILE_DELETED", "FILE_ERROR", "FILE_READY", "FILE_STATISTICS_AGGREGATED", "FILE_SYNC_LIMIT_REACHED", "MOVED_TO_COLD_STORAGE", "MOVED_TO_HOT_STORAGE", "ORGANIZATION_USER_DELETED", "RATE_LIMIT_ERROR", "REVOKE", "SPARSE_VECTOR_QUEUE_STATUS", "UPDATE", "WEBPAGE_ERROR", "WEBPAGE_READY", "WEBSCRAPE_URLS_READY"])
|
126
126
|
unless validator.valid?(webhook_type)
|
127
127
|
fail ArgumentError, "invalid value for \"webhook_type\", must be one of #{validator.allowable_values}."
|
128
128
|
end
|
@@ -45,6 +45,9 @@ module Carbon
|
|
45
45
|
|
46
46
|
attr_accessor :file_sync_config
|
47
47
|
|
48
|
+
# Automatically open source file picker after the OAuth flow is complete. This flag is currently supported by BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT. It will be ignored for other data sources.
|
49
|
+
attr_accessor :automatically_open_file_picker
|
50
|
+
|
48
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
49
52
|
def self.attribute_map
|
50
53
|
{
|
@@ -62,7 +65,8 @@ module Carbon
|
|
62
65
|
:'enable_file_picker' => :'enable_file_picker',
|
63
66
|
:'sync_source_items' => :'sync_source_items',
|
64
67
|
:'incremental_sync' => :'incremental_sync',
|
65
|
-
:'file_sync_config' => :'file_sync_config'
|
68
|
+
:'file_sync_config' => :'file_sync_config',
|
69
|
+
:'automatically_open_file_picker' => :'automatically_open_file_picker'
|
66
70
|
}
|
67
71
|
end
|
68
72
|
|
@@ -88,7 +92,8 @@ module Carbon
|
|
88
92
|
:'enable_file_picker' => :'Boolean',
|
89
93
|
:'sync_source_items' => :'Boolean',
|
90
94
|
:'incremental_sync' => :'Boolean',
|
91
|
-
:'file_sync_config' => :'FileSyncConfigNullable'
|
95
|
+
:'file_sync_config' => :'FileSyncConfigNullable',
|
96
|
+
:'automatically_open_file_picker' => :'Boolean'
|
92
97
|
}
|
93
98
|
end
|
94
99
|
|
@@ -105,7 +110,8 @@ module Carbon
|
|
105
110
|
:'max_items_per_chunk',
|
106
111
|
:'sync_files_on_connection',
|
107
112
|
:'request_id',
|
108
|
-
:'file_sync_config'
|
113
|
+
:'file_sync_config',
|
114
|
+
:'automatically_open_file_picker'
|
109
115
|
])
|
110
116
|
end
|
111
117
|
|
@@ -205,6 +211,10 @@ module Carbon
|
|
205
211
|
if attributes.key?(:'file_sync_config')
|
206
212
|
self.file_sync_config = attributes[:'file_sync_config']
|
207
213
|
end
|
214
|
+
|
215
|
+
if attributes.key?(:'automatically_open_file_picker')
|
216
|
+
self.automatically_open_file_picker = attributes[:'automatically_open_file_picker']
|
217
|
+
end
|
208
218
|
end
|
209
219
|
|
210
220
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -239,7 +249,8 @@ module Carbon
|
|
239
249
|
enable_file_picker == o.enable_file_picker &&
|
240
250
|
sync_source_items == o.sync_source_items &&
|
241
251
|
incremental_sync == o.incremental_sync &&
|
242
|
-
file_sync_config == o.file_sync_config
|
252
|
+
file_sync_config == o.file_sync_config &&
|
253
|
+
automatically_open_file_picker == o.automatically_open_file_picker
|
243
254
|
end
|
244
255
|
|
245
256
|
# @see the `==` method
|
@@ -251,7 +262,7 @@ module Carbon
|
|
251
262
|
# Calculates hash code according to all attributes.
|
252
263
|
# @return [Integer] Hash code
|
253
264
|
def hash
|
254
|
-
[tags, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, sync_files_on_connection, set_page_as_boundary, request_id, enable_file_picker, sync_source_items, incremental_sync, file_sync_config].hash
|
265
|
+
[tags, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, sync_files_on_connection, set_page_as_boundary, request_id, enable_file_picker, sync_source_items, incremental_sync, file_sync_config, automatically_open_file_picker].hash
|
255
266
|
end
|
256
267
|
|
257
268
|
# Builds the object from hash
|
@@ -40,10 +40,14 @@ module Carbon
|
|
40
40
|
|
41
41
|
attr_accessor :transcription_service
|
42
42
|
|
43
|
+
attr_accessor :include_speaker_labels
|
44
|
+
|
43
45
|
attr_accessor :media_type
|
44
46
|
|
45
47
|
attr_accessor :split_rows
|
46
48
|
|
49
|
+
attr_accessor :cold_storage_params
|
50
|
+
|
47
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
48
52
|
def self.attribute_map
|
49
53
|
{
|
@@ -61,8 +65,10 @@ module Carbon
|
|
61
65
|
:'parse_pdf_tables_with_ocr' => :'parse_pdf_tables_with_ocr',
|
62
66
|
:'detect_audio_language' => :'detect_audio_language',
|
63
67
|
:'transcription_service' => :'transcription_service',
|
68
|
+
:'include_speaker_labels' => :'include_speaker_labels',
|
64
69
|
:'media_type' => :'media_type',
|
65
|
-
:'split_rows' => :'split_rows'
|
70
|
+
:'split_rows' => :'split_rows',
|
71
|
+
:'cold_storage_params' => :'cold_storage_params'
|
66
72
|
}
|
67
73
|
end
|
68
74
|
|
@@ -88,8 +94,10 @@ module Carbon
|
|
88
94
|
:'parse_pdf_tables_with_ocr' => :'Boolean',
|
89
95
|
:'detect_audio_language' => :'Boolean',
|
90
96
|
:'transcription_service' => :'TranscriptionServiceNullable',
|
97
|
+
:'include_speaker_labels' => :'Boolean',
|
91
98
|
:'media_type' => :'FileContentTypesNullable',
|
92
|
-
:'split_rows' => :'Boolean'
|
99
|
+
:'split_rows' => :'Boolean',
|
100
|
+
:'cold_storage_params' => :'ColdStorageProps'
|
93
101
|
}
|
94
102
|
end
|
95
103
|
|
@@ -192,6 +200,12 @@ module Carbon
|
|
192
200
|
self.transcription_service = attributes[:'transcription_service']
|
193
201
|
end
|
194
202
|
|
203
|
+
if attributes.key?(:'include_speaker_labels')
|
204
|
+
self.include_speaker_labels = attributes[:'include_speaker_labels']
|
205
|
+
else
|
206
|
+
self.include_speaker_labels = false
|
207
|
+
end
|
208
|
+
|
195
209
|
if attributes.key?(:'media_type')
|
196
210
|
self.media_type = attributes[:'media_type']
|
197
211
|
end
|
@@ -201,6 +215,10 @@ module Carbon
|
|
201
215
|
else
|
202
216
|
self.split_rows = false
|
203
217
|
end
|
218
|
+
|
219
|
+
if attributes.key?(:'cold_storage_params')
|
220
|
+
self.cold_storage_params = attributes[:'cold_storage_params']
|
221
|
+
end
|
204
222
|
end
|
205
223
|
|
206
224
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -240,8 +258,10 @@ module Carbon
|
|
240
258
|
parse_pdf_tables_with_ocr == o.parse_pdf_tables_with_ocr &&
|
241
259
|
detect_audio_language == o.detect_audio_language &&
|
242
260
|
transcription_service == o.transcription_service &&
|
261
|
+
include_speaker_labels == o.include_speaker_labels &&
|
243
262
|
media_type == o.media_type &&
|
244
|
-
split_rows == o.split_rows
|
263
|
+
split_rows == o.split_rows &&
|
264
|
+
cold_storage_params == o.cold_storage_params
|
245
265
|
end
|
246
266
|
|
247
267
|
# @see the `==` method
|
@@ -253,7 +273,7 @@ module Carbon
|
|
253
273
|
# Calculates hash code according to all attributes.
|
254
274
|
# @return [Integer] Hash code
|
255
275
|
def hash
|
256
|
-
[url, file_name, chunk_size, chunk_overlap, skip_embedding_generation, set_page_as_boundary, embedding_model, generate_sparse_vectors, use_textract, prepend_filename_to_chunks, max_items_per_chunk, parse_pdf_tables_with_ocr, detect_audio_language, transcription_service, media_type, split_rows].hash
|
276
|
+
[url, file_name, chunk_size, chunk_overlap, skip_embedding_generation, set_page_as_boundary, embedding_model, generate_sparse_vectors, use_textract, prepend_filename_to_chunks, max_items_per_chunk, parse_pdf_tables_with_ocr, detect_audio_language, transcription_service, include_speaker_labels, media_type, split_rows, cold_storage_params].hash
|
257
277
|
end
|
258
278
|
|
259
279
|
# Builds the object from hash
|
@@ -75,6 +75,12 @@ module Carbon
|
|
75
75
|
|
76
76
|
attr_accessor :file_contents_deleted
|
77
77
|
|
78
|
+
attr_accessor :supports_cold_storage
|
79
|
+
|
80
|
+
attr_accessor :hot_storage_time_to_live
|
81
|
+
|
82
|
+
attr_accessor :embedding_storage_status
|
83
|
+
|
78
84
|
attr_accessor :created_at
|
79
85
|
|
80
86
|
attr_accessor :updated_at
|
@@ -114,6 +120,9 @@ module Carbon
|
|
114
120
|
:'sync_properties' => :'sync_properties',
|
115
121
|
:'messages_metadata' => :'messages_metadata',
|
116
122
|
:'file_contents_deleted' => :'file_contents_deleted',
|
123
|
+
:'supports_cold_storage' => :'supports_cold_storage',
|
124
|
+
:'hot_storage_time_to_live' => :'hot_storage_time_to_live',
|
125
|
+
:'embedding_storage_status' => :'embedding_storage_status',
|
117
126
|
:'created_at' => :'created_at',
|
118
127
|
:'updated_at' => :'updated_at'
|
119
128
|
}
|
@@ -159,6 +168,9 @@ module Carbon
|
|
159
168
|
:'sync_properties' => :'Object',
|
160
169
|
:'messages_metadata' => :'Object',
|
161
170
|
:'file_contents_deleted' => :'Boolean',
|
171
|
+
:'supports_cold_storage' => :'Boolean',
|
172
|
+
:'hot_storage_time_to_live' => :'Integer',
|
173
|
+
:'embedding_storage_status' => :'EmbeddingStorageStatus',
|
162
174
|
:'created_at' => :'Time',
|
163
175
|
:'updated_at' => :'Time'
|
164
176
|
}
|
@@ -188,6 +200,7 @@ module Carbon
|
|
188
200
|
:'source_created_at',
|
189
201
|
:'generate_sparse_vectors',
|
190
202
|
:'request_id',
|
203
|
+
:'hot_storage_time_to_live',
|
191
204
|
])
|
192
205
|
end
|
193
206
|
|
@@ -338,6 +351,18 @@ module Carbon
|
|
338
351
|
self.file_contents_deleted = false
|
339
352
|
end
|
340
353
|
|
354
|
+
if attributes.key?(:'supports_cold_storage')
|
355
|
+
self.supports_cold_storage = attributes[:'supports_cold_storage']
|
356
|
+
end
|
357
|
+
|
358
|
+
if attributes.key?(:'hot_storage_time_to_live')
|
359
|
+
self.hot_storage_time_to_live = attributes[:'hot_storage_time_to_live']
|
360
|
+
end
|
361
|
+
|
362
|
+
if attributes.key?(:'embedding_storage_status')
|
363
|
+
self.embedding_storage_status = attributes[:'embedding_storage_status']
|
364
|
+
end
|
365
|
+
|
341
366
|
if attributes.key?(:'created_at')
|
342
367
|
self.created_at = attributes[:'created_at']
|
343
368
|
end
|
@@ -395,6 +420,14 @@ module Carbon
|
|
395
420
|
invalid_properties.push('invalid value for "file_contents_deleted", file_contents_deleted cannot be nil.')
|
396
421
|
end
|
397
422
|
|
423
|
+
if @supports_cold_storage.nil?
|
424
|
+
invalid_properties.push('invalid value for "supports_cold_storage", supports_cold_storage cannot be nil.')
|
425
|
+
end
|
426
|
+
|
427
|
+
if @embedding_storage_status.nil?
|
428
|
+
invalid_properties.push('invalid value for "embedding_storage_status", embedding_storage_status cannot be nil.')
|
429
|
+
end
|
430
|
+
|
398
431
|
if @created_at.nil?
|
399
432
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
400
433
|
end
|
@@ -420,6 +453,8 @@ module Carbon
|
|
420
453
|
return false if @sync_properties.nil?
|
421
454
|
return false if @messages_metadata.nil?
|
422
455
|
return false if @file_contents_deleted.nil?
|
456
|
+
return false if @supports_cold_storage.nil?
|
457
|
+
return false if @embedding_storage_status.nil?
|
423
458
|
return false if @created_at.nil?
|
424
459
|
return false if @updated_at.nil?
|
425
460
|
true
|
@@ -462,6 +497,9 @@ module Carbon
|
|
462
497
|
sync_properties == o.sync_properties &&
|
463
498
|
messages_metadata == o.messages_metadata &&
|
464
499
|
file_contents_deleted == o.file_contents_deleted &&
|
500
|
+
supports_cold_storage == o.supports_cold_storage &&
|
501
|
+
hot_storage_time_to_live == o.hot_storage_time_to_live &&
|
502
|
+
embedding_storage_status == o.embedding_storage_status &&
|
465
503
|
created_at == o.created_at &&
|
466
504
|
updated_at == o.updated_at
|
467
505
|
end
|
@@ -475,7 +513,7 @@ module Carbon
|
|
475
513
|
# Calculates hash code according to all attributes.
|
476
514
|
# @return [Integer] Hash code
|
477
515
|
def hash
|
478
|
-
[tags, id, source, organization_id, organization_supplied_user_id, organization_user_data_source_id, external_file_id, external_url, sync_status, sync_error_message, last_sync, file_statistics, file_metadata, embedding_properties, chunk_size, chunk_overlap, chunk_properties, ocr_properties, ocr_job_started_at, name, parent_id, enable_auto_sync, presigned_url, parsed_text_url, additional_presigned_urls, skip_embedding_generation, source_created_at, generate_sparse_vectors, request_id, sync_properties, messages_metadata, file_contents_deleted, created_at, updated_at].hash
|
516
|
+
[tags, id, source, organization_id, organization_supplied_user_id, organization_user_data_source_id, external_file_id, external_url, sync_status, sync_error_message, last_sync, file_statistics, file_metadata, embedding_properties, chunk_size, chunk_overlap, chunk_properties, ocr_properties, ocr_job_started_at, name, parent_id, enable_auto_sync, presigned_url, parsed_text_url, additional_presigned_urls, skip_embedding_generation, source_created_at, generate_sparse_vectors, request_id, sync_properties, messages_metadata, file_contents_deleted, supports_cold_storage, hot_storage_time_to_live, embedding_storage_status, created_at, updated_at].hash
|
479
517
|
end
|
480
518
|
|
481
519
|
# Builds the object from hash
|
data/lib/carbon_ruby_sdk.rb
CHANGED
@@ -23,6 +23,7 @@ require 'carbon_ruby_sdk/models/chunk_properties'
|
|
23
23
|
require 'carbon_ruby_sdk/models/chunk_properties_nullable'
|
24
24
|
require 'carbon_ruby_sdk/models/chunks_and_embeddings'
|
25
25
|
require 'carbon_ruby_sdk/models/chunks_and_embeddings_upload_input'
|
26
|
+
require 'carbon_ruby_sdk/models/cold_storage_props'
|
26
27
|
require 'carbon_ruby_sdk/models/confluence_authentication'
|
27
28
|
require 'carbon_ruby_sdk/models/connect_data_source_input'
|
28
29
|
require 'carbon_ruby_sdk/models/connect_data_source_response'
|
@@ -43,6 +44,7 @@ require 'carbon_ruby_sdk/models/embedding_generators'
|
|
43
44
|
require 'carbon_ruby_sdk/models/embedding_generators_nullable'
|
44
45
|
require 'carbon_ruby_sdk/models/embedding_model'
|
45
46
|
require 'carbon_ruby_sdk/models/embedding_properties'
|
47
|
+
require 'carbon_ruby_sdk/models/embedding_storage_status'
|
46
48
|
require 'carbon_ruby_sdk/models/embeddings_and_chunks_filters'
|
47
49
|
require 'carbon_ruby_sdk/models/embeddings_and_chunks_order_by_columns'
|
48
50
|
require 'carbon_ruby_sdk/models/embeddings_and_chunks_query_input'
|
@@ -88,7 +90,9 @@ require 'carbon_ruby_sdk/models/list_users_filters'
|
|
88
90
|
require 'carbon_ruby_sdk/models/list_users_order_by_types'
|
89
91
|
require 'carbon_ruby_sdk/models/list_users_request'
|
90
92
|
require 'carbon_ruby_sdk/models/location_property_inner'
|
93
|
+
require 'carbon_ruby_sdk/models/modify_cold_storage_parameters_query_input'
|
91
94
|
require 'carbon_ruby_sdk/models/modify_user_configuration_input'
|
95
|
+
require 'carbon_ruby_sdk/models/move_to_hot_storage_query_input'
|
92
96
|
require 'carbon_ruby_sdk/models/notion_authentication'
|
93
97
|
require 'carbon_ruby_sdk/models/o_auth_authentication'
|
94
98
|
require 'carbon_ruby_sdk/models/o_auth_url_request'
|
data/spec/api/files_api_spec.rb
CHANGED
@@ -106,6 +106,28 @@ describe 'FilesApi' do
|
|
106
106
|
end
|
107
107
|
end
|
108
108
|
|
109
|
+
# unit tests for modify_cold_storage_parameters
|
110
|
+
# Modify Cold Storage Parameters
|
111
|
+
# @param modify_cold_storage_parameters_query_input
|
112
|
+
# @param [Hash] opts the optional parameters
|
113
|
+
# @return [Boolean]
|
114
|
+
describe 'modify_cold_storage_parameters test' do
|
115
|
+
it 'should work' do
|
116
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
# unit tests for move_to_hot_storage
|
121
|
+
# Move To Hot Storage
|
122
|
+
# @param move_to_hot_storage_query_input
|
123
|
+
# @param [Hash] opts the optional parameters
|
124
|
+
# @return [Boolean]
|
125
|
+
describe 'move_to_hot_storage test' do
|
126
|
+
it 'should work' do
|
127
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
109
131
|
# unit tests for query_user_files
|
110
132
|
# User Files V2
|
111
133
|
# For pre-filtering documents, using `tags_v2` is preferred to using `tags` (which is now deprecated). If both `tags_v2` and `tags` are specified, `tags` is ignored. `tags_v2` enables building complex filters through the use of \"AND\", \"OR\", and negation logic. Take the below input as an example: ```json { \"OR\": [ { \"key\": \"subject\", \"value\": \"holy-bible\", \"negate\": false }, { \"key\": \"person-of-interest\", \"value\": \"jesus christ\", \"negate\": false }, { \"key\": \"genre\", \"value\": \"religion\", \"negate\": true } { \"AND\": [ { \"key\": \"subject\", \"value\": \"tao-te-ching\", \"negate\": false }, { \"key\": \"author\", \"value\": \"lao-tzu\", \"negate\": false } ] } ] } ``` In this case, files will be filtered such that: 1. \"subject\" = \"holy-bible\" OR 2. \"person-of-interest\" = \"jesus christ\" OR 3. \"genre\" != \"religion\" OR 4. \"subject\" = \"tao-te-ching\" AND \"author\" = \"lao-tzu\" Note that the top level of the query must be either an \"OR\" or \"AND\" array. Currently, nesting is limited to 3. For tag blocks (those with \"key\", \"value\", and \"negate\" keys), the following typing rules apply: 1. \"key\" isn't optional and must be a `string` 2. \"value\" isn't optional and can be `any` or list[`any`] 3. \"negate\" is optional and must be `true` or `false`. If present and `true`, then the filter block is negated in the resulting query. It is `false` by default.
|
@@ -159,8 +181,11 @@ describe 'FilesApi' do
|
|
159
181
|
# @option opts [Boolean] :parse_pdf_tables_with_ocr Whether to use rich table parsing when `use_ocr` is enabled.
|
160
182
|
# @option opts [Boolean] :detect_audio_language Whether to automatically detect the language of the uploaded audio file.
|
161
183
|
# @option opts [TranscriptionServiceNullable] :transcription_service The transcription service to use for audio files. If no service is specified, 'deepgram' will be used.
|
184
|
+
# @option opts [Boolean] :include_speaker_labels Detect multiple speakers and label segments of speech by speaker for audio files.
|
162
185
|
# @option opts [FileContentTypesNullable] :media_type The media type of the file. If not provided, it will be inferred from the file extension.
|
163
186
|
# @option opts [Boolean] :split_rows Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files.
|
187
|
+
# @option opts [Boolean] :enable_cold_storage Enable cold storage for the file. If set to true, the file will be moved to cold storage after a certain period of inactivity. Default is false.
|
188
|
+
# @option opts [Integer] :hot_storage_time_to_live Time in seconds after which the file will be moved to cold storage.
|
164
189
|
# @return [UserFile]
|
165
190
|
describe 'upload test' do
|
166
191
|
it 'should work' do
|
@@ -0,0 +1,34 @@
|
|
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 'spec_helper'
|
10
|
+
require 'json'
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
# Unit tests for Carbon::ColdStorageProps
|
14
|
+
describe Carbon::ColdStorageProps do
|
15
|
+
let(:instance) { Carbon::ColdStorageProps.new }
|
16
|
+
|
17
|
+
describe 'test an instance of ColdStorageProps' do
|
18
|
+
it 'should create an instance of ColdStorageProps' do
|
19
|
+
expect(instance).to be_instance_of(Carbon::ColdStorageProps)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
describe 'test attribute "enable_cold_storage"' do
|
23
|
+
it 'should work' do
|
24
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'test attribute "hot_storage_time_to_live"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
@@ -0,0 +1,22 @@
|
|
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 'spec_helper'
|
10
|
+
require 'json'
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
# Unit tests for Carbon::EmbeddingStorageStatus
|
14
|
+
describe Carbon::EmbeddingStorageStatus do
|
15
|
+
let(:instance) { Carbon::EmbeddingStorageStatus.new }
|
16
|
+
|
17
|
+
describe 'test an instance of EmbeddingStorageStatus' do
|
18
|
+
it 'should create an instance of EmbeddingStorageStatus' do
|
19
|
+
expect(instance).to be_instance_of(Carbon::EmbeddingStorageStatus)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -43,6 +43,12 @@ describe Carbon::FileSyncConfigNullable do
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
+
describe 'test attribute "include_speaker_labels"' do
|
47
|
+
it 'should work' do
|
48
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
46
52
|
describe 'test attribute "split_rows"' do
|
47
53
|
it 'should work' do
|
48
54
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -43,6 +43,12 @@ describe Carbon::FileSyncConfig do
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
+
describe 'test attribute "include_speaker_labels"' do
|
47
|
+
it 'should work' do
|
48
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
46
52
|
describe 'test attribute "split_rows"' do
|
47
53
|
it 'should work' do
|
48
54
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -133,4 +133,10 @@ describe Carbon::GetEmbeddingDocumentsBody do
|
|
133
133
|
end
|
134
134
|
end
|
135
135
|
|
136
|
+
describe 'test attribute "exclude_cold_storage_files"' do
|
137
|
+
it 'should work' do
|
138
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
136
142
|
end
|
@@ -0,0 +1,40 @@
|
|
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 'spec_helper'
|
10
|
+
require 'json'
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
# Unit tests for Carbon::ModifyColdStorageParametersQueryInput
|
14
|
+
describe Carbon::ModifyColdStorageParametersQueryInput do
|
15
|
+
let(:instance) { Carbon::ModifyColdStorageParametersQueryInput.new }
|
16
|
+
|
17
|
+
describe 'test an instance of ModifyColdStorageParametersQueryInput' do
|
18
|
+
it 'should create an instance of ModifyColdStorageParametersQueryInput' do
|
19
|
+
expect(instance).to be_instance_of(Carbon::ModifyColdStorageParametersQueryInput)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
describe 'test attribute "filters"' do
|
23
|
+
it 'should work' do
|
24
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'test attribute "enable_cold_storage"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe 'test attribute "hot_storage_time_to_live"' do
|
35
|
+
it 'should work' do
|
36
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
@@ -0,0 +1,28 @@
|
|
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 'spec_helper'
|
10
|
+
require 'json'
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
# Unit tests for Carbon::MoveToHotStorageQueryInput
|
14
|
+
describe Carbon::MoveToHotStorageQueryInput do
|
15
|
+
let(:instance) { Carbon::MoveToHotStorageQueryInput.new }
|
16
|
+
|
17
|
+
describe 'test an instance of MoveToHotStorageQueryInput' do
|
18
|
+
it 'should create an instance of MoveToHotStorageQueryInput' do
|
19
|
+
expect(instance).to be_instance_of(Carbon::MoveToHotStorageQueryInput)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
describe 'test attribute "filters"' do
|
23
|
+
it 'should work' do
|
24
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|