carbon_ruby_sdk 0.2.29 → 0.2.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -7
- data/README.md +42 -6
- 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 +12 -8
- data/lib/carbon_ruby_sdk/api/utilities_api.rb +6 -2
- data/lib/carbon_ruby_sdk/models/authentication_property.rb +62 -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 +2 -1
- data/lib/carbon_ruby_sdk/models/data_source_type_nullable.rb +2 -1
- data/lib/carbon_ruby_sdk/models/external_data_source_type.rb +2 -1
- 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/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/o_auth_url_request.rb +16 -6
- 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 +5 -0
- data/spec/api/files_api_spec.rb +1 -0
- data/spec/models/authentication_property_spec.rb +24 -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/o_auth_url_request_spec.rb +6 -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 +165 -150
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a4dfc04f6002c88a580732866b35621b0085073c7d084752fb3eea595db176f
|
4
|
+
data.tar.gz: 7f6ec52e2e0cca67fb4ed8fb70c1e067d646c7c1e95ae4a1086fe92b16fc528d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e20ea7bc789678298a46eb7f3e79941203a0b68563dd4a3fef8a074ff4c5d510b0c23c59fd1ccd36c424cc650cbad2add6bd471371951b8ea62a2d0f9f81e93c
|
7
|
+
data.tar.gz: a64e47e2054338cd48a2197961ff09defdc3b0b536f7dac9baaae54b55abeb4c5db78c74cee677b05ae16250e2d33d17bd1a40f8dd4b9e28c4f041993a3405d6
|
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.30)
|
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)
|
@@ -44,13 +44,12 @@ GEM
|
|
44
44
|
regexp_parser (2.9.2)
|
45
45
|
reline (0.5.9)
|
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
54
|
rspec-expectations (3.13.2)
|
56
55
|
diff-lcs (>= 1.2.0, < 2.0)
|
@@ -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.30-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.2.30)
|
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.30'
|
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,8 +1731,15 @@ 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
|
+
servicenow_credentials: {
|
1738
|
+
"instance_subdomain" => "instance_subdomain_example",
|
1739
|
+
"client_id" => "client_id_example",
|
1740
|
+
"client_secret" => "client_secret_example",
|
1741
|
+
"redirect_uri" => "redirect_uri_example",
|
1742
|
+
},
|
1719
1743
|
)
|
1720
1744
|
p result
|
1721
1745
|
```
|
@@ -1775,7 +1799,7 @@ via list items endpoint
|
|
1775
1799
|
Only sync files if they have not already been synced or if the embedding
|
1776
1800
|
properties have changed. This flag is currently supported by ONEDRIVE,
|
1777
1801
|
GOOGLE_DRIVE, BOX, DROPBOX, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE,
|
1778
|
-
NOTION, SHAREPOINT. It will be ignored for other data sources.
|
1802
|
+
NOTION, SHAREPOINT, SERVICENOW. It will be ignored for other data sources.
|
1779
1803
|
|
1780
1804
|
##### 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
1805
|
##### automatically_open_file_picker: `Boolean`<a id="automatically_open_file_picker-boolean"></a>
|
@@ -1783,6 +1807,7 @@ Automatically open source file picker after the OAuth flow is complete. This
|
|
1783
1807
|
flag is currently supported by BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT.
|
1784
1808
|
It will be ignored for other data sources.
|
1785
1809
|
|
1810
|
+
##### 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
1811
|
#### 🔄 Return<a id="🔄-return"></a>
|
1787
1812
|
|
1788
1813
|
[OuthURLResponse](./lib/carbon_ruby_sdk/models/outh_url_response.rb)
|
@@ -2087,6 +2112,7 @@ result = carbon.integrations.sync_confluence(
|
|
2087
2112
|
"transcription_service" => "assemblyai",
|
2088
2113
|
"include_speaker_labels" => false,
|
2089
2114
|
"split_rows" => false,
|
2115
|
+
"generate_chunks_only" => false,
|
2090
2116
|
},
|
2091
2117
|
)
|
2092
2118
|
p result
|
@@ -2114,7 +2140,7 @@ Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
|
2114
2140
|
Only sync files if they have not already been synced or if the embedding
|
2115
2141
|
properties have changed. This flag is currently supported by ONEDRIVE,
|
2116
2142
|
GOOGLE_DRIVE, BOX, DROPBOX, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE,
|
2117
|
-
NOTION, SHAREPOINT. It will be ignored for other data sources.
|
2143
|
+
NOTION, SHAREPOINT, SERVICENOW. It will be ignored for other data sources.
|
2118
2144
|
|
2119
2145
|
##### 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
2146
|
#### 🔄 Return<a id="🔄-return"></a>
|
@@ -2194,6 +2220,7 @@ result = carbon.integrations.sync_files(
|
|
2194
2220
|
"transcription_service" => "assemblyai",
|
2195
2221
|
"include_speaker_labels" => false,
|
2196
2222
|
"split_rows" => false,
|
2223
|
+
"generate_chunks_only" => false,
|
2197
2224
|
},
|
2198
2225
|
)
|
2199
2226
|
p result
|
@@ -2221,7 +2248,7 @@ Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
|
2221
2248
|
Only sync files if they have not already been synced or if the embedding
|
2222
2249
|
properties have changed. This flag is currently supported by ONEDRIVE,
|
2223
2250
|
GOOGLE_DRIVE, BOX, DROPBOX, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE,
|
2224
|
-
NOTION, SHAREPOINT. It will be ignored for other data sources.
|
2251
|
+
NOTION, SHAREPOINT, SERVICENOW. It will be ignored for other data sources.
|
2225
2252
|
|
2226
2253
|
##### 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
2254
|
#### 🔄 Return<a id="🔄-return"></a>
|
@@ -2400,6 +2427,7 @@ result = carbon.integrations.sync_gmail(
|
|
2400
2427
|
"transcription_service" => "assemblyai",
|
2401
2428
|
"include_speaker_labels" => false,
|
2402
2429
|
"split_rows" => false,
|
2430
|
+
"generate_chunks_only" => false,
|
2403
2431
|
},
|
2404
2432
|
incremental_sync: false,
|
2405
2433
|
)
|
@@ -2521,6 +2549,7 @@ result = carbon.integrations.sync_outlook(
|
|
2521
2549
|
"transcription_service" => "assemblyai",
|
2522
2550
|
"include_speaker_labels" => false,
|
2523
2551
|
"split_rows" => false,
|
2552
|
+
"generate_chunks_only" => false,
|
2524
2553
|
},
|
2525
2554
|
incremental_sync: false,
|
2526
2555
|
)
|
@@ -2666,6 +2695,7 @@ result = carbon.integrations.sync_s3_files(
|
|
2666
2695
|
"transcription_service" => "assemblyai",
|
2667
2696
|
"include_speaker_labels" => false,
|
2668
2697
|
"split_rows" => false,
|
2698
|
+
"generate_chunks_only" => false,
|
2669
2699
|
},
|
2670
2700
|
)
|
2671
2701
|
p result
|
@@ -3184,6 +3214,7 @@ result = carbon.utilities.scrape_sitemap(
|
|
3184
3214
|
url_paths_to_exclude: [],
|
3185
3215
|
urls_to_scrape: [],
|
3186
3216
|
download_css_and_media: false,
|
3217
|
+
generate_chunks_only: false,
|
3187
3218
|
)
|
3188
3219
|
p result
|
3189
3220
|
```
|
@@ -3223,6 +3254,10 @@ Whether the scraper should download css and media from the page (images, fonts,
|
|
3223
3254
|
etc). Scrapes might take longer to finish with this flag enabled, but the
|
3224
3255
|
success rate is improved.
|
3225
3256
|
|
3257
|
+
##### generate_chunks_only: `Boolean`<a id="generate_chunks_only-boolean"></a>
|
3258
|
+
If this flag is enabled, the file will be chunked and stored with Carbon, but no
|
3259
|
+
embeddings will be generated. This overrides the skip_embedding_generation flag.
|
3260
|
+
|
3226
3261
|
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
3227
3262
|
|
3228
3263
|
`/scrape_sitemap` `POST`
|
@@ -3264,6 +3299,7 @@ result = carbon.utilities.scrape_web(
|
|
3264
3299
|
"embedding_model" => "OPENAI",
|
3265
3300
|
"url_paths_to_include" => [],
|
3266
3301
|
"download_css_and_media" => false,
|
3302
|
+
"generate_chunks_only" => false,
|
3267
3303
|
}
|
3268
3304
|
],
|
3269
3305
|
)
|
@@ -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
|
@@ -813,12 +813,13 @@ 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 servicenow_credentials [ServiceNowCredentialsNullable]
|
819
820
|
# @param body [OAuthURLRequest]
|
820
821
|
# @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: {})
|
822
|
+
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, servicenow_credentials: SENTINEL, extra: {})
|
822
823
|
_body = {}
|
823
824
|
_body[:tags] = tags if tags != SENTINEL
|
824
825
|
_body[:scope] = scope if scope != SENTINEL
|
@@ -847,6 +848,7 @@ module Carbon
|
|
847
848
|
_body[:incremental_sync] = incremental_sync if incremental_sync != SENTINEL
|
848
849
|
_body[:file_sync_config] = file_sync_config if file_sync_config != SENTINEL
|
849
850
|
_body[:automatically_open_file_picker] = automatically_open_file_picker if automatically_open_file_picker != SENTINEL
|
851
|
+
_body[:servicenow_credentials] = servicenow_credentials if servicenow_credentials != SENTINEL
|
850
852
|
o_auth_url_request = _body
|
851
853
|
api_response = get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
|
852
854
|
api_response.data
|
@@ -883,12 +885,13 @@ module Carbon
|
|
883
885
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
884
886
|
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT
|
885
887
|
# @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.
|
888
|
+
# @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
889
|
# @param file_sync_config [FileSyncConfigNullable]
|
888
890
|
# @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.
|
891
|
+
# @param servicenow_credentials [ServiceNowCredentialsNullable]
|
889
892
|
# @param body [OAuthURLRequest]
|
890
893
|
# @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: {})
|
894
|
+
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, servicenow_credentials: SENTINEL, extra: {})
|
892
895
|
_body = {}
|
893
896
|
_body[:tags] = tags if tags != SENTINEL
|
894
897
|
_body[:scope] = scope if scope != SENTINEL
|
@@ -917,6 +920,7 @@ module Carbon
|
|
917
920
|
_body[:incremental_sync] = incremental_sync if incremental_sync != SENTINEL
|
918
921
|
_body[:file_sync_config] = file_sync_config if file_sync_config != SENTINEL
|
919
922
|
_body[:automatically_open_file_picker] = automatically_open_file_picker if automatically_open_file_picker != SENTINEL
|
923
|
+
_body[:servicenow_credentials] = servicenow_credentials if servicenow_credentials != SENTINEL
|
920
924
|
o_auth_url_request = _body
|
921
925
|
get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
|
922
926
|
end
|
@@ -1804,7 +1808,7 @@ module Carbon
|
|
1804
1808
|
# @param request_id [String]
|
1805
1809
|
# @param use_ocr [Boolean]
|
1806
1810
|
# @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.
|
1811
|
+
# @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
1812
|
# @param file_sync_config [FileSyncConfigNullable]
|
1809
1813
|
# @param body [SyncFilesRequest]
|
1810
1814
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -1854,7 +1858,7 @@ module Carbon
|
|
1854
1858
|
# @param request_id [String]
|
1855
1859
|
# @param use_ocr [Boolean]
|
1856
1860
|
# @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.
|
1861
|
+
# @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
1862
|
# @param file_sync_config [FileSyncConfigNullable]
|
1859
1863
|
# @param body [SyncFilesRequest]
|
1860
1864
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -2062,7 +2066,7 @@ module Carbon
|
|
2062
2066
|
# @param request_id [String]
|
2063
2067
|
# @param use_ocr [Boolean]
|
2064
2068
|
# @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.
|
2069
|
+
# @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
2070
|
# @param file_sync_config [FileSyncConfigNullable]
|
2067
2071
|
# @param body [SyncFilesRequest]
|
2068
2072
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -2110,7 +2114,7 @@ module Carbon
|
|
2110
2114
|
# @param request_id [String]
|
2111
2115
|
# @param use_ocr [Boolean]
|
2112
2116
|
# @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.
|
2117
|
+
# @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
2118
|
# @param file_sync_config [FileSyncConfigNullable]
|
2115
2119
|
# @param body [SyncFilesRequest]
|
2116
2120
|
# @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
|