carbon_ruby_sdk 0.1.28 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +15 -7
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +16 -8
- data/lib/carbon_ruby_sdk/models/helpdesk_global_file_sync_config.rb +217 -0
- data/lib/carbon_ruby_sdk/models/helpdesk_global_file_sync_config_nullable.rb +218 -0
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +2 -2
- data/lib/carbon_ruby_sdk/models/sync_files_request.rb +15 -5
- data/lib/carbon_ruby_sdk/models/sync_options.rb +1 -1
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +2 -0
- data/spec/models/helpdesk_global_file_sync_config_nullable_spec.rb +28 -0
- data/spec/models/helpdesk_global_file_sync_config_spec.rb +28 -0
- data/spec/models/sync_files_request_spec.rb +6 -0
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e17ef8a89e973427802b45bb0b25e6829c14d4a0b869aea6e6b28af8e4a9b78a
|
|
4
|
+
data.tar.gz: c32c0480d4eb49e359e3b2d723e883e89281290b6fb093e7bb230b150d70e24b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e1699dd81d8184eb058380d5a33658b0a090a9b3433aa96b4bda9968bce4902f86ca408e4c19dbf8915e82973cf6c116ed1c70df0381072e95d7a8a1203a3218
|
|
7
|
+
data.tar.gz: fa4c8d9be1c251958dd420097da9d8dc7883f3e95dbc2b4021d42567ab1d5fb733a3a3b9e752a94338592e1623acf386470f89a70633ea7081625e1d3efdcdba
|
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
|
-
[](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.1.29)
|
|
10
10
|
|
|
11
11
|
</div>
|
|
12
12
|
|
|
@@ -84,7 +84,7 @@ Connect external data to LLMs, no matter the source.
|
|
|
84
84
|
Add to Gemfile:
|
|
85
85
|
|
|
86
86
|
```ruby
|
|
87
|
-
gem 'carbon_ruby_sdk', '~> 0.1.
|
|
87
|
+
gem 'carbon_ruby_sdk', '~> 0.1.29'
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -1202,7 +1202,7 @@ result = carbon.integrations.connect_data_source(
|
|
|
1202
1202
|
"prepend_filename_to_chunks" => false,
|
|
1203
1203
|
"sync_files_on_connection" => true,
|
|
1204
1204
|
"set_page_as_boundary" => false,
|
|
1205
|
-
"request_id" => "
|
|
1205
|
+
"request_id" => "30d4247e-9dcf-41e3-98a7-61ef4a78adad",
|
|
1206
1206
|
"enable_file_picker" => true,
|
|
1207
1207
|
"sync_source_items" => true,
|
|
1208
1208
|
"incremental_sync" => false,
|
|
@@ -1415,7 +1415,7 @@ result = carbon.integrations.get_oauth_url(
|
|
|
1415
1415
|
set_page_as_boundary: false,
|
|
1416
1416
|
data_source_id: 1,
|
|
1417
1417
|
connecting_new_account: false,
|
|
1418
|
-
request_id: "
|
|
1418
|
+
request_id: "e33ac7f9-11d1-4a94-8855-016e4d6c07ff",
|
|
1419
1419
|
use_ocr: false,
|
|
1420
1420
|
parse_pdf_tables_with_ocr: false,
|
|
1421
1421
|
enable_file_picker: true,
|
|
@@ -1474,7 +1474,7 @@ Enable OCR for files that support it. Supported formats: pdf
|
|
|
1474
1474
|
##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
|
|
1475
1475
|
##### enable_file_picker: `Boolean`<a id="enable_file_picker-boolean"></a>
|
|
1476
1476
|
Enable integration's file picker for sources that support it. Supported sources:
|
|
1477
|
-
|
|
1477
|
+
DROPBOX, ONEDRIVE, SHAREPOINT, BOX, GOOGLE_DRIVE
|
|
1478
1478
|
|
|
1479
1479
|
##### sync_source_items: `Boolean`<a id="sync_source_items-boolean"></a>
|
|
1480
1480
|
Enabling this flag will fetch all available content from the source to be listed
|
|
@@ -1736,10 +1736,13 @@ result = carbon.integrations.sync_confluence(
|
|
|
1736
1736
|
prepend_filename_to_chunks: false,
|
|
1737
1737
|
max_items_per_chunk: 1,
|
|
1738
1738
|
set_page_as_boundary: false,
|
|
1739
|
-
request_id: "
|
|
1739
|
+
request_id: "952c7efa-d4fe-43bf-a86c-4f5dad9fc003",
|
|
1740
1740
|
use_ocr: false,
|
|
1741
1741
|
parse_pdf_tables_with_ocr: false,
|
|
1742
1742
|
incremental_sync: false,
|
|
1743
|
+
file_sync_config: {
|
|
1744
|
+
"sync_attachments" => false,
|
|
1745
|
+
},
|
|
1743
1746
|
)
|
|
1744
1747
|
p result
|
|
1745
1748
|
```
|
|
@@ -1767,6 +1770,7 @@ Only sync files if they have not already been synced or if the embedding
|
|
|
1767
1770
|
properties have changed. This flag is currently supported by ONEDRIVE,
|
|
1768
1771
|
GOOGLE_DRIVE, BOX, DROPBOX. It will be ignored for other data sources.
|
|
1769
1772
|
|
|
1773
|
+
##### file_sync_config: [`HelpdeskGlobalFileSyncConfigNullable`](./lib/carbon_ruby_sdk/models/helpdesk_global_file_sync_config_nullable.rb)<a id="file_sync_config-helpdeskglobalfilesyncconfignullablelibcarbon_ruby_sdkmodelshelpdesk_global_file_sync_config_nullablerb"></a>
|
|
1770
1774
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
1771
1775
|
|
|
1772
1776
|
[GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
|
|
@@ -1833,10 +1837,13 @@ result = carbon.integrations.sync_files(
|
|
|
1833
1837
|
prepend_filename_to_chunks: false,
|
|
1834
1838
|
max_items_per_chunk: 1,
|
|
1835
1839
|
set_page_as_boundary: false,
|
|
1836
|
-
request_id: "
|
|
1840
|
+
request_id: "952c7efa-d4fe-43bf-a86c-4f5dad9fc003",
|
|
1837
1841
|
use_ocr: false,
|
|
1838
1842
|
parse_pdf_tables_with_ocr: false,
|
|
1839
1843
|
incremental_sync: false,
|
|
1844
|
+
file_sync_config: {
|
|
1845
|
+
"sync_attachments" => false,
|
|
1846
|
+
},
|
|
1840
1847
|
)
|
|
1841
1848
|
p result
|
|
1842
1849
|
```
|
|
@@ -1864,6 +1871,7 @@ Only sync files if they have not already been synced or if the embedding
|
|
|
1864
1871
|
properties have changed. This flag is currently supported by ONEDRIVE,
|
|
1865
1872
|
GOOGLE_DRIVE, BOX, DROPBOX. It will be ignored for other data sources.
|
|
1866
1873
|
|
|
1874
|
+
##### file_sync_config: [`HelpdeskGlobalFileSyncConfigNullable`](./lib/carbon_ruby_sdk/models/helpdesk_global_file_sync_config_nullable.rb)<a id="file_sync_config-helpdeskglobalfilesyncconfignullablelibcarbon_ruby_sdkmodelshelpdesk_global_file_sync_config_nullablerb"></a>
|
|
1867
1875
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
1868
1876
|
|
|
1869
1877
|
[GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
|
|
@@ -557,13 +557,13 @@ module Carbon
|
|
|
557
557
|
# @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
|
|
558
558
|
# @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
|
|
559
559
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
|
560
|
-
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources:
|
|
560
|
+
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: DROPBOX, ONEDRIVE, SHAREPOINT, BOX, GOOGLE_DRIVE
|
|
561
561
|
# @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
|
|
562
562
|
# @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.
|
|
563
563
|
# @param file_sync_config [HelpdeskFileSyncConfigNullable]
|
|
564
564
|
# @param body [OAuthURLRequest]
|
|
565
565
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
566
|
-
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: '
|
|
566
|
+
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: 'e33ac7f9-11d1-4a94-8855-016e4d6c07ff', 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: {})
|
|
567
567
|
_body = {}
|
|
568
568
|
_body[:tags] = tags if tags != SENTINEL
|
|
569
569
|
_body[:scope] = scope if scope != SENTINEL
|
|
@@ -625,13 +625,13 @@ module Carbon
|
|
|
625
625
|
# @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
|
|
626
626
|
# @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
|
|
627
627
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
|
628
|
-
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources:
|
|
628
|
+
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: DROPBOX, ONEDRIVE, SHAREPOINT, BOX, GOOGLE_DRIVE
|
|
629
629
|
# @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
|
|
630
630
|
# @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.
|
|
631
631
|
# @param file_sync_config [HelpdeskFileSyncConfigNullable]
|
|
632
632
|
# @param body [OAuthURLRequest]
|
|
633
633
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
634
|
-
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: '
|
|
634
|
+
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: 'e33ac7f9-11d1-4a94-8855-016e4d6c07ff', 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: {})
|
|
635
635
|
_body = {}
|
|
636
636
|
_body[:tags] = tags if tags != SENTINEL
|
|
637
637
|
_body[:scope] = scope if scope != SENTINEL
|
|
@@ -1424,9 +1424,10 @@ module Carbon
|
|
|
1424
1424
|
# @param use_ocr [Boolean]
|
|
1425
1425
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
|
1426
1426
|
# @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.
|
|
1427
|
+
# @param file_sync_config [HelpdeskGlobalFileSyncConfigNullable]
|
|
1427
1428
|
# @param body [SyncFilesRequest]
|
|
1428
1429
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
1429
|
-
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: '
|
|
1430
|
+
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: '952c7efa-d4fe-43bf-a86c-4f5dad9fc003', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
|
1430
1431
|
_body = {}
|
|
1431
1432
|
_body[:tags] = tags if tags != SENTINEL
|
|
1432
1433
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
|
@@ -1443,6 +1444,7 @@ module Carbon
|
|
|
1443
1444
|
_body[:use_ocr] = use_ocr if use_ocr != SENTINEL
|
|
1444
1445
|
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
|
1445
1446
|
_body[:incremental_sync] = incremental_sync if incremental_sync != SENTINEL
|
|
1447
|
+
_body[:file_sync_config] = file_sync_config if file_sync_config != SENTINEL
|
|
1446
1448
|
sync_files_request = _body
|
|
1447
1449
|
api_response = sync_confluence_with_http_info_impl(sync_files_request, extra)
|
|
1448
1450
|
api_response.data
|
|
@@ -1470,9 +1472,10 @@ module Carbon
|
|
|
1470
1472
|
# @param use_ocr [Boolean]
|
|
1471
1473
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
|
1472
1474
|
# @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.
|
|
1475
|
+
# @param file_sync_config [HelpdeskGlobalFileSyncConfigNullable]
|
|
1473
1476
|
# @param body [SyncFilesRequest]
|
|
1474
1477
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
1475
|
-
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: '
|
|
1478
|
+
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: '952c7efa-d4fe-43bf-a86c-4f5dad9fc003', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
|
1476
1479
|
_body = {}
|
|
1477
1480
|
_body[:tags] = tags if tags != SENTINEL
|
|
1478
1481
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
|
@@ -1489,6 +1492,7 @@ module Carbon
|
|
|
1489
1492
|
_body[:use_ocr] = use_ocr if use_ocr != SENTINEL
|
|
1490
1493
|
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
|
1491
1494
|
_body[:incremental_sync] = incremental_sync if incremental_sync != SENTINEL
|
|
1495
|
+
_body[:file_sync_config] = file_sync_config if file_sync_config != SENTINEL
|
|
1492
1496
|
sync_files_request = _body
|
|
1493
1497
|
sync_confluence_with_http_info_impl(sync_files_request, extra)
|
|
1494
1498
|
end
|
|
@@ -1676,9 +1680,10 @@ module Carbon
|
|
|
1676
1680
|
# @param use_ocr [Boolean]
|
|
1677
1681
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
|
1678
1682
|
# @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.
|
|
1683
|
+
# @param file_sync_config [HelpdeskGlobalFileSyncConfigNullable]
|
|
1679
1684
|
# @param body [SyncFilesRequest]
|
|
1680
1685
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
1681
|
-
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: '
|
|
1686
|
+
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: '952c7efa-d4fe-43bf-a86c-4f5dad9fc003', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
|
1682
1687
|
_body = {}
|
|
1683
1688
|
_body[:tags] = tags if tags != SENTINEL
|
|
1684
1689
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
|
@@ -1695,6 +1700,7 @@ module Carbon
|
|
|
1695
1700
|
_body[:use_ocr] = use_ocr if use_ocr != SENTINEL
|
|
1696
1701
|
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
|
1697
1702
|
_body[:incremental_sync] = incremental_sync if incremental_sync != SENTINEL
|
|
1703
|
+
_body[:file_sync_config] = file_sync_config if file_sync_config != SENTINEL
|
|
1698
1704
|
sync_files_request = _body
|
|
1699
1705
|
api_response = sync_files_with_http_info_impl(sync_files_request, extra)
|
|
1700
1706
|
api_response.data
|
|
@@ -1722,9 +1728,10 @@ module Carbon
|
|
|
1722
1728
|
# @param use_ocr [Boolean]
|
|
1723
1729
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
|
1724
1730
|
# @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.
|
|
1731
|
+
# @param file_sync_config [HelpdeskGlobalFileSyncConfigNullable]
|
|
1725
1732
|
# @param body [SyncFilesRequest]
|
|
1726
1733
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
1727
|
-
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: '
|
|
1734
|
+
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: '952c7efa-d4fe-43bf-a86c-4f5dad9fc003', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
|
1728
1735
|
_body = {}
|
|
1729
1736
|
_body[:tags] = tags if tags != SENTINEL
|
|
1730
1737
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
|
@@ -1741,6 +1748,7 @@ module Carbon
|
|
|
1741
1748
|
_body[:use_ocr] = use_ocr if use_ocr != SENTINEL
|
|
1742
1749
|
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
|
1743
1750
|
_body[:incremental_sync] = incremental_sync if incremental_sync != SENTINEL
|
|
1751
|
+
_body[:file_sync_config] = file_sync_config if file_sync_config != SENTINEL
|
|
1744
1752
|
sync_files_request = _body
|
|
1745
1753
|
sync_files_with_http_info_impl(sync_files_request, extra)
|
|
1746
1754
|
end
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Carbon
|
|
3
|
+
|
|
4
|
+
#Connect external data to LLMs, no matter the source.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
=end
|
|
8
|
+
|
|
9
|
+
require 'date'
|
|
10
|
+
require 'time'
|
|
11
|
+
|
|
12
|
+
module Carbon
|
|
13
|
+
class HelpdeskGlobalFileSyncConfig
|
|
14
|
+
attr_accessor :sync_attachments
|
|
15
|
+
|
|
16
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
17
|
+
def self.attribute_map
|
|
18
|
+
{
|
|
19
|
+
:'sync_attachments' => :'sync_attachments'
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Returns all the JSON keys this model knows about
|
|
24
|
+
def self.acceptable_attributes
|
|
25
|
+
attribute_map.values
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Attribute type mapping.
|
|
29
|
+
def self.openapi_types
|
|
30
|
+
{
|
|
31
|
+
:'sync_attachments' => :'Boolean'
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# List of attributes with nullable: true
|
|
36
|
+
def self.openapi_nullable
|
|
37
|
+
Set.new([
|
|
38
|
+
])
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Initializes the object
|
|
42
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
43
|
+
def initialize(attributes = {})
|
|
44
|
+
if (!attributes.is_a?(Hash))
|
|
45
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::HelpdeskGlobalFileSyncConfig` initialize method"
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
49
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
50
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
51
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::HelpdeskGlobalFileSyncConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
52
|
+
end
|
|
53
|
+
h[k.to_sym] = v
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if attributes.key?(:'sync_attachments')
|
|
57
|
+
self.sync_attachments = attributes[:'sync_attachments']
|
|
58
|
+
else
|
|
59
|
+
self.sync_attachments = false
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
64
|
+
# @return Array for valid properties with the reasons
|
|
65
|
+
def list_invalid_properties
|
|
66
|
+
invalid_properties = Array.new
|
|
67
|
+
invalid_properties
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Check to see if the all the properties in the model are valid
|
|
71
|
+
# @return true if the model is valid
|
|
72
|
+
def valid?
|
|
73
|
+
true
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Checks equality by comparing each attribute.
|
|
77
|
+
# @param [Object] Object to be compared
|
|
78
|
+
def ==(o)
|
|
79
|
+
return true if self.equal?(o)
|
|
80
|
+
self.class == o.class &&
|
|
81
|
+
sync_attachments == o.sync_attachments
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# @see the `==` method
|
|
85
|
+
# @param [Object] Object to be compared
|
|
86
|
+
def eql?(o)
|
|
87
|
+
self == o
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Calculates hash code according to all attributes.
|
|
91
|
+
# @return [Integer] Hash code
|
|
92
|
+
def hash
|
|
93
|
+
[sync_attachments].hash
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Builds the object from hash
|
|
97
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
98
|
+
# @return [Object] Returns the model itself
|
|
99
|
+
def self.build_from_hash(attributes)
|
|
100
|
+
new.build_from_hash(attributes)
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Builds the object from hash
|
|
104
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
105
|
+
# @return [Object] Returns the model itself
|
|
106
|
+
def build_from_hash(attributes)
|
|
107
|
+
return nil unless attributes.is_a?(Hash)
|
|
108
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
109
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
110
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
111
|
+
self.send("#{key}=", nil)
|
|
112
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
113
|
+
# check to ensure the input is an array given that the attribute
|
|
114
|
+
# is documented as an array but the input is not
|
|
115
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
116
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
117
|
+
end
|
|
118
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
119
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
self
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Deserializes the data based on type
|
|
127
|
+
# @param string type Data type
|
|
128
|
+
# @param string value Value to be deserialized
|
|
129
|
+
# @return [Object] Deserialized data
|
|
130
|
+
def _deserialize(type, value)
|
|
131
|
+
case type.to_sym
|
|
132
|
+
when :Time
|
|
133
|
+
Time.parse(value)
|
|
134
|
+
when :Date
|
|
135
|
+
Date.parse(value)
|
|
136
|
+
when :String
|
|
137
|
+
value.to_s
|
|
138
|
+
when :Integer
|
|
139
|
+
value.to_i
|
|
140
|
+
when :Float
|
|
141
|
+
value.to_f
|
|
142
|
+
when :Boolean
|
|
143
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
144
|
+
true
|
|
145
|
+
else
|
|
146
|
+
false
|
|
147
|
+
end
|
|
148
|
+
when :Object
|
|
149
|
+
# generic object (usually a Hash), return directly
|
|
150
|
+
value
|
|
151
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
152
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
153
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
154
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
155
|
+
k_type = Regexp.last_match[:k_type]
|
|
156
|
+
v_type = Regexp.last_match[:v_type]
|
|
157
|
+
{}.tap do |hash|
|
|
158
|
+
value.each do |k, v|
|
|
159
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
else # model
|
|
163
|
+
# models (e.g. Pet) or oneOf
|
|
164
|
+
klass = Carbon.const_get(type)
|
|
165
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Returns the string representation of the object
|
|
170
|
+
# @return [String] String presentation of the object
|
|
171
|
+
def to_s
|
|
172
|
+
to_hash.to_s
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
176
|
+
# @return [Hash] Returns the object in the form of hash
|
|
177
|
+
def to_body
|
|
178
|
+
to_hash
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Returns the object in the form of hash
|
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
|
183
|
+
def to_hash
|
|
184
|
+
hash = {}
|
|
185
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
186
|
+
value = self.send(attr)
|
|
187
|
+
if value.nil?
|
|
188
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
189
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
hash[param] = _to_hash(value)
|
|
193
|
+
end
|
|
194
|
+
hash
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Outputs non-array value in the form of hash
|
|
198
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
199
|
+
# @param [Object] value Any valid value
|
|
200
|
+
# @return [Hash] Returns the value in the form of hash
|
|
201
|
+
def _to_hash(value)
|
|
202
|
+
if value.is_a?(Array)
|
|
203
|
+
value.compact.map { |v| _to_hash(v) }
|
|
204
|
+
elsif value.is_a?(Hash)
|
|
205
|
+
{}.tap do |hash|
|
|
206
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
207
|
+
end
|
|
208
|
+
elsif value.respond_to? :to_hash
|
|
209
|
+
value.to_hash
|
|
210
|
+
else
|
|
211
|
+
value
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
end
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Carbon
|
|
3
|
+
|
|
4
|
+
#Connect external data to LLMs, no matter the source.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
=end
|
|
8
|
+
|
|
9
|
+
require 'date'
|
|
10
|
+
require 'time'
|
|
11
|
+
|
|
12
|
+
module Carbon
|
|
13
|
+
# Used to configure file syncing for certain connectors, for example including attachments
|
|
14
|
+
class HelpdeskGlobalFileSyncConfigNullable
|
|
15
|
+
attr_accessor :sync_attachments
|
|
16
|
+
|
|
17
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
18
|
+
def self.attribute_map
|
|
19
|
+
{
|
|
20
|
+
:'sync_attachments' => :'sync_attachments'
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Returns all the JSON keys this model knows about
|
|
25
|
+
def self.acceptable_attributes
|
|
26
|
+
attribute_map.values
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Attribute type mapping.
|
|
30
|
+
def self.openapi_types
|
|
31
|
+
{
|
|
32
|
+
:'sync_attachments' => :'Boolean'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# List of attributes with nullable: true
|
|
37
|
+
def self.openapi_nullable
|
|
38
|
+
Set.new([
|
|
39
|
+
])
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Initializes the object
|
|
43
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
44
|
+
def initialize(attributes = {})
|
|
45
|
+
if (!attributes.is_a?(Hash))
|
|
46
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::HelpdeskGlobalFileSyncConfigNullable` initialize method"
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
50
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
51
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
52
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::HelpdeskGlobalFileSyncConfigNullable`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
53
|
+
end
|
|
54
|
+
h[k.to_sym] = v
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if attributes.key?(:'sync_attachments')
|
|
58
|
+
self.sync_attachments = attributes[:'sync_attachments']
|
|
59
|
+
else
|
|
60
|
+
self.sync_attachments = false
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
65
|
+
# @return Array for valid properties with the reasons
|
|
66
|
+
def list_invalid_properties
|
|
67
|
+
invalid_properties = Array.new
|
|
68
|
+
invalid_properties
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Check to see if the all the properties in the model are valid
|
|
72
|
+
# @return true if the model is valid
|
|
73
|
+
def valid?
|
|
74
|
+
true
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Checks equality by comparing each attribute.
|
|
78
|
+
# @param [Object] Object to be compared
|
|
79
|
+
def ==(o)
|
|
80
|
+
return true if self.equal?(o)
|
|
81
|
+
self.class == o.class &&
|
|
82
|
+
sync_attachments == o.sync_attachments
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# @see the `==` method
|
|
86
|
+
# @param [Object] Object to be compared
|
|
87
|
+
def eql?(o)
|
|
88
|
+
self == o
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Calculates hash code according to all attributes.
|
|
92
|
+
# @return [Integer] Hash code
|
|
93
|
+
def hash
|
|
94
|
+
[sync_attachments].hash
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Builds the object from hash
|
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
99
|
+
# @return [Object] Returns the model itself
|
|
100
|
+
def self.build_from_hash(attributes)
|
|
101
|
+
new.build_from_hash(attributes)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Builds the object from hash
|
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
106
|
+
# @return [Object] Returns the model itself
|
|
107
|
+
def build_from_hash(attributes)
|
|
108
|
+
return nil unless attributes.is_a?(Hash)
|
|
109
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
110
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
111
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
112
|
+
self.send("#{key}=", nil)
|
|
113
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
114
|
+
# check to ensure the input is an array given that the attribute
|
|
115
|
+
# is documented as an array but the input is not
|
|
116
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
117
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
118
|
+
end
|
|
119
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
120
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
self
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Deserializes the data based on type
|
|
128
|
+
# @param string type Data type
|
|
129
|
+
# @param string value Value to be deserialized
|
|
130
|
+
# @return [Object] Deserialized data
|
|
131
|
+
def _deserialize(type, value)
|
|
132
|
+
case type.to_sym
|
|
133
|
+
when :Time
|
|
134
|
+
Time.parse(value)
|
|
135
|
+
when :Date
|
|
136
|
+
Date.parse(value)
|
|
137
|
+
when :String
|
|
138
|
+
value.to_s
|
|
139
|
+
when :Integer
|
|
140
|
+
value.to_i
|
|
141
|
+
when :Float
|
|
142
|
+
value.to_f
|
|
143
|
+
when :Boolean
|
|
144
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
145
|
+
true
|
|
146
|
+
else
|
|
147
|
+
false
|
|
148
|
+
end
|
|
149
|
+
when :Object
|
|
150
|
+
# generic object (usually a Hash), return directly
|
|
151
|
+
value
|
|
152
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
153
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
154
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
155
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
156
|
+
k_type = Regexp.last_match[:k_type]
|
|
157
|
+
v_type = Regexp.last_match[:v_type]
|
|
158
|
+
{}.tap do |hash|
|
|
159
|
+
value.each do |k, v|
|
|
160
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
else # model
|
|
164
|
+
# models (e.g. Pet) or oneOf
|
|
165
|
+
klass = Carbon.const_get(type)
|
|
166
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Returns the string representation of the object
|
|
171
|
+
# @return [String] String presentation of the object
|
|
172
|
+
def to_s
|
|
173
|
+
to_hash.to_s
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
177
|
+
# @return [Hash] Returns the object in the form of hash
|
|
178
|
+
def to_body
|
|
179
|
+
to_hash
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Returns the object in the form of hash
|
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
|
184
|
+
def to_hash
|
|
185
|
+
hash = {}
|
|
186
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
187
|
+
value = self.send(attr)
|
|
188
|
+
if value.nil?
|
|
189
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
190
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
hash[param] = _to_hash(value)
|
|
194
|
+
end
|
|
195
|
+
hash
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Outputs non-array value in the form of hash
|
|
199
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
200
|
+
# @param [Object] value Any valid value
|
|
201
|
+
# @return [Hash] Returns the value in the form of hash
|
|
202
|
+
def _to_hash(value)
|
|
203
|
+
if value.is_a?(Array)
|
|
204
|
+
value.compact.map { |v| _to_hash(v) }
|
|
205
|
+
elsif value.is_a?(Hash)
|
|
206
|
+
{}.tap do |hash|
|
|
207
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
208
|
+
end
|
|
209
|
+
elsif value.respond_to? :to_hash
|
|
210
|
+
value.to_hash
|
|
211
|
+
else
|
|
212
|
+
value
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
end
|
|
@@ -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:
|
|
64
|
+
# Enable integration's file picker for sources that support it. Supported sources: DROPBOX, ONEDRIVE, SHAREPOINT, BOX, GOOGLE_DRIVE
|
|
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 = '
|
|
282
|
+
self.request_id = 'e33ac7f9-11d1-4a94-8855-016e4d6c07ff'
|
|
283
283
|
end
|
|
284
284
|
|
|
285
285
|
if attributes.key?(:'use_ocr')
|
|
@@ -43,6 +43,8 @@ module Carbon
|
|
|
43
43
|
# 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.
|
|
44
44
|
attr_accessor :incremental_sync
|
|
45
45
|
|
|
46
|
+
attr_accessor :file_sync_config
|
|
47
|
+
|
|
46
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
49
|
def self.attribute_map
|
|
48
50
|
{
|
|
@@ -60,7 +62,8 @@ module Carbon
|
|
|
60
62
|
:'request_id' => :'request_id',
|
|
61
63
|
:'use_ocr' => :'use_ocr',
|
|
62
64
|
:'parse_pdf_tables_with_ocr' => :'parse_pdf_tables_with_ocr',
|
|
63
|
-
:'incremental_sync' => :'incremental_sync'
|
|
65
|
+
:'incremental_sync' => :'incremental_sync',
|
|
66
|
+
:'file_sync_config' => :'file_sync_config'
|
|
64
67
|
}
|
|
65
68
|
end
|
|
66
69
|
|
|
@@ -86,7 +89,8 @@ module Carbon
|
|
|
86
89
|
:'request_id' => :'String',
|
|
87
90
|
:'use_ocr' => :'Boolean',
|
|
88
91
|
:'parse_pdf_tables_with_ocr' => :'Boolean',
|
|
89
|
-
:'incremental_sync' => :'Boolean'
|
|
92
|
+
:'incremental_sync' => :'Boolean',
|
|
93
|
+
:'file_sync_config' => :'HelpdeskGlobalFileSyncConfigNullable'
|
|
90
94
|
}
|
|
91
95
|
end
|
|
92
96
|
|
|
@@ -103,6 +107,7 @@ module Carbon
|
|
|
103
107
|
:'max_items_per_chunk',
|
|
104
108
|
:'use_ocr',
|
|
105
109
|
:'parse_pdf_tables_with_ocr',
|
|
110
|
+
:'file_sync_config'
|
|
106
111
|
])
|
|
107
112
|
end
|
|
108
113
|
|
|
@@ -182,7 +187,7 @@ module Carbon
|
|
|
182
187
|
if attributes.key?(:'request_id')
|
|
183
188
|
self.request_id = attributes[:'request_id']
|
|
184
189
|
else
|
|
185
|
-
self.request_id = '
|
|
190
|
+
self.request_id = '952c7efa-d4fe-43bf-a86c-4f5dad9fc003'
|
|
186
191
|
end
|
|
187
192
|
|
|
188
193
|
if attributes.key?(:'use_ocr')
|
|
@@ -202,6 +207,10 @@ module Carbon
|
|
|
202
207
|
else
|
|
203
208
|
self.incremental_sync = false
|
|
204
209
|
end
|
|
210
|
+
|
|
211
|
+
if attributes.key?(:'file_sync_config')
|
|
212
|
+
self.file_sync_config = attributes[:'file_sync_config']
|
|
213
|
+
end
|
|
205
214
|
end
|
|
206
215
|
|
|
207
216
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -246,7 +255,8 @@ module Carbon
|
|
|
246
255
|
request_id == o.request_id &&
|
|
247
256
|
use_ocr == o.use_ocr &&
|
|
248
257
|
parse_pdf_tables_with_ocr == o.parse_pdf_tables_with_ocr &&
|
|
249
|
-
incremental_sync == o.incremental_sync
|
|
258
|
+
incremental_sync == o.incremental_sync &&
|
|
259
|
+
file_sync_config == o.file_sync_config
|
|
250
260
|
end
|
|
251
261
|
|
|
252
262
|
# @see the `==` method
|
|
@@ -258,7 +268,7 @@ module Carbon
|
|
|
258
268
|
# Calculates hash code according to all attributes.
|
|
259
269
|
# @return [Integer] Hash code
|
|
260
270
|
def hash
|
|
261
|
-
[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, incremental_sync].hash
|
|
271
|
+
[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, incremental_sync, file_sync_config].hash
|
|
262
272
|
end
|
|
263
273
|
|
|
264
274
|
# Builds the object from hash
|
|
@@ -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 = '
|
|
185
|
+
self.request_id = '30d4247e-9dcf-41e3-98a7-61ef4a78adad'
|
|
186
186
|
end
|
|
187
187
|
|
|
188
188
|
if attributes.key?(:'enable_file_picker')
|
data/lib/carbon_ruby_sdk.rb
CHANGED
|
@@ -70,6 +70,8 @@ require 'carbon_ruby_sdk/models/http_validation_error'
|
|
|
70
70
|
require 'carbon_ruby_sdk/models/helpdesk_file_sync_config'
|
|
71
71
|
require 'carbon_ruby_sdk/models/helpdesk_file_sync_config_nullable'
|
|
72
72
|
require 'carbon_ruby_sdk/models/helpdesk_file_types'
|
|
73
|
+
require 'carbon_ruby_sdk/models/helpdesk_global_file_sync_config'
|
|
74
|
+
require 'carbon_ruby_sdk/models/helpdesk_global_file_sync_config_nullable'
|
|
73
75
|
require 'carbon_ruby_sdk/models/hybrid_search_tuning_params'
|
|
74
76
|
require 'carbon_ruby_sdk/models/hybrid_search_tuning_params_nullable'
|
|
75
77
|
require 'carbon_ruby_sdk/models/ids_property'
|
|
@@ -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::HelpdeskGlobalFileSyncConfigNullable
|
|
14
|
+
describe Carbon::HelpdeskGlobalFileSyncConfigNullable do
|
|
15
|
+
let(:instance) { Carbon::HelpdeskGlobalFileSyncConfigNullable.new }
|
|
16
|
+
|
|
17
|
+
describe 'test an instance of HelpdeskGlobalFileSyncConfigNullable' do
|
|
18
|
+
it 'should create an instance of HelpdeskGlobalFileSyncConfigNullable' do
|
|
19
|
+
expect(instance).to be_instance_of(Carbon::HelpdeskGlobalFileSyncConfigNullable)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
describe 'test attribute "sync_attachments"' 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
|
|
@@ -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::HelpdeskGlobalFileSyncConfig
|
|
14
|
+
describe Carbon::HelpdeskGlobalFileSyncConfig do
|
|
15
|
+
let(:instance) { Carbon::HelpdeskGlobalFileSyncConfig.new }
|
|
16
|
+
|
|
17
|
+
describe 'test an instance of HelpdeskGlobalFileSyncConfig' do
|
|
18
|
+
it 'should create an instance of HelpdeskGlobalFileSyncConfig' do
|
|
19
|
+
expect(instance).to be_instance_of(Carbon::HelpdeskGlobalFileSyncConfig)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
describe 'test attribute "sync_attachments"' 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
|
|
@@ -109,4 +109,10 @@ describe Carbon::SyncFilesRequest do
|
|
|
109
109
|
end
|
|
110
110
|
end
|
|
111
111
|
|
|
112
|
+
describe 'test attribute "file_sync_config"' do
|
|
113
|
+
it 'should work' do
|
|
114
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
112
118
|
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.1.
|
|
4
|
+
version: 0.1.29
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Konfig
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-05-
|
|
11
|
+
date: 2024-05-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -152,6 +152,8 @@ files:
|
|
|
152
152
|
- lib/carbon_ruby_sdk/models/helpdesk_file_sync_config.rb
|
|
153
153
|
- lib/carbon_ruby_sdk/models/helpdesk_file_sync_config_nullable.rb
|
|
154
154
|
- lib/carbon_ruby_sdk/models/helpdesk_file_types.rb
|
|
155
|
+
- lib/carbon_ruby_sdk/models/helpdesk_global_file_sync_config.rb
|
|
156
|
+
- lib/carbon_ruby_sdk/models/helpdesk_global_file_sync_config_nullable.rb
|
|
155
157
|
- lib/carbon_ruby_sdk/models/http_validation_error.rb
|
|
156
158
|
- lib/carbon_ruby_sdk/models/hybrid_search_tuning_params.rb
|
|
157
159
|
- lib/carbon_ruby_sdk/models/hybrid_search_tuning_params_nullable.rb
|
|
@@ -297,6 +299,8 @@ files:
|
|
|
297
299
|
- spec/models/helpdesk_file_sync_config_nullable_spec.rb
|
|
298
300
|
- spec/models/helpdesk_file_sync_config_spec.rb
|
|
299
301
|
- spec/models/helpdesk_file_types_spec.rb
|
|
302
|
+
- spec/models/helpdesk_global_file_sync_config_nullable_spec.rb
|
|
303
|
+
- spec/models/helpdesk_global_file_sync_config_spec.rb
|
|
300
304
|
- spec/models/http_validation_error_spec.rb
|
|
301
305
|
- spec/models/hybrid_search_tuning_params_nullable_spec.rb
|
|
302
306
|
- spec/models/hybrid_search_tuning_params_spec.rb
|
|
@@ -448,6 +452,7 @@ test_files:
|
|
|
448
452
|
- spec/models/user_configuration_spec.rb
|
|
449
453
|
- spec/models/zendesk_authentication_spec.rb
|
|
450
454
|
- spec/models/connect_data_source_response_spec.rb
|
|
455
|
+
- spec/models/helpdesk_global_file_sync_config_nullable_spec.rb
|
|
451
456
|
- spec/models/simple_o_auth_data_sources_spec.rb
|
|
452
457
|
- spec/models/add_webhook_props_spec.rb
|
|
453
458
|
- spec/models/white_labeling_response_spec.rb
|
|
@@ -515,6 +520,7 @@ test_files:
|
|
|
515
520
|
- spec/models/organization_user_file_tag_create_spec.rb
|
|
516
521
|
- spec/models/organization_user_data_source_order_by_columns_spec.rb
|
|
517
522
|
- spec/models/custom_credentials_type_spec.rb
|
|
523
|
+
- spec/models/helpdesk_global_file_sync_config_spec.rb
|
|
518
524
|
- spec/models/file_formats_nullable_spec.rb
|
|
519
525
|
- spec/models/s3_authentication_spec.rb
|
|
520
526
|
- spec/models/file_statistics_spec.rb
|