carbon_ruby_sdk 0.2.3 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af28a3b256d49d38a6aca558d12a49a6e3f2888587dedeef54311ad7d0bd0ac9
4
- data.tar.gz: a685b15e3ad3ab32463c4bd03c92432c21bc3c7cf3b8f29bcf340cde6e468377
3
+ metadata.gz: c7706176e499f1533fc878b19eedf2ec5861f96ff958fe1e5b06a3165a880af2
4
+ data.tar.gz: 2bbd00bf0d604cc026a3c88b6db2760fc3385d471de31e4ff741d8377b27cc3d
5
5
  SHA512:
6
- metadata.gz: 023c5d51386e0e76ecd6954f25c69a8562302f89de2a1a15cd72fbfc0e3491c6129ad496da1ad9dbfd80a0030c30ba501cb2e8552cbdd92c07513a20f0257211
7
- data.tar.gz: 465fbc642ce7bf817b5c5d647d34c1c963e254a21facef003efc0a60a5074dad6c1b642a1093e3f0e9228505bde79b9f5c55e263827987395734718b019c7a06
6
+ metadata.gz: 58edf104baac33bc87aa26f7bab3b5bbcc206234745f72bffc7bcd4569c07d25cd421c8d28e269db58116035f98930cf51ccb407a905dab8c87118cd769b6623
7
+ data.tar.gz: fa7538776a59eaa0f81583a91166d98d8712501f816ed55fb16abb7f6f7b70eb8e05aecf0968d0f307bff65810edc028a5917c630a341ce62e3a1badacd35a1b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- carbon_ruby_sdk (0.2.2)
4
+ carbon_ruby_sdk (0.2.4)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Connect external data to LLMs, no matter the source.
8
8
 
9
- [![npm](https://img.shields.io/badge/gem-v0.2.3-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.2.3)
9
+ [![npm](https://img.shields.io/badge/gem-v0.2.5-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.2.5)
10
10
 
11
11
  </div>
12
12
 
@@ -86,7 +86,7 @@ Connect external data to LLMs, no matter the source.
86
86
  Add to Gemfile:
87
87
 
88
88
  ```ruby
89
- gem 'carbon_ruby_sdk', '~> 0.2.3'
89
+ gem 'carbon_ruby_sdk', '~> 0.2.5'
90
90
  ```
91
91
 
92
92
  ## Getting Started<a id="getting-started"></a>
@@ -999,6 +999,7 @@ result = carbon.files.upload(
999
999
  parse_pdf_tables_with_ocr: false,
1000
1000
  detect_audio_language: false,
1001
1001
  media_type: "TEXT",
1002
+ split_rows: false,
1002
1003
  )
1003
1004
  p result
1004
1005
  ```
@@ -1048,6 +1049,10 @@ Whether to automatically detect the language of the uploaded audio file.
1048
1049
  The media type of the file. If not provided, it will be inferred from the file
1049
1050
  extension.
1050
1051
 
1052
+ ##### split_rows: `Boolean`<a id="split_rows-boolean"></a>
1053
+ Whether to split tabular rows into chunks. Currently only valid for CSV, TSV,
1054
+ and XLSX files.
1055
+
1051
1056
  #### 🔄 Return<a id="🔄-return"></a>
1052
1057
 
1053
1058
  [UserFile](./lib/carbon_ruby_sdk/models/user_file.rb)
@@ -1083,6 +1088,7 @@ result = carbon.files.upload_from_url(
1083
1088
  parse_pdf_tables_with_ocr: false,
1084
1089
  detect_audio_language: false,
1085
1090
  media_type: "TEXT",
1091
+ split_rows: false,
1086
1092
  )
1087
1093
  p result
1088
1094
  ```
@@ -1105,6 +1111,7 @@ Number of objects per chunk. For csv, tsv, xlsx, and json files only.
1105
1111
  ##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
1106
1112
  ##### detect_audio_language: `Boolean`<a id="detect_audio_language-boolean"></a>
1107
1113
  ##### media_type: [`FileContentTypesNullable`](./lib/carbon_ruby_sdk/models/file_content_types_nullable.rb)<a id="media_type-filecontenttypesnullablelibcarbon_ruby_sdkmodelsfile_content_types_nullablerb"></a>
1114
+ ##### split_rows: `Boolean`<a id="split_rows-boolean"></a>
1108
1115
  #### 🔄 Return<a id="🔄-return"></a>
1109
1116
 
1110
1117
  [UserFile](./lib/carbon_ruby_sdk/models/user_file.rb)
@@ -1240,7 +1247,7 @@ result = carbon.integrations.connect_data_source(
1240
1247
  "prepend_filename_to_chunks" => false,
1241
1248
  "sync_files_on_connection" => true,
1242
1249
  "set_page_as_boundary" => false,
1243
- "request_id" => "652297b9-0f55-46d8-869d-13a36e89e5da",
1250
+ "request_id" => "3faff6b4-cf31-42c5-b652-a4115dfbc64f",
1244
1251
  "enable_file_picker" => true,
1245
1252
  "sync_source_items" => true,
1246
1253
  "incremental_sync" => false,
@@ -1459,7 +1466,7 @@ result = carbon.integrations.get_oauth_url(
1459
1466
  set_page_as_boundary: false,
1460
1467
  data_source_id: 1,
1461
1468
  connecting_new_account: false,
1462
- request_id: "71f214fa-2155-41cb-9336-9b3070e86897",
1469
+ request_id: "f3bc66ce-11ad-480a-97d3-8564f86ea2e4",
1463
1470
  use_ocr: false,
1464
1471
  parse_pdf_tables_with_ocr: false,
1465
1472
  enable_file_picker: true,
@@ -1519,7 +1526,7 @@ Enable OCR for files that support it. Supported formats: pdf
1519
1526
  ##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
1520
1527
  ##### enable_file_picker: `Boolean`<a id="enable_file_picker-boolean"></a>
1521
1528
  Enable integration's file picker for sources that support it. Supported sources:
1522
- DROPBOX, GOOGLE_DRIVE, SHAREPOINT, ONEDRIVE, BOX
1529
+ BOX, ONEDRIVE, DROPBOX, GOOGLE_DRIVE, SHAREPOINT
1523
1530
 
1524
1531
  ##### sync_source_items: `Boolean`<a id="sync_source_items-boolean"></a>
1525
1532
  Enabling this flag will fetch all available content from the source to be listed
@@ -1781,7 +1788,7 @@ result = carbon.integrations.sync_confluence(
1781
1788
  prepend_filename_to_chunks: false,
1782
1789
  max_items_per_chunk: 1,
1783
1790
  set_page_as_boundary: false,
1784
- request_id: "6136b467-242e-49df-9478-d3e0cfdde299",
1791
+ request_id: "6ae9a1d5-64b6-4ec2-ab39-8869a383e3cf",
1785
1792
  use_ocr: false,
1786
1793
  parse_pdf_tables_with_ocr: false,
1787
1794
  incremental_sync: false,
@@ -1884,7 +1891,7 @@ result = carbon.integrations.sync_files(
1884
1891
  prepend_filename_to_chunks: false,
1885
1892
  max_items_per_chunk: 1,
1886
1893
  set_page_as_boundary: false,
1887
- request_id: "6136b467-242e-49df-9478-d3e0cfdde299",
1894
+ request_id: "6ae9a1d5-64b6-4ec2-ab39-8869a383e3cf",
1888
1895
  use_ocr: false,
1889
1896
  parse_pdf_tables_with_ocr: false,
1890
1897
  incremental_sync: false,
@@ -1174,9 +1174,10 @@ module Carbon
1174
1174
  # @param parse_pdf_tables_with_ocr [Boolean] Whether to use rich table parsing when `use_ocr` is enabled.
1175
1175
  # @param detect_audio_language [Boolean] Whether to automatically detect the language of the uploaded audio file.
1176
1176
  # @param media_type [FileContentTypesNullable] The media type of the file. If not provided, it will be inferred from the file extension.
1177
+ # @param split_rows [Boolean] Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files.
1177
1178
  # @param body [BodyCreateUploadFileUploadfilePost]
1178
1179
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1179
- def upload(file:, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: 'OPENAI', use_ocr: false, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, parse_pdf_tables_with_ocr: false, detect_audio_language: false, media_type: SENTINEL, extra: {})
1180
+ def upload(file:, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: 'OPENAI', use_ocr: false, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, parse_pdf_tables_with_ocr: false, detect_audio_language: false, media_type: SENTINEL, split_rows: false, extra: {})
1180
1181
  _body = {}
1181
1182
  _body[:file] = file if file != SENTINEL
1182
1183
  body_create_upload_file_uploadfile_post = _body
@@ -1192,6 +1193,7 @@ module Carbon
1192
1193
  extra[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
1193
1194
  extra[:detect_audio_language] = detect_audio_language if detect_audio_language != SENTINEL
1194
1195
  extra[:media_type] = media_type if media_type != SENTINEL
1196
+ extra[:split_rows] = split_rows if split_rows != SENTINEL
1195
1197
  api_response = upload_with_http_info_impl(file, body_create_upload_file_uploadfile_post, extra)
1196
1198
  api_response.data
1197
1199
  end
@@ -1237,9 +1239,10 @@ module Carbon
1237
1239
  # @param parse_pdf_tables_with_ocr [Boolean] Whether to use rich table parsing when `use_ocr` is enabled.
1238
1240
  # @param detect_audio_language [Boolean] Whether to automatically detect the language of the uploaded audio file.
1239
1241
  # @param media_type [FileContentTypesNullable] The media type of the file. If not provided, it will be inferred from the file extension.
1242
+ # @param split_rows [Boolean] Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files.
1240
1243
  # @param body [BodyCreateUploadFileUploadfilePost]
1241
1244
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1242
- def upload_with_http_info(file:, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: 'OPENAI', use_ocr: false, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, parse_pdf_tables_with_ocr: false, detect_audio_language: false, media_type: SENTINEL, extra: {})
1245
+ def upload_with_http_info(file:, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: 'OPENAI', use_ocr: false, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, parse_pdf_tables_with_ocr: false, detect_audio_language: false, media_type: SENTINEL, split_rows: false, extra: {})
1243
1246
  _body = {}
1244
1247
  _body[:file] = file if file != SENTINEL
1245
1248
  body_create_upload_file_uploadfile_post = _body
@@ -1255,6 +1258,7 @@ module Carbon
1255
1258
  extra[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
1256
1259
  extra[:detect_audio_language] = detect_audio_language if detect_audio_language != SENTINEL
1257
1260
  extra[:media_type] = media_type if media_type != SENTINEL
1261
+ extra[:split_rows] = split_rows if split_rows != SENTINEL
1258
1262
  upload_with_http_info_impl(file, body_create_upload_file_uploadfile_post, extra)
1259
1263
  end
1260
1264
 
@@ -1275,6 +1279,7 @@ module Carbon
1275
1279
  # @option opts [Boolean] :parse_pdf_tables_with_ocr Whether to use rich table parsing when `use_ocr` is enabled. (default to false)
1276
1280
  # @option opts [Boolean] :detect_audio_language Whether to automatically detect the language of the uploaded audio file. (default to false)
1277
1281
  # @option opts [FileContentTypesNullable] :media_type The media type of the file. If not provided, it will be inferred from the file extension.
1282
+ # @option opts [Boolean] :split_rows Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files. (default to false)
1278
1283
  # @return [UserFile]
1279
1284
  private def upload_impl(file, body_create_upload_file_uploadfile_post, opts = {})
1280
1285
  data, _status_code, _headers = upload_with_http_info(file, body_create_upload_file_uploadfile_post, opts)
@@ -1298,6 +1303,7 @@ module Carbon
1298
1303
  # @option opts [Boolean] :parse_pdf_tables_with_ocr Whether to use rich table parsing when `use_ocr` is enabled. (default to false)
1299
1304
  # @option opts [Boolean] :detect_audio_language Whether to automatically detect the language of the uploaded audio file. (default to false)
1300
1305
  # @option opts [FileContentTypesNullable] :media_type The media type of the file. If not provided, it will be inferred from the file extension.
1306
+ # @option opts [Boolean] :split_rows Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files. (default to false)
1301
1307
  # @return [APIResponse] data is UserFile, status code, headers and response
1302
1308
  private def upload_with_http_info_impl(file, body_create_upload_file_uploadfile_post, opts = {})
1303
1309
  if @api_client.config.debugging
@@ -1328,6 +1334,7 @@ module Carbon
1328
1334
  query_params[:'parse_pdf_tables_with_ocr'] = opts[:'parse_pdf_tables_with_ocr'] if !opts[:'parse_pdf_tables_with_ocr'].nil?
1329
1335
  query_params[:'detect_audio_language'] = opts[:'detect_audio_language'] if !opts[:'detect_audio_language'].nil?
1330
1336
  query_params[:'media_type'] = opts[:'media_type'] if !opts[:'media_type'].nil?
1337
+ query_params[:'split_rows'] = opts[:'split_rows'] if !opts[:'split_rows'].nil?
1331
1338
 
1332
1339
  # header parameters
1333
1340
  header_params = opts[:header_params] || {}
@@ -1386,9 +1393,10 @@ module Carbon
1386
1393
  # @param parse_pdf_tables_with_ocr [Boolean]
1387
1394
  # @param detect_audio_language [Boolean]
1388
1395
  # @param media_type [FileContentTypesNullable]
1396
+ # @param split_rows [Boolean]
1389
1397
  # @param body [UploadFileFromUrlInput]
1390
1398
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1391
- def upload_from_url(url:, file_name: SENTINEL, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, use_textract: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, parse_pdf_tables_with_ocr: false, detect_audio_language: false, media_type: SENTINEL, extra: {})
1399
+ def upload_from_url(url:, file_name: SENTINEL, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, use_textract: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, parse_pdf_tables_with_ocr: false, detect_audio_language: false, media_type: SENTINEL, split_rows: false, extra: {})
1392
1400
  _body = {}
1393
1401
  _body[:url] = url if url != SENTINEL
1394
1402
  _body[:file_name] = file_name if file_name != SENTINEL
@@ -1404,6 +1412,7 @@ module Carbon
1404
1412
  _body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
1405
1413
  _body[:detect_audio_language] = detect_audio_language if detect_audio_language != SENTINEL
1406
1414
  _body[:media_type] = media_type if media_type != SENTINEL
1415
+ _body[:split_rows] = split_rows if split_rows != SENTINEL
1407
1416
  upload_file_from_url_input = _body
1408
1417
  api_response = upload_from_url_with_http_info_impl(upload_file_from_url_input, extra)
1409
1418
  api_response.data
@@ -1425,9 +1434,10 @@ module Carbon
1425
1434
  # @param parse_pdf_tables_with_ocr [Boolean]
1426
1435
  # @param detect_audio_language [Boolean]
1427
1436
  # @param media_type [FileContentTypesNullable]
1437
+ # @param split_rows [Boolean]
1428
1438
  # @param body [UploadFileFromUrlInput]
1429
1439
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1430
- def upload_from_url_with_http_info(url:, file_name: SENTINEL, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, use_textract: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, parse_pdf_tables_with_ocr: false, detect_audio_language: false, media_type: SENTINEL, extra: {})
1440
+ def upload_from_url_with_http_info(url:, file_name: SENTINEL, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, use_textract: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, parse_pdf_tables_with_ocr: false, detect_audio_language: false, media_type: SENTINEL, split_rows: false, extra: {})
1431
1441
  _body = {}
1432
1442
  _body[:url] = url if url != SENTINEL
1433
1443
  _body[:file_name] = file_name if file_name != SENTINEL
@@ -1443,6 +1453,7 @@ module Carbon
1443
1453
  _body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
1444
1454
  _body[:detect_audio_language] = detect_audio_language if detect_audio_language != SENTINEL
1445
1455
  _body[:media_type] = media_type if media_type != SENTINEL
1456
+ _body[:split_rows] = split_rows if split_rows != SENTINEL
1446
1457
  upload_file_from_url_input = _body
1447
1458
  upload_from_url_with_http_info_impl(upload_file_from_url_input, extra)
1448
1459
  end
@@ -653,13 +653,13 @@ module Carbon
653
653
  # @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
654
654
  # @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
655
655
  # @param parse_pdf_tables_with_ocr [Boolean]
656
- # @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: DROPBOX, GOOGLE_DRIVE, SHAREPOINT, ONEDRIVE, BOX
656
+ # @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: BOX, ONEDRIVE, DROPBOX, GOOGLE_DRIVE, SHAREPOINT
657
657
  # @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
658
658
  # @param incremental_sync [Boolean] Only sync files if they have not already been synced or if the embedding properties have changed. This flag is currently supported by ONEDRIVE, GOOGLE_DRIVE, BOX, DROPBOX. It will be ignored for other data sources.
659
659
  # @param file_sync_config [FileSyncConfigNullable]
660
660
  # @param body [OAuthURLRequest]
661
661
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
662
- def get_oauth_url(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: '71f214fa-2155-41cb-9336-9b3070e86897', use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
662
+ def get_oauth_url(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: 'f3bc66ce-11ad-480a-97d3-8564f86ea2e4', use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
663
663
  _body = {}
664
664
  _body[:tags] = tags if tags != SENTINEL
665
665
  _body[:scope] = scope if scope != SENTINEL
@@ -721,13 +721,13 @@ module Carbon
721
721
  # @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
722
722
  # @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
723
723
  # @param parse_pdf_tables_with_ocr [Boolean]
724
- # @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: DROPBOX, GOOGLE_DRIVE, SHAREPOINT, ONEDRIVE, BOX
724
+ # @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: BOX, ONEDRIVE, DROPBOX, GOOGLE_DRIVE, SHAREPOINT
725
725
  # @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
726
726
  # @param incremental_sync [Boolean] Only sync files if they have not already been synced or if the embedding properties have changed. This flag is currently supported by ONEDRIVE, GOOGLE_DRIVE, BOX, DROPBOX. It will be ignored for other data sources.
727
727
  # @param file_sync_config [FileSyncConfigNullable]
728
728
  # @param body [OAuthURLRequest]
729
729
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
730
- def get_oauth_url_with_http_info(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: '71f214fa-2155-41cb-9336-9b3070e86897', use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
730
+ def get_oauth_url_with_http_info(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: 'f3bc66ce-11ad-480a-97d3-8564f86ea2e4', use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
731
731
  _body = {}
732
732
  _body[:tags] = tags if tags != SENTINEL
733
733
  _body[:scope] = scope if scope != SENTINEL
@@ -1523,7 +1523,7 @@ module Carbon
1523
1523
  # @param file_sync_config [FileSyncConfigNullable]
1524
1524
  # @param body [SyncFilesRequest]
1525
1525
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1526
- def sync_confluence(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '6136b467-242e-49df-9478-d3e0cfdde299', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
1526
+ def sync_confluence(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '6ae9a1d5-64b6-4ec2-ab39-8869a383e3cf', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
1527
1527
  _body = {}
1528
1528
  _body[:tags] = tags if tags != SENTINEL
1529
1529
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
@@ -1571,7 +1571,7 @@ module Carbon
1571
1571
  # @param file_sync_config [FileSyncConfigNullable]
1572
1572
  # @param body [SyncFilesRequest]
1573
1573
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1574
- def sync_confluence_with_http_info(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '6136b467-242e-49df-9478-d3e0cfdde299', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
1574
+ def sync_confluence_with_http_info(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '6ae9a1d5-64b6-4ec2-ab39-8869a383e3cf', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
1575
1575
  _body = {}
1576
1576
  _body[:tags] = tags if tags != SENTINEL
1577
1577
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
@@ -1779,7 +1779,7 @@ module Carbon
1779
1779
  # @param file_sync_config [FileSyncConfigNullable]
1780
1780
  # @param body [SyncFilesRequest]
1781
1781
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1782
- def sync_files(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '6136b467-242e-49df-9478-d3e0cfdde299', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
1782
+ def sync_files(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '6ae9a1d5-64b6-4ec2-ab39-8869a383e3cf', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
1783
1783
  _body = {}
1784
1784
  _body[:tags] = tags if tags != SENTINEL
1785
1785
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
@@ -1827,7 +1827,7 @@ module Carbon
1827
1827
  # @param file_sync_config [FileSyncConfigNullable]
1828
1828
  # @param body [SyncFilesRequest]
1829
1829
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1830
- def sync_files_with_http_info(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '6136b467-242e-49df-9478-d3e0cfdde299', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
1830
+ def sync_files_with_http_info(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '6ae9a1d5-64b6-4ec2-ab39-8869a383e3cf', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
1831
1831
  _body = {}
1832
1832
  _body[:tags] = tags if tags != SENTINEL
1833
1833
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
@@ -61,7 +61,7 @@ module Carbon
61
61
 
62
62
  attr_accessor :parse_pdf_tables_with_ocr
63
63
 
64
- # Enable integration's file picker for sources that support it. Supported sources: DROPBOX, GOOGLE_DRIVE, SHAREPOINT, ONEDRIVE, BOX
64
+ # Enable integration's file picker for sources that support it. Supported sources: BOX, ONEDRIVE, DROPBOX, GOOGLE_DRIVE, SHAREPOINT
65
65
  attr_accessor :enable_file_picker
66
66
 
67
67
  # Enabling this flag will fetch all available content from the source to be listed via list items endpoint
@@ -279,7 +279,7 @@ module Carbon
279
279
  if attributes.key?(:'request_id')
280
280
  self.request_id = attributes[:'request_id']
281
281
  else
282
- self.request_id = '71f214fa-2155-41cb-9336-9b3070e86897'
282
+ self.request_id = 'f3bc66ce-11ad-480a-97d3-8564f86ea2e4'
283
283
  end
284
284
 
285
285
  if attributes.key?(:'use_ocr')
@@ -43,6 +43,8 @@ module Carbon
43
43
 
44
44
  attr_accessor :global_user_config
45
45
 
46
+ attr_accessor :file_sync_usage
47
+
46
48
  attr_accessor :created_at
47
49
 
48
50
  attr_accessor :updated_at
@@ -66,6 +68,7 @@ module Carbon
66
68
  :'period_ends_at' => :'period_ends_at',
67
69
  :'cancel_at_period_end' => :'cancel_at_period_end',
68
70
  :'global_user_config' => :'global_user_config',
71
+ :'file_sync_usage' => :'file_sync_usage',
69
72
  :'created_at' => :'created_at',
70
73
  :'updated_at' => :'updated_at'
71
74
  }
@@ -95,6 +98,7 @@ module Carbon
95
98
  :'period_ends_at' => :'Time',
96
99
  :'cancel_at_period_end' => :'Boolean',
97
100
  :'global_user_config' => :'Object',
101
+ :'file_sync_usage' => :'Object',
98
102
  :'created_at' => :'Time',
99
103
  :'updated_at' => :'Time'
100
104
  }
@@ -191,6 +195,10 @@ module Carbon
191
195
  self.global_user_config = attributes[:'global_user_config']
192
196
  end
193
197
 
198
+ if attributes.key?(:'file_sync_usage')
199
+ self.file_sync_usage = attributes[:'file_sync_usage']
200
+ end
201
+
194
202
  if attributes.key?(:'created_at')
195
203
  self.created_at = attributes[:'created_at']
196
204
  end
@@ -244,6 +252,10 @@ module Carbon
244
252
  invalid_properties.push('invalid value for "global_user_config", global_user_config cannot be nil.')
245
253
  end
246
254
 
255
+ if @file_sync_usage.nil?
256
+ invalid_properties.push('invalid value for "file_sync_usage", file_sync_usage cannot be nil.')
257
+ end
258
+
247
259
  if @created_at.nil?
248
260
  invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
249
261
  end
@@ -268,6 +280,7 @@ module Carbon
268
280
  return false if @aggregate_num_files_by_source.nil?
269
281
  return false if @aggregate_num_files_by_file_format.nil?
270
282
  return false if @global_user_config.nil?
283
+ return false if @file_sync_usage.nil?
271
284
  return false if @created_at.nil?
272
285
  return false if @updated_at.nil?
273
286
  true
@@ -294,6 +307,7 @@ module Carbon
294
307
  period_ends_at == o.period_ends_at &&
295
308
  cancel_at_period_end == o.cancel_at_period_end &&
296
309
  global_user_config == o.global_user_config &&
310
+ file_sync_usage == o.file_sync_usage &&
297
311
  created_at == o.created_at &&
298
312
  updated_at == o.updated_at
299
313
  end
@@ -307,7 +321,7 @@ module Carbon
307
321
  # Calculates hash code according to all attributes.
308
322
  # @return [Integer] Hash code
309
323
  def hash
310
- [id, name, nickname, remove_branding, custom_branding, custom_limits, aggregate_file_size, aggregate_num_characters, aggregate_num_tokens, aggregate_num_embeddings, aggregate_num_files_by_source, aggregate_num_files_by_file_format, file_statistics_aggregated_at, period_ends_at, cancel_at_period_end, global_user_config, created_at, updated_at].hash
324
+ [id, name, nickname, remove_branding, custom_branding, custom_limits, aggregate_file_size, aggregate_num_characters, aggregate_num_tokens, aggregate_num_embeddings, aggregate_num_files_by_source, aggregate_num_files_by_file_format, file_statistics_aggregated_at, period_ends_at, cancel_at_period_end, global_user_config, file_sync_usage, created_at, updated_at].hash
311
325
  end
312
326
 
313
327
  # Builds the object from hash
@@ -187,7 +187,7 @@ module Carbon
187
187
  if attributes.key?(:'request_id')
188
188
  self.request_id = attributes[:'request_id']
189
189
  else
190
- self.request_id = '6136b467-242e-49df-9478-d3e0cfdde299'
190
+ self.request_id = '6ae9a1d5-64b6-4ec2-ab39-8869a383e3cf'
191
191
  end
192
192
 
193
193
  if attributes.key?(:'use_ocr')
@@ -182,7 +182,7 @@ module Carbon
182
182
  if attributes.key?(:'request_id')
183
183
  self.request_id = attributes[:'request_id']
184
184
  else
185
- self.request_id = '652297b9-0f55-46d8-869d-13a36e89e5da'
185
+ self.request_id = '3faff6b4-cf31-42c5-b652-a4115dfbc64f'
186
186
  end
187
187
 
188
188
  if attributes.key?(:'enable_file_picker')
@@ -40,6 +40,8 @@ module Carbon
40
40
 
41
41
  attr_accessor :media_type
42
42
 
43
+ attr_accessor :split_rows
44
+
43
45
  # Attribute mapping from ruby-style variable name to JSON key.
44
46
  def self.attribute_map
45
47
  {
@@ -56,7 +58,8 @@ module Carbon
56
58
  :'max_items_per_chunk' => :'max_items_per_chunk',
57
59
  :'parse_pdf_tables_with_ocr' => :'parse_pdf_tables_with_ocr',
58
60
  :'detect_audio_language' => :'detect_audio_language',
59
- :'media_type' => :'media_type'
61
+ :'media_type' => :'media_type',
62
+ :'split_rows' => :'split_rows'
60
63
  }
61
64
  end
62
65
 
@@ -81,7 +84,8 @@ module Carbon
81
84
  :'max_items_per_chunk' => :'Integer',
82
85
  :'parse_pdf_tables_with_ocr' => :'Boolean',
83
86
  :'detect_audio_language' => :'Boolean',
84
- :'media_type' => :'FileContentTypesNullable'
87
+ :'media_type' => :'FileContentTypesNullable',
88
+ :'split_rows' => :'Boolean'
85
89
  }
86
90
  end
87
91
 
@@ -92,7 +96,7 @@ module Carbon
92
96
  :'chunk_size',
93
97
  :'chunk_overlap',
94
98
  :'max_items_per_chunk',
95
- :'media_type'
99
+ :'media_type',
96
100
  ])
97
101
  end
98
102
 
@@ -182,6 +186,12 @@ module Carbon
182
186
  if attributes.key?(:'media_type')
183
187
  self.media_type = attributes[:'media_type']
184
188
  end
189
+
190
+ if attributes.key?(:'split_rows')
191
+ self.split_rows = attributes[:'split_rows']
192
+ else
193
+ self.split_rows = false
194
+ end
185
195
  end
186
196
 
187
197
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -220,7 +230,8 @@ module Carbon
220
230
  max_items_per_chunk == o.max_items_per_chunk &&
221
231
  parse_pdf_tables_with_ocr == o.parse_pdf_tables_with_ocr &&
222
232
  detect_audio_language == o.detect_audio_language &&
223
- media_type == o.media_type
233
+ media_type == o.media_type &&
234
+ split_rows == o.split_rows
224
235
  end
225
236
 
226
237
  # @see the `==` method
@@ -232,7 +243,7 @@ module Carbon
232
243
  # Calculates hash code according to all attributes.
233
244
  # @return [Integer] Hash code
234
245
  def hash
235
- [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, media_type].hash
246
+ [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, media_type, split_rows].hash
236
247
  end
237
248
 
238
249
  # Builds the object from hash
@@ -15,11 +15,14 @@ module Carbon
15
15
 
16
16
  attr_accessor :integrations
17
17
 
18
+ attr_accessor :custom_limits
19
+
18
20
  # Attribute mapping from ruby-style variable name to JSON key.
19
21
  def self.attribute_map
20
22
  {
21
23
  :'remove_branding' => :'remove_branding',
22
- :'integrations' => :'integrations'
24
+ :'integrations' => :'integrations',
25
+ :'custom_limits' => :'custom_limits'
23
26
  }
24
27
  end
25
28
 
@@ -32,7 +35,8 @@ module Carbon
32
35
  def self.openapi_types
33
36
  {
34
37
  :'remove_branding' => :'Boolean',
35
- :'integrations' => :'Object'
38
+ :'integrations' => :'Object',
39
+ :'custom_limits' => :'Object'
36
40
  }
37
41
  end
38
42
 
@@ -64,6 +68,10 @@ module Carbon
64
68
  if attributes.key?(:'integrations')
65
69
  self.integrations = attributes[:'integrations']
66
70
  end
71
+
72
+ if attributes.key?(:'custom_limits')
73
+ self.custom_limits = attributes[:'custom_limits']
74
+ end
67
75
  end
68
76
 
69
77
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -78,6 +86,10 @@ module Carbon
78
86
  invalid_properties.push('invalid value for "integrations", integrations cannot be nil.')
79
87
  end
80
88
 
89
+ if @custom_limits.nil?
90
+ invalid_properties.push('invalid value for "custom_limits", custom_limits cannot be nil.')
91
+ end
92
+
81
93
  invalid_properties
82
94
  end
83
95
 
@@ -86,6 +98,7 @@ module Carbon
86
98
  def valid?
87
99
  return false if @remove_branding.nil?
88
100
  return false if @integrations.nil?
101
+ return false if @custom_limits.nil?
89
102
  true
90
103
  end
91
104
 
@@ -95,7 +108,8 @@ module Carbon
95
108
  return true if self.equal?(o)
96
109
  self.class == o.class &&
97
110
  remove_branding == o.remove_branding &&
98
- integrations == o.integrations
111
+ integrations == o.integrations &&
112
+ custom_limits == o.custom_limits
99
113
  end
100
114
 
101
115
  # @see the `==` method
@@ -107,7 +121,7 @@ module Carbon
107
121
  # Calculates hash code according to all attributes.
108
122
  # @return [Integer] Hash code
109
123
  def hash
110
- [remove_branding, integrations].hash
124
+ [remove_branding, integrations, custom_limits].hash
111
125
  end
112
126
 
113
127
  # Builds the object from hash
@@ -7,5 +7,5 @@ The version of the OpenAPI document: 1.0.0
7
7
  =end
8
8
 
9
9
  module Carbon
10
- VERSION = '0.2.3'
10
+ VERSION = '0.2.5'
11
11
  end
@@ -159,6 +159,7 @@ describe 'FilesApi' do
159
159
  # @option opts [Boolean] :parse_pdf_tables_with_ocr Whether to use rich table parsing when &#x60;use_ocr&#x60; is enabled.
160
160
  # @option opts [Boolean] :detect_audio_language Whether to automatically detect the language of the uploaded audio file.
161
161
  # @option opts [FileContentTypesNullable] :media_type The media type of the file. If not provided, it will be inferred from the file extension.
162
+ # @option opts [Boolean] :split_rows Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files.
162
163
  # @return [UserFile]
163
164
  describe 'upload test' do
164
165
  it 'should work' do
@@ -115,6 +115,12 @@ describe Carbon::OrganizationResponse do
115
115
  end
116
116
  end
117
117
 
118
+ describe 'test attribute "file_sync_usage"' do
119
+ it 'should work' do
120
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
121
+ end
122
+ end
123
+
118
124
  describe 'test attribute "created_at"' do
119
125
  it 'should work' do
120
126
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -103,4 +103,10 @@ describe Carbon::UploadFileFromUrlInput do
103
103
  end
104
104
  end
105
105
 
106
+ describe 'test attribute "split_rows"' do
107
+ it 'should work' do
108
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
109
+ end
110
+ end
111
+
106
112
  end
@@ -31,4 +31,10 @@ describe Carbon::WhiteLabelingResponse do
31
31
  end
32
32
  end
33
33
 
34
+ describe 'test attribute "custom_limits"' 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
+
34
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carbon_ruby_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konfig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-05 00:00:00.000000000 Z
11
+ date: 2024-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday