carbon_ruby_sdk 0.1.26 → 0.1.27
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 +31 -7
- data/lib/carbon_ruby_sdk/api/embeddings_api.rb +1 -1
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +24 -8
- data/lib/carbon_ruby_sdk/models/file_formats.rb +2 -1
- data/lib/carbon_ruby_sdk/models/file_formats_nullable.rb +2 -1
- data/lib/carbon_ruby_sdk/models/helpdesk_file_sync_config.rb +228 -0
- data/lib/carbon_ruby_sdk/models/helpdesk_file_sync_config_nullable.rb +229 -0
- data/lib/carbon_ruby_sdk/models/helpdesk_file_types.rb +36 -0
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +28 -6
- data/lib/carbon_ruby_sdk/models/sync_files_request.rb +18 -6
- data/lib/carbon_ruby_sdk/models/sync_options.rb +27 -5
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +3 -0
- data/spec/models/helpdesk_file_sync_config_nullable_spec.rb +34 -0
- data/spec/models/helpdesk_file_sync_config_spec.rb +34 -0
- data/spec/models/helpdesk_file_types_spec.rb +22 -0
- data/spec/models/o_auth_url_request_spec.rb +12 -0
- data/spec/models/sync_files_request_spec.rb +6 -0
- data/spec/models/sync_options_spec.rb +12 -0
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ac9daf22135c068fcd84189709ef118201beb9d4eab590bf898a4026056e98c
|
4
|
+
data.tar.gz: 041716ceb046ef931db5d67446d7a44862af32197c41420c8167aec333e5d66c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 555efe547b71f4c34487c10e6d648273f8222fcf4aae49c3c0764734716aef951ec18e87e8dfd7060977668ccc20036c4a13a84b3f5baa7e2bb5a2afebfb3cbb
|
7
|
+
data.tar.gz: 147ab93158e1bd2d89175f692c2512bd55f88cb16e8437675fbf3e26bf4ce1a365fd665715241f0dec61cb0252aefcbb42d69edc13d88cf36c3f8d0b87c0edc4
|
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.27-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.1.27)
|
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.27'
|
88
88
|
```
|
89
89
|
|
90
90
|
## Getting Started<a id="getting-started"></a>
|
@@ -1197,9 +1197,10 @@ result = carbon.integrations.connect_data_source(
|
|
1197
1197
|
"prepend_filename_to_chunks" => false,
|
1198
1198
|
"sync_files_on_connection" => true,
|
1199
1199
|
"set_page_as_boundary" => false,
|
1200
|
-
"request_id" => "
|
1200
|
+
"request_id" => "b9a72b38-115a-4dd6-bad9-00185ae2333b",
|
1201
1201
|
"enable_file_picker" => true,
|
1202
1202
|
"sync_source_items" => true,
|
1203
|
+
"incremental_sync" => false,
|
1203
1204
|
},
|
1204
1205
|
)
|
1205
1206
|
p result
|
@@ -1409,11 +1410,16 @@ result = carbon.integrations.get_oauth_url(
|
|
1409
1410
|
set_page_as_boundary: false,
|
1410
1411
|
data_source_id: 1,
|
1411
1412
|
connecting_new_account: false,
|
1412
|
-
request_id: "
|
1413
|
+
request_id: "444e3f13-e490-4cc0-9cba-48957104083d",
|
1413
1414
|
use_ocr: false,
|
1414
1415
|
parse_pdf_tables_with_ocr: false,
|
1415
1416
|
enable_file_picker: true,
|
1416
1417
|
sync_source_items: true,
|
1418
|
+
incremental_sync: false,
|
1419
|
+
file_sync_config: {
|
1420
|
+
"file_types" => ["ARTICLE"],
|
1421
|
+
"sync_attachments" => false,
|
1422
|
+
},
|
1417
1423
|
)
|
1418
1424
|
p result
|
1419
1425
|
```
|
@@ -1463,12 +1469,18 @@ Enable OCR for files that support it. Supported formats: pdf
|
|
1463
1469
|
##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
|
1464
1470
|
##### enable_file_picker: `Boolean`<a id="enable_file_picker-boolean"></a>
|
1465
1471
|
Enable integration's file picker for sources that support it. Supported sources:
|
1466
|
-
|
1472
|
+
BOX, SHAREPOINT, GOOGLE_DRIVE, DROPBOX, ONEDRIVE
|
1467
1473
|
|
1468
1474
|
##### sync_source_items: `Boolean`<a id="sync_source_items-boolean"></a>
|
1469
1475
|
Enabling this flag will fetch all available content from the source to be listed
|
1470
1476
|
via list items endpoint
|
1471
1477
|
|
1478
|
+
##### incremental_sync: `Boolean`<a id="incremental_sync-boolean"></a>
|
1479
|
+
Only sync files if they have not already been synced or if the embedding
|
1480
|
+
properties have changed. This flag is currently supported by ONEDRIVE,
|
1481
|
+
GOOGLE_DRIVE, BOX, DROPBOX. It will be ignored for other data sources.
|
1482
|
+
|
1483
|
+
##### file_sync_config: [`HelpdeskFileSyncConfigNullable`](./lib/carbon_ruby_sdk/models/helpdesk_file_sync_config_nullable.rb)<a id="file_sync_config-helpdeskfilesyncconfignullablelibcarbon_ruby_sdkmodelshelpdesk_file_sync_config_nullablerb"></a>
|
1472
1484
|
#### 🔄 Return<a id="🔄-return"></a>
|
1473
1485
|
|
1474
1486
|
[OuthURLResponse](./lib/carbon_ruby_sdk/models/outh_url_response.rb)
|
@@ -1719,9 +1731,10 @@ result = carbon.integrations.sync_confluence(
|
|
1719
1731
|
prepend_filename_to_chunks: false,
|
1720
1732
|
max_items_per_chunk: 1,
|
1721
1733
|
set_page_as_boundary: false,
|
1722
|
-
request_id: "
|
1734
|
+
request_id: "a5c6b913-12ce-4ae5-af61-694dd5c400fc",
|
1723
1735
|
use_ocr: false,
|
1724
1736
|
parse_pdf_tables_with_ocr: false,
|
1737
|
+
incremental_sync: false,
|
1725
1738
|
)
|
1726
1739
|
p result
|
1727
1740
|
```
|
@@ -1744,6 +1757,11 @@ Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
|
1744
1757
|
##### request_id: `String`<a id="request_id-string"></a>
|
1745
1758
|
##### use_ocr: `Boolean`<a id="use_ocr-boolean"></a>
|
1746
1759
|
##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
|
1760
|
+
##### incremental_sync: `Boolean`<a id="incremental_sync-boolean"></a>
|
1761
|
+
Only sync files if they have not already been synced or if the embedding
|
1762
|
+
properties have changed. This flag is currently supported by ONEDRIVE,
|
1763
|
+
GOOGLE_DRIVE, BOX, DROPBOX. It will be ignored for other data sources.
|
1764
|
+
|
1747
1765
|
#### 🔄 Return<a id="🔄-return"></a>
|
1748
1766
|
|
1749
1767
|
[GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
|
@@ -1810,9 +1828,10 @@ result = carbon.integrations.sync_files(
|
|
1810
1828
|
prepend_filename_to_chunks: false,
|
1811
1829
|
max_items_per_chunk: 1,
|
1812
1830
|
set_page_as_boundary: false,
|
1813
|
-
request_id: "
|
1831
|
+
request_id: "a5c6b913-12ce-4ae5-af61-694dd5c400fc",
|
1814
1832
|
use_ocr: false,
|
1815
1833
|
parse_pdf_tables_with_ocr: false,
|
1834
|
+
incremental_sync: false,
|
1816
1835
|
)
|
1817
1836
|
p result
|
1818
1837
|
```
|
@@ -1835,6 +1854,11 @@ Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
|
1835
1854
|
##### request_id: `String`<a id="request_id-string"></a>
|
1836
1855
|
##### use_ocr: `Boolean`<a id="use_ocr-boolean"></a>
|
1837
1856
|
##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
|
1857
|
+
##### incremental_sync: `Boolean`<a id="incremental_sync-boolean"></a>
|
1858
|
+
Only sync files if they have not already been synced or if the embedding
|
1859
|
+
properties have changed. This flag is currently supported by ONEDRIVE,
|
1860
|
+
GOOGLE_DRIVE, BOX, DROPBOX. It will be ignored for other data sources.
|
1861
|
+
|
1838
1862
|
#### 🔄 Return<a id="🔄-return"></a>
|
1839
1863
|
|
1840
1864
|
[GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
|
@@ -336,7 +336,7 @@ module Carbon
|
|
336
336
|
return_type = opts[:debug_return_type] || 'DocumentResponseList'
|
337
337
|
|
338
338
|
# auth_names
|
339
|
-
auth_names = opts[:debug_auth_names] || [
|
339
|
+
auth_names = opts[:debug_auth_names] || []
|
340
340
|
|
341
341
|
new_options = opts.merge(
|
342
342
|
:operation => :"EmbeddingsApi.get_documents",
|
@@ -557,11 +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: BOX, SHAREPOINT, GOOGLE_DRIVE, DROPBOX, ONEDRIVE
|
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
|
+
# @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
|
+
# @param file_sync_config [HelpdeskFileSyncConfigNullable]
|
562
564
|
# @param body [OAuthURLRequest]
|
563
565
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
564
|
-
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: '444e3f13-e490-4cc0-9cba-48957104083d', 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: {})
|
565
567
|
_body = {}
|
566
568
|
_body[:tags] = tags if tags != SENTINEL
|
567
569
|
_body[:scope] = scope if scope != SENTINEL
|
@@ -587,6 +589,8 @@ module Carbon
|
|
587
589
|
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
588
590
|
_body[:enable_file_picker] = enable_file_picker if enable_file_picker != SENTINEL
|
589
591
|
_body[:sync_source_items] = sync_source_items if sync_source_items != SENTINEL
|
592
|
+
_body[:incremental_sync] = incremental_sync if incremental_sync != SENTINEL
|
593
|
+
_body[:file_sync_config] = file_sync_config if file_sync_config != SENTINEL
|
590
594
|
o_auth_url_request = _body
|
591
595
|
api_response = get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
|
592
596
|
api_response.data
|
@@ -621,11 +625,13 @@ module Carbon
|
|
621
625
|
# @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
|
622
626
|
# @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
|
623
627
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
624
|
-
# @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: BOX, SHAREPOINT, GOOGLE_DRIVE, DROPBOX, ONEDRIVE
|
625
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
|
+
# @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
|
+
# @param file_sync_config [HelpdeskFileSyncConfigNullable]
|
626
632
|
# @param body [OAuthURLRequest]
|
627
633
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
628
|
-
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: '444e3f13-e490-4cc0-9cba-48957104083d', 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: {})
|
629
635
|
_body = {}
|
630
636
|
_body[:tags] = tags if tags != SENTINEL
|
631
637
|
_body[:scope] = scope if scope != SENTINEL
|
@@ -651,6 +657,8 @@ module Carbon
|
|
651
657
|
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
652
658
|
_body[:enable_file_picker] = enable_file_picker if enable_file_picker != SENTINEL
|
653
659
|
_body[:sync_source_items] = sync_source_items if sync_source_items != SENTINEL
|
660
|
+
_body[:incremental_sync] = incremental_sync if incremental_sync != SENTINEL
|
661
|
+
_body[:file_sync_config] = file_sync_config if file_sync_config != SENTINEL
|
654
662
|
o_auth_url_request = _body
|
655
663
|
get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
|
656
664
|
end
|
@@ -1415,9 +1423,10 @@ module Carbon
|
|
1415
1423
|
# @param request_id [String]
|
1416
1424
|
# @param use_ocr [Boolean]
|
1417
1425
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
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.
|
1418
1427
|
# @param body [SyncFilesRequest]
|
1419
1428
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1420
|
-
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: '
|
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: 'a5c6b913-12ce-4ae5-af61-694dd5c400fc', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, extra: {})
|
1421
1430
|
_body = {}
|
1422
1431
|
_body[:tags] = tags if tags != SENTINEL
|
1423
1432
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1433,6 +1442,7 @@ module Carbon
|
|
1433
1442
|
_body[:request_id] = request_id if request_id != SENTINEL
|
1434
1443
|
_body[:use_ocr] = use_ocr if use_ocr != SENTINEL
|
1435
1444
|
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
1445
|
+
_body[:incremental_sync] = incremental_sync if incremental_sync != SENTINEL
|
1436
1446
|
sync_files_request = _body
|
1437
1447
|
api_response = sync_confluence_with_http_info_impl(sync_files_request, extra)
|
1438
1448
|
api_response.data
|
@@ -1459,9 +1469,10 @@ module Carbon
|
|
1459
1469
|
# @param request_id [String]
|
1460
1470
|
# @param use_ocr [Boolean]
|
1461
1471
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
1472
|
+
# @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.
|
1462
1473
|
# @param body [SyncFilesRequest]
|
1463
1474
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1464
|
-
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: '
|
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: 'a5c6b913-12ce-4ae5-af61-694dd5c400fc', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, extra: {})
|
1465
1476
|
_body = {}
|
1466
1477
|
_body[:tags] = tags if tags != SENTINEL
|
1467
1478
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1477,6 +1488,7 @@ module Carbon
|
|
1477
1488
|
_body[:request_id] = request_id if request_id != SENTINEL
|
1478
1489
|
_body[:use_ocr] = use_ocr if use_ocr != SENTINEL
|
1479
1490
|
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
1491
|
+
_body[:incremental_sync] = incremental_sync if incremental_sync != SENTINEL
|
1480
1492
|
sync_files_request = _body
|
1481
1493
|
sync_confluence_with_http_info_impl(sync_files_request, extra)
|
1482
1494
|
end
|
@@ -1663,9 +1675,10 @@ module Carbon
|
|
1663
1675
|
# @param request_id [String]
|
1664
1676
|
# @param use_ocr [Boolean]
|
1665
1677
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
1678
|
+
# @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.
|
1666
1679
|
# @param body [SyncFilesRequest]
|
1667
1680
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1668
|
-
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: '
|
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: 'a5c6b913-12ce-4ae5-af61-694dd5c400fc', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, extra: {})
|
1669
1682
|
_body = {}
|
1670
1683
|
_body[:tags] = tags if tags != SENTINEL
|
1671
1684
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1681,6 +1694,7 @@ module Carbon
|
|
1681
1694
|
_body[:request_id] = request_id if request_id != SENTINEL
|
1682
1695
|
_body[:use_ocr] = use_ocr if use_ocr != SENTINEL
|
1683
1696
|
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
1697
|
+
_body[:incremental_sync] = incremental_sync if incremental_sync != SENTINEL
|
1684
1698
|
sync_files_request = _body
|
1685
1699
|
api_response = sync_files_with_http_info_impl(sync_files_request, extra)
|
1686
1700
|
api_response.data
|
@@ -1707,9 +1721,10 @@ module Carbon
|
|
1707
1721
|
# @param request_id [String]
|
1708
1722
|
# @param use_ocr [Boolean]
|
1709
1723
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
1724
|
+
# @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.
|
1710
1725
|
# @param body [SyncFilesRequest]
|
1711
1726
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1712
|
-
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: '
|
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: 'a5c6b913-12ce-4ae5-af61-694dd5c400fc', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, extra: {})
|
1713
1728
|
_body = {}
|
1714
1729
|
_body[:tags] = tags if tags != SENTINEL
|
1715
1730
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1725,6 +1740,7 @@ module Carbon
|
|
1725
1740
|
_body[:request_id] = request_id if request_id != SENTINEL
|
1726
1741
|
_body[:use_ocr] = use_ocr if use_ocr != SENTINEL
|
1727
1742
|
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
1743
|
+
_body[:incremental_sync] = incremental_sync if incremental_sync != SENTINEL
|
1728
1744
|
sync_files_request = _body
|
1729
1745
|
sync_files_with_http_info_impl(sync_files_request, extra)
|
1730
1746
|
end
|
@@ -38,6 +38,7 @@ module Carbon
|
|
38
38
|
GITHUB = "GITHUB".freeze
|
39
39
|
JPG = "JPG".freeze
|
40
40
|
PNG = "PNG".freeze
|
41
|
+
MPEG = "MPEG".freeze
|
41
42
|
MP3 = "MP3".freeze
|
42
43
|
MP4 = "MP4".freeze
|
43
44
|
MP2 = "MP2".freeze
|
@@ -51,7 +52,7 @@ module Carbon
|
|
51
52
|
WEBM = "WEBM".freeze
|
52
53
|
|
53
54
|
def self.all_vars
|
54
|
-
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, GITHUB, JPG, PNG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
|
55
|
+
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, GITHUB, JPG, PNG, MPEG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
|
55
56
|
end
|
56
57
|
|
57
58
|
# Builds the enum from string
|
@@ -38,6 +38,7 @@ module Carbon
|
|
38
38
|
GITHUB = "GITHUB".freeze
|
39
39
|
JPG = "JPG".freeze
|
40
40
|
PNG = "PNG".freeze
|
41
|
+
MPEG = "MPEG".freeze
|
41
42
|
MP3 = "MP3".freeze
|
42
43
|
MP4 = "MP4".freeze
|
43
44
|
MP2 = "MP2".freeze
|
@@ -51,7 +52,7 @@ module Carbon
|
|
51
52
|
WEBM = "WEBM".freeze
|
52
53
|
|
53
54
|
def self.all_vars
|
54
|
-
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, GITHUB, JPG, PNG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
|
55
|
+
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, GITHUB, JPG, PNG, MPEG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
|
55
56
|
end
|
56
57
|
|
57
58
|
# Builds the enum from string
|
@@ -0,0 +1,228 @@
|
|
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 HelpdeskFileSyncConfig
|
14
|
+
attr_accessor :file_types
|
15
|
+
|
16
|
+
attr_accessor :sync_attachments
|
17
|
+
|
18
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
19
|
+
def self.attribute_map
|
20
|
+
{
|
21
|
+
:'file_types' => :'file_types',
|
22
|
+
:'sync_attachments' => :'sync_attachments'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Returns all the JSON keys this model knows about
|
27
|
+
def self.acceptable_attributes
|
28
|
+
attribute_map.values
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.openapi_types
|
33
|
+
{
|
34
|
+
:'file_types' => :'Array<HelpdeskFileTypes>',
|
35
|
+
:'sync_attachments' => :'Boolean'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::HelpdeskFileSyncConfig` initialize method"
|
50
|
+
end
|
51
|
+
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::HelpdeskFileSyncConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
|
60
|
+
if attributes.key?(:'file_types')
|
61
|
+
if (value = attributes[:'file_types']).is_a?(Array)
|
62
|
+
self.file_types = value
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.key?(:'sync_attachments')
|
67
|
+
self.sync_attachments = attributes[:'sync_attachments']
|
68
|
+
else
|
69
|
+
self.sync_attachments = false
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
74
|
+
# @return Array for valid properties with the reasons
|
75
|
+
def list_invalid_properties
|
76
|
+
invalid_properties = Array.new
|
77
|
+
invalid_properties
|
78
|
+
end
|
79
|
+
|
80
|
+
# Check to see if the all the properties in the model are valid
|
81
|
+
# @return true if the model is valid
|
82
|
+
def valid?
|
83
|
+
true
|
84
|
+
end
|
85
|
+
|
86
|
+
# Checks equality by comparing each attribute.
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def ==(o)
|
89
|
+
return true if self.equal?(o)
|
90
|
+
self.class == o.class &&
|
91
|
+
file_types == o.file_types &&
|
92
|
+
sync_attachments == o.sync_attachments
|
93
|
+
end
|
94
|
+
|
95
|
+
# @see the `==` method
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def eql?(o)
|
98
|
+
self == o
|
99
|
+
end
|
100
|
+
|
101
|
+
# Calculates hash code according to all attributes.
|
102
|
+
# @return [Integer] Hash code
|
103
|
+
def hash
|
104
|
+
[file_types, sync_attachments].hash
|
105
|
+
end
|
106
|
+
|
107
|
+
# Builds the object from hash
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
+
# @return [Object] Returns the model itself
|
110
|
+
def self.build_from_hash(attributes)
|
111
|
+
new.build_from_hash(attributes)
|
112
|
+
end
|
113
|
+
|
114
|
+
# Builds the object from hash
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
+
# @return [Object] Returns the model itself
|
117
|
+
def build_from_hash(attributes)
|
118
|
+
return nil unless attributes.is_a?(Hash)
|
119
|
+
attributes = attributes.transform_keys(&:to_sym)
|
120
|
+
self.class.openapi_types.each_pair do |key, type|
|
121
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
122
|
+
self.send("#{key}=", nil)
|
123
|
+
elsif type =~ /\AArray<(.*)>/i
|
124
|
+
# check to ensure the input is an array given that the attribute
|
125
|
+
# is documented as an array but the input is not
|
126
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
127
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
128
|
+
end
|
129
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
130
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
self
|
135
|
+
end
|
136
|
+
|
137
|
+
# Deserializes the data based on type
|
138
|
+
# @param string type Data type
|
139
|
+
# @param string value Value to be deserialized
|
140
|
+
# @return [Object] Deserialized data
|
141
|
+
def _deserialize(type, value)
|
142
|
+
case type.to_sym
|
143
|
+
when :Time
|
144
|
+
Time.parse(value)
|
145
|
+
when :Date
|
146
|
+
Date.parse(value)
|
147
|
+
when :String
|
148
|
+
value.to_s
|
149
|
+
when :Integer
|
150
|
+
value.to_i
|
151
|
+
when :Float
|
152
|
+
value.to_f
|
153
|
+
when :Boolean
|
154
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
155
|
+
true
|
156
|
+
else
|
157
|
+
false
|
158
|
+
end
|
159
|
+
when :Object
|
160
|
+
# generic object (usually a Hash), return directly
|
161
|
+
value
|
162
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
163
|
+
inner_type = Regexp.last_match[:inner_type]
|
164
|
+
value.map { |v| _deserialize(inner_type, v) }
|
165
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
166
|
+
k_type = Regexp.last_match[:k_type]
|
167
|
+
v_type = Regexp.last_match[:v_type]
|
168
|
+
{}.tap do |hash|
|
169
|
+
value.each do |k, v|
|
170
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
171
|
+
end
|
172
|
+
end
|
173
|
+
else # model
|
174
|
+
# models (e.g. Pet) or oneOf
|
175
|
+
klass = Carbon.const_get(type)
|
176
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
# Returns the string representation of the object
|
181
|
+
# @return [String] String presentation of the object
|
182
|
+
def to_s
|
183
|
+
to_hash.to_s
|
184
|
+
end
|
185
|
+
|
186
|
+
# to_body is an alias to to_hash (backward compatibility)
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
188
|
+
def to_body
|
189
|
+
to_hash
|
190
|
+
end
|
191
|
+
|
192
|
+
# Returns the object in the form of hash
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
194
|
+
def to_hash
|
195
|
+
hash = {}
|
196
|
+
self.class.attribute_map.each_pair do |attr, param|
|
197
|
+
value = self.send(attr)
|
198
|
+
if value.nil?
|
199
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
200
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
201
|
+
end
|
202
|
+
|
203
|
+
hash[param] = _to_hash(value)
|
204
|
+
end
|
205
|
+
hash
|
206
|
+
end
|
207
|
+
|
208
|
+
# Outputs non-array value in the form of hash
|
209
|
+
# For object, use to_hash. Otherwise, just return the value
|
210
|
+
# @param [Object] value Any valid value
|
211
|
+
# @return [Hash] Returns the value in the form of hash
|
212
|
+
def _to_hash(value)
|
213
|
+
if value.is_a?(Array)
|
214
|
+
value.compact.map { |v| _to_hash(v) }
|
215
|
+
elsif value.is_a?(Hash)
|
216
|
+
{}.tap do |hash|
|
217
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
218
|
+
end
|
219
|
+
elsif value.respond_to? :to_hash
|
220
|
+
value.to_hash
|
221
|
+
else
|
222
|
+
value
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
end
|
227
|
+
|
228
|
+
end
|
@@ -0,0 +1,229 @@
|
|
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 when sync_files_on_connection is set to true
|
14
|
+
class HelpdeskFileSyncConfigNullable
|
15
|
+
attr_accessor :file_types
|
16
|
+
|
17
|
+
attr_accessor :sync_attachments
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'file_types' => :'file_types',
|
23
|
+
:'sync_attachments' => :'sync_attachments'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns all the JSON keys this model knows about
|
28
|
+
def self.acceptable_attributes
|
29
|
+
attribute_map.values
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'file_types' => :'Array<HelpdeskFileTypes>',
|
36
|
+
:'sync_attachments' => :'Boolean'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# List of attributes with nullable: true
|
41
|
+
def self.openapi_nullable
|
42
|
+
Set.new([
|
43
|
+
])
|
44
|
+
end
|
45
|
+
|
46
|
+
# Initializes the object
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
+
def initialize(attributes = {})
|
49
|
+
if (!attributes.is_a?(Hash))
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::HelpdeskFileSyncConfigNullable` initialize method"
|
51
|
+
end
|
52
|
+
|
53
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::HelpdeskFileSyncConfigNullable`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
|
+
end
|
58
|
+
h[k.to_sym] = v
|
59
|
+
}
|
60
|
+
|
61
|
+
if attributes.key?(:'file_types')
|
62
|
+
if (value = attributes[:'file_types']).is_a?(Array)
|
63
|
+
self.file_types = value
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.key?(:'sync_attachments')
|
68
|
+
self.sync_attachments = attributes[:'sync_attachments']
|
69
|
+
else
|
70
|
+
self.sync_attachments = false
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
75
|
+
# @return Array for valid properties with the reasons
|
76
|
+
def list_invalid_properties
|
77
|
+
invalid_properties = Array.new
|
78
|
+
invalid_properties
|
79
|
+
end
|
80
|
+
|
81
|
+
# Check to see if the all the properties in the model are valid
|
82
|
+
# @return true if the model is valid
|
83
|
+
def valid?
|
84
|
+
true
|
85
|
+
end
|
86
|
+
|
87
|
+
# Checks equality by comparing each attribute.
|
88
|
+
# @param [Object] Object to be compared
|
89
|
+
def ==(o)
|
90
|
+
return true if self.equal?(o)
|
91
|
+
self.class == o.class &&
|
92
|
+
file_types == o.file_types &&
|
93
|
+
sync_attachments == o.sync_attachments
|
94
|
+
end
|
95
|
+
|
96
|
+
# @see the `==` method
|
97
|
+
# @param [Object] Object to be compared
|
98
|
+
def eql?(o)
|
99
|
+
self == o
|
100
|
+
end
|
101
|
+
|
102
|
+
# Calculates hash code according to all attributes.
|
103
|
+
# @return [Integer] Hash code
|
104
|
+
def hash
|
105
|
+
[file_types, sync_attachments].hash
|
106
|
+
end
|
107
|
+
|
108
|
+
# Builds the object from hash
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
110
|
+
# @return [Object] Returns the model itself
|
111
|
+
def self.build_from_hash(attributes)
|
112
|
+
new.build_from_hash(attributes)
|
113
|
+
end
|
114
|
+
|
115
|
+
# Builds the object from hash
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
117
|
+
# @return [Object] Returns the model itself
|
118
|
+
def build_from_hash(attributes)
|
119
|
+
return nil unless attributes.is_a?(Hash)
|
120
|
+
attributes = attributes.transform_keys(&:to_sym)
|
121
|
+
self.class.openapi_types.each_pair do |key, type|
|
122
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
123
|
+
self.send("#{key}=", nil)
|
124
|
+
elsif type =~ /\AArray<(.*)>/i
|
125
|
+
# check to ensure the input is an array given that the attribute
|
126
|
+
# is documented as an array but the input is not
|
127
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
128
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
129
|
+
end
|
130
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
131
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
self
|
136
|
+
end
|
137
|
+
|
138
|
+
# Deserializes the data based on type
|
139
|
+
# @param string type Data type
|
140
|
+
# @param string value Value to be deserialized
|
141
|
+
# @return [Object] Deserialized data
|
142
|
+
def _deserialize(type, value)
|
143
|
+
case type.to_sym
|
144
|
+
when :Time
|
145
|
+
Time.parse(value)
|
146
|
+
when :Date
|
147
|
+
Date.parse(value)
|
148
|
+
when :String
|
149
|
+
value.to_s
|
150
|
+
when :Integer
|
151
|
+
value.to_i
|
152
|
+
when :Float
|
153
|
+
value.to_f
|
154
|
+
when :Boolean
|
155
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
156
|
+
true
|
157
|
+
else
|
158
|
+
false
|
159
|
+
end
|
160
|
+
when :Object
|
161
|
+
# generic object (usually a Hash), return directly
|
162
|
+
value
|
163
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
164
|
+
inner_type = Regexp.last_match[:inner_type]
|
165
|
+
value.map { |v| _deserialize(inner_type, v) }
|
166
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
167
|
+
k_type = Regexp.last_match[:k_type]
|
168
|
+
v_type = Regexp.last_match[:v_type]
|
169
|
+
{}.tap do |hash|
|
170
|
+
value.each do |k, v|
|
171
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
else # model
|
175
|
+
# models (e.g. Pet) or oneOf
|
176
|
+
klass = Carbon.const_get(type)
|
177
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
# Returns the string representation of the object
|
182
|
+
# @return [String] String presentation of the object
|
183
|
+
def to_s
|
184
|
+
to_hash.to_s
|
185
|
+
end
|
186
|
+
|
187
|
+
# to_body is an alias to to_hash (backward compatibility)
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
189
|
+
def to_body
|
190
|
+
to_hash
|
191
|
+
end
|
192
|
+
|
193
|
+
# Returns the object in the form of hash
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
195
|
+
def to_hash
|
196
|
+
hash = {}
|
197
|
+
self.class.attribute_map.each_pair do |attr, param|
|
198
|
+
value = self.send(attr)
|
199
|
+
if value.nil?
|
200
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
201
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
202
|
+
end
|
203
|
+
|
204
|
+
hash[param] = _to_hash(value)
|
205
|
+
end
|
206
|
+
hash
|
207
|
+
end
|
208
|
+
|
209
|
+
# Outputs non-array value in the form of hash
|
210
|
+
# For object, use to_hash. Otherwise, just return the value
|
211
|
+
# @param [Object] value Any valid value
|
212
|
+
# @return [Hash] Returns the value in the form of hash
|
213
|
+
def _to_hash(value)
|
214
|
+
if value.is_a?(Array)
|
215
|
+
value.compact.map { |v| _to_hash(v) }
|
216
|
+
elsif value.is_a?(Hash)
|
217
|
+
{}.tap do |hash|
|
218
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
219
|
+
end
|
220
|
+
elsif value.respond_to? :to_hash
|
221
|
+
value.to_hash
|
222
|
+
else
|
223
|
+
value
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
end
|
228
|
+
|
229
|
+
end
|
@@ -0,0 +1,36 @@
|
|
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 HelpdeskFileTypes
|
14
|
+
TICKET = "TICKET".freeze
|
15
|
+
ARTICLE = "ARTICLE".freeze
|
16
|
+
|
17
|
+
def self.all_vars
|
18
|
+
@all_vars ||= [TICKET, ARTICLE].freeze
|
19
|
+
end
|
20
|
+
|
21
|
+
# Builds the enum from string
|
22
|
+
# @param [String] The enum value in the form of the string
|
23
|
+
# @return [String] The enum value
|
24
|
+
def self.build_from_hash(value)
|
25
|
+
new.build_from_hash(value)
|
26
|
+
end
|
27
|
+
|
28
|
+
# Builds the enum from string
|
29
|
+
# @param [String] The enum value in the form of the string
|
30
|
+
# @return [String] The enum value
|
31
|
+
def build_from_hash(value)
|
32
|
+
return value if HelpdeskFileTypes.all_vars.include?(value)
|
33
|
+
raise "Invalid ENUM value #{value} for class #HelpdeskFileTypes"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -61,12 +61,17 @@ 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: BOX, SHAREPOINT, GOOGLE_DRIVE, DROPBOX, ONEDRIVE
|
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
|
68
68
|
attr_accessor :sync_source_items
|
69
69
|
|
70
|
+
# 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.
|
71
|
+
attr_accessor :incremental_sync
|
72
|
+
|
73
|
+
attr_accessor :file_sync_config
|
74
|
+
|
70
75
|
# Attribute mapping from ruby-style variable name to JSON key.
|
71
76
|
def self.attribute_map
|
72
77
|
{
|
@@ -93,7 +98,9 @@ module Carbon
|
|
93
98
|
:'use_ocr' => :'use_ocr',
|
94
99
|
:'parse_pdf_tables_with_ocr' => :'parse_pdf_tables_with_ocr',
|
95
100
|
:'enable_file_picker' => :'enable_file_picker',
|
96
|
-
:'sync_source_items' => :'sync_source_items'
|
101
|
+
:'sync_source_items' => :'sync_source_items',
|
102
|
+
:'incremental_sync' => :'incremental_sync',
|
103
|
+
:'file_sync_config' => :'file_sync_config'
|
97
104
|
}
|
98
105
|
end
|
99
106
|
|
@@ -128,7 +135,9 @@ module Carbon
|
|
128
135
|
:'use_ocr' => :'Boolean',
|
129
136
|
:'parse_pdf_tables_with_ocr' => :'Boolean',
|
130
137
|
:'enable_file_picker' => :'Boolean',
|
131
|
-
:'sync_source_items' => :'Boolean'
|
138
|
+
:'sync_source_items' => :'Boolean',
|
139
|
+
:'incremental_sync' => :'Boolean',
|
140
|
+
:'file_sync_config' => :'HelpdeskFileSyncConfigNullable'
|
132
141
|
}
|
133
142
|
end
|
134
143
|
|
@@ -154,6 +163,7 @@ module Carbon
|
|
154
163
|
:'connecting_new_account',
|
155
164
|
:'use_ocr',
|
156
165
|
:'parse_pdf_tables_with_ocr',
|
166
|
+
:'file_sync_config'
|
157
167
|
])
|
158
168
|
end
|
159
169
|
|
@@ -269,7 +279,7 @@ module Carbon
|
|
269
279
|
if attributes.key?(:'request_id')
|
270
280
|
self.request_id = attributes[:'request_id']
|
271
281
|
else
|
272
|
-
self.request_id = '
|
282
|
+
self.request_id = '444e3f13-e490-4cc0-9cba-48957104083d'
|
273
283
|
end
|
274
284
|
|
275
285
|
if attributes.key?(:'use_ocr')
|
@@ -295,6 +305,16 @@ module Carbon
|
|
295
305
|
else
|
296
306
|
self.sync_source_items = true
|
297
307
|
end
|
308
|
+
|
309
|
+
if attributes.key?(:'incremental_sync')
|
310
|
+
self.incremental_sync = attributes[:'incremental_sync']
|
311
|
+
else
|
312
|
+
self.incremental_sync = false
|
313
|
+
end
|
314
|
+
|
315
|
+
if attributes.key?(:'file_sync_config')
|
316
|
+
self.file_sync_config = attributes[:'file_sync_config']
|
317
|
+
end
|
298
318
|
end
|
299
319
|
|
300
320
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -343,7 +363,9 @@ module Carbon
|
|
343
363
|
use_ocr == o.use_ocr &&
|
344
364
|
parse_pdf_tables_with_ocr == o.parse_pdf_tables_with_ocr &&
|
345
365
|
enable_file_picker == o.enable_file_picker &&
|
346
|
-
sync_source_items == o.sync_source_items
|
366
|
+
sync_source_items == o.sync_source_items &&
|
367
|
+
incremental_sync == o.incremental_sync &&
|
368
|
+
file_sync_config == o.file_sync_config
|
347
369
|
end
|
348
370
|
|
349
371
|
# @see the `==` method
|
@@ -355,7 +377,7 @@ module Carbon
|
|
355
377
|
# Calculates hash code according to all attributes.
|
356
378
|
# @return [Integer] Hash code
|
357
379
|
def hash
|
358
|
-
[tags, scope, service, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, zendesk_subdomain, microsoft_tenant, sharepoint_site_name, confluence_subdomain, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, salesforce_domain, sync_files_on_connection, set_page_as_boundary, data_source_id, connecting_new_account, request_id, use_ocr, parse_pdf_tables_with_ocr, enable_file_picker, sync_source_items].hash
|
380
|
+
[tags, scope, service, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, zendesk_subdomain, microsoft_tenant, sharepoint_site_name, confluence_subdomain, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, salesforce_domain, sync_files_on_connection, set_page_as_boundary, data_source_id, connecting_new_account, request_id, use_ocr, parse_pdf_tables_with_ocr, enable_file_picker, sync_source_items, incremental_sync, file_sync_config].hash
|
359
381
|
end
|
360
382
|
|
361
383
|
# Builds the object from hash
|
@@ -40,6 +40,9 @@ module Carbon
|
|
40
40
|
|
41
41
|
attr_accessor :parse_pdf_tables_with_ocr
|
42
42
|
|
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
|
+
attr_accessor :incremental_sync
|
45
|
+
|
43
46
|
# Attribute mapping from ruby-style variable name to JSON key.
|
44
47
|
def self.attribute_map
|
45
48
|
{
|
@@ -56,7 +59,8 @@ module Carbon
|
|
56
59
|
:'set_page_as_boundary' => :'set_page_as_boundary',
|
57
60
|
:'request_id' => :'request_id',
|
58
61
|
:'use_ocr' => :'use_ocr',
|
59
|
-
:'parse_pdf_tables_with_ocr' => :'parse_pdf_tables_with_ocr'
|
62
|
+
:'parse_pdf_tables_with_ocr' => :'parse_pdf_tables_with_ocr',
|
63
|
+
:'incremental_sync' => :'incremental_sync'
|
60
64
|
}
|
61
65
|
end
|
62
66
|
|
@@ -81,7 +85,8 @@ module Carbon
|
|
81
85
|
:'set_page_as_boundary' => :'Boolean',
|
82
86
|
:'request_id' => :'String',
|
83
87
|
:'use_ocr' => :'Boolean',
|
84
|
-
:'parse_pdf_tables_with_ocr' => :'Boolean'
|
88
|
+
:'parse_pdf_tables_with_ocr' => :'Boolean',
|
89
|
+
:'incremental_sync' => :'Boolean'
|
85
90
|
}
|
86
91
|
end
|
87
92
|
|
@@ -97,7 +102,7 @@ module Carbon
|
|
97
102
|
:'prepend_filename_to_chunks',
|
98
103
|
:'max_items_per_chunk',
|
99
104
|
:'use_ocr',
|
100
|
-
:'parse_pdf_tables_with_ocr'
|
105
|
+
:'parse_pdf_tables_with_ocr',
|
101
106
|
])
|
102
107
|
end
|
103
108
|
|
@@ -177,7 +182,7 @@ module Carbon
|
|
177
182
|
if attributes.key?(:'request_id')
|
178
183
|
self.request_id = attributes[:'request_id']
|
179
184
|
else
|
180
|
-
self.request_id = '
|
185
|
+
self.request_id = 'a5c6b913-12ce-4ae5-af61-694dd5c400fc'
|
181
186
|
end
|
182
187
|
|
183
188
|
if attributes.key?(:'use_ocr')
|
@@ -191,6 +196,12 @@ module Carbon
|
|
191
196
|
else
|
192
197
|
self.parse_pdf_tables_with_ocr = false
|
193
198
|
end
|
199
|
+
|
200
|
+
if attributes.key?(:'incremental_sync')
|
201
|
+
self.incremental_sync = attributes[:'incremental_sync']
|
202
|
+
else
|
203
|
+
self.incremental_sync = false
|
204
|
+
end
|
194
205
|
end
|
195
206
|
|
196
207
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -234,7 +245,8 @@ module Carbon
|
|
234
245
|
set_page_as_boundary == o.set_page_as_boundary &&
|
235
246
|
request_id == o.request_id &&
|
236
247
|
use_ocr == o.use_ocr &&
|
237
|
-
parse_pdf_tables_with_ocr == o.parse_pdf_tables_with_ocr
|
248
|
+
parse_pdf_tables_with_ocr == o.parse_pdf_tables_with_ocr &&
|
249
|
+
incremental_sync == o.incremental_sync
|
238
250
|
end
|
239
251
|
|
240
252
|
# @see the `==` method
|
@@ -246,7 +258,7 @@ module Carbon
|
|
246
258
|
# Calculates hash code according to all attributes.
|
247
259
|
# @return [Integer] Hash code
|
248
260
|
def hash
|
249
|
-
[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
|
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
|
250
262
|
end
|
251
263
|
|
252
264
|
# Builds the object from hash
|
@@ -40,6 +40,11 @@ module Carbon
|
|
40
40
|
# Enabling this flag will fetch all available content from the source to be listed via list items endpoint
|
41
41
|
attr_accessor :sync_source_items
|
42
42
|
|
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
|
+
attr_accessor :incremental_sync
|
45
|
+
|
46
|
+
attr_accessor :file_sync_config
|
47
|
+
|
43
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
44
49
|
def self.attribute_map
|
45
50
|
{
|
@@ -55,7 +60,9 @@ module Carbon
|
|
55
60
|
:'set_page_as_boundary' => :'set_page_as_boundary',
|
56
61
|
:'request_id' => :'request_id',
|
57
62
|
:'enable_file_picker' => :'enable_file_picker',
|
58
|
-
:'sync_source_items' => :'sync_source_items'
|
63
|
+
:'sync_source_items' => :'sync_source_items',
|
64
|
+
:'incremental_sync' => :'incremental_sync',
|
65
|
+
:'file_sync_config' => :'file_sync_config'
|
59
66
|
}
|
60
67
|
end
|
61
68
|
|
@@ -79,7 +86,9 @@ module Carbon
|
|
79
86
|
:'set_page_as_boundary' => :'Boolean',
|
80
87
|
:'request_id' => :'String',
|
81
88
|
:'enable_file_picker' => :'Boolean',
|
82
|
-
:'sync_source_items' => :'Boolean'
|
89
|
+
:'sync_source_items' => :'Boolean',
|
90
|
+
:'incremental_sync' => :'Boolean',
|
91
|
+
:'file_sync_config' => :'HelpdeskFileSyncConfigNullable'
|
83
92
|
}
|
84
93
|
end
|
85
94
|
|
@@ -95,6 +104,7 @@ module Carbon
|
|
95
104
|
:'prepend_filename_to_chunks',
|
96
105
|
:'max_items_per_chunk',
|
97
106
|
:'sync_files_on_connection',
|
107
|
+
:'file_sync_config'
|
98
108
|
])
|
99
109
|
end
|
100
110
|
|
@@ -172,7 +182,7 @@ module Carbon
|
|
172
182
|
if attributes.key?(:'request_id')
|
173
183
|
self.request_id = attributes[:'request_id']
|
174
184
|
else
|
175
|
-
self.request_id = '
|
185
|
+
self.request_id = 'b9a72b38-115a-4dd6-bad9-00185ae2333b'
|
176
186
|
end
|
177
187
|
|
178
188
|
if attributes.key?(:'enable_file_picker')
|
@@ -186,6 +196,16 @@ module Carbon
|
|
186
196
|
else
|
187
197
|
self.sync_source_items = true
|
188
198
|
end
|
199
|
+
|
200
|
+
if attributes.key?(:'incremental_sync')
|
201
|
+
self.incremental_sync = attributes[:'incremental_sync']
|
202
|
+
else
|
203
|
+
self.incremental_sync = false
|
204
|
+
end
|
205
|
+
|
206
|
+
if attributes.key?(:'file_sync_config')
|
207
|
+
self.file_sync_config = attributes[:'file_sync_config']
|
208
|
+
end
|
189
209
|
end
|
190
210
|
|
191
211
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -218,7 +238,9 @@ module Carbon
|
|
218
238
|
set_page_as_boundary == o.set_page_as_boundary &&
|
219
239
|
request_id == o.request_id &&
|
220
240
|
enable_file_picker == o.enable_file_picker &&
|
221
|
-
sync_source_items == o.sync_source_items
|
241
|
+
sync_source_items == o.sync_source_items &&
|
242
|
+
incremental_sync == o.incremental_sync &&
|
243
|
+
file_sync_config == o.file_sync_config
|
222
244
|
end
|
223
245
|
|
224
246
|
# @see the `==` method
|
@@ -230,7 +252,7 @@ module Carbon
|
|
230
252
|
# Calculates hash code according to all attributes.
|
231
253
|
# @return [Integer] Hash code
|
232
254
|
def hash
|
233
|
-
[tags, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, sync_files_on_connection, set_page_as_boundary, request_id, enable_file_picker, sync_source_items].hash
|
255
|
+
[tags, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, sync_files_on_connection, set_page_as_boundary, request_id, enable_file_picker, sync_source_items, incremental_sync, file_sync_config].hash
|
234
256
|
end
|
235
257
|
|
236
258
|
# Builds the object from hash
|
data/lib/carbon_ruby_sdk.rb
CHANGED
@@ -67,6 +67,9 @@ require 'carbon_ruby_sdk/models/github_connect_request'
|
|
67
67
|
require 'carbon_ruby_sdk/models/github_fetch_repos_request'
|
68
68
|
require 'carbon_ruby_sdk/models/gmail_sync_input'
|
69
69
|
require 'carbon_ruby_sdk/models/http_validation_error'
|
70
|
+
require 'carbon_ruby_sdk/models/helpdesk_file_sync_config'
|
71
|
+
require 'carbon_ruby_sdk/models/helpdesk_file_sync_config_nullable'
|
72
|
+
require 'carbon_ruby_sdk/models/helpdesk_file_types'
|
70
73
|
require 'carbon_ruby_sdk/models/hybrid_search_tuning_params'
|
71
74
|
require 'carbon_ruby_sdk/models/hybrid_search_tuning_params_nullable'
|
72
75
|
require 'carbon_ruby_sdk/models/ids_property'
|
@@ -0,0 +1,34 @@
|
|
1
|
+
=begin
|
2
|
+
#Carbon
|
3
|
+
|
4
|
+
#Connect external data to LLMs, no matter the source.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'spec_helper'
|
10
|
+
require 'json'
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
# Unit tests for Carbon::HelpdeskFileSyncConfigNullable
|
14
|
+
describe Carbon::HelpdeskFileSyncConfigNullable do
|
15
|
+
let(:instance) { Carbon::HelpdeskFileSyncConfigNullable.new }
|
16
|
+
|
17
|
+
describe 'test an instance of HelpdeskFileSyncConfigNullable' do
|
18
|
+
it 'should create an instance of HelpdeskFileSyncConfigNullable' do
|
19
|
+
expect(instance).to be_instance_of(Carbon::HelpdeskFileSyncConfigNullable)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
describe 'test attribute "file_types"' do
|
23
|
+
it 'should work' do
|
24
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'test attribute "sync_attachments"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
=begin
|
2
|
+
#Carbon
|
3
|
+
|
4
|
+
#Connect external data to LLMs, no matter the source.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'spec_helper'
|
10
|
+
require 'json'
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
# Unit tests for Carbon::HelpdeskFileSyncConfig
|
14
|
+
describe Carbon::HelpdeskFileSyncConfig do
|
15
|
+
let(:instance) { Carbon::HelpdeskFileSyncConfig.new }
|
16
|
+
|
17
|
+
describe 'test an instance of HelpdeskFileSyncConfig' do
|
18
|
+
it 'should create an instance of HelpdeskFileSyncConfig' do
|
19
|
+
expect(instance).to be_instance_of(Carbon::HelpdeskFileSyncConfig)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
describe 'test attribute "file_types"' do
|
23
|
+
it 'should work' do
|
24
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'test attribute "sync_attachments"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
=begin
|
2
|
+
#Carbon
|
3
|
+
|
4
|
+
#Connect external data to LLMs, no matter the source.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'spec_helper'
|
10
|
+
require 'json'
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
# Unit tests for Carbon::HelpdeskFileTypes
|
14
|
+
describe Carbon::HelpdeskFileTypes do
|
15
|
+
let(:instance) { Carbon::HelpdeskFileTypes.new }
|
16
|
+
|
17
|
+
describe 'test an instance of HelpdeskFileTypes' do
|
18
|
+
it 'should create an instance of HelpdeskFileTypes' do
|
19
|
+
expect(instance).to be_instance_of(Carbon::HelpdeskFileTypes)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -163,4 +163,16 @@ describe Carbon::OAuthURLRequest do
|
|
163
163
|
end
|
164
164
|
end
|
165
165
|
|
166
|
+
describe 'test attribute "incremental_sync"' do
|
167
|
+
it 'should work' do
|
168
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
describe 'test attribute "file_sync_config"' do
|
173
|
+
it 'should work' do
|
174
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
166
178
|
end
|
@@ -103,4 +103,10 @@ describe Carbon::SyncFilesRequest do
|
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
106
|
+
describe 'test attribute "incremental_sync"' do
|
107
|
+
it 'should work' do
|
108
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
106
112
|
end
|
@@ -97,4 +97,16 @@ describe Carbon::SyncOptions do
|
|
97
97
|
end
|
98
98
|
end
|
99
99
|
|
100
|
+
describe 'test attribute "incremental_sync"' 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
|
+
|
106
|
+
describe 'test attribute "file_sync_config"' do
|
107
|
+
it 'should work' do
|
108
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
100
112
|
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.27
|
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-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -149,6 +149,9 @@ files:
|
|
149
149
|
- lib/carbon_ruby_sdk/models/github_connect_request.rb
|
150
150
|
- lib/carbon_ruby_sdk/models/github_fetch_repos_request.rb
|
151
151
|
- lib/carbon_ruby_sdk/models/gmail_sync_input.rb
|
152
|
+
- lib/carbon_ruby_sdk/models/helpdesk_file_sync_config.rb
|
153
|
+
- lib/carbon_ruby_sdk/models/helpdesk_file_sync_config_nullable.rb
|
154
|
+
- lib/carbon_ruby_sdk/models/helpdesk_file_types.rb
|
152
155
|
- lib/carbon_ruby_sdk/models/http_validation_error.rb
|
153
156
|
- lib/carbon_ruby_sdk/models/hybrid_search_tuning_params.rb
|
154
157
|
- lib/carbon_ruby_sdk/models/hybrid_search_tuning_params_nullable.rb
|
@@ -291,6 +294,9 @@ files:
|
|
291
294
|
- spec/models/github_connect_request_spec.rb
|
292
295
|
- spec/models/github_fetch_repos_request_spec.rb
|
293
296
|
- spec/models/gmail_sync_input_spec.rb
|
297
|
+
- spec/models/helpdesk_file_sync_config_nullable_spec.rb
|
298
|
+
- spec/models/helpdesk_file_sync_config_spec.rb
|
299
|
+
- spec/models/helpdesk_file_types_spec.rb
|
294
300
|
- spec/models/http_validation_error_spec.rb
|
295
301
|
- spec/models/hybrid_search_tuning_params_nullable_spec.rb
|
296
302
|
- spec/models/hybrid_search_tuning_params_spec.rb
|
@@ -463,6 +469,7 @@ test_files:
|
|
463
469
|
- spec/models/s3_auth_request_spec.rb
|
464
470
|
- spec/models/sharepoint_authentication_spec.rb
|
465
471
|
- spec/models/zotero_authentication_spec.rb
|
472
|
+
- spec/models/helpdesk_file_types_spec.rb
|
466
473
|
- spec/models/document_response_spec.rb
|
467
474
|
- spec/models/data_source_last_sync_actions_spec.rb
|
468
475
|
- spec/models/organization_user_file_tags_remove_spec.rb
|
@@ -490,6 +497,7 @@ test_files:
|
|
490
497
|
- spec/models/chunk_properties_spec.rb
|
491
498
|
- spec/models/fetch_urls_response_spec.rb
|
492
499
|
- spec/models/data_source_type_nullable_spec.rb
|
500
|
+
- spec/models/helpdesk_file_sync_config_spec.rb
|
493
501
|
- spec/models/http_validation_error_spec.rb
|
494
502
|
- spec/models/embedding_and_chunk_spec.rb
|
495
503
|
- spec/models/tags_spec.rb
|
@@ -522,6 +530,7 @@ test_files:
|
|
522
530
|
- spec/models/fresh_desk_connect_request_spec.rb
|
523
531
|
- spec/models/embeddings_and_chunks_filters_spec.rb
|
524
532
|
- spec/models/raw_transcript_property_inner_value_spec.rb
|
533
|
+
- spec/models/helpdesk_file_sync_config_nullable_spec.rb
|
525
534
|
- spec/models/delete_users_input_spec.rb
|
526
535
|
- spec/models/webhook_no_key_spec.rb
|
527
536
|
- spec/models/s3_file_sync_input_spec.rb
|