carbon_ruby_sdk 0.2.29 → 0.2.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -9
- data/README.md +49 -7
- data/lib/carbon_ruby_sdk/api/embeddings_api.rb +2 -2
- data/lib/carbon_ruby_sdk/api/files_api.rb +21 -6
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +18 -10
- data/lib/carbon_ruby_sdk/api/utilities_api.rb +6 -2
- data/lib/carbon_ruby_sdk/models/authentication_property.rb +77 -5
- data/lib/carbon_ruby_sdk/models/auto_synced_source_types_property_inner.rb +226 -0
- data/lib/carbon_ruby_sdk/models/data_source_type.rb +3 -1
- data/lib/carbon_ruby_sdk/models/data_source_type_nullable.rb +3 -1
- data/lib/carbon_ruby_sdk/models/file_formats.rb +3 -1
- data/lib/carbon_ruby_sdk/models/file_formats_nullable.rb +3 -1
- data/lib/carbon_ruby_sdk/models/file_sync_config.rb +17 -5
- data/lib/carbon_ruby_sdk/models/file_sync_config_nullable.rb +17 -5
- data/lib/carbon_ruby_sdk/models/get_embedding_documents_body.rb +1 -1
- data/lib/carbon_ruby_sdk/models/gong_authentication.rb +254 -0
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +28 -7
- data/lib/carbon_ruby_sdk/models/{external_data_source_type.rb → oauth_based_connectors.rb} +6 -4
- data/lib/carbon_ruby_sdk/models/organization_user_files_to_sync_filters.rb +1 -1
- data/lib/carbon_ruby_sdk/models/raw_text_input.rb +16 -4
- data/lib/carbon_ruby_sdk/models/service_now_authentication.rb +296 -0
- data/lib/carbon_ruby_sdk/models/service_now_credentials.rb +262 -0
- data/lib/carbon_ruby_sdk/models/service_now_credentials_nullable.rb +263 -0
- data/lib/carbon_ruby_sdk/models/service_now_file_types.rb +37 -0
- data/lib/carbon_ruby_sdk/models/sitemap_scrape_request.rb +17 -5
- data/lib/carbon_ruby_sdk/models/sync_files_request.rb +1 -1
- data/lib/carbon_ruby_sdk/models/sync_options.rb +1 -1
- data/lib/carbon_ruby_sdk/models/upload_file_from_url_input.rb +16 -4
- data/lib/carbon_ruby_sdk/models/webscrape_request.rb +17 -5
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +7 -1
- data/spec/api/files_api_spec.rb +1 -0
- data/spec/models/authentication_property_spec.rb +30 -0
- data/spec/models/auto_synced_source_types_property_inner_spec.rb +22 -0
- data/spec/models/file_sync_config_nullable_spec.rb +6 -0
- data/spec/models/file_sync_config_spec.rb +6 -0
- data/spec/models/gong_authentication_spec.rb +46 -0
- data/spec/models/o_auth_url_request_spec.rb +12 -0
- data/spec/models/oauth_based_connectors_spec.rb +22 -0
- data/spec/models/raw_text_input_spec.rb +6 -0
- data/spec/models/service_now_authentication_spec.rb +64 -0
- data/spec/models/service_now_credentials_nullable_spec.rb +46 -0
- data/spec/models/service_now_credentials_spec.rb +46 -0
- data/spec/models/service_now_file_types_spec.rb +22 -0
- data/spec/models/sitemap_scrape_request_spec.rb +6 -0
- data/spec/models/upload_file_from_url_input_spec.rb +6 -0
- data/spec/models/webscrape_request_spec.rb +6 -0
- metadata +170 -152
- data/spec/models/external_data_source_type_spec.rb +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1939099e2521b3ce6cd543619658ed58f1faa33ce3a130183c5c974f35a000e4
|
4
|
+
data.tar.gz: 4573715a75b4ac334b788ff4a2d3750d04ec01a488daa01d5581d36c1d61ae1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e97681a4f7458e062ac3c13f822d359ddd5096b9f8982ec81d6ceb19374f33ca6c906df6cedcd4794c4e57f91827de14a8b03de4575373e925c632cd3a686505
|
7
|
+
data.tar.gz: 0d2a1f1704620c3e481c11f7f124dcf4f08df5a40cd59c43890e1f504076376faeec18acd31a7ae508975619d6fcfdf5a70b6521ebb00cf160b5152b8a7f9efa
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
carbon_ruby_sdk (0.2.
|
4
|
+
carbon_ruby_sdk (0.2.31)
|
5
5
|
faraday (>= 1.0.1, < 3.0)
|
6
6
|
faraday-multipart (~> 1.0, >= 1.0.4)
|
7
7
|
|
@@ -29,7 +29,7 @@ GEM
|
|
29
29
|
method_source (1.1.0)
|
30
30
|
multipart-post (2.4.1)
|
31
31
|
parallel (1.26.3)
|
32
|
-
parser (3.3.
|
32
|
+
parser (3.3.5.0)
|
33
33
|
ast (~> 2.4.1)
|
34
34
|
racc
|
35
35
|
pry (0.14.2)
|
@@ -42,17 +42,16 @@ GEM
|
|
42
42
|
rainbow (3.1.1)
|
43
43
|
rake (13.0.6)
|
44
44
|
regexp_parser (2.9.2)
|
45
|
-
reline (0.5.
|
45
|
+
reline (0.5.10)
|
46
46
|
io-console (~> 0.5)
|
47
|
-
rexml (3.3.
|
48
|
-
strscan
|
47
|
+
rexml (3.3.7)
|
49
48
|
rspec (3.13.0)
|
50
49
|
rspec-core (~> 3.13.0)
|
51
50
|
rspec-expectations (~> 3.13.0)
|
52
51
|
rspec-mocks (~> 3.13.0)
|
53
|
-
rspec-core (3.13.
|
52
|
+
rspec-core (3.13.1)
|
54
53
|
rspec-support (~> 3.13.0)
|
55
|
-
rspec-expectations (3.13.
|
54
|
+
rspec-expectations (3.13.3)
|
56
55
|
diff-lcs (>= 1.2.0, < 2.0)
|
57
56
|
rspec-support (~> 3.13.0)
|
58
57
|
rspec-mocks (3.13.1)
|
@@ -68,11 +67,10 @@ GEM
|
|
68
67
|
rubocop-ast (>= 1.2.0, < 2.0)
|
69
68
|
ruby-progressbar (~> 1.7)
|
70
69
|
unicode-display_width (>= 1.4.0, < 3.0)
|
71
|
-
rubocop-ast (1.32.
|
70
|
+
rubocop-ast (1.32.3)
|
72
71
|
parser (>= 3.3.1.0)
|
73
72
|
ruby-progressbar (1.13.0)
|
74
73
|
ruby2_keywords (0.0.5)
|
75
|
-
strscan (3.1.0)
|
76
74
|
unicode-display_width (2.5.0)
|
77
75
|
|
78
76
|
PLATFORMS
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
Connect external data to LLMs, no matter the source.
|
8
8
|
|
9
|
-
[![npm](https://img.shields.io/badge/gem-v0.2.
|
9
|
+
[![npm](https://img.shields.io/badge/gem-v0.2.31-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.2.31)
|
10
10
|
|
11
11
|
</div>
|
12
12
|
|
@@ -94,7 +94,7 @@ Connect external data to LLMs, no matter the source.
|
|
94
94
|
Add to Gemfile:
|
95
95
|
|
96
96
|
```ruby
|
97
|
-
gem 'carbon_ruby_sdk', '~> 0.2.
|
97
|
+
gem 'carbon_ruby_sdk', '~> 0.2.31'
|
98
98
|
```
|
99
99
|
|
100
100
|
## Getting Started<a id="getting-started"></a>
|
@@ -456,7 +456,7 @@ default, this is set to false. If true, the search may return more accurate
|
|
456
456
|
results, but may take longer to complete.
|
457
457
|
|
458
458
|
##### rerank: [`RerankParamsNullable`](./lib/carbon_ruby_sdk/models/rerank_params_nullable.rb)<a id="rerank-rerankparamsnullablelibcarbon_ruby_sdkmodelsrerank_params_nullablerb"></a>
|
459
|
-
##### file_types_at_source: Array<[`
|
459
|
+
##### file_types_at_source: Array<[`AutoSyncedSourceTypesPropertyInner`](./lib/carbon_ruby_sdk/models/auto_synced_source_types_property_inner.rb)><a id="file_types_at_source-array"></a>
|
460
460
|
Filter files based on their type at the source (for example help center tickets
|
461
461
|
and articles)
|
462
462
|
|
@@ -1153,6 +1153,7 @@ result = carbon.files.upload(
|
|
1153
1153
|
split_rows: false,
|
1154
1154
|
enable_cold_storage: false,
|
1155
1155
|
hot_storage_time_to_live: 1,
|
1156
|
+
generate_chunks_only: false,
|
1156
1157
|
)
|
1157
1158
|
p result
|
1158
1159
|
```
|
@@ -1221,6 +1222,10 @@ storage after a certain period of inactivity. Default is false.
|
|
1221
1222
|
##### hot_storage_time_to_live: `Integer`<a id="hot_storage_time_to_live-integer"></a>
|
1222
1223
|
Time in seconds after which the file will be moved to cold storage.
|
1223
1224
|
|
1225
|
+
##### generate_chunks_only: `Boolean`<a id="generate_chunks_only-boolean"></a>
|
1226
|
+
If this flag is enabled, the file will be chunked and stored with Carbon, but no
|
1227
|
+
embeddings will be generated. This overrides the skip_embedding_generation flag.
|
1228
|
+
|
1224
1229
|
#### 🔄 Return<a id="🔄-return"></a>
|
1225
1230
|
|
1226
1231
|
[UserFile](./lib/carbon_ruby_sdk/models/user_file.rb)
|
@@ -1262,6 +1267,7 @@ result = carbon.files.upload_from_url(
|
|
1262
1267
|
cold_storage_params: {
|
1263
1268
|
"enable_cold_storage" => false,
|
1264
1269
|
},
|
1270
|
+
generate_chunks_only: false,
|
1265
1271
|
)
|
1266
1272
|
p result
|
1267
1273
|
```
|
@@ -1288,6 +1294,10 @@ Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
|
1288
1294
|
##### media_type: [`FileContentTypesNullable`](./lib/carbon_ruby_sdk/models/file_content_types_nullable.rb)<a id="media_type-filecontenttypesnullablelibcarbon_ruby_sdkmodelsfile_content_types_nullablerb"></a>
|
1289
1295
|
##### split_rows: `Boolean`<a id="split_rows-boolean"></a>
|
1290
1296
|
##### cold_storage_params: [`ColdStorageProps`](./lib/carbon_ruby_sdk/models/cold_storage_props.rb)<a id="cold_storage_params-coldstoragepropslibcarbon_ruby_sdkmodelscold_storage_propsrb"></a>
|
1297
|
+
##### generate_chunks_only: `Boolean`<a id="generate_chunks_only-boolean"></a>
|
1298
|
+
If this flag is enabled, the file will be chunked and stored with Carbon, but no
|
1299
|
+
embeddings will be generated. This overrides the skip_embedding_generation flag.
|
1300
|
+
|
1291
1301
|
#### 🔄 Return<a id="🔄-return"></a>
|
1292
1302
|
|
1293
1303
|
[UserFile](./lib/carbon_ruby_sdk/models/user_file.rb)
|
@@ -1329,6 +1339,7 @@ result = carbon.files.upload_text(
|
|
1329
1339
|
cold_storage_params: {
|
1330
1340
|
"enable_cold_storage" => false,
|
1331
1341
|
},
|
1342
|
+
generate_chunks_only: false,
|
1332
1343
|
)
|
1333
1344
|
p result
|
1334
1345
|
```
|
@@ -1344,6 +1355,10 @@ p result
|
|
1344
1355
|
##### embedding_model: [`EmbeddingGeneratorsNullable`](./lib/carbon_ruby_sdk/models/embedding_generators_nullable.rb)<a id="embedding_model-embeddinggeneratorsnullablelibcarbon_ruby_sdkmodelsembedding_generators_nullablerb"></a>
|
1345
1356
|
##### generate_sparse_vectors: `Boolean`<a id="generate_sparse_vectors-boolean"></a>
|
1346
1357
|
##### cold_storage_params: [`ColdStorageProps`](./lib/carbon_ruby_sdk/models/cold_storage_props.rb)<a id="cold_storage_params-coldstoragepropslibcarbon_ruby_sdkmodelscold_storage_propsrb"></a>
|
1358
|
+
##### generate_chunks_only: `Boolean`<a id="generate_chunks_only-boolean"></a>
|
1359
|
+
If this flag is enabled, the file will be chunked and stored with Carbon, but no
|
1360
|
+
embeddings will be generated. This overrides the skip_embedding_generation flag.
|
1361
|
+
|
1347
1362
|
#### 🔄 Return<a id="🔄-return"></a>
|
1348
1363
|
|
1349
1364
|
[UserFile](./lib/carbon_ruby_sdk/models/user_file.rb)
|
@@ -1463,6 +1478,7 @@ result = carbon.integrations.connect_freshdesk(
|
|
1463
1478
|
"transcription_service" => "assemblyai",
|
1464
1479
|
"include_speaker_labels" => false,
|
1465
1480
|
"split_rows" => false,
|
1481
|
+
"generate_chunks_only" => false,
|
1466
1482
|
},
|
1467
1483
|
)
|
1468
1484
|
p result
|
@@ -1584,6 +1600,7 @@ result = carbon.integrations.connect_guru(
|
|
1584
1600
|
"transcription_service" => "assemblyai",
|
1585
1601
|
"include_speaker_labels" => false,
|
1586
1602
|
"split_rows" => false,
|
1603
|
+
"generate_chunks_only" => false,
|
1587
1604
|
},
|
1588
1605
|
)
|
1589
1606
|
p result
|
@@ -1714,15 +1731,23 @@ result = carbon.integrations.get_oauth_url(
|
|
1714
1731
|
"transcription_service" => "assemblyai",
|
1715
1732
|
"include_speaker_labels" => false,
|
1716
1733
|
"split_rows" => false,
|
1734
|
+
"generate_chunks_only" => false,
|
1717
1735
|
},
|
1718
1736
|
automatically_open_file_picker: true,
|
1737
|
+
gong_account_email: "string_example",
|
1738
|
+
servicenow_credentials: {
|
1739
|
+
"instance_subdomain" => "instance_subdomain_example",
|
1740
|
+
"client_id" => "client_id_example",
|
1741
|
+
"client_secret" => "client_secret_example",
|
1742
|
+
"redirect_uri" => "redirect_uri_example",
|
1743
|
+
},
|
1719
1744
|
)
|
1720
1745
|
p result
|
1721
1746
|
```
|
1722
1747
|
|
1723
1748
|
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
1724
1749
|
|
1725
|
-
##### service: [`
|
1750
|
+
##### service: [`OauthBasedConnectors`](./lib/carbon_ruby_sdk/models/oauth_based_connectors.rb)<a id="service-oauthbasedconnectorslibcarbon_ruby_sdkmodelsoauth_based_connectorsrb"></a>
|
1726
1751
|
##### tags: `Object`<a id="tags-object"></a>
|
1727
1752
|
##### scope: `String`<a id="scope-string"></a>
|
1728
1753
|
##### chunk_size: `Integer`<a id="chunk_size-integer"></a>
|
@@ -1775,7 +1800,7 @@ via list items endpoint
|
|
1775
1800
|
Only sync files if they have not already been synced or if the embedding
|
1776
1801
|
properties have changed. This flag is currently supported by ONEDRIVE,
|
1777
1802
|
GOOGLE_DRIVE, BOX, DROPBOX, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE,
|
1778
|
-
NOTION, SHAREPOINT. It will be ignored for other data sources.
|
1803
|
+
NOTION, SHAREPOINT, SERVICENOW. It will be ignored for other data sources.
|
1779
1804
|
|
1780
1805
|
##### file_sync_config: [`FileSyncConfigNullable`](./lib/carbon_ruby_sdk/models/file_sync_config_nullable.rb)<a id="file_sync_config-filesyncconfignullablelibcarbon_ruby_sdkmodelsfile_sync_config_nullablerb"></a>
|
1781
1806
|
##### automatically_open_file_picker: `Boolean`<a id="automatically_open_file_picker-boolean"></a>
|
@@ -1783,6 +1808,12 @@ Automatically open source file picker after the OAuth flow is complete. This
|
|
1783
1808
|
flag is currently supported by BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT.
|
1784
1809
|
It will be ignored for other data sources.
|
1785
1810
|
|
1811
|
+
##### gong_account_email: `String`<a id="gong_account_email-string"></a>
|
1812
|
+
If you are connecting a Gong account, you need to input the email of the account
|
1813
|
+
you wish to connect. This email will be used to identify your carbon data
|
1814
|
+
source.
|
1815
|
+
|
1816
|
+
##### servicenow_credentials: [`ServiceNowCredentialsNullable`](./lib/carbon_ruby_sdk/models/service_now_credentials_nullable.rb)<a id="servicenow_credentials-servicenowcredentialsnullablelibcarbon_ruby_sdkmodelsservice_now_credentials_nullablerb"></a>
|
1786
1817
|
#### 🔄 Return<a id="🔄-return"></a>
|
1787
1818
|
|
1788
1819
|
[OuthURLResponse](./lib/carbon_ruby_sdk/models/outh_url_response.rb)
|
@@ -2087,6 +2118,7 @@ result = carbon.integrations.sync_confluence(
|
|
2087
2118
|
"transcription_service" => "assemblyai",
|
2088
2119
|
"include_speaker_labels" => false,
|
2089
2120
|
"split_rows" => false,
|
2121
|
+
"generate_chunks_only" => false,
|
2090
2122
|
},
|
2091
2123
|
)
|
2092
2124
|
p result
|
@@ -2114,7 +2146,7 @@ Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
|
2114
2146
|
Only sync files if they have not already been synced or if the embedding
|
2115
2147
|
properties have changed. This flag is currently supported by ONEDRIVE,
|
2116
2148
|
GOOGLE_DRIVE, BOX, DROPBOX, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE,
|
2117
|
-
NOTION, SHAREPOINT. It will be ignored for other data sources.
|
2149
|
+
NOTION, SHAREPOINT, SERVICENOW. It will be ignored for other data sources.
|
2118
2150
|
|
2119
2151
|
##### file_sync_config: [`FileSyncConfigNullable`](./lib/carbon_ruby_sdk/models/file_sync_config_nullable.rb)<a id="file_sync_config-filesyncconfignullablelibcarbon_ruby_sdkmodelsfile_sync_config_nullablerb"></a>
|
2120
2152
|
#### 🔄 Return<a id="🔄-return"></a>
|
@@ -2194,6 +2226,7 @@ result = carbon.integrations.sync_files(
|
|
2194
2226
|
"transcription_service" => "assemblyai",
|
2195
2227
|
"include_speaker_labels" => false,
|
2196
2228
|
"split_rows" => false,
|
2229
|
+
"generate_chunks_only" => false,
|
2197
2230
|
},
|
2198
2231
|
)
|
2199
2232
|
p result
|
@@ -2221,7 +2254,7 @@ Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
|
2221
2254
|
Only sync files if they have not already been synced or if the embedding
|
2222
2255
|
properties have changed. This flag is currently supported by ONEDRIVE,
|
2223
2256
|
GOOGLE_DRIVE, BOX, DROPBOX, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE,
|
2224
|
-
NOTION, SHAREPOINT. It will be ignored for other data sources.
|
2257
|
+
NOTION, SHAREPOINT, SERVICENOW. It will be ignored for other data sources.
|
2225
2258
|
|
2226
2259
|
##### file_sync_config: [`FileSyncConfigNullable`](./lib/carbon_ruby_sdk/models/file_sync_config_nullable.rb)<a id="file_sync_config-filesyncconfignullablelibcarbon_ruby_sdkmodelsfile_sync_config_nullablerb"></a>
|
2227
2260
|
#### 🔄 Return<a id="🔄-return"></a>
|
@@ -2400,6 +2433,7 @@ result = carbon.integrations.sync_gmail(
|
|
2400
2433
|
"transcription_service" => "assemblyai",
|
2401
2434
|
"include_speaker_labels" => false,
|
2402
2435
|
"split_rows" => false,
|
2436
|
+
"generate_chunks_only" => false,
|
2403
2437
|
},
|
2404
2438
|
incremental_sync: false,
|
2405
2439
|
)
|
@@ -2521,6 +2555,7 @@ result = carbon.integrations.sync_outlook(
|
|
2521
2555
|
"transcription_service" => "assemblyai",
|
2522
2556
|
"include_speaker_labels" => false,
|
2523
2557
|
"split_rows" => false,
|
2558
|
+
"generate_chunks_only" => false,
|
2524
2559
|
},
|
2525
2560
|
incremental_sync: false,
|
2526
2561
|
)
|
@@ -2666,6 +2701,7 @@ result = carbon.integrations.sync_s3_files(
|
|
2666
2701
|
"transcription_service" => "assemblyai",
|
2667
2702
|
"include_speaker_labels" => false,
|
2668
2703
|
"split_rows" => false,
|
2704
|
+
"generate_chunks_only" => false,
|
2669
2705
|
},
|
2670
2706
|
)
|
2671
2707
|
p result
|
@@ -3184,6 +3220,7 @@ result = carbon.utilities.scrape_sitemap(
|
|
3184
3220
|
url_paths_to_exclude: [],
|
3185
3221
|
urls_to_scrape: [],
|
3186
3222
|
download_css_and_media: false,
|
3223
|
+
generate_chunks_only: false,
|
3187
3224
|
)
|
3188
3225
|
p result
|
3189
3226
|
```
|
@@ -3223,6 +3260,10 @@ Whether the scraper should download css and media from the page (images, fonts,
|
|
3223
3260
|
etc). Scrapes might take longer to finish with this flag enabled, but the
|
3224
3261
|
success rate is improved.
|
3225
3262
|
|
3263
|
+
##### generate_chunks_only: `Boolean`<a id="generate_chunks_only-boolean"></a>
|
3264
|
+
If this flag is enabled, the file will be chunked and stored with Carbon, but no
|
3265
|
+
embeddings will be generated. This overrides the skip_embedding_generation flag.
|
3266
|
+
|
3226
3267
|
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
3227
3268
|
|
3228
3269
|
`/scrape_sitemap` `POST`
|
@@ -3264,6 +3305,7 @@ result = carbon.utilities.scrape_web(
|
|
3264
3305
|
"embedding_model" => "OPENAI",
|
3265
3306
|
"url_paths_to_include" => [],
|
3266
3307
|
"download_css_and_media" => false,
|
3308
|
+
"generate_chunks_only" => false,
|
3267
3309
|
}
|
3268
3310
|
],
|
3269
3311
|
)
|
@@ -131,7 +131,7 @@ module Carbon
|
|
131
131
|
# @param include_file_level_metadata [Boolean] Flag to control whether or not to include file-level metadata in the response. This metadata will be included in the `content_metadata` field of each document along with chunk/embedding level metadata.
|
132
132
|
# @param high_accuracy [Boolean] Flag to control whether or not to perform a high accuracy embedding search. By default, this is set to false. If true, the search may return more accurate results, but may take longer to complete.
|
133
133
|
# @param rerank [RerankParamsNullable]
|
134
|
-
# @param file_types_at_source [Array<
|
134
|
+
# @param file_types_at_source [Array<AutoSyncedSourceTypesPropertyInner>] Filter files based on their type at the source (for example help center tickets and articles)
|
135
135
|
# @param exclude_cold_storage_files [Boolean] Flag to control whether or not to exclude files that are not in hot storage. If set to False, then an error will be returned if any filtered files are in cold storage.
|
136
136
|
# @param body [GetEmbeddingDocumentsBody]
|
137
137
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -277,7 +277,7 @@ module Carbon
|
|
277
277
|
# @param include_file_level_metadata [Boolean] Flag to control whether or not to include file-level metadata in the response. This metadata will be included in the `content_metadata` field of each document along with chunk/embedding level metadata.
|
278
278
|
# @param high_accuracy [Boolean] Flag to control whether or not to perform a high accuracy embedding search. By default, this is set to false. If true, the search may return more accurate results, but may take longer to complete.
|
279
279
|
# @param rerank [RerankParamsNullable]
|
280
|
-
# @param file_types_at_source [Array<
|
280
|
+
# @param file_types_at_source [Array<AutoSyncedSourceTypesPropertyInner>] Filter files based on their type at the source (for example help center tickets and articles)
|
281
281
|
# @param exclude_cold_storage_files [Boolean] Flag to control whether or not to exclude files that are not in hot storage. If set to False, then an error will be returned if any filtered files are in cold storage.
|
282
282
|
# @param body [GetEmbeddingDocumentsBody]
|
283
283
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -1375,9 +1375,10 @@ module Carbon
|
|
1375
1375
|
# @param split_rows [Boolean] Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files.
|
1376
1376
|
# @param enable_cold_storage [Boolean] Enable cold storage for the file. If set to true, the file will be moved to cold storage after a certain period of inactivity. Default is false.
|
1377
1377
|
# @param hot_storage_time_to_live [Integer] Time in seconds after which the file will be moved to cold storage.
|
1378
|
+
# @param generate_chunks_only [Boolean] If this flag is enabled, the file will be chunked and stored with Carbon, but no embeddings will be generated. This overrides the skip_embedding_generation flag.
|
1378
1379
|
# @param body [BodyCreateUploadFileUploadfilePost]
|
1379
1380
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1380
|
-
def upload(file:, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: 'OPENAI', use_ocr: false, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, parse_pdf_tables_with_ocr: false, detect_audio_language: false, transcription_service: SENTINEL, include_speaker_labels: false, media_type: SENTINEL, split_rows: false, enable_cold_storage: false, hot_storage_time_to_live: SENTINEL, extra: {})
|
1381
|
+
def upload(file:, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: 'OPENAI', use_ocr: false, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, parse_pdf_tables_with_ocr: false, detect_audio_language: false, transcription_service: SENTINEL, include_speaker_labels: false, media_type: SENTINEL, split_rows: false, enable_cold_storage: false, hot_storage_time_to_live: SENTINEL, generate_chunks_only: false, extra: {})
|
1381
1382
|
_body = {}
|
1382
1383
|
_body[:file] = file if file != SENTINEL
|
1383
1384
|
body_create_upload_file_uploadfile_post = _body
|
@@ -1398,6 +1399,7 @@ module Carbon
|
|
1398
1399
|
extra[:split_rows] = split_rows if split_rows != SENTINEL
|
1399
1400
|
extra[:enable_cold_storage] = enable_cold_storage if enable_cold_storage != SENTINEL
|
1400
1401
|
extra[:hot_storage_time_to_live] = hot_storage_time_to_live if hot_storage_time_to_live != SENTINEL
|
1402
|
+
extra[:generate_chunks_only] = generate_chunks_only if generate_chunks_only != SENTINEL
|
1401
1403
|
api_response = upload_with_http_info_impl(file, body_create_upload_file_uploadfile_post, extra)
|
1402
1404
|
api_response.data
|
1403
1405
|
end
|
@@ -1448,9 +1450,10 @@ module Carbon
|
|
1448
1450
|
# @param split_rows [Boolean] Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files.
|
1449
1451
|
# @param enable_cold_storage [Boolean] Enable cold storage for the file. If set to true, the file will be moved to cold storage after a certain period of inactivity. Default is false.
|
1450
1452
|
# @param hot_storage_time_to_live [Integer] Time in seconds after which the file will be moved to cold storage.
|
1453
|
+
# @param generate_chunks_only [Boolean] If this flag is enabled, the file will be chunked and stored with Carbon, but no embeddings will be generated. This overrides the skip_embedding_generation flag.
|
1451
1454
|
# @param body [BodyCreateUploadFileUploadfilePost]
|
1452
1455
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1453
|
-
def upload_with_http_info(file:, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: 'OPENAI', use_ocr: false, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, parse_pdf_tables_with_ocr: false, detect_audio_language: false, transcription_service: SENTINEL, include_speaker_labels: false, media_type: SENTINEL, split_rows: false, enable_cold_storage: false, hot_storage_time_to_live: SENTINEL, extra: {})
|
1456
|
+
def upload_with_http_info(file:, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: 'OPENAI', use_ocr: false, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, parse_pdf_tables_with_ocr: false, detect_audio_language: false, transcription_service: SENTINEL, include_speaker_labels: false, media_type: SENTINEL, split_rows: false, enable_cold_storage: false, hot_storage_time_to_live: SENTINEL, generate_chunks_only: false, extra: {})
|
1454
1457
|
_body = {}
|
1455
1458
|
_body[:file] = file if file != SENTINEL
|
1456
1459
|
body_create_upload_file_uploadfile_post = _body
|
@@ -1471,6 +1474,7 @@ module Carbon
|
|
1471
1474
|
extra[:split_rows] = split_rows if split_rows != SENTINEL
|
1472
1475
|
extra[:enable_cold_storage] = enable_cold_storage if enable_cold_storage != SENTINEL
|
1473
1476
|
extra[:hot_storage_time_to_live] = hot_storage_time_to_live if hot_storage_time_to_live != SENTINEL
|
1477
|
+
extra[:generate_chunks_only] = generate_chunks_only if generate_chunks_only != SENTINEL
|
1474
1478
|
upload_with_http_info_impl(file, body_create_upload_file_uploadfile_post, extra)
|
1475
1479
|
end
|
1476
1480
|
|
@@ -1496,6 +1500,7 @@ module Carbon
|
|
1496
1500
|
# @option opts [Boolean] :split_rows Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files. (default to false)
|
1497
1501
|
# @option opts [Boolean] :enable_cold_storage Enable cold storage for the file. If set to true, the file will be moved to cold storage after a certain period of inactivity. Default is false. (default to false)
|
1498
1502
|
# @option opts [Integer] :hot_storage_time_to_live Time in seconds after which the file will be moved to cold storage.
|
1503
|
+
# @option opts [Boolean] :generate_chunks_only If this flag is enabled, the file will be chunked and stored with Carbon, but no embeddings will be generated. This overrides the skip_embedding_generation flag. (default to false)
|
1499
1504
|
# @return [UserFile]
|
1500
1505
|
private def upload_impl(file, body_create_upload_file_uploadfile_post, opts = {})
|
1501
1506
|
data, _status_code, _headers = upload_with_http_info(file, body_create_upload_file_uploadfile_post, opts)
|
@@ -1524,6 +1529,7 @@ module Carbon
|
|
1524
1529
|
# @option opts [Boolean] :split_rows Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files. (default to false)
|
1525
1530
|
# @option opts [Boolean] :enable_cold_storage Enable cold storage for the file. If set to true, the file will be moved to cold storage after a certain period of inactivity. Default is false. (default to false)
|
1526
1531
|
# @option opts [Integer] :hot_storage_time_to_live Time in seconds after which the file will be moved to cold storage.
|
1532
|
+
# @option opts [Boolean] :generate_chunks_only If this flag is enabled, the file will be chunked and stored with Carbon, but no embeddings will be generated. This overrides the skip_embedding_generation flag. (default to false)
|
1527
1533
|
# @return [APIResponse] data is UserFile, status code, headers and response
|
1528
1534
|
private def upload_with_http_info_impl(file, body_create_upload_file_uploadfile_post, opts = {})
|
1529
1535
|
if @api_client.config.debugging
|
@@ -1559,6 +1565,7 @@ module Carbon
|
|
1559
1565
|
query_params[:'split_rows'] = opts[:'split_rows'] if !opts[:'split_rows'].nil?
|
1560
1566
|
query_params[:'enable_cold_storage'] = opts[:'enable_cold_storage'] if !opts[:'enable_cold_storage'].nil?
|
1561
1567
|
query_params[:'hot_storage_time_to_live'] = opts[:'hot_storage_time_to_live'] if !opts[:'hot_storage_time_to_live'].nil?
|
1568
|
+
query_params[:'generate_chunks_only'] = opts[:'generate_chunks_only'] if !opts[:'generate_chunks_only'].nil?
|
1562
1569
|
|
1563
1570
|
# header parameters
|
1564
1571
|
header_params = opts[:header_params] || {}
|
@@ -1621,9 +1628,10 @@ module Carbon
|
|
1621
1628
|
# @param media_type [FileContentTypesNullable]
|
1622
1629
|
# @param split_rows [Boolean]
|
1623
1630
|
# @param cold_storage_params [ColdStorageProps]
|
1631
|
+
# @param generate_chunks_only [Boolean] If this flag is enabled, the file will be chunked and stored with Carbon, but no embeddings will be generated. This overrides the skip_embedding_generation flag.
|
1624
1632
|
# @param body [UploadFileFromUrlInput]
|
1625
1633
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1626
|
-
def upload_from_url(url:, file_name: SENTINEL, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, use_textract: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, parse_pdf_tables_with_ocr: false, detect_audio_language: false, transcription_service: SENTINEL, include_speaker_labels: false, media_type: SENTINEL, split_rows: false, cold_storage_params: SENTINEL, extra: {})
|
1634
|
+
def upload_from_url(url:, file_name: SENTINEL, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, use_textract: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, parse_pdf_tables_with_ocr: false, detect_audio_language: false, transcription_service: SENTINEL, include_speaker_labels: false, media_type: SENTINEL, split_rows: false, cold_storage_params: SENTINEL, generate_chunks_only: false, extra: {})
|
1627
1635
|
_body = {}
|
1628
1636
|
_body[:url] = url if url != SENTINEL
|
1629
1637
|
_body[:file_name] = file_name if file_name != SENTINEL
|
@@ -1643,6 +1651,7 @@ module Carbon
|
|
1643
1651
|
_body[:media_type] = media_type if media_type != SENTINEL
|
1644
1652
|
_body[:split_rows] = split_rows if split_rows != SENTINEL
|
1645
1653
|
_body[:cold_storage_params] = cold_storage_params if cold_storage_params != SENTINEL
|
1654
|
+
_body[:generate_chunks_only] = generate_chunks_only if generate_chunks_only != SENTINEL
|
1646
1655
|
upload_file_from_url_input = _body
|
1647
1656
|
api_response = upload_from_url_with_http_info_impl(upload_file_from_url_input, extra)
|
1648
1657
|
api_response.data
|
@@ -1668,9 +1677,10 @@ module Carbon
|
|
1668
1677
|
# @param media_type [FileContentTypesNullable]
|
1669
1678
|
# @param split_rows [Boolean]
|
1670
1679
|
# @param cold_storage_params [ColdStorageProps]
|
1680
|
+
# @param generate_chunks_only [Boolean] If this flag is enabled, the file will be chunked and stored with Carbon, but no embeddings will be generated. This overrides the skip_embedding_generation flag.
|
1671
1681
|
# @param body [UploadFileFromUrlInput]
|
1672
1682
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1673
|
-
def upload_from_url_with_http_info(url:, file_name: SENTINEL, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, use_textract: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, parse_pdf_tables_with_ocr: false, detect_audio_language: false, transcription_service: SENTINEL, include_speaker_labels: false, media_type: SENTINEL, split_rows: false, cold_storage_params: SENTINEL, extra: {})
|
1683
|
+
def upload_from_url_with_http_info(url:, file_name: SENTINEL, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, use_textract: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, parse_pdf_tables_with_ocr: false, detect_audio_language: false, transcription_service: SENTINEL, include_speaker_labels: false, media_type: SENTINEL, split_rows: false, cold_storage_params: SENTINEL, generate_chunks_only: false, extra: {})
|
1674
1684
|
_body = {}
|
1675
1685
|
_body[:url] = url if url != SENTINEL
|
1676
1686
|
_body[:file_name] = file_name if file_name != SENTINEL
|
@@ -1690,6 +1700,7 @@ module Carbon
|
|
1690
1700
|
_body[:media_type] = media_type if media_type != SENTINEL
|
1691
1701
|
_body[:split_rows] = split_rows if split_rows != SENTINEL
|
1692
1702
|
_body[:cold_storage_params] = cold_storage_params if cold_storage_params != SENTINEL
|
1703
|
+
_body[:generate_chunks_only] = generate_chunks_only if generate_chunks_only != SENTINEL
|
1693
1704
|
upload_file_from_url_input = _body
|
1694
1705
|
upload_from_url_with_http_info_impl(upload_file_from_url_input, extra)
|
1695
1706
|
end
|
@@ -1783,9 +1794,10 @@ module Carbon
|
|
1783
1794
|
# @param embedding_model [EmbeddingGeneratorsNullable]
|
1784
1795
|
# @param generate_sparse_vectors [Boolean]
|
1785
1796
|
# @param cold_storage_params [ColdStorageProps]
|
1797
|
+
# @param generate_chunks_only [Boolean] If this flag is enabled, the file will be chunked and stored with Carbon, but no embeddings will be generated. This overrides the skip_embedding_generation flag.
|
1786
1798
|
# @param body [RawTextInput]
|
1787
1799
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1788
|
-
def upload_text(contents:, name: SENTINEL, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, overwrite_file_id: SENTINEL, embedding_model: 'OPENAI', generate_sparse_vectors: false, cold_storage_params: SENTINEL, extra: {})
|
1800
|
+
def upload_text(contents:, name: SENTINEL, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, overwrite_file_id: SENTINEL, embedding_model: 'OPENAI', generate_sparse_vectors: false, cold_storage_params: SENTINEL, generate_chunks_only: false, extra: {})
|
1789
1801
|
_body = {}
|
1790
1802
|
_body[:contents] = contents if contents != SENTINEL
|
1791
1803
|
_body[:name] = name if name != SENTINEL
|
@@ -1796,6 +1808,7 @@ module Carbon
|
|
1796
1808
|
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1797
1809
|
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1798
1810
|
_body[:cold_storage_params] = cold_storage_params if cold_storage_params != SENTINEL
|
1811
|
+
_body[:generate_chunks_only] = generate_chunks_only if generate_chunks_only != SENTINEL
|
1799
1812
|
raw_text_input = _body
|
1800
1813
|
api_response = upload_text_with_http_info_impl(raw_text_input, extra)
|
1801
1814
|
api_response.data
|
@@ -1823,9 +1836,10 @@ module Carbon
|
|
1823
1836
|
# @param embedding_model [EmbeddingGeneratorsNullable]
|
1824
1837
|
# @param generate_sparse_vectors [Boolean]
|
1825
1838
|
# @param cold_storage_params [ColdStorageProps]
|
1839
|
+
# @param generate_chunks_only [Boolean] If this flag is enabled, the file will be chunked and stored with Carbon, but no embeddings will be generated. This overrides the skip_embedding_generation flag.
|
1826
1840
|
# @param body [RawTextInput]
|
1827
1841
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1828
|
-
def upload_text_with_http_info(contents:, name: SENTINEL, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, overwrite_file_id: SENTINEL, embedding_model: 'OPENAI', generate_sparse_vectors: false, cold_storage_params: SENTINEL, extra: {})
|
1842
|
+
def upload_text_with_http_info(contents:, name: SENTINEL, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, overwrite_file_id: SENTINEL, embedding_model: 'OPENAI', generate_sparse_vectors: false, cold_storage_params: SENTINEL, generate_chunks_only: false, extra: {})
|
1829
1843
|
_body = {}
|
1830
1844
|
_body[:contents] = contents if contents != SENTINEL
|
1831
1845
|
_body[:name] = name if name != SENTINEL
|
@@ -1836,6 +1850,7 @@ module Carbon
|
|
1836
1850
|
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1837
1851
|
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1838
1852
|
_body[:cold_storage_params] = cold_storage_params if cold_storage_params != SENTINEL
|
1853
|
+
_body[:generate_chunks_only] = generate_chunks_only if generate_chunks_only != SENTINEL
|
1839
1854
|
raw_text_input = _body
|
1840
1855
|
upload_text_with_http_info_impl(raw_text_input, extra)
|
1841
1856
|
end
|
@@ -789,7 +789,7 @@ module Carbon
|
|
789
789
|
# - A file syncing URL which skips the OAuth flow if the user already has a valid access token and takes them to the
|
790
790
|
# success state.
|
791
791
|
#
|
792
|
-
# @param service [
|
792
|
+
# @param service [OauthBasedConnectors]
|
793
793
|
# @param tags [Object]
|
794
794
|
# @param scope [String]
|
795
795
|
# @param chunk_size [Integer]
|
@@ -813,12 +813,14 @@ module Carbon
|
|
813
813
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
814
814
|
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT
|
815
815
|
# @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
|
816
|
-
# @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, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT. It will be ignored for other data sources.
|
816
|
+
# @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, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT, SERVICENOW. It will be ignored for other data sources.
|
817
817
|
# @param file_sync_config [FileSyncConfigNullable]
|
818
818
|
# @param automatically_open_file_picker [Boolean] Automatically open source file picker after the OAuth flow is complete. This flag is currently supported by BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT. It will be ignored for other data sources.
|
819
|
+
# @param gong_account_email [String] If you are connecting a Gong account, you need to input the email of the account you wish to connect. This email will be used to identify your carbon data source.
|
820
|
+
# @param servicenow_credentials [ServiceNowCredentialsNullable]
|
819
821
|
# @param body [OAuthURLRequest]
|
820
822
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
821
|
-
def get_oauth_url(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, incremental_sync: false, file_sync_config: SENTINEL, automatically_open_file_picker: SENTINEL, extra: {})
|
823
|
+
def get_oauth_url(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, incremental_sync: false, file_sync_config: SENTINEL, automatically_open_file_picker: SENTINEL, gong_account_email: SENTINEL, servicenow_credentials: SENTINEL, extra: {})
|
822
824
|
_body = {}
|
823
825
|
_body[:tags] = tags if tags != SENTINEL
|
824
826
|
_body[:scope] = scope if scope != SENTINEL
|
@@ -847,6 +849,8 @@ module Carbon
|
|
847
849
|
_body[:incremental_sync] = incremental_sync if incremental_sync != SENTINEL
|
848
850
|
_body[:file_sync_config] = file_sync_config if file_sync_config != SENTINEL
|
849
851
|
_body[:automatically_open_file_picker] = automatically_open_file_picker if automatically_open_file_picker != SENTINEL
|
852
|
+
_body[:gong_account_email] = gong_account_email if gong_account_email != SENTINEL
|
853
|
+
_body[:servicenow_credentials] = servicenow_credentials if servicenow_credentials != SENTINEL
|
850
854
|
o_auth_url_request = _body
|
851
855
|
api_response = get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
|
852
856
|
api_response.data
|
@@ -859,7 +863,7 @@ module Carbon
|
|
859
863
|
# - A file syncing URL which skips the OAuth flow if the user already has a valid access token and takes them to the
|
860
864
|
# success state.
|
861
865
|
#
|
862
|
-
# @param service [
|
866
|
+
# @param service [OauthBasedConnectors]
|
863
867
|
# @param tags [Object]
|
864
868
|
# @param scope [String]
|
865
869
|
# @param chunk_size [Integer]
|
@@ -883,12 +887,14 @@ module Carbon
|
|
883
887
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
884
888
|
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT
|
885
889
|
# @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
|
886
|
-
# @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, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT. It will be ignored for other data sources.
|
890
|
+
# @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, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT, SERVICENOW. It will be ignored for other data sources.
|
887
891
|
# @param file_sync_config [FileSyncConfigNullable]
|
888
892
|
# @param automatically_open_file_picker [Boolean] Automatically open source file picker after the OAuth flow is complete. This flag is currently supported by BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT. It will be ignored for other data sources.
|
893
|
+
# @param gong_account_email [String] If you are connecting a Gong account, you need to input the email of the account you wish to connect. This email will be used to identify your carbon data source.
|
894
|
+
# @param servicenow_credentials [ServiceNowCredentialsNullable]
|
889
895
|
# @param body [OAuthURLRequest]
|
890
896
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
891
|
-
def get_oauth_url_with_http_info(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, incremental_sync: false, file_sync_config: SENTINEL, automatically_open_file_picker: SENTINEL, extra: {})
|
897
|
+
def get_oauth_url_with_http_info(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, incremental_sync: false, file_sync_config: SENTINEL, automatically_open_file_picker: SENTINEL, gong_account_email: SENTINEL, servicenow_credentials: SENTINEL, extra: {})
|
892
898
|
_body = {}
|
893
899
|
_body[:tags] = tags if tags != SENTINEL
|
894
900
|
_body[:scope] = scope if scope != SENTINEL
|
@@ -917,6 +923,8 @@ module Carbon
|
|
917
923
|
_body[:incremental_sync] = incremental_sync if incremental_sync != SENTINEL
|
918
924
|
_body[:file_sync_config] = file_sync_config if file_sync_config != SENTINEL
|
919
925
|
_body[:automatically_open_file_picker] = automatically_open_file_picker if automatically_open_file_picker != SENTINEL
|
926
|
+
_body[:gong_account_email] = gong_account_email if gong_account_email != SENTINEL
|
927
|
+
_body[:servicenow_credentials] = servicenow_credentials if servicenow_credentials != SENTINEL
|
920
928
|
o_auth_url_request = _body
|
921
929
|
get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
|
922
930
|
end
|
@@ -1804,7 +1812,7 @@ module Carbon
|
|
1804
1812
|
# @param request_id [String]
|
1805
1813
|
# @param use_ocr [Boolean]
|
1806
1814
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
1807
|
-
# @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, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT. It will be ignored for other data sources.
|
1815
|
+
# @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, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT, SERVICENOW. It will be ignored for other data sources.
|
1808
1816
|
# @param file_sync_config [FileSyncConfigNullable]
|
1809
1817
|
# @param body [SyncFilesRequest]
|
1810
1818
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -1854,7 +1862,7 @@ module Carbon
|
|
1854
1862
|
# @param request_id [String]
|
1855
1863
|
# @param use_ocr [Boolean]
|
1856
1864
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
1857
|
-
# @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, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT. It will be ignored for other data sources.
|
1865
|
+
# @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, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT, SERVICENOW. It will be ignored for other data sources.
|
1858
1866
|
# @param file_sync_config [FileSyncConfigNullable]
|
1859
1867
|
# @param body [SyncFilesRequest]
|
1860
1868
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -2062,7 +2070,7 @@ module Carbon
|
|
2062
2070
|
# @param request_id [String]
|
2063
2071
|
# @param use_ocr [Boolean]
|
2064
2072
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
2065
|
-
# @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, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT. It will be ignored for other data sources.
|
2073
|
+
# @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, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT, SERVICENOW. It will be ignored for other data sources.
|
2066
2074
|
# @param file_sync_config [FileSyncConfigNullable]
|
2067
2075
|
# @param body [SyncFilesRequest]
|
2068
2076
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -2110,7 +2118,7 @@ module Carbon
|
|
2110
2118
|
# @param request_id [String]
|
2111
2119
|
# @param use_ocr [Boolean]
|
2112
2120
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
2113
|
-
# @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, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT. It will be ignored for other data sources.
|
2121
|
+
# @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, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT, SERVICENOW. It will be ignored for other data sources.
|
2114
2122
|
# @param file_sync_config [FileSyncConfigNullable]
|
2115
2123
|
# @param body [SyncFilesRequest]
|
2116
2124
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -438,9 +438,10 @@ module Carbon
|
|
438
438
|
# @param url_paths_to_exclude [Array<String>] URL subpaths or directories that you want to exclude. For example if you want to exclude URLs that start with /questions in stackoverflow.com, you will add /questions/ in this input
|
439
439
|
# @param urls_to_scrape [Array<String>] You can submit a subset of URLs from the sitemap that should be scraped. To get the list of URLs, you can check out /process_sitemap endpoint. If left empty, all URLs from the sitemap will be scraped.
|
440
440
|
# @param download_css_and_media [Boolean] Whether the scraper should download css and media from the page (images, fonts, etc). Scrapes might take longer to finish with this flag enabled, but the success rate is improved.
|
441
|
+
# @param generate_chunks_only [Boolean] If this flag is enabled, the file will be chunked and stored with Carbon, but no embeddings will be generated. This overrides the skip_embedding_generation flag.
|
441
442
|
# @param body [SitemapScrapeRequest]
|
442
443
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
443
|
-
def scrape_sitemap(url:, tags: SENTINEL, max_pages_to_scrape: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, enable_auto_sync: false, generate_sparse_vectors: false, prepend_filename_to_chunks: false, html_tags_to_skip: SENTINEL, css_classes_to_skip: SENTINEL, css_selectors_to_skip: SENTINEL, embedding_model: 'OPENAI', url_paths_to_include: SENTINEL, url_paths_to_exclude: SENTINEL, urls_to_scrape: SENTINEL, download_css_and_media: false, extra: {})
|
444
|
+
def scrape_sitemap(url:, tags: SENTINEL, max_pages_to_scrape: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, enable_auto_sync: false, generate_sparse_vectors: false, prepend_filename_to_chunks: false, html_tags_to_skip: SENTINEL, css_classes_to_skip: SENTINEL, css_selectors_to_skip: SENTINEL, embedding_model: 'OPENAI', url_paths_to_include: SENTINEL, url_paths_to_exclude: SENTINEL, urls_to_scrape: SENTINEL, download_css_and_media: false, generate_chunks_only: false, extra: {})
|
444
445
|
_body = {}
|
445
446
|
_body[:tags] = tags if tags != SENTINEL
|
446
447
|
_body[:url] = url if url != SENTINEL
|
@@ -459,6 +460,7 @@ module Carbon
|
|
459
460
|
_body[:url_paths_to_exclude] = url_paths_to_exclude if url_paths_to_exclude != SENTINEL
|
460
461
|
_body[:urls_to_scrape] = urls_to_scrape if urls_to_scrape != SENTINEL
|
461
462
|
_body[:download_css_and_media] = download_css_and_media if download_css_and_media != SENTINEL
|
463
|
+
_body[:generate_chunks_only] = generate_chunks_only if generate_chunks_only != SENTINEL
|
462
464
|
sitemap_scrape_request = _body
|
463
465
|
api_response = scrape_sitemap_with_http_info_impl(sitemap_scrape_request, extra)
|
464
466
|
api_response.data
|
@@ -491,9 +493,10 @@ module Carbon
|
|
491
493
|
# @param url_paths_to_exclude [Array<String>] URL subpaths or directories that you want to exclude. For example if you want to exclude URLs that start with /questions in stackoverflow.com, you will add /questions/ in this input
|
492
494
|
# @param urls_to_scrape [Array<String>] You can submit a subset of URLs from the sitemap that should be scraped. To get the list of URLs, you can check out /process_sitemap endpoint. If left empty, all URLs from the sitemap will be scraped.
|
493
495
|
# @param download_css_and_media [Boolean] Whether the scraper should download css and media from the page (images, fonts, etc). Scrapes might take longer to finish with this flag enabled, but the success rate is improved.
|
496
|
+
# @param generate_chunks_only [Boolean] If this flag is enabled, the file will be chunked and stored with Carbon, but no embeddings will be generated. This overrides the skip_embedding_generation flag.
|
494
497
|
# @param body [SitemapScrapeRequest]
|
495
498
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
496
|
-
def scrape_sitemap_with_http_info(url:, tags: SENTINEL, max_pages_to_scrape: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, enable_auto_sync: false, generate_sparse_vectors: false, prepend_filename_to_chunks: false, html_tags_to_skip: SENTINEL, css_classes_to_skip: SENTINEL, css_selectors_to_skip: SENTINEL, embedding_model: 'OPENAI', url_paths_to_include: SENTINEL, url_paths_to_exclude: SENTINEL, urls_to_scrape: SENTINEL, download_css_and_media: false, extra: {})
|
499
|
+
def scrape_sitemap_with_http_info(url:, tags: SENTINEL, max_pages_to_scrape: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, enable_auto_sync: false, generate_sparse_vectors: false, prepend_filename_to_chunks: false, html_tags_to_skip: SENTINEL, css_classes_to_skip: SENTINEL, css_selectors_to_skip: SENTINEL, embedding_model: 'OPENAI', url_paths_to_include: SENTINEL, url_paths_to_exclude: SENTINEL, urls_to_scrape: SENTINEL, download_css_and_media: false, generate_chunks_only: false, extra: {})
|
497
500
|
_body = {}
|
498
501
|
_body[:tags] = tags if tags != SENTINEL
|
499
502
|
_body[:url] = url if url != SENTINEL
|
@@ -512,6 +515,7 @@ module Carbon
|
|
512
515
|
_body[:url_paths_to_exclude] = url_paths_to_exclude if url_paths_to_exclude != SENTINEL
|
513
516
|
_body[:urls_to_scrape] = urls_to_scrape if urls_to_scrape != SENTINEL
|
514
517
|
_body[:download_css_and_media] = download_css_and_media if download_css_and_media != SENTINEL
|
518
|
+
_body[:generate_chunks_only] = generate_chunks_only if generate_chunks_only != SENTINEL
|
515
519
|
sitemap_scrape_request = _body
|
516
520
|
scrape_sitemap_with_http_info_impl(sitemap_scrape_request, extra)
|
517
521
|
end
|