carbon_ruby_sdk 0.1.5 → 0.1.7
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 +100 -9
- data/lib/carbon_ruby_sdk/api/embeddings_api.rb +10 -2
- data/lib/carbon_ruby_sdk/api/files_api.rb +6 -2
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +168 -19
- data/lib/carbon_ruby_sdk/models/authentication_property.rb +436 -0
- data/lib/carbon_ruby_sdk/models/chunks_and_embeddings.rb +1 -5
- data/lib/carbon_ruby_sdk/models/chunks_and_embeddings_upload_input.rb +24 -4
- data/lib/carbon_ruby_sdk/models/confluence_authentication.rb +254 -0
- data/lib/carbon_ruby_sdk/models/connect_data_source_input.rb +229 -0
- data/lib/carbon_ruby_sdk/models/connect_data_source_response.rb +230 -0
- data/lib/carbon_ruby_sdk/models/freskdesk_authentication.rb +244 -0
- data/lib/carbon_ruby_sdk/models/gitbook_authetication.rb +244 -0
- data/lib/carbon_ruby_sdk/models/gmail_sync_input.rb +15 -5
- data/lib/carbon_ruby_sdk/models/notion_authentication.rb +244 -0
- data/lib/carbon_ruby_sdk/models/o_auth_authentication.rb +244 -0
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +29 -4
- data/lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb +11 -1
- data/lib/carbon_ruby_sdk/models/outh_url_response.rb +220 -0
- data/lib/carbon_ruby_sdk/models/outlook_sync_input.rb +15 -5
- data/lib/carbon_ruby_sdk/models/resync_file_query_input.rb +16 -5
- data/lib/carbon_ruby_sdk/models/s3_authentication.rb +244 -0
- data/lib/carbon_ruby_sdk/models/s3_file_sync_input.rb +14 -4
- data/lib/carbon_ruby_sdk/models/salesforce_authentication.rb +254 -0
- data/lib/carbon_ruby_sdk/models/sharepoint_authentication.rb +268 -0
- data/lib/carbon_ruby_sdk/models/simple_o_auth_data_sources.rb +41 -0
- data/lib/carbon_ruby_sdk/models/sitemap_scrape_request.rb +15 -0
- data/lib/carbon_ruby_sdk/models/sync_options.rb +322 -0
- data/lib/carbon_ruby_sdk/models/webscrape_request.rb +30 -0
- data/lib/carbon_ruby_sdk/models/zendesk_authentication.rb +244 -0
- data/lib/carbon_ruby_sdk/models/zotero_authentication.rb +272 -0
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +16 -0
- data/spec/api/integrations_api_spec.rb +16 -1
- data/spec/models/authentication_property_spec.rb +112 -0
- data/spec/models/chunks_and_embeddings_upload_input_spec.rb +12 -0
- data/spec/models/confluence_authentication_spec.rb +46 -0
- data/spec/models/connect_data_source_input_spec.rb +34 -0
- data/spec/models/connect_data_source_response_spec.rb +34 -0
- data/spec/models/freskdesk_authentication_spec.rb +40 -0
- data/spec/models/gitbook_authetication_spec.rb +40 -0
- data/spec/models/gmail_sync_input_spec.rb +6 -0
- data/spec/models/notion_authentication_spec.rb +40 -0
- data/spec/models/o_auth_authentication_spec.rb +40 -0
- data/spec/models/o_auth_url_request_spec.rb +12 -0
- data/spec/models/organization_user_data_source_api_spec.rb +6 -0
- data/spec/models/outh_url_response_spec.rb +28 -0
- data/spec/models/outlook_sync_input_spec.rb +6 -0
- data/spec/models/resync_file_query_input_spec.rb +6 -0
- data/spec/models/s3_authentication_spec.rb +40 -0
- data/spec/models/s3_file_sync_input_spec.rb +6 -0
- data/spec/models/salesforce_authentication_spec.rb +46 -0
- data/spec/models/sharepoint_authentication_spec.rb +52 -0
- data/spec/models/simple_o_auth_data_sources_spec.rb +22 -0
- data/spec/models/sync_options_spec.rb +82 -0
- data/spec/models/zendesk_authentication_spec.rb +40 -0
- data/spec/models/zotero_authentication_spec.rb +52 -0
- metadata +50 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd7974b2da45db33f2f9b12525479855314a2a4c894ba085df0e7743052b0e85
|
4
|
+
data.tar.gz: 12583c34578f4a0dfe0ea096f471a3d7329305afca38d255bc0f5f1c97f8a6b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9be2791c4adac413d756ef78aa17e7ad0851293ad7b5ef6ed6ad530e80e6d5e14e97759028870bc04c16e7f5d15bca0a548b4b9710f1c807740b03aa8aae474d
|
7
|
+
data.tar.gz: 1e139cb78829fe2757e2b629a08146d7b899e7b542f93ca57b4224200cead60ec641a1152b5339eed9e7353015123545d937f4930b8e5b6444dff186d6906739
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
Connect external data to LLMs, no matter the source.
|
8
8
|
|
9
|
-
[](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.1.7)
|
10
10
|
|
11
11
|
</div>
|
12
12
|
|
@@ -38,6 +38,7 @@ Connect external data to LLMs, no matter the source.
|
|
38
38
|
* [`carbon.files.upload_from_url`](#carbonfilesupload_from_url)
|
39
39
|
* [`carbon.files.upload_text`](#carbonfilesupload_text)
|
40
40
|
* [`carbon.health.check`](#carbonhealthcheck)
|
41
|
+
* [`carbon.integrations.connect_data_source`](#carbonintegrationsconnect_data_source)
|
41
42
|
* [`carbon.integrations.connect_freshdesk`](#carbonintegrationsconnect_freshdesk)
|
42
43
|
* [`carbon.integrations.connect_gitbook`](#carbonintegrationsconnect_gitbook)
|
43
44
|
* [`carbon.integrations.create_aws_iam_user`](#carbonintegrationscreate_aws_iam_user)
|
@@ -77,7 +78,7 @@ Connect external data to LLMs, no matter the source.
|
|
77
78
|
Add to Gemfile:
|
78
79
|
|
79
80
|
```ruby
|
80
|
-
gem 'carbon_ruby_sdk', '~> 0.1.
|
81
|
+
gem 'carbon_ruby_sdk', '~> 0.1.7'
|
81
82
|
```
|
82
83
|
|
83
84
|
## Getting Started<a id="getting-started"></a>
|
@@ -492,14 +493,13 @@ result = carbon.embeddings.upload_chunks_and_embeddings(
|
|
492
493
|
{
|
493
494
|
"chunk_number" => 1,
|
494
495
|
"chunk" => "chunk_example",
|
495
|
-
"embedding" => [
|
496
|
-
3.14
|
497
|
-
],
|
498
496
|
}
|
499
497
|
],
|
500
498
|
}
|
501
499
|
],
|
502
500
|
overwrite_existing: false,
|
501
|
+
chunks_only: false,
|
502
|
+
custom_credentials: {},
|
503
503
|
)
|
504
504
|
p result
|
505
505
|
```
|
@@ -509,6 +509,8 @@ p result
|
|
509
509
|
##### embedding_model: [`EmbeddingGenerators`](./lib/carbon_ruby_sdk/models/embedding_generators.rb)<a id="embedding_model-embeddinggeneratorslibcarbon_ruby_sdkmodelsembedding_generatorsrb"></a>
|
510
510
|
##### chunks_and_embeddings: Array<[`SingleChunksAndEmbeddingsUploadInput`](./lib/carbon_ruby_sdk/models/single_chunks_and_embeddings_upload_input.rb)><a id="chunks_and_embeddings-array"></a>
|
511
511
|
##### overwrite_existing: `Boolean`<a id="overwrite_existing-boolean"></a>
|
512
|
+
##### chunks_only: `Boolean`<a id="chunks_only-boolean"></a>
|
513
|
+
##### custom_credentials: `Object`<a id="custom_credentials-object"></a>
|
512
514
|
#### 🔄 Return<a id="🔄-return"></a>
|
513
515
|
|
514
516
|
[GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
|
@@ -876,6 +878,7 @@ result = carbon.files.resync(
|
|
876
878
|
file_id: 1,
|
877
879
|
chunk_size: 1,
|
878
880
|
chunk_overlap: 1,
|
881
|
+
force_embedding_generation: false,
|
879
882
|
)
|
880
883
|
p result
|
881
884
|
```
|
@@ -885,6 +888,7 @@ p result
|
|
885
888
|
##### file_id: `Integer`<a id="file_id-integer"></a>
|
886
889
|
##### chunk_size: `Integer`<a id="chunk_size-integer"></a>
|
887
890
|
##### chunk_overlap: `Integer`<a id="chunk_overlap-integer"></a>
|
891
|
+
##### force_embedding_generation: `Boolean`<a id="force_embedding_generation-boolean"></a>
|
888
892
|
#### 🔄 Return<a id="🔄-return"></a>
|
889
893
|
|
890
894
|
[UserFile](./lib/carbon_ruby_sdk/models/user_file.rb)
|
@@ -1113,6 +1117,49 @@ p result
|
|
1113
1117
|
---
|
1114
1118
|
|
1115
1119
|
|
1120
|
+
### `carbon.integrations.connect_data_source`<a id="carbonintegrationsconnect_data_source"></a>
|
1121
|
+
|
1122
|
+
Connect Data Source
|
1123
|
+
|
1124
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
1125
|
+
|
1126
|
+
```ruby
|
1127
|
+
result = carbon.integrations.connect_data_source(
|
1128
|
+
authentication: {
|
1129
|
+
"source" => "GOOGLE_DRIVE",
|
1130
|
+
"access_token" => "access_token_example",
|
1131
|
+
},
|
1132
|
+
sync_options: {
|
1133
|
+
"chunk_size" => 1500,
|
1134
|
+
"chunk_overlap" => 20,
|
1135
|
+
"skip_embedding_generation" => false,
|
1136
|
+
"embedding_model" => "OPENAI",
|
1137
|
+
"generate_sparse_vectors" => false,
|
1138
|
+
"prepend_filename_to_chunks" => false,
|
1139
|
+
"sync_files_on_connection" => true,
|
1140
|
+
"set_page_as_boundary" => false,
|
1141
|
+
},
|
1142
|
+
)
|
1143
|
+
p result
|
1144
|
+
```
|
1145
|
+
|
1146
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
1147
|
+
|
1148
|
+
##### authentication: [`AuthenticationProperty`](./lib/carbon_ruby_sdk/models/authentication_property.rb)<a id="authentication-authenticationpropertylibcarbon_ruby_sdkmodelsauthentication_propertyrb"></a>
|
1149
|
+
##### sync_options: [`SyncOptions`](./lib/carbon_ruby_sdk/models/sync_options.rb)<a id="sync_options-syncoptionslibcarbon_ruby_sdkmodelssync_optionsrb"></a>
|
1150
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
1151
|
+
|
1152
|
+
[ConnectDataSourceResponse](./lib/carbon_ruby_sdk/models/connect_data_source_response.rb)
|
1153
|
+
|
1154
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
1155
|
+
|
1156
|
+
`/integrations/connect` `POST`
|
1157
|
+
|
1158
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
1159
|
+
|
1160
|
+
---
|
1161
|
+
|
1162
|
+
|
1116
1163
|
### `carbon.integrations.connect_freshdesk`<a id="carbonintegrationsconnect_freshdesk"></a>
|
1117
1164
|
|
1118
1165
|
Refer this article to obtain an API key https://support.freshdesk.com/en/support/solutions/articles/215517.
|
@@ -1253,7 +1300,10 @@ p result
|
|
1253
1300
|
|
1254
1301
|
### `carbon.integrations.get_oauth_url`<a id="carbonintegrationsget_oauth_url"></a>
|
1255
1302
|
|
1256
|
-
|
1303
|
+
This endpoint can be used to generate the following URLs
|
1304
|
+
- An OAuth URL for OAuth based connectors
|
1305
|
+
- A file syncing URL which skips the OAuth flow if the user already has a valid access token and takes them to the
|
1306
|
+
success state.
|
1257
1307
|
|
1258
1308
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
1259
1309
|
|
@@ -1276,6 +1326,8 @@ result = carbon.integrations.get_oauth_url(
|
|
1276
1326
|
salesforce_domain: "string_example",
|
1277
1327
|
sync_files_on_connection: true,
|
1278
1328
|
set_page_as_boundary: false,
|
1329
|
+
data_source_id: 1,
|
1330
|
+
connecting_new_account: false,
|
1279
1331
|
)
|
1280
1332
|
p result
|
1281
1333
|
```
|
@@ -1298,7 +1350,25 @@ p result
|
|
1298
1350
|
##### max_items_per_chunk: `Integer`<a id="max_items_per_chunk-integer"></a>
|
1299
1351
|
##### salesforce_domain: `String`<a id="salesforce_domain-string"></a>
|
1300
1352
|
##### sync_files_on_connection: `Boolean`<a id="sync_files_on_connection-boolean"></a>
|
1353
|
+
Used to specify whether Carbon should attempt to sync all your files
|
1354
|
+
automatically when authorization is complete. This is only supported for a
|
1355
|
+
subset of connectors and will be ignored for the rest. Supported connectors:
|
1356
|
+
Intercom, Zendesk, Gitbook, Confluence, Salesforce, Freshdesk
|
1357
|
+
|
1301
1358
|
##### set_page_as_boundary: `Boolean`<a id="set_page_as_boundary-boolean"></a>
|
1359
|
+
##### data_source_id: `Integer`<a id="data_source_id-integer"></a>
|
1360
|
+
Used to specify a data source to sync from if you have multiple connected. It
|
1361
|
+
can be skipped if you only have one data source of that type connected or are
|
1362
|
+
connecting a new account.
|
1363
|
+
|
1364
|
+
##### connecting_new_account: `Boolean`<a id="connecting_new_account-boolean"></a>
|
1365
|
+
Used to connect a new data source. If not specified, we will attempt to create a
|
1366
|
+
sync URL for an existing data source based on type and ID.
|
1367
|
+
|
1368
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
1369
|
+
|
1370
|
+
[OuthURLResponse](./lib/carbon_ruby_sdk/models/outh_url_response.rb)
|
1371
|
+
|
1302
1372
|
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
1303
1373
|
|
1304
1374
|
`/integrations/oauth_url` `POST`
|
@@ -1389,10 +1459,15 @@ both system folders like "inbox" and user created folders.
|
|
1389
1459
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
1390
1460
|
|
1391
1461
|
```ruby
|
1392
|
-
result = carbon.integrations.list_folders
|
1462
|
+
result = carbon.integrations.list_folders(
|
1463
|
+
data_source_id: 1,
|
1464
|
+
)
|
1393
1465
|
p result
|
1394
1466
|
```
|
1395
1467
|
|
1468
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
1469
|
+
|
1470
|
+
##### data_source_id: `Integer`<a id="data_source_id-integer"></a>
|
1396
1471
|
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
1397
1472
|
|
1398
1473
|
`/integrations/outlook/user_folders` `GET`
|
@@ -1435,10 +1510,15 @@ will have the type "user" and Gmail's default labels will have the type "system"
|
|
1435
1510
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
1436
1511
|
|
1437
1512
|
```ruby
|
1438
|
-
result = carbon.integrations.list_labels
|
1513
|
+
result = carbon.integrations.list_labels(
|
1514
|
+
data_source_id: 1,
|
1515
|
+
)
|
1439
1516
|
p result
|
1440
1517
|
```
|
1441
1518
|
|
1519
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
1520
|
+
|
1521
|
+
##### data_source_id: `Integer`<a id="data_source_id-integer"></a>
|
1442
1522
|
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
1443
1523
|
|
1444
1524
|
`/integrations/gmail/user_labels` `GET`
|
@@ -1456,10 +1536,15 @@ support listing up to 250 categories.
|
|
1456
1536
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
1457
1537
|
|
1458
1538
|
```ruby
|
1459
|
-
result = carbon.integrations.list_outlook_categories
|
1539
|
+
result = carbon.integrations.list_outlook_categories(
|
1540
|
+
data_source_id: 1,
|
1541
|
+
)
|
1460
1542
|
p result
|
1461
1543
|
```
|
1462
1544
|
|
1545
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
1546
|
+
|
1547
|
+
##### data_source_id: `Integer`<a id="data_source_id-integer"></a>
|
1463
1548
|
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
1464
1549
|
|
1465
1550
|
`/integrations/outlook/user_categories` `GET`
|
@@ -1715,6 +1800,7 @@ result = carbon.integrations.sync_gmail(
|
|
1715
1800
|
embedding_model: "OPENAI",
|
1716
1801
|
generate_sparse_vectors: false,
|
1717
1802
|
prepend_filename_to_chunks: false,
|
1803
|
+
data_source_id: 1,
|
1718
1804
|
)
|
1719
1805
|
p result
|
1720
1806
|
```
|
@@ -1729,6 +1815,7 @@ p result
|
|
1729
1815
|
##### embedding_model: [`EmbeddingGenerators`](./lib/carbon_ruby_sdk/models/embedding_generators.rb)<a id="embedding_model-embeddinggeneratorslibcarbon_ruby_sdkmodelsembedding_generatorsrb"></a>
|
1730
1816
|
##### generate_sparse_vectors: `Boolean`<a id="generate_sparse_vectors-boolean"></a>
|
1731
1817
|
##### prepend_filename_to_chunks: `Boolean`<a id="prepend_filename_to_chunks-boolean"></a>
|
1818
|
+
##### data_source_id: `Integer`<a id="data_source_id-integer"></a>
|
1732
1819
|
#### 🔄 Return<a id="🔄-return"></a>
|
1733
1820
|
|
1734
1821
|
[GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
|
@@ -1818,6 +1905,7 @@ result = carbon.integrations.sync_outlook(
|
|
1818
1905
|
embedding_model: "OPENAI",
|
1819
1906
|
generate_sparse_vectors: false,
|
1820
1907
|
prepend_filename_to_chunks: false,
|
1908
|
+
data_source_id: 1,
|
1821
1909
|
)
|
1822
1910
|
p result
|
1823
1911
|
```
|
@@ -1833,6 +1921,7 @@ p result
|
|
1833
1921
|
##### embedding_model: [`EmbeddingGenerators`](./lib/carbon_ruby_sdk/models/embedding_generators.rb)<a id="embedding_model-embeddinggeneratorslibcarbon_ruby_sdkmodelsembedding_generatorsrb"></a>
|
1834
1922
|
##### generate_sparse_vectors: `Boolean`<a id="generate_sparse_vectors-boolean"></a>
|
1835
1923
|
##### prepend_filename_to_chunks: `Boolean`<a id="prepend_filename_to_chunks-boolean"></a>
|
1924
|
+
##### data_source_id: `Integer`<a id="data_source_id-integer"></a>
|
1836
1925
|
#### 🔄 Return<a id="🔄-return"></a>
|
1837
1926
|
|
1838
1927
|
[GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
|
@@ -1912,6 +2001,7 @@ result = carbon.integrations.sync_s3_files(
|
|
1912
2001
|
prepend_filename_to_chunks: false,
|
1913
2002
|
max_items_per_chunk: 1,
|
1914
2003
|
set_page_as_boundary: false,
|
2004
|
+
data_source_id: 1,
|
1915
2005
|
)
|
1916
2006
|
p result
|
1917
2007
|
```
|
@@ -1928,6 +2018,7 @@ p result
|
|
1928
2018
|
##### prepend_filename_to_chunks: `Boolean`<a id="prepend_filename_to_chunks-boolean"></a>
|
1929
2019
|
##### max_items_per_chunk: `Integer`<a id="max_items_per_chunk-integer"></a>
|
1930
2020
|
##### set_page_as_boundary: `Boolean`<a id="set_page_as_boundary-boolean"></a>
|
2021
|
+
##### data_source_id: `Integer`<a id="data_source_id-integer"></a>
|
1931
2022
|
#### 🔄 Return<a id="🔄-return"></a>
|
1932
2023
|
|
1933
2024
|
[GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
|
@@ -465,13 +465,17 @@ module Carbon
|
|
465
465
|
# @param embedding_model [EmbeddingGenerators]
|
466
466
|
# @param chunks_and_embeddings [Array<SingleChunksAndEmbeddingsUploadInput>]
|
467
467
|
# @param overwrite_existing [Boolean]
|
468
|
+
# @param chunks_only [Boolean]
|
469
|
+
# @param custom_credentials [Object]
|
468
470
|
# @param body [ChunksAndEmbeddingsUploadInput]
|
469
471
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
470
|
-
def upload_chunks_and_embeddings(embedding_model:, chunks_and_embeddings:, overwrite_existing: false, extra: {})
|
472
|
+
def upload_chunks_and_embeddings(embedding_model:, chunks_and_embeddings:, overwrite_existing: false, chunks_only: false, custom_credentials: SENTINEL, extra: {})
|
471
473
|
_body = {}
|
472
474
|
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
473
475
|
_body[:chunks_and_embeddings] = chunks_and_embeddings if chunks_and_embeddings != SENTINEL
|
474
476
|
_body[:overwrite_existing] = overwrite_existing if overwrite_existing != SENTINEL
|
477
|
+
_body[:chunks_only] = chunks_only if chunks_only != SENTINEL
|
478
|
+
_body[:custom_credentials] = custom_credentials if custom_credentials != SENTINEL
|
475
479
|
chunks_and_embeddings_upload_input = _body
|
476
480
|
api_response = upload_chunks_and_embeddings_with_http_info_impl(chunks_and_embeddings_upload_input, extra)
|
477
481
|
api_response.data
|
@@ -482,13 +486,17 @@ module Carbon
|
|
482
486
|
# @param embedding_model [EmbeddingGenerators]
|
483
487
|
# @param chunks_and_embeddings [Array<SingleChunksAndEmbeddingsUploadInput>]
|
484
488
|
# @param overwrite_existing [Boolean]
|
489
|
+
# @param chunks_only [Boolean]
|
490
|
+
# @param custom_credentials [Object]
|
485
491
|
# @param body [ChunksAndEmbeddingsUploadInput]
|
486
492
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
487
|
-
def upload_chunks_and_embeddings_with_http_info(embedding_model:, chunks_and_embeddings:, overwrite_existing: false, extra: {})
|
493
|
+
def upload_chunks_and_embeddings_with_http_info(embedding_model:, chunks_and_embeddings:, overwrite_existing: false, chunks_only: false, custom_credentials: SENTINEL, extra: {})
|
488
494
|
_body = {}
|
489
495
|
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
490
496
|
_body[:chunks_and_embeddings] = chunks_and_embeddings if chunks_and_embeddings != SENTINEL
|
491
497
|
_body[:overwrite_existing] = overwrite_existing if overwrite_existing != SENTINEL
|
498
|
+
_body[:chunks_only] = chunks_only if chunks_only != SENTINEL
|
499
|
+
_body[:custom_credentials] = custom_credentials if custom_credentials != SENTINEL
|
492
500
|
chunks_and_embeddings_upload_input = _body
|
493
501
|
upload_chunks_and_embeddings_with_http_info_impl(chunks_and_embeddings_upload_input, extra)
|
494
502
|
end
|
@@ -938,13 +938,15 @@ module Carbon
|
|
938
938
|
# @param file_id [Integer]
|
939
939
|
# @param chunk_size [Integer]
|
940
940
|
# @param chunk_overlap [Integer]
|
941
|
+
# @param force_embedding_generation [Boolean]
|
941
942
|
# @param body [ResyncFileQueryInput]
|
942
943
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
943
|
-
def resync(file_id:, chunk_size: SENTINEL, chunk_overlap: SENTINEL, extra: {})
|
944
|
+
def resync(file_id:, chunk_size: SENTINEL, chunk_overlap: SENTINEL, force_embedding_generation: false, extra: {})
|
944
945
|
_body = {}
|
945
946
|
_body[:file_id] = file_id if file_id != SENTINEL
|
946
947
|
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
947
948
|
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
949
|
+
_body[:force_embedding_generation] = force_embedding_generation if force_embedding_generation != SENTINEL
|
948
950
|
resync_file_query_input = _body
|
949
951
|
api_response = resync_with_http_info_impl(resync_file_query_input, extra)
|
950
952
|
api_response.data
|
@@ -955,13 +957,15 @@ module Carbon
|
|
955
957
|
# @param file_id [Integer]
|
956
958
|
# @param chunk_size [Integer]
|
957
959
|
# @param chunk_overlap [Integer]
|
960
|
+
# @param force_embedding_generation [Boolean]
|
958
961
|
# @param body [ResyncFileQueryInput]
|
959
962
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
960
|
-
def resync_with_http_info(file_id:, chunk_size: SENTINEL, chunk_overlap: SENTINEL, extra: {})
|
963
|
+
def resync_with_http_info(file_id:, chunk_size: SENTINEL, chunk_overlap: SENTINEL, force_embedding_generation: false, extra: {})
|
961
964
|
_body = {}
|
962
965
|
_body[:file_id] = file_id if file_id != SENTINEL
|
963
966
|
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
964
967
|
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
968
|
+
_body[:force_embedding_generation] = force_embedding_generation if force_embedding_generation != SENTINEL
|
965
969
|
resync_file_query_input = _body
|
966
970
|
resync_with_http_info_impl(resync_file_query_input, extra)
|
967
971
|
end
|