carbon_ruby_sdk 0.1.13 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +20 -2
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +40 -8
- data/lib/carbon_ruby_sdk/models/document_response.rb +15 -5
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +30 -5
- data/lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb +11 -1
- data/lib/carbon_ruby_sdk/models/s3_file_sync_input.rb +29 -5
- data/lib/carbon_ruby_sdk/models/sync_files_request.rb +29 -5
- data/lib/carbon_ruby_sdk/models/user_file.rb +15 -1
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/spec/models/document_response_spec.rb +6 -0
- data/spec/models/o_auth_url_request_spec.rb +12 -0
- data/spec/models/organization_user_data_source_api_spec.rb +6 -0
- data/spec/models/s3_file_sync_input_spec.rb +12 -0
- data/spec/models/sync_files_request_spec.rb +12 -0
- data/spec/models/user_file_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fd28e7eb718e7a438c849d5d9820cb60fc73d8cdacfe0ef13f30fb6e97c67b3
|
4
|
+
data.tar.gz: a0b09df8026bb03a9e9549a01b09929a7c1b98be45579b399e54811ac21363f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a75f3914ec5e430b9c1ea7fd75367b34ff96bc516c434146c36c049c275747f852d1c7a60d93dd32acb4321806ce80e5436f873b3fb21df43f8d7292da92ed0
|
7
|
+
data.tar.gz: 723037b41f5609aef0d2af2e410bf6cce42065ec5c5c8125e59bbc89d26a0bbd3b26af6c090ee4bfa41094c96aa563ad704fdea588e29c3110a3acdebe99c8d4
|
data/Gemfile.lock
CHANGED
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.1.
|
9
|
+
[![npm](https://img.shields.io/badge/gem-v0.1.15-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.1.15)
|
10
10
|
|
11
11
|
</div>
|
12
12
|
|
@@ -80,7 +80,7 @@ Connect external data to LLMs, no matter the source.
|
|
80
80
|
Add to Gemfile:
|
81
81
|
|
82
82
|
```ruby
|
83
|
-
gem 'carbon_ruby_sdk', '~> 0.1.
|
83
|
+
gem 'carbon_ruby_sdk', '~> 0.1.15'
|
84
84
|
```
|
85
85
|
|
86
86
|
## Getting Started<a id="getting-started"></a>
|
@@ -1381,6 +1381,8 @@ result = carbon.integrations.get_oauth_url(
|
|
1381
1381
|
data_source_id: 1,
|
1382
1382
|
connecting_new_account: false,
|
1383
1383
|
request_id: "string_example",
|
1384
|
+
use_ocr: false,
|
1385
|
+
parse_pdf_tables_with_ocr: false,
|
1384
1386
|
)
|
1385
1387
|
p result
|
1386
1388
|
```
|
@@ -1424,6 +1426,10 @@ sync URL for an existing data source based on type and ID.
|
|
1424
1426
|
This request id will be added to all files that get synced using the generated
|
1425
1427
|
OAuth URL
|
1426
1428
|
|
1429
|
+
##### use_ocr: `Boolean`<a id="use_ocr-boolean"></a>
|
1430
|
+
Enable OCR for files that support it. Supported formats: pdf
|
1431
|
+
|
1432
|
+
##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
|
1427
1433
|
#### 🔄 Return<a id="🔄-return"></a>
|
1428
1434
|
|
1429
1435
|
[OuthURLResponse](./lib/carbon_ruby_sdk/models/outh_url_response.rb)
|
@@ -1641,6 +1647,8 @@ result = carbon.integrations.sync_confluence(
|
|
1641
1647
|
max_items_per_chunk: 1,
|
1642
1648
|
set_page_as_boundary: false,
|
1643
1649
|
request_id: "string_example",
|
1650
|
+
use_ocr: false,
|
1651
|
+
parse_pdf_tables_with_ocr: false,
|
1644
1652
|
)
|
1645
1653
|
p result
|
1646
1654
|
```
|
@@ -1661,6 +1669,8 @@ Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
|
1661
1669
|
|
1662
1670
|
##### set_page_as_boundary: `Boolean`<a id="set_page_as_boundary-boolean"></a>
|
1663
1671
|
##### request_id: `String`<a id="request_id-string"></a>
|
1672
|
+
##### use_ocr: `Boolean`<a id="use_ocr-boolean"></a>
|
1673
|
+
##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
|
1664
1674
|
#### 🔄 Return<a id="🔄-return"></a>
|
1665
1675
|
|
1666
1676
|
[GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
|
@@ -1728,6 +1738,8 @@ result = carbon.integrations.sync_files(
|
|
1728
1738
|
max_items_per_chunk: 1,
|
1729
1739
|
set_page_as_boundary: false,
|
1730
1740
|
request_id: "string_example",
|
1741
|
+
use_ocr: false,
|
1742
|
+
parse_pdf_tables_with_ocr: false,
|
1731
1743
|
)
|
1732
1744
|
p result
|
1733
1745
|
```
|
@@ -1748,6 +1760,8 @@ Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
|
1748
1760
|
|
1749
1761
|
##### set_page_as_boundary: `Boolean`<a id="set_page_as_boundary-boolean"></a>
|
1750
1762
|
##### request_id: `String`<a id="request_id-string"></a>
|
1763
|
+
##### use_ocr: `Boolean`<a id="use_ocr-boolean"></a>
|
1764
|
+
##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
|
1751
1765
|
#### 🔄 Return<a id="🔄-return"></a>
|
1752
1766
|
|
1753
1767
|
[GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
|
@@ -2081,6 +2095,8 @@ result = carbon.integrations.sync_s3_files(
|
|
2081
2095
|
set_page_as_boundary: false,
|
2082
2096
|
data_source_id: 1,
|
2083
2097
|
request_id: "string_example",
|
2098
|
+
use_ocr: false,
|
2099
|
+
parse_pdf_tables_with_ocr: false,
|
2084
2100
|
)
|
2085
2101
|
p result
|
2086
2102
|
```
|
@@ -2101,6 +2117,8 @@ Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
|
2101
2117
|
##### set_page_as_boundary: `Boolean`<a id="set_page_as_boundary-boolean"></a>
|
2102
2118
|
##### data_source_id: `Integer`<a id="data_source_id-integer"></a>
|
2103
2119
|
##### request_id: `String`<a id="request_id-string"></a>
|
2120
|
+
##### use_ocr: `Boolean`<a id="use_ocr-boolean"></a>
|
2121
|
+
##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
|
2104
2122
|
#### 🔄 Return<a id="🔄-return"></a>
|
2105
2123
|
|
2106
2124
|
[GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
|
@@ -543,9 +543,11 @@ module Carbon
|
|
543
543
|
# @param data_source_id [Integer] Used to specify a data source to sync from if you have multiple connected. It can be skipped if you only have one data source of that type connected or are connecting a new account.
|
544
544
|
# @param connecting_new_account [Boolean] 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.
|
545
545
|
# @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
|
546
|
+
# @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
|
547
|
+
# @param parse_pdf_tables_with_ocr [Boolean]
|
546
548
|
# @param body [OAuthURLRequest]
|
547
549
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
548
|
-
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: SENTINEL, extra: {})
|
550
|
+
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: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
|
549
551
|
_body = {}
|
550
552
|
_body[:tags] = tags if tags != SENTINEL
|
551
553
|
_body[:scope] = scope if scope != SENTINEL
|
@@ -567,6 +569,8 @@ module Carbon
|
|
567
569
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
568
570
|
_body[:connecting_new_account] = connecting_new_account if connecting_new_account != SENTINEL
|
569
571
|
_body[:request_id] = request_id if request_id != SENTINEL
|
572
|
+
_body[:use_ocr] = use_ocr if use_ocr != SENTINEL
|
573
|
+
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
570
574
|
o_auth_url_request = _body
|
571
575
|
api_response = get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
|
572
576
|
api_response.data
|
@@ -599,9 +603,11 @@ module Carbon
|
|
599
603
|
# @param data_source_id [Integer] Used to specify a data source to sync from if you have multiple connected. It can be skipped if you only have one data source of that type connected or are connecting a new account.
|
600
604
|
# @param connecting_new_account [Boolean] 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.
|
601
605
|
# @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
|
606
|
+
# @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
|
607
|
+
# @param parse_pdf_tables_with_ocr [Boolean]
|
602
608
|
# @param body [OAuthURLRequest]
|
603
609
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
604
|
-
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: SENTINEL, extra: {})
|
610
|
+
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: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
|
605
611
|
_body = {}
|
606
612
|
_body[:tags] = tags if tags != SENTINEL
|
607
613
|
_body[:scope] = scope if scope != SENTINEL
|
@@ -623,6 +629,8 @@ module Carbon
|
|
623
629
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
624
630
|
_body[:connecting_new_account] = connecting_new_account if connecting_new_account != SENTINEL
|
625
631
|
_body[:request_id] = request_id if request_id != SENTINEL
|
632
|
+
_body[:use_ocr] = use_ocr if use_ocr != SENTINEL
|
633
|
+
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
626
634
|
o_auth_url_request = _body
|
627
635
|
get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
|
628
636
|
end
|
@@ -1277,9 +1285,11 @@ module Carbon
|
|
1277
1285
|
# @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1278
1286
|
# @param set_page_as_boundary [Boolean]
|
1279
1287
|
# @param request_id [String]
|
1288
|
+
# @param use_ocr [Boolean]
|
1289
|
+
# @param parse_pdf_tables_with_ocr [Boolean]
|
1280
1290
|
# @param body [SyncFilesRequest]
|
1281
1291
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1282
|
-
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: SENTINEL, extra: {})
|
1292
|
+
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: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
|
1283
1293
|
_body = {}
|
1284
1294
|
_body[:tags] = tags if tags != SENTINEL
|
1285
1295
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1293,6 +1303,8 @@ module Carbon
|
|
1293
1303
|
_body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
|
1294
1304
|
_body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
|
1295
1305
|
_body[:request_id] = request_id if request_id != SENTINEL
|
1306
|
+
_body[:use_ocr] = use_ocr if use_ocr != SENTINEL
|
1307
|
+
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
1296
1308
|
sync_files_request = _body
|
1297
1309
|
api_response = sync_confluence_with_http_info_impl(sync_files_request, extra)
|
1298
1310
|
api_response.data
|
@@ -1317,9 +1329,11 @@ module Carbon
|
|
1317
1329
|
# @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1318
1330
|
# @param set_page_as_boundary [Boolean]
|
1319
1331
|
# @param request_id [String]
|
1332
|
+
# @param use_ocr [Boolean]
|
1333
|
+
# @param parse_pdf_tables_with_ocr [Boolean]
|
1320
1334
|
# @param body [SyncFilesRequest]
|
1321
1335
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1322
|
-
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: SENTINEL, extra: {})
|
1336
|
+
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: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
|
1323
1337
|
_body = {}
|
1324
1338
|
_body[:tags] = tags if tags != SENTINEL
|
1325
1339
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1333,6 +1347,8 @@ module Carbon
|
|
1333
1347
|
_body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
|
1334
1348
|
_body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
|
1335
1349
|
_body[:request_id] = request_id if request_id != SENTINEL
|
1350
|
+
_body[:use_ocr] = use_ocr if use_ocr != SENTINEL
|
1351
|
+
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
1336
1352
|
sync_files_request = _body
|
1337
1353
|
sync_confluence_with_http_info_impl(sync_files_request, extra)
|
1338
1354
|
end
|
@@ -1517,9 +1533,11 @@ module Carbon
|
|
1517
1533
|
# @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1518
1534
|
# @param set_page_as_boundary [Boolean]
|
1519
1535
|
# @param request_id [String]
|
1536
|
+
# @param use_ocr [Boolean]
|
1537
|
+
# @param parse_pdf_tables_with_ocr [Boolean]
|
1520
1538
|
# @param body [SyncFilesRequest]
|
1521
1539
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1522
|
-
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: SENTINEL, extra: {})
|
1540
|
+
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: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
|
1523
1541
|
_body = {}
|
1524
1542
|
_body[:tags] = tags if tags != SENTINEL
|
1525
1543
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1533,6 +1551,8 @@ module Carbon
|
|
1533
1551
|
_body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
|
1534
1552
|
_body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
|
1535
1553
|
_body[:request_id] = request_id if request_id != SENTINEL
|
1554
|
+
_body[:use_ocr] = use_ocr if use_ocr != SENTINEL
|
1555
|
+
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
1536
1556
|
sync_files_request = _body
|
1537
1557
|
api_response = sync_files_with_http_info_impl(sync_files_request, extra)
|
1538
1558
|
api_response.data
|
@@ -1557,9 +1577,11 @@ module Carbon
|
|
1557
1577
|
# @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1558
1578
|
# @param set_page_as_boundary [Boolean]
|
1559
1579
|
# @param request_id [String]
|
1580
|
+
# @param use_ocr [Boolean]
|
1581
|
+
# @param parse_pdf_tables_with_ocr [Boolean]
|
1560
1582
|
# @param body [SyncFilesRequest]
|
1561
1583
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1562
|
-
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: SENTINEL, extra: {})
|
1584
|
+
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: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
|
1563
1585
|
_body = {}
|
1564
1586
|
_body[:tags] = tags if tags != SENTINEL
|
1565
1587
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1573,6 +1595,8 @@ module Carbon
|
|
1573
1595
|
_body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
|
1574
1596
|
_body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
|
1575
1597
|
_body[:request_id] = request_id if request_id != SENTINEL
|
1598
|
+
_body[:use_ocr] = use_ocr if use_ocr != SENTINEL
|
1599
|
+
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
1576
1600
|
sync_files_request = _body
|
1577
1601
|
sync_files_with_http_info_impl(sync_files_request, extra)
|
1578
1602
|
end
|
@@ -2412,9 +2436,11 @@ module Carbon
|
|
2412
2436
|
# @param set_page_as_boundary [Boolean]
|
2413
2437
|
# @param data_source_id [Integer]
|
2414
2438
|
# @param request_id [String]
|
2439
|
+
# @param use_ocr [Boolean]
|
2440
|
+
# @param parse_pdf_tables_with_ocr [Boolean]
|
2415
2441
|
# @param body [S3FileSyncInput]
|
2416
2442
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
2417
|
-
def sync_s3_files(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, data_source_id: SENTINEL, request_id: SENTINEL, extra: {})
|
2443
|
+
def sync_s3_files(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, data_source_id: SENTINEL, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
|
2418
2444
|
_body = {}
|
2419
2445
|
_body[:tags] = tags if tags != SENTINEL
|
2420
2446
|
_body[:ids] = ids if ids != SENTINEL
|
@@ -2428,6 +2454,8 @@ module Carbon
|
|
2428
2454
|
_body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
|
2429
2455
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
2430
2456
|
_body[:request_id] = request_id if request_id != SENTINEL
|
2457
|
+
_body[:use_ocr] = use_ocr if use_ocr != SENTINEL
|
2458
|
+
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
2431
2459
|
s3_file_sync_input = _body
|
2432
2460
|
api_response = sync_s3_files_with_http_info_impl(s3_file_sync_input, extra)
|
2433
2461
|
api_response.data
|
@@ -2451,9 +2479,11 @@ module Carbon
|
|
2451
2479
|
# @param set_page_as_boundary [Boolean]
|
2452
2480
|
# @param data_source_id [Integer]
|
2453
2481
|
# @param request_id [String]
|
2482
|
+
# @param use_ocr [Boolean]
|
2483
|
+
# @param parse_pdf_tables_with_ocr [Boolean]
|
2454
2484
|
# @param body [S3FileSyncInput]
|
2455
2485
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
2456
|
-
def sync_s3_files_with_http_info(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, data_source_id: SENTINEL, request_id: SENTINEL, extra: {})
|
2486
|
+
def sync_s3_files_with_http_info(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, data_source_id: SENTINEL, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
|
2457
2487
|
_body = {}
|
2458
2488
|
_body[:tags] = tags if tags != SENTINEL
|
2459
2489
|
_body[:ids] = ids if ids != SENTINEL
|
@@ -2467,6 +2497,8 @@ module Carbon
|
|
2467
2497
|
_body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
|
2468
2498
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
2469
2499
|
_body[:request_id] = request_id if request_id != SENTINEL
|
2500
|
+
_body[:use_ocr] = use_ocr if use_ocr != SENTINEL
|
2501
|
+
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
2470
2502
|
s3_file_sync_input = _body
|
2471
2503
|
sync_s3_files_with_http_info_impl(s3_file_sync_input, extra)
|
2472
2504
|
end
|
@@ -33,6 +33,8 @@ module Carbon
|
|
33
33
|
|
34
34
|
attr_accessor :content_metadata
|
35
35
|
|
36
|
+
attr_accessor :chunk_index
|
37
|
+
|
36
38
|
# Attribute mapping from ruby-style variable name to JSON key.
|
37
39
|
def self.attribute_map
|
38
40
|
{
|
@@ -46,7 +48,8 @@ module Carbon
|
|
46
48
|
:'vector' => :'vector',
|
47
49
|
:'score' => :'score',
|
48
50
|
:'rank' => :'rank',
|
49
|
-
:'content_metadata' => :'content_metadata'
|
51
|
+
:'content_metadata' => :'content_metadata',
|
52
|
+
:'chunk_index' => :'chunk_index'
|
50
53
|
}
|
51
54
|
end
|
52
55
|
|
@@ -68,7 +71,8 @@ module Carbon
|
|
68
71
|
:'vector' => :'Array<Float>',
|
69
72
|
:'score' => :'Float',
|
70
73
|
:'rank' => :'RankProperty',
|
71
|
-
:'content_metadata' => :'Object'
|
74
|
+
:'content_metadata' => :'Object',
|
75
|
+
:'chunk_index' => :'Integer'
|
72
76
|
}
|
73
77
|
end
|
74
78
|
|
@@ -83,7 +87,8 @@ module Carbon
|
|
83
87
|
:'vector',
|
84
88
|
:'score',
|
85
89
|
:'rank',
|
86
|
-
:'content_metadata'
|
90
|
+
:'content_metadata',
|
91
|
+
:'chunk_index'
|
87
92
|
])
|
88
93
|
end
|
89
94
|
|
@@ -149,6 +154,10 @@ module Carbon
|
|
149
154
|
if attributes.key?(:'content_metadata')
|
150
155
|
self.content_metadata = attributes[:'content_metadata']
|
151
156
|
end
|
157
|
+
|
158
|
+
if attributes.key?(:'chunk_index')
|
159
|
+
self.chunk_index = attributes[:'chunk_index']
|
160
|
+
end
|
152
161
|
end
|
153
162
|
|
154
163
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -189,7 +198,8 @@ module Carbon
|
|
189
198
|
vector == o.vector &&
|
190
199
|
score == o.score &&
|
191
200
|
rank == o.rank &&
|
192
|
-
content_metadata == o.content_metadata
|
201
|
+
content_metadata == o.content_metadata &&
|
202
|
+
chunk_index == o.chunk_index
|
193
203
|
end
|
194
204
|
|
195
205
|
# @see the `==` method
|
@@ -201,7 +211,7 @@ module Carbon
|
|
201
211
|
# Calculates hash code according to all attributes.
|
202
212
|
# @return [Integer] Hash code
|
203
213
|
def hash
|
204
|
-
[tags, content, file_id, source, source_url, source_type, presigned_url, vector, score, rank, content_metadata].hash
|
214
|
+
[tags, content, file_id, source, source_url, source_type, presigned_url, vector, score, rank, content_metadata, chunk_index].hash
|
205
215
|
end
|
206
216
|
|
207
217
|
# Builds the object from hash
|
@@ -56,6 +56,11 @@ module Carbon
|
|
56
56
|
# This request id will be added to all files that get synced using the generated OAuth URL
|
57
57
|
attr_accessor :request_id
|
58
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
|
+
|
59
64
|
# Attribute mapping from ruby-style variable name to JSON key.
|
60
65
|
def self.attribute_map
|
61
66
|
{
|
@@ -78,7 +83,9 @@ module Carbon
|
|
78
83
|
:'set_page_as_boundary' => :'set_page_as_boundary',
|
79
84
|
:'data_source_id' => :'data_source_id',
|
80
85
|
:'connecting_new_account' => :'connecting_new_account',
|
81
|
-
:'request_id' => :'request_id'
|
86
|
+
:'request_id' => :'request_id',
|
87
|
+
:'use_ocr' => :'use_ocr',
|
88
|
+
:'parse_pdf_tables_with_ocr' => :'parse_pdf_tables_with_ocr'
|
82
89
|
}
|
83
90
|
end
|
84
91
|
|
@@ -109,7 +116,9 @@ module Carbon
|
|
109
116
|
:'set_page_as_boundary' => :'Boolean',
|
110
117
|
:'data_source_id' => :'Integer',
|
111
118
|
:'connecting_new_account' => :'Boolean',
|
112
|
-
:'request_id' => :'String'
|
119
|
+
:'request_id' => :'String',
|
120
|
+
:'use_ocr' => :'Boolean',
|
121
|
+
:'parse_pdf_tables_with_ocr' => :'Boolean'
|
113
122
|
}
|
114
123
|
end
|
115
124
|
|
@@ -133,7 +142,9 @@ module Carbon
|
|
133
142
|
:'sync_files_on_connection',
|
134
143
|
:'data_source_id',
|
135
144
|
:'connecting_new_account',
|
136
|
-
:'request_id'
|
145
|
+
:'request_id',
|
146
|
+
:'use_ocr',
|
147
|
+
:'parse_pdf_tables_with_ocr'
|
137
148
|
])
|
138
149
|
end
|
139
150
|
|
@@ -249,6 +260,18 @@ module Carbon
|
|
249
260
|
if attributes.key?(:'request_id')
|
250
261
|
self.request_id = attributes[:'request_id']
|
251
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
|
252
275
|
end
|
253
276
|
|
254
277
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -293,7 +316,9 @@ module Carbon
|
|
293
316
|
set_page_as_boundary == o.set_page_as_boundary &&
|
294
317
|
data_source_id == o.data_source_id &&
|
295
318
|
connecting_new_account == o.connecting_new_account &&
|
296
|
-
request_id == o.request_id
|
319
|
+
request_id == o.request_id &&
|
320
|
+
use_ocr == o.use_ocr &&
|
321
|
+
parse_pdf_tables_with_ocr == o.parse_pdf_tables_with_ocr
|
297
322
|
end
|
298
323
|
|
299
324
|
# @see the `==` method
|
@@ -305,7 +330,7 @@ module Carbon
|
|
305
330
|
# Calculates hash code according to all attributes.
|
306
331
|
# @return [Integer] Hash code
|
307
332
|
def hash
|
308
|
-
[tags, scope, service, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, zendesk_subdomain, microsoft_tenant, sharepoint_site_name, confluence_subdomain, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, salesforce_domain, sync_files_on_connection, set_page_as_boundary, data_source_id, connecting_new_account, request_id].hash
|
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
|
309
334
|
end
|
310
335
|
|
311
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
|
@@ -36,6 +36,10 @@ module Carbon
|
|
36
36
|
|
37
37
|
attr_accessor :request_id
|
38
38
|
|
39
|
+
attr_accessor :use_ocr
|
40
|
+
|
41
|
+
attr_accessor :parse_pdf_tables_with_ocr
|
42
|
+
|
39
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
40
44
|
def self.attribute_map
|
41
45
|
{
|
@@ -50,7 +54,9 @@ module Carbon
|
|
50
54
|
:'max_items_per_chunk' => :'max_items_per_chunk',
|
51
55
|
:'set_page_as_boundary' => :'set_page_as_boundary',
|
52
56
|
:'data_source_id' => :'data_source_id',
|
53
|
-
:'request_id' => :'request_id'
|
57
|
+
:'request_id' => :'request_id',
|
58
|
+
:'use_ocr' => :'use_ocr',
|
59
|
+
:'parse_pdf_tables_with_ocr' => :'parse_pdf_tables_with_ocr'
|
54
60
|
}
|
55
61
|
end
|
56
62
|
|
@@ -73,7 +79,9 @@ module Carbon
|
|
73
79
|
:'max_items_per_chunk' => :'Integer',
|
74
80
|
:'set_page_as_boundary' => :'Boolean',
|
75
81
|
:'data_source_id' => :'Integer',
|
76
|
-
:'request_id' => :'String'
|
82
|
+
:'request_id' => :'String',
|
83
|
+
:'use_ocr' => :'Boolean',
|
84
|
+
:'parse_pdf_tables_with_ocr' => :'Boolean'
|
77
85
|
}
|
78
86
|
end
|
79
87
|
|
@@ -88,7 +96,9 @@ module Carbon
|
|
88
96
|
:'prepend_filename_to_chunks',
|
89
97
|
:'max_items_per_chunk',
|
90
98
|
:'data_source_id',
|
91
|
-
:'request_id'
|
99
|
+
:'request_id',
|
100
|
+
:'use_ocr',
|
101
|
+
:'parse_pdf_tables_with_ocr'
|
92
102
|
])
|
93
103
|
end
|
94
104
|
|
@@ -170,6 +180,18 @@ module Carbon
|
|
170
180
|
if attributes.key?(:'request_id')
|
171
181
|
self.request_id = attributes[:'request_id']
|
172
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
|
173
195
|
end
|
174
196
|
|
175
197
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -206,7 +228,9 @@ module Carbon
|
|
206
228
|
max_items_per_chunk == o.max_items_per_chunk &&
|
207
229
|
set_page_as_boundary == o.set_page_as_boundary &&
|
208
230
|
data_source_id == o.data_source_id &&
|
209
|
-
request_id == o.request_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
|
210
234
|
end
|
211
235
|
|
212
236
|
# @see the `==` method
|
@@ -218,7 +242,7 @@ module Carbon
|
|
218
242
|
# Calculates hash code according to all attributes.
|
219
243
|
# @return [Integer] Hash code
|
220
244
|
def hash
|
221
|
-
[tags, ids, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, set_page_as_boundary, data_source_id, request_id].hash
|
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
|
222
246
|
end
|
223
247
|
|
224
248
|
# Builds the object from hash
|
@@ -36,6 +36,10 @@ module Carbon
|
|
36
36
|
|
37
37
|
attr_accessor :request_id
|
38
38
|
|
39
|
+
attr_accessor :use_ocr
|
40
|
+
|
41
|
+
attr_accessor :parse_pdf_tables_with_ocr
|
42
|
+
|
39
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
40
44
|
def self.attribute_map
|
41
45
|
{
|
@@ -50,7 +54,9 @@ module Carbon
|
|
50
54
|
:'prepend_filename_to_chunks' => :'prepend_filename_to_chunks',
|
51
55
|
:'max_items_per_chunk' => :'max_items_per_chunk',
|
52
56
|
:'set_page_as_boundary' => :'set_page_as_boundary',
|
53
|
-
:'request_id' => :'request_id'
|
57
|
+
:'request_id' => :'request_id',
|
58
|
+
:'use_ocr' => :'use_ocr',
|
59
|
+
:'parse_pdf_tables_with_ocr' => :'parse_pdf_tables_with_ocr'
|
54
60
|
}
|
55
61
|
end
|
56
62
|
|
@@ -73,7 +79,9 @@ module Carbon
|
|
73
79
|
:'prepend_filename_to_chunks' => :'Boolean',
|
74
80
|
:'max_items_per_chunk' => :'Integer',
|
75
81
|
:'set_page_as_boundary' => :'Boolean',
|
76
|
-
:'request_id' => :'String'
|
82
|
+
:'request_id' => :'String',
|
83
|
+
:'use_ocr' => :'Boolean',
|
84
|
+
:'parse_pdf_tables_with_ocr' => :'Boolean'
|
77
85
|
}
|
78
86
|
end
|
79
87
|
|
@@ -88,7 +96,9 @@ module Carbon
|
|
88
96
|
:'generate_sparse_vectors',
|
89
97
|
:'prepend_filename_to_chunks',
|
90
98
|
:'max_items_per_chunk',
|
91
|
-
:'request_id'
|
99
|
+
:'request_id',
|
100
|
+
:'use_ocr',
|
101
|
+
:'parse_pdf_tables_with_ocr'
|
92
102
|
])
|
93
103
|
end
|
94
104
|
|
@@ -168,6 +178,18 @@ module Carbon
|
|
168
178
|
if attributes.key?(:'request_id')
|
169
179
|
self.request_id = attributes[:'request_id']
|
170
180
|
end
|
181
|
+
|
182
|
+
if attributes.key?(:'use_ocr')
|
183
|
+
self.use_ocr = attributes[:'use_ocr']
|
184
|
+
else
|
185
|
+
self.use_ocr = false
|
186
|
+
end
|
187
|
+
|
188
|
+
if attributes.key?(:'parse_pdf_tables_with_ocr')
|
189
|
+
self.parse_pdf_tables_with_ocr = attributes[:'parse_pdf_tables_with_ocr']
|
190
|
+
else
|
191
|
+
self.parse_pdf_tables_with_ocr = false
|
192
|
+
end
|
171
193
|
end
|
172
194
|
|
173
195
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -209,7 +231,9 @@ module Carbon
|
|
209
231
|
prepend_filename_to_chunks == o.prepend_filename_to_chunks &&
|
210
232
|
max_items_per_chunk == o.max_items_per_chunk &&
|
211
233
|
set_page_as_boundary == o.set_page_as_boundary &&
|
212
|
-
request_id == o.request_id
|
234
|
+
request_id == o.request_id &&
|
235
|
+
use_ocr == o.use_ocr &&
|
236
|
+
parse_pdf_tables_with_ocr == o.parse_pdf_tables_with_ocr
|
213
237
|
end
|
214
238
|
|
215
239
|
# @see the `==` method
|
@@ -221,7 +245,7 @@ module Carbon
|
|
221
245
|
# Calculates hash code according to all attributes.
|
222
246
|
# @return [Integer] Hash code
|
223
247
|
def hash
|
224
|
-
[tags, data_source_id, ids, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, set_page_as_boundary, request_id].hash
|
248
|
+
[tags, data_source_id, ids, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, set_page_as_boundary, request_id, use_ocr, parse_pdf_tables_with_ocr].hash
|
225
249
|
end
|
226
250
|
|
227
251
|
# Builds the object from hash
|
@@ -45,6 +45,8 @@ module Carbon
|
|
45
45
|
|
46
46
|
attr_accessor :chunk_properties
|
47
47
|
|
48
|
+
attr_accessor :ocr_properties
|
49
|
+
|
48
50
|
attr_accessor :name
|
49
51
|
|
50
52
|
attr_accessor :parent_id
|
@@ -89,6 +91,7 @@ module Carbon
|
|
89
91
|
:'chunk_size' => :'chunk_size',
|
90
92
|
:'chunk_overlap' => :'chunk_overlap',
|
91
93
|
:'chunk_properties' => :'chunk_properties',
|
94
|
+
:'ocr_properties' => :'ocr_properties',
|
92
95
|
:'name' => :'name',
|
93
96
|
:'parent_id' => :'parent_id',
|
94
97
|
:'enable_auto_sync' => :'enable_auto_sync',
|
@@ -129,6 +132,7 @@ module Carbon
|
|
129
132
|
:'chunk_size' => :'Integer',
|
130
133
|
:'chunk_overlap' => :'Integer',
|
131
134
|
:'chunk_properties' => :'ChunkPropertiesNullable',
|
135
|
+
:'ocr_properties' => :'Object',
|
132
136
|
:'name' => :'String',
|
133
137
|
:'parent_id' => :'Integer',
|
134
138
|
:'enable_auto_sync' => :'Boolean',
|
@@ -255,6 +259,10 @@ module Carbon
|
|
255
259
|
self.chunk_properties = attributes[:'chunk_properties']
|
256
260
|
end
|
257
261
|
|
262
|
+
if attributes.key?(:'ocr_properties')
|
263
|
+
self.ocr_properties = attributes[:'ocr_properties']
|
264
|
+
end
|
265
|
+
|
258
266
|
if attributes.key?(:'name')
|
259
267
|
self.name = attributes[:'name']
|
260
268
|
end
|
@@ -332,6 +340,10 @@ module Carbon
|
|
332
340
|
invalid_properties.push('invalid value for "sync_status", sync_status cannot be nil.')
|
333
341
|
end
|
334
342
|
|
343
|
+
if @ocr_properties.nil?
|
344
|
+
invalid_properties.push('invalid value for "ocr_properties", ocr_properties cannot be nil.')
|
345
|
+
end
|
346
|
+
|
335
347
|
if @skip_embedding_generation.nil?
|
336
348
|
invalid_properties.push('invalid value for "skip_embedding_generation", skip_embedding_generation cannot be nil.')
|
337
349
|
end
|
@@ -356,6 +368,7 @@ module Carbon
|
|
356
368
|
return false if @organization_supplied_user_id.nil?
|
357
369
|
return false if @external_file_id.nil?
|
358
370
|
return false if @sync_status.nil?
|
371
|
+
return false if @ocr_properties.nil?
|
359
372
|
return false if @skip_embedding_generation.nil?
|
360
373
|
return false if @created_at.nil?
|
361
374
|
return false if @updated_at.nil?
|
@@ -384,6 +397,7 @@ module Carbon
|
|
384
397
|
chunk_size == o.chunk_size &&
|
385
398
|
chunk_overlap == o.chunk_overlap &&
|
386
399
|
chunk_properties == o.chunk_properties &&
|
400
|
+
ocr_properties == o.ocr_properties &&
|
387
401
|
name == o.name &&
|
388
402
|
parent_id == o.parent_id &&
|
389
403
|
enable_auto_sync == o.enable_auto_sync &&
|
@@ -407,7 +421,7 @@ module Carbon
|
|
407
421
|
# Calculates hash code according to all attributes.
|
408
422
|
# @return [Integer] Hash code
|
409
423
|
def hash
|
410
|
-
[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, 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, created_at, updated_at].hash
|
424
|
+
[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, 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, created_at, updated_at].hash
|
411
425
|
end
|
412
426
|
|
413
427
|
# Builds the object from hash
|
@@ -139,4 +139,16 @@ describe Carbon::OAuthURLRequest do
|
|
139
139
|
end
|
140
140
|
end
|
141
141
|
|
142
|
+
describe 'test attribute "use_ocr"' do
|
143
|
+
it 'should work' do
|
144
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
describe 'test attribute "parse_pdf_tables_with_ocr"' do
|
149
|
+
it 'should work' do
|
150
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
142
154
|
end
|
@@ -91,6 +91,12 @@ describe Carbon::OrganizationUserDataSourceAPI do
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
94
|
+
describe 'test attribute "enable_auto_sync"' do
|
95
|
+
it 'should work' do
|
96
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
94
100
|
describe 'test attribute "created_at"' do
|
95
101
|
it 'should work' do
|
96
102
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -91,4 +91,16 @@ describe Carbon::S3FileSyncInput do
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
94
|
+
describe 'test attribute "use_ocr"' do
|
95
|
+
it 'should work' do
|
96
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
describe 'test attribute "parse_pdf_tables_with_ocr"' do
|
101
|
+
it 'should work' do
|
102
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
94
106
|
end
|
@@ -91,4 +91,16 @@ describe Carbon::SyncFilesRequest do
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
94
|
+
describe 'test attribute "use_ocr"' do
|
95
|
+
it 'should work' do
|
96
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
describe 'test attribute "parse_pdf_tables_with_ocr"' do
|
101
|
+
it 'should work' do
|
102
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
94
106
|
end
|
@@ -121,6 +121,12 @@ describe Carbon::UserFile do
|
|
121
121
|
end
|
122
122
|
end
|
123
123
|
|
124
|
+
describe 'test attribute "ocr_properties"' do
|
125
|
+
it 'should work' do
|
126
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
124
130
|
describe 'test attribute "name"' do
|
125
131
|
it 'should work' do
|
126
132
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
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.1.
|
4
|
+
version: 0.1.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konfig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|