carbon_ruby_sdk 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +70 -28
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +8 -8
- data/lib/carbon_ruby_sdk/api/utilities_api.rb +196 -0
- data/lib/carbon_ruby_sdk/models/fetch_urls_request.rb +220 -0
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +2 -2
- 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/user_web_page_order_by_types.rb +37 -0
- data/lib/carbon_ruby_sdk/models/user_web_pages_filters.rb +218 -0
- data/lib/carbon_ruby_sdk/models/user_web_pages_request.rb +246 -0
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +4 -3
- data/spec/api/utilities_api_spec.rb +22 -0
- data/spec/models/fetch_urls_request_spec.rb +28 -0
- data/spec/models/user_web_page_order_by_types_spec.rb +22 -0
- data/spec/models/user_web_pages_filters_spec.rb +28 -0
- data/spec/models/user_web_pages_request_spec.rb +46 -0
- metadata +14 -5
- data/lib/carbon_ruby_sdk/api/health_api.rb +0 -92
- data/spec/api/health_api_spec.rb +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e24c4f7481d52cd0901f996fa2918d220818ff71e03f3466fe588a0a721048a
|
4
|
+
data.tar.gz: b4b4f44995b7b14d370897734d98b16d1e8f05d6d12be08890e2a1486c768f8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4c1aa6d3423c0a32fbd51eeccf1059e1f2e5b3c44124bfdf3b3abec834e7bb5f564f0a4ed6c40ca265bc387b334881d3f8f4955301388e7d6439636828aec75
|
7
|
+
data.tar.gz: 5c8eee9e089f459a6da9b5242f8843ee53dcd21ef80b3b4361ac45c040a3d50c61e8c158d5759d3d24f9106e8aa52bfee3df1c78a9d27b87cffe9d6c54dac4d9
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
Connect external data to LLMs, no matter the source.
|
8
8
|
|
9
|
-
[](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.2.8)
|
10
10
|
|
11
11
|
</div>
|
12
12
|
|
@@ -38,7 +38,6 @@ Connect external data to LLMs, no matter the source.
|
|
38
38
|
* [`carbon.files.upload`](#carbonfilesupload)
|
39
39
|
* [`carbon.files.upload_from_url`](#carbonfilesupload_from_url)
|
40
40
|
* [`carbon.files.upload_text`](#carbonfilesupload_text)
|
41
|
-
* [`carbon.health.check`](#carbonhealthcheck)
|
42
41
|
* [`carbon.integrations.cancel`](#carbonintegrationscancel)
|
43
42
|
* [`carbon.integrations.connect_data_source`](#carbonintegrationsconnect_data_source)
|
44
43
|
* [`carbon.integrations.connect_freshdesk`](#carbonintegrationsconnect_freshdesk)
|
@@ -72,11 +71,13 @@ Connect external data to LLMs, no matter the source.
|
|
72
71
|
* [`carbon.users.toggle_user_features`](#carbonuserstoggle_user_features)
|
73
72
|
* [`carbon.users.update_users`](#carbonusersupdate_users)
|
74
73
|
* [`carbon.utilities.fetch_urls`](#carbonutilitiesfetch_urls)
|
74
|
+
* [`carbon.utilities.fetch_webpage`](#carbonutilitiesfetch_webpage)
|
75
75
|
* [`carbon.utilities.fetch_youtube_transcripts`](#carbonutilitiesfetch_youtube_transcripts)
|
76
76
|
* [`carbon.utilities.process_sitemap`](#carbonutilitiesprocess_sitemap)
|
77
77
|
* [`carbon.utilities.scrape_sitemap`](#carbonutilitiesscrape_sitemap)
|
78
78
|
* [`carbon.utilities.scrape_web`](#carbonutilitiesscrape_web)
|
79
79
|
* [`carbon.utilities.search_urls`](#carbonutilitiessearch_urls)
|
80
|
+
* [`carbon.utilities.user_webpages`](#carbonutilitiesuser_webpages)
|
80
81
|
* [`carbon.webhooks.add_url`](#carbonwebhooksadd_url)
|
81
82
|
* [`carbon.webhooks.delete_url`](#carbonwebhooksdelete_url)
|
82
83
|
* [`carbon.webhooks.urls`](#carbonwebhooksurls)
|
@@ -88,7 +89,7 @@ Connect external data to LLMs, no matter the source.
|
|
88
89
|
Add to Gemfile:
|
89
90
|
|
90
91
|
```ruby
|
91
|
-
gem 'carbon_ruby_sdk', '~> 0.2.
|
92
|
+
gem 'carbon_ruby_sdk', '~> 0.2.8'
|
92
93
|
```
|
93
94
|
|
94
95
|
## Getting Started<a id="getting-started"></a>
|
@@ -1179,26 +1180,6 @@ p result
|
|
1179
1180
|
---
|
1180
1181
|
|
1181
1182
|
|
1182
|
-
### `carbon.health.check`<a id="carbonhealthcheck"></a>
|
1183
|
-
|
1184
|
-
Health
|
1185
|
-
|
1186
|
-
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
1187
|
-
|
1188
|
-
```ruby
|
1189
|
-
result = carbon.health.check
|
1190
|
-
p result
|
1191
|
-
```
|
1192
|
-
|
1193
|
-
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
1194
|
-
|
1195
|
-
`/health` `GET`
|
1196
|
-
|
1197
|
-
[🔙 **Back to Table of Contents**](#table-of-contents)
|
1198
|
-
|
1199
|
-
---
|
1200
|
-
|
1201
|
-
|
1202
1183
|
### `carbon.integrations.cancel`<a id="carbonintegrationscancel"></a>
|
1203
1184
|
|
1204
1185
|
Cancel Data Source Items Sync
|
@@ -1249,7 +1230,7 @@ result = carbon.integrations.connect_data_source(
|
|
1249
1230
|
"prepend_filename_to_chunks" => false,
|
1250
1231
|
"sync_files_on_connection" => true,
|
1251
1232
|
"set_page_as_boundary" => false,
|
1252
|
-
"request_id" => "
|
1233
|
+
"request_id" => "9e41dd01-0592-477a-97b3-df618acf082b",
|
1253
1234
|
"enable_file_picker" => true,
|
1254
1235
|
"sync_source_items" => true,
|
1255
1236
|
"incremental_sync" => false,
|
@@ -1469,7 +1450,7 @@ result = carbon.integrations.get_oauth_url(
|
|
1469
1450
|
set_page_as_boundary: false,
|
1470
1451
|
data_source_id: 1,
|
1471
1452
|
connecting_new_account: false,
|
1472
|
-
request_id: "
|
1453
|
+
request_id: "1855375f-faa1-4965-99a1-03d1cab8000b",
|
1473
1454
|
use_ocr: false,
|
1474
1455
|
parse_pdf_tables_with_ocr: false,
|
1475
1456
|
enable_file_picker: true,
|
@@ -1530,7 +1511,7 @@ Enable OCR for files that support it. Supported formats: pdf
|
|
1530
1511
|
##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
|
1531
1512
|
##### enable_file_picker: `Boolean`<a id="enable_file_picker-boolean"></a>
|
1532
1513
|
Enable integration's file picker for sources that support it. Supported sources:
|
1533
|
-
|
1514
|
+
SHAREPOINT, GOOGLE_DRIVE, ONEDRIVE, BOX, DROPBOX
|
1534
1515
|
|
1535
1516
|
##### sync_source_items: `Boolean`<a id="sync_source_items-boolean"></a>
|
1536
1517
|
Enabling this flag will fetch all available content from the source to be listed
|
@@ -1829,7 +1810,7 @@ result = carbon.integrations.sync_confluence(
|
|
1829
1810
|
prepend_filename_to_chunks: false,
|
1830
1811
|
max_items_per_chunk: 1,
|
1831
1812
|
set_page_as_boundary: false,
|
1832
|
-
request_id: "
|
1813
|
+
request_id: "9e2d7dc0-7a78-49fa-9f68-a411cfa13267",
|
1833
1814
|
use_ocr: false,
|
1834
1815
|
parse_pdf_tables_with_ocr: false,
|
1835
1816
|
incremental_sync: false,
|
@@ -1933,7 +1914,7 @@ result = carbon.integrations.sync_files(
|
|
1933
1914
|
prepend_filename_to_chunks: false,
|
1934
1915
|
max_items_per_chunk: 1,
|
1935
1916
|
set_page_as_boundary: false,
|
1936
|
-
request_id: "
|
1917
|
+
request_id: "9e2d7dc0-7a78-49fa-9f68-a411cfa13267",
|
1937
1918
|
use_ocr: false,
|
1938
1919
|
parse_pdf_tables_with_ocr: false,
|
1939
1920
|
incremental_sync: false,
|
@@ -2708,6 +2689,7 @@ upload. If not set, or if set to -1, then the user will have no limit.
|
|
2708
2689
|
|
2709
2690
|
|
2710
2691
|
### `carbon.utilities.fetch_urls`<a id="carbonutilitiesfetch_urls"></a>
|
2692
|
+

|
2711
2693
|
|
2712
2694
|
Extracts all URLs from a webpage.
|
2713
2695
|
|
@@ -2742,6 +2724,31 @@ p result
|
|
2742
2724
|
---
|
2743
2725
|
|
2744
2726
|
|
2727
|
+
### `carbon.utilities.fetch_webpage`<a id="carbonutilitiesfetch_webpage"></a>
|
2728
|
+
|
2729
|
+
Fetch Urls V2
|
2730
|
+
|
2731
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
2732
|
+
|
2733
|
+
```ruby
|
2734
|
+
result = carbon.utilities.fetch_webpage(
|
2735
|
+
url: "string_example",
|
2736
|
+
)
|
2737
|
+
p result
|
2738
|
+
```
|
2739
|
+
|
2740
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
2741
|
+
|
2742
|
+
##### url: `String`<a id="url-string"></a>
|
2743
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
2744
|
+
|
2745
|
+
`/fetch_webpage` `POST`
|
2746
|
+
|
2747
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
2748
|
+
|
2749
|
+
---
|
2750
|
+
|
2751
|
+
|
2745
2752
|
### `carbon.utilities.fetch_youtube_transcripts`<a id="carbonutilitiesfetch_youtube_transcripts"></a>
|
2746
2753
|
|
2747
2754
|
Fetches english transcripts from YouTube videos.
|
@@ -2976,6 +2983,41 @@ p result
|
|
2976
2983
|
---
|
2977
2984
|
|
2978
2985
|
|
2986
|
+
### `carbon.utilities.user_webpages`<a id="carbonutilitiesuser_webpages"></a>
|
2987
|
+
|
2988
|
+
User Web Pages
|
2989
|
+
|
2990
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
2991
|
+
|
2992
|
+
```ruby
|
2993
|
+
result = carbon.utilities.user_webpages(
|
2994
|
+
filters: {
|
2995
|
+
},
|
2996
|
+
pagination: {
|
2997
|
+
"limit" => 10,
|
2998
|
+
"offset" => 0,
|
2999
|
+
},
|
3000
|
+
order_by: "created_at",
|
3001
|
+
order_dir: "asc",
|
3002
|
+
)
|
3003
|
+
p result
|
3004
|
+
```
|
3005
|
+
|
3006
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
3007
|
+
|
3008
|
+
##### filters: [`UserWebPagesFilters`](./lib/carbon_ruby_sdk/models/user_web_pages_filters.rb)<a id="filters-userwebpagesfilterslibcarbon_ruby_sdkmodelsuser_web_pages_filtersrb"></a>
|
3009
|
+
##### pagination: [`Pagination`](./lib/carbon_ruby_sdk/models/pagination.rb)<a id="pagination-paginationlibcarbon_ruby_sdkmodelspaginationrb"></a>
|
3010
|
+
##### order_by: [`UserWebPageOrderByTypes`](./lib/carbon_ruby_sdk/models/user_web_page_order_by_types.rb)<a id="order_by-userwebpageorderbytypeslibcarbon_ruby_sdkmodelsuser_web_page_order_by_typesrb"></a>
|
3011
|
+
##### order_dir: [`OrderDirV2`](./lib/carbon_ruby_sdk/models/order_dir_v2.rb)<a id="order_dir-orderdirv2libcarbon_ruby_sdkmodelsorder_dir_v2rb"></a>
|
3012
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
3013
|
+
|
3014
|
+
`/user_webpages` `POST`
|
3015
|
+
|
3016
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
3017
|
+
|
3018
|
+
---
|
3019
|
+
|
3020
|
+
|
2979
3021
|
### `carbon.webhooks.add_url`<a id="carbonwebhooksadd_url"></a>
|
2980
3022
|
|
2981
3023
|
Add Webhook Url
|
@@ -653,13 +653,13 @@ module Carbon
|
|
653
653
|
# @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
|
654
654
|
# @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
|
655
655
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
656
|
-
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources:
|
656
|
+
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: SHAREPOINT, GOOGLE_DRIVE, ONEDRIVE, BOX, DROPBOX
|
657
657
|
# @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
|
658
658
|
# @param incremental_sync [Boolean] Only sync files if they have not already been synced or if the embedding properties have changed. This flag is currently supported by ONEDRIVE, GOOGLE_DRIVE, BOX, DROPBOX. It will be ignored for other data sources.
|
659
659
|
# @param file_sync_config [FileSyncConfigNullable]
|
660
660
|
# @param body [OAuthURLRequest]
|
661
661
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
662
|
-
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: '
|
662
|
+
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: '1855375f-faa1-4965-99a1-03d1cab8000b', use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
663
663
|
_body = {}
|
664
664
|
_body[:tags] = tags if tags != SENTINEL
|
665
665
|
_body[:scope] = scope if scope != SENTINEL
|
@@ -721,13 +721,13 @@ module Carbon
|
|
721
721
|
# @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
|
722
722
|
# @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
|
723
723
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
724
|
-
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources:
|
724
|
+
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: SHAREPOINT, GOOGLE_DRIVE, ONEDRIVE, BOX, DROPBOX
|
725
725
|
# @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
|
726
726
|
# @param incremental_sync [Boolean] Only sync files if they have not already been synced or if the embedding properties have changed. This flag is currently supported by ONEDRIVE, GOOGLE_DRIVE, BOX, DROPBOX. It will be ignored for other data sources.
|
727
727
|
# @param file_sync_config [FileSyncConfigNullable]
|
728
728
|
# @param body [OAuthURLRequest]
|
729
729
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
730
|
-
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: '
|
730
|
+
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: '1855375f-faa1-4965-99a1-03d1cab8000b', use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
731
731
|
_body = {}
|
732
732
|
_body[:tags] = tags if tags != SENTINEL
|
733
733
|
_body[:scope] = scope if scope != SENTINEL
|
@@ -1640,7 +1640,7 @@ module Carbon
|
|
1640
1640
|
# @param file_sync_config [FileSyncConfigNullable]
|
1641
1641
|
# @param body [SyncFilesRequest]
|
1642
1642
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1643
|
-
def sync_confluence(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '
|
1643
|
+
def sync_confluence(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '9e2d7dc0-7a78-49fa-9f68-a411cfa13267', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
1644
1644
|
_body = {}
|
1645
1645
|
_body[:tags] = tags if tags != SENTINEL
|
1646
1646
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1688,7 +1688,7 @@ module Carbon
|
|
1688
1688
|
# @param file_sync_config [FileSyncConfigNullable]
|
1689
1689
|
# @param body [SyncFilesRequest]
|
1690
1690
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1691
|
-
def sync_confluence_with_http_info(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '
|
1691
|
+
def sync_confluence_with_http_info(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '9e2d7dc0-7a78-49fa-9f68-a411cfa13267', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
1692
1692
|
_body = {}
|
1693
1693
|
_body[:tags] = tags if tags != SENTINEL
|
1694
1694
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1896,7 +1896,7 @@ module Carbon
|
|
1896
1896
|
# @param file_sync_config [FileSyncConfigNullable]
|
1897
1897
|
# @param body [SyncFilesRequest]
|
1898
1898
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1899
|
-
def sync_files(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '
|
1899
|
+
def sync_files(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '9e2d7dc0-7a78-49fa-9f68-a411cfa13267', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
1900
1900
|
_body = {}
|
1901
1901
|
_body[:tags] = tags if tags != SENTINEL
|
1902
1902
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1944,7 +1944,7 @@ module Carbon
|
|
1944
1944
|
# @param file_sync_config [FileSyncConfigNullable]
|
1945
1945
|
# @param body [SyncFilesRequest]
|
1946
1946
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1947
|
-
def sync_files_with_http_info(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '
|
1947
|
+
def sync_files_with_http_info(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '9e2d7dc0-7a78-49fa-9f68-a411cfa13267', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
1948
1948
|
_body = {}
|
1949
1949
|
_body[:tags] = tags if tags != SENTINEL
|
1950
1950
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -114,6 +114,98 @@ module Carbon
|
|
114
114
|
end
|
115
115
|
|
116
116
|
|
117
|
+
# Fetch Urls V2
|
118
|
+
#
|
119
|
+
# @param url [String]
|
120
|
+
# @param body [FetchURLsRequest]
|
121
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
122
|
+
def fetch_webpage(url:, extra: {})
|
123
|
+
_body = {}
|
124
|
+
_body[:url] = url if url != SENTINEL
|
125
|
+
fetch_urls_request = _body
|
126
|
+
api_response = fetch_webpage_with_http_info_impl(fetch_urls_request, extra)
|
127
|
+
api_response.data
|
128
|
+
end
|
129
|
+
|
130
|
+
# Fetch Urls V2
|
131
|
+
#
|
132
|
+
# @param url [String]
|
133
|
+
# @param body [FetchURLsRequest]
|
134
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
135
|
+
def fetch_webpage_with_http_info(url:, extra: {})
|
136
|
+
_body = {}
|
137
|
+
_body[:url] = url if url != SENTINEL
|
138
|
+
fetch_urls_request = _body
|
139
|
+
fetch_webpage_with_http_info_impl(fetch_urls_request, extra)
|
140
|
+
end
|
141
|
+
|
142
|
+
# Fetch Urls V2
|
143
|
+
# @param fetch_urls_request [FetchURLsRequest]
|
144
|
+
# @param [Hash] opts the optional parameters
|
145
|
+
# @return [Object]
|
146
|
+
private def fetch_webpage_impl(fetch_urls_request, opts = {})
|
147
|
+
data, _status_code, _headers = fetch_webpage_with_http_info(fetch_urls_request, opts)
|
148
|
+
data
|
149
|
+
end
|
150
|
+
|
151
|
+
# Fetch Urls V2
|
152
|
+
# @param fetch_urls_request [FetchURLsRequest]
|
153
|
+
# @param [Hash] opts the optional parameters
|
154
|
+
# @return [APIResponse] data is Object, status code, headers and response
|
155
|
+
private def fetch_webpage_with_http_info_impl(fetch_urls_request, opts = {})
|
156
|
+
if @api_client.config.debugging
|
157
|
+
@api_client.config.logger.debug 'Calling API: UtilitiesApi.fetch_webpage ...'
|
158
|
+
end
|
159
|
+
# verify the required parameter 'fetch_urls_request' is set
|
160
|
+
if @api_client.config.client_side_validation && fetch_urls_request.nil?
|
161
|
+
fail ArgumentError, "Missing the required parameter 'fetch_urls_request' when calling UtilitiesApi.fetch_webpage"
|
162
|
+
end
|
163
|
+
# resource path
|
164
|
+
local_var_path = '/fetch_webpage'
|
165
|
+
|
166
|
+
# query parameters
|
167
|
+
query_params = opts[:query_params] || {}
|
168
|
+
|
169
|
+
# header parameters
|
170
|
+
header_params = opts[:header_params] || {}
|
171
|
+
# HTTP header 'Accept' (if needed)
|
172
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
173
|
+
# HTTP header 'Content-Type'
|
174
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
175
|
+
if !content_type.nil?
|
176
|
+
header_params['Content-Type'] = content_type
|
177
|
+
end
|
178
|
+
|
179
|
+
# form parameters
|
180
|
+
form_params = opts[:form_params] || {}
|
181
|
+
|
182
|
+
# http body (model)
|
183
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(fetch_urls_request)
|
184
|
+
|
185
|
+
# return_type
|
186
|
+
return_type = opts[:debug_return_type] || 'Object'
|
187
|
+
|
188
|
+
# auth_names
|
189
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
190
|
+
|
191
|
+
new_options = opts.merge(
|
192
|
+
:operation => :"UtilitiesApi.fetch_webpage",
|
193
|
+
:header_params => header_params,
|
194
|
+
:query_params => query_params,
|
195
|
+
:form_params => form_params,
|
196
|
+
:body => post_body,
|
197
|
+
:auth_names => auth_names,
|
198
|
+
:return_type => return_type
|
199
|
+
)
|
200
|
+
|
201
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
202
|
+
if @api_client.config.debugging
|
203
|
+
@api_client.config.logger.debug "API called: UtilitiesApi#fetch_webpage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
204
|
+
end
|
205
|
+
APIResponse::new(data, status_code, headers, response)
|
206
|
+
end
|
207
|
+
|
208
|
+
|
117
209
|
# Fetch Youtube Transcripts
|
118
210
|
#
|
119
211
|
# Fetches english transcripts from YouTube videos.
|
@@ -711,6 +803,110 @@ module Carbon
|
|
711
803
|
end
|
712
804
|
APIResponse::new(data, status_code, headers, response)
|
713
805
|
end
|
806
|
+
|
807
|
+
|
808
|
+
# User Web Pages
|
809
|
+
#
|
810
|
+
# @param filters [UserWebPagesFilters]
|
811
|
+
# @param pagination [Pagination]
|
812
|
+
# @param order_by [UserWebPageOrderByTypes]
|
813
|
+
# @param order_dir [OrderDirV2]
|
814
|
+
# @param body [UserWebPagesRequest]
|
815
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
816
|
+
def user_webpages(filters: SENTINEL, pagination: SENTINEL, order_by: 'updated_at', order_dir: 'desc', extra: {})
|
817
|
+
_body = {}
|
818
|
+
_body[:filters] = filters if filters != SENTINEL
|
819
|
+
_body[:pagination] = pagination if pagination != SENTINEL
|
820
|
+
_body[:order_by] = order_by if order_by != SENTINEL
|
821
|
+
_body[:order_dir] = order_dir if order_dir != SENTINEL
|
822
|
+
user_web_pages_request = _body
|
823
|
+
api_response = user_webpages_with_http_info_impl(user_web_pages_request, extra)
|
824
|
+
api_response.data
|
825
|
+
end
|
826
|
+
|
827
|
+
# User Web Pages
|
828
|
+
#
|
829
|
+
# @param filters [UserWebPagesFilters]
|
830
|
+
# @param pagination [Pagination]
|
831
|
+
# @param order_by [UserWebPageOrderByTypes]
|
832
|
+
# @param order_dir [OrderDirV2]
|
833
|
+
# @param body [UserWebPagesRequest]
|
834
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
835
|
+
def user_webpages_with_http_info(filters: SENTINEL, pagination: SENTINEL, order_by: 'updated_at', order_dir: 'desc', extra: {})
|
836
|
+
_body = {}
|
837
|
+
_body[:filters] = filters if filters != SENTINEL
|
838
|
+
_body[:pagination] = pagination if pagination != SENTINEL
|
839
|
+
_body[:order_by] = order_by if order_by != SENTINEL
|
840
|
+
_body[:order_dir] = order_dir if order_dir != SENTINEL
|
841
|
+
user_web_pages_request = _body
|
842
|
+
user_webpages_with_http_info_impl(user_web_pages_request, extra)
|
843
|
+
end
|
844
|
+
|
845
|
+
# User Web Pages
|
846
|
+
# @param user_web_pages_request [UserWebPagesRequest]
|
847
|
+
# @param [Hash] opts the optional parameters
|
848
|
+
# @return [Object]
|
849
|
+
private def user_webpages_impl(user_web_pages_request, opts = {})
|
850
|
+
data, _status_code, _headers = user_webpages_with_http_info(user_web_pages_request, opts)
|
851
|
+
data
|
852
|
+
end
|
853
|
+
|
854
|
+
# User Web Pages
|
855
|
+
# @param user_web_pages_request [UserWebPagesRequest]
|
856
|
+
# @param [Hash] opts the optional parameters
|
857
|
+
# @return [APIResponse] data is Object, status code, headers and response
|
858
|
+
private def user_webpages_with_http_info_impl(user_web_pages_request, opts = {})
|
859
|
+
if @api_client.config.debugging
|
860
|
+
@api_client.config.logger.debug 'Calling API: UtilitiesApi.user_webpages ...'
|
861
|
+
end
|
862
|
+
# verify the required parameter 'user_web_pages_request' is set
|
863
|
+
if @api_client.config.client_side_validation && user_web_pages_request.nil?
|
864
|
+
fail ArgumentError, "Missing the required parameter 'user_web_pages_request' when calling UtilitiesApi.user_webpages"
|
865
|
+
end
|
866
|
+
# resource path
|
867
|
+
local_var_path = '/user_webpages'
|
868
|
+
|
869
|
+
# query parameters
|
870
|
+
query_params = opts[:query_params] || {}
|
871
|
+
|
872
|
+
# header parameters
|
873
|
+
header_params = opts[:header_params] || {}
|
874
|
+
# HTTP header 'Accept' (if needed)
|
875
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
876
|
+
# HTTP header 'Content-Type'
|
877
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
878
|
+
if !content_type.nil?
|
879
|
+
header_params['Content-Type'] = content_type
|
880
|
+
end
|
881
|
+
|
882
|
+
# form parameters
|
883
|
+
form_params = opts[:form_params] || {}
|
884
|
+
|
885
|
+
# http body (model)
|
886
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(user_web_pages_request)
|
887
|
+
|
888
|
+
# return_type
|
889
|
+
return_type = opts[:debug_return_type] || 'Object'
|
890
|
+
|
891
|
+
# auth_names
|
892
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
893
|
+
|
894
|
+
new_options = opts.merge(
|
895
|
+
:operation => :"UtilitiesApi.user_webpages",
|
896
|
+
:header_params => header_params,
|
897
|
+
:query_params => query_params,
|
898
|
+
:form_params => form_params,
|
899
|
+
:body => post_body,
|
900
|
+
:auth_names => auth_names,
|
901
|
+
:return_type => return_type
|
902
|
+
)
|
903
|
+
|
904
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
905
|
+
if @api_client.config.debugging
|
906
|
+
@api_client.config.logger.debug "API called: UtilitiesApi#user_webpages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
907
|
+
end
|
908
|
+
APIResponse::new(data, status_code, headers, response)
|
909
|
+
end
|
714
910
|
end
|
715
911
|
|
716
912
|
# top-level client access to avoid having the user to insantiate their own API instances
|