carbon_ruby_sdk 0.2.20 → 0.2.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/README.md +108 -3
- data/lib/carbon_ruby_sdk/api/embeddings_api.rb +6 -2
- data/lib/carbon_ruby_sdk/api/files_api.rb +231 -6
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +8 -4
- data/lib/carbon_ruby_sdk/models/cold_storage_props.rb +229 -0
- data/lib/carbon_ruby_sdk/models/embedding_storage_status.rb +38 -0
- data/lib/carbon_ruby_sdk/models/file_sync_config.rb +13 -1
- data/lib/carbon_ruby_sdk/models/file_sync_config_nullable.rb +13 -1
- data/lib/carbon_ruby_sdk/models/get_embedding_documents_body.rb +17 -5
- data/lib/carbon_ruby_sdk/models/modify_cold_storage_parameters_query_input.rb +235 -0
- data/lib/carbon_ruby_sdk/models/move_to_hot_storage_query_input.rb +215 -0
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +17 -6
- data/lib/carbon_ruby_sdk/models/raw_text_input.rb +14 -5
- data/lib/carbon_ruby_sdk/models/sent_webhook_payload.rb +2 -2
- data/lib/carbon_ruby_sdk/models/sync_options.rb +16 -5
- data/lib/carbon_ruby_sdk/models/upload_file_from_url_input.rb +24 -4
- data/lib/carbon_ruby_sdk/models/user_file.rb +39 -1
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +4 -0
- data/spec/api/files_api_spec.rb +25 -0
- data/spec/models/cold_storage_props_spec.rb +34 -0
- data/spec/models/embedding_storage_status_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/get_embedding_documents_body_spec.rb +6 -0
- data/spec/models/modify_cold_storage_parameters_query_input_spec.rb +40 -0
- data/spec/models/move_to_hot_storage_query_input_spec.rb +28 -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/sent_webhook_payload_spec.rb +1 -1
- data/spec/models/sync_options_spec.rb +6 -0
- data/spec/models/upload_file_from_url_input_spec.rb +12 -0
- data/spec/models/user_file_spec.rb +18 -0
- metadata +14 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 806bcc7f0eb46e3620cbeb04930aaea25d030ca1336725a4819e29d2e01f6ef1
|
4
|
+
data.tar.gz: 9ab058d3e97f2a70a109db053b9900332ebcbf1387e24d09f875bcecd57125b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4268173c09c5e36e0bb61bd87754300a97818ebda1f49101b19001ddcbb0f0d8bb8ef02c839c5b5d450a1c12de29c49c516db97f39c1f969d3b3a928ca95836a
|
7
|
+
data.tar.gz: 583d3c91102825020658d5d2335289e6b05e7076a782dc1eb820002fa3b3ce7de10d8824de2773d32741fb34faee2c1cee36128bcb94a840d8157185934942ea
|
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.22)
|
5
5
|
faraday (>= 1.0.1, < 3.0)
|
6
6
|
faraday-multipart (~> 1.0, >= 1.0.4)
|
7
7
|
|
@@ -28,8 +28,8 @@ GEM
|
|
28
28
|
reline (>= 0.3.0)
|
29
29
|
method_source (1.1.0)
|
30
30
|
multipart-post (2.4.1)
|
31
|
-
parallel (1.
|
32
|
-
parser (3.3.4.
|
31
|
+
parallel (1.26.3)
|
32
|
+
parser (3.3.4.2)
|
33
33
|
ast (~> 2.4.1)
|
34
34
|
racc
|
35
35
|
pry (0.14.2)
|
@@ -44,7 +44,7 @@ GEM
|
|
44
44
|
regexp_parser (2.9.2)
|
45
45
|
reline (0.5.9)
|
46
46
|
io-console (~> 0.5)
|
47
|
-
rexml (3.3.
|
47
|
+
rexml (3.3.5)
|
48
48
|
strscan
|
49
49
|
rspec (3.13.0)
|
50
50
|
rspec-core (~> 3.13.0)
|
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.22-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.2.22)
|
10
10
|
|
11
11
|
</div>
|
12
12
|
|
@@ -33,6 +33,8 @@ Connect external data to LLMs, no matter the source.
|
|
33
33
|
* [`carbon.files.delete_v2`](#carbonfilesdelete_v2)
|
34
34
|
* [`carbon.files.get_parsed_file`](#carbonfilesget_parsed_file)
|
35
35
|
* [`carbon.files.get_raw_file`](#carbonfilesget_raw_file)
|
36
|
+
* [`carbon.files.modify_cold_storage_parameters`](#carbonfilesmodify_cold_storage_parameters)
|
37
|
+
* [`carbon.files.move_to_hot_storage`](#carbonfilesmove_to_hot_storage)
|
36
38
|
* [`carbon.files.query_user_files`](#carbonfilesquery_user_files)
|
37
39
|
* [`carbon.files.query_user_files_deprecated`](#carbonfilesquery_user_files_deprecated)
|
38
40
|
* [`carbon.files.resync`](#carbonfilesresync)
|
@@ -91,7 +93,7 @@ Connect external data to LLMs, no matter the source.
|
|
91
93
|
Add to Gemfile:
|
92
94
|
|
93
95
|
```ruby
|
94
|
-
gem 'carbon_ruby_sdk', '~> 0.2.
|
96
|
+
gem 'carbon_ruby_sdk', '~> 0.2.22'
|
95
97
|
```
|
96
98
|
|
97
99
|
## Getting Started<a id="getting-started"></a>
|
@@ -388,6 +390,7 @@ result = carbon.embeddings.get_documents(
|
|
388
390
|
file_types_at_source: [
|
389
391
|
"string_example"
|
390
392
|
],
|
393
|
+
exclude_cold_storage_files: false,
|
391
394
|
)
|
392
395
|
p result
|
393
396
|
```
|
@@ -456,6 +459,11 @@ results, but may take longer to complete.
|
|
456
459
|
Filter files based on their type at the source (for example help center tickets
|
457
460
|
and articles)
|
458
461
|
|
462
|
+
##### exclude_cold_storage_files: `Boolean`<a id="exclude_cold_storage_files-boolean"></a>
|
463
|
+
Flag to control whether or not to exclude files that are not in hot storage. If
|
464
|
+
set to False, then an error will be returned if any filtered files are in cold
|
465
|
+
storage.
|
466
|
+
|
459
467
|
#### 🔄 Return<a id="🔄-return"></a>
|
460
468
|
|
461
469
|
[DocumentResponseList](./lib/carbon_ruby_sdk/models/document_response_list.rb)
|
@@ -855,6 +863,66 @@ p result
|
|
855
863
|
---
|
856
864
|
|
857
865
|
|
866
|
+
### `carbon.files.modify_cold_storage_parameters`<a id="carbonfilesmodify_cold_storage_parameters"></a>
|
867
|
+
|
868
|
+
Modify Cold Storage Parameters
|
869
|
+
|
870
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
871
|
+
|
872
|
+
```ruby
|
873
|
+
result = carbon.files.modify_cold_storage_parameters(
|
874
|
+
filters: {
|
875
|
+
"include_all_children" => false,
|
876
|
+
"non_synced_only" => false,
|
877
|
+
},
|
878
|
+
enable_cold_storage: true,
|
879
|
+
hot_storage_time_to_live: 1,
|
880
|
+
)
|
881
|
+
p result
|
882
|
+
```
|
883
|
+
|
884
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
885
|
+
|
886
|
+
##### filters: [`OrganizationUserFilesToSyncFilters`](./lib/carbon_ruby_sdk/models/organization_user_files_to_sync_filters.rb)<a id="filters-organizationuserfilestosyncfilterslibcarbon_ruby_sdkmodelsorganization_user_files_to_sync_filtersrb"></a>
|
887
|
+
##### enable_cold_storage: `Boolean`<a id="enable_cold_storage-boolean"></a>
|
888
|
+
##### hot_storage_time_to_live: `Integer`<a id="hot_storage_time_to_live-integer"></a>
|
889
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
890
|
+
|
891
|
+
`/modify_cold_storage_parameters` `POST`
|
892
|
+
|
893
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
894
|
+
|
895
|
+
---
|
896
|
+
|
897
|
+
|
898
|
+
### `carbon.files.move_to_hot_storage`<a id="carbonfilesmove_to_hot_storage"></a>
|
899
|
+
|
900
|
+
Move To Hot Storage
|
901
|
+
|
902
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
903
|
+
|
904
|
+
```ruby
|
905
|
+
result = carbon.files.move_to_hot_storage(
|
906
|
+
filters: {
|
907
|
+
"include_all_children" => false,
|
908
|
+
"non_synced_only" => false,
|
909
|
+
},
|
910
|
+
)
|
911
|
+
p result
|
912
|
+
```
|
913
|
+
|
914
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
915
|
+
|
916
|
+
##### filters: [`OrganizationUserFilesToSyncFilters`](./lib/carbon_ruby_sdk/models/organization_user_files_to_sync_filters.rb)<a id="filters-organizationuserfilestosyncfilterslibcarbon_ruby_sdkmodelsorganization_user_files_to_sync_filtersrb"></a>
|
917
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
918
|
+
|
919
|
+
`/move_to_hot_storage` `POST`
|
920
|
+
|
921
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
922
|
+
|
923
|
+
---
|
924
|
+
|
925
|
+
|
858
926
|
### `carbon.files.query_user_files`<a id="carbonfilesquery_user_files"></a>
|
859
927
|
|
860
928
|
For pre-filtering documents, using `tags_v2` is preferred to using `tags` (which is now deprecated). If both `tags_v2`
|
@@ -1079,8 +1147,11 @@ result = carbon.files.upload(
|
|
1079
1147
|
parse_pdf_tables_with_ocr: false,
|
1080
1148
|
detect_audio_language: false,
|
1081
1149
|
transcription_service: "assemblyai",
|
1150
|
+
include_speaker_labels: false,
|
1082
1151
|
media_type: "TEXT",
|
1083
1152
|
split_rows: false,
|
1153
|
+
enable_cold_storage: false,
|
1154
|
+
hot_storage_time_to_live: 1,
|
1084
1155
|
)
|
1085
1156
|
p result
|
1086
1157
|
```
|
@@ -1130,6 +1201,10 @@ Whether to automatically detect the language of the uploaded audio file.
|
|
1130
1201
|
The transcription service to use for audio files. If no service is specified,
|
1131
1202
|
'deepgram' will be used.
|
1132
1203
|
|
1204
|
+
##### include_speaker_labels: `Boolean`<a id="include_speaker_labels-boolean"></a>
|
1205
|
+
Detect multiple speakers and label segments of speech by speaker for audio
|
1206
|
+
files.
|
1207
|
+
|
1133
1208
|
##### media_type: [`FileContentTypesNullable`](./lib/carbon_ruby_sdk/models/file_content_types_nullable.rb)<a id="media_type-filecontenttypesnullablelibcarbon_ruby_sdkmodelsfile_content_types_nullablerb"></a>
|
1134
1209
|
The media type of the file. If not provided, it will be inferred from the file
|
1135
1210
|
extension.
|
@@ -1138,6 +1213,13 @@ extension.
|
|
1138
1213
|
Whether to split tabular rows into chunks. Currently only valid for CSV, TSV,
|
1139
1214
|
and XLSX files.
|
1140
1215
|
|
1216
|
+
##### enable_cold_storage: `Boolean`<a id="enable_cold_storage-boolean"></a>
|
1217
|
+
Enable cold storage for the file. If set to true, the file will be moved to cold
|
1218
|
+
storage after a certain period of inactivity. Default is false.
|
1219
|
+
|
1220
|
+
##### hot_storage_time_to_live: `Integer`<a id="hot_storage_time_to_live-integer"></a>
|
1221
|
+
Time in seconds after which the file will be moved to cold storage.
|
1222
|
+
|
1141
1223
|
#### 🔄 Return<a id="🔄-return"></a>
|
1142
1224
|
|
1143
1225
|
[UserFile](./lib/carbon_ruby_sdk/models/user_file.rb)
|
@@ -1173,8 +1255,12 @@ result = carbon.files.upload_from_url(
|
|
1173
1255
|
parse_pdf_tables_with_ocr: false,
|
1174
1256
|
detect_audio_language: false,
|
1175
1257
|
transcription_service: "assemblyai",
|
1258
|
+
include_speaker_labels: false,
|
1176
1259
|
media_type: "TEXT",
|
1177
1260
|
split_rows: false,
|
1261
|
+
cold_storage_params: {
|
1262
|
+
"enable_cold_storage" => false,
|
1263
|
+
},
|
1178
1264
|
)
|
1179
1265
|
p result
|
1180
1266
|
```
|
@@ -1197,8 +1283,10 @@ Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
|
1197
1283
|
##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
|
1198
1284
|
##### detect_audio_language: `Boolean`<a id="detect_audio_language-boolean"></a>
|
1199
1285
|
##### transcription_service: [`TranscriptionServiceNullable`](./lib/carbon_ruby_sdk/models/transcription_service_nullable.rb)<a id="transcription_service-transcriptionservicenullablelibcarbon_ruby_sdkmodelstranscription_service_nullablerb"></a>
|
1286
|
+
##### include_speaker_labels: `Boolean`<a id="include_speaker_labels-boolean"></a>
|
1200
1287
|
##### media_type: [`FileContentTypesNullable`](./lib/carbon_ruby_sdk/models/file_content_types_nullable.rb)<a id="media_type-filecontenttypesnullablelibcarbon_ruby_sdkmodelsfile_content_types_nullablerb"></a>
|
1201
1288
|
##### split_rows: `Boolean`<a id="split_rows-boolean"></a>
|
1289
|
+
##### cold_storage_params: [`ColdStorageProps`](./lib/carbon_ruby_sdk/models/cold_storage_props.rb)<a id="cold_storage_params-coldstoragepropslibcarbon_ruby_sdkmodelscold_storage_propsrb"></a>
|
1202
1290
|
#### 🔄 Return<a id="🔄-return"></a>
|
1203
1291
|
|
1204
1292
|
[UserFile](./lib/carbon_ruby_sdk/models/user_file.rb)
|
@@ -1237,6 +1325,9 @@ result = carbon.files.upload_text(
|
|
1237
1325
|
overwrite_file_id: 1,
|
1238
1326
|
embedding_model: "OPENAI",
|
1239
1327
|
generate_sparse_vectors: false,
|
1328
|
+
cold_storage_params: {
|
1329
|
+
"enable_cold_storage" => false,
|
1330
|
+
},
|
1240
1331
|
)
|
1241
1332
|
p result
|
1242
1333
|
```
|
@@ -1251,6 +1342,7 @@ p result
|
|
1251
1342
|
##### overwrite_file_id: `Integer`<a id="overwrite_file_id-integer"></a>
|
1252
1343
|
##### embedding_model: [`EmbeddingGeneratorsNullable`](./lib/carbon_ruby_sdk/models/embedding_generators_nullable.rb)<a id="embedding_model-embeddinggeneratorsnullablelibcarbon_ruby_sdkmodelsembedding_generators_nullablerb"></a>
|
1253
1344
|
##### generate_sparse_vectors: `Boolean`<a id="generate_sparse_vectors-boolean"></a>
|
1345
|
+
##### cold_storage_params: [`ColdStorageProps`](./lib/carbon_ruby_sdk/models/cold_storage_props.rb)<a id="cold_storage_params-coldstoragepropslibcarbon_ruby_sdkmodelscold_storage_propsrb"></a>
|
1254
1346
|
#### 🔄 Return<a id="🔄-return"></a>
|
1255
1347
|
|
1256
1348
|
[UserFile](./lib/carbon_ruby_sdk/models/user_file.rb)
|
@@ -1368,6 +1460,7 @@ result = carbon.integrations.connect_freshdesk(
|
|
1368
1460
|
"sync_attachments" => false,
|
1369
1461
|
"detect_audio_language" => false,
|
1370
1462
|
"transcription_service" => "assemblyai",
|
1463
|
+
"include_speaker_labels" => false,
|
1371
1464
|
"split_rows" => false,
|
1372
1465
|
},
|
1373
1466
|
)
|
@@ -1554,8 +1647,10 @@ result = carbon.integrations.get_oauth_url(
|
|
1554
1647
|
"sync_attachments" => false,
|
1555
1648
|
"detect_audio_language" => false,
|
1556
1649
|
"transcription_service" => "assemblyai",
|
1650
|
+
"include_speaker_labels" => false,
|
1557
1651
|
"split_rows" => false,
|
1558
1652
|
},
|
1653
|
+
automatically_open_file_picker: true,
|
1559
1654
|
)
|
1560
1655
|
p result
|
1561
1656
|
```
|
@@ -1600,7 +1695,7 @@ This request id will be added to all files that get synced using the generated
|
|
1600
1695
|
OAuth URL
|
1601
1696
|
|
1602
1697
|
##### use_ocr: `Boolean`<a id="use_ocr-boolean"></a>
|
1603
|
-
Enable OCR for files that support it. Supported formats: pdf
|
1698
|
+
Enable OCR for files that support it. Supported formats: jpg, png, pdf
|
1604
1699
|
|
1605
1700
|
##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
|
1606
1701
|
##### enable_file_picker: `Boolean`<a id="enable_file_picker-boolean"></a>
|
@@ -1618,6 +1713,11 @@ GOOGLE_DRIVE, BOX, DROPBOX, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE,
|
|
1618
1713
|
NOTION, SHAREPOINT. It will be ignored for other data sources.
|
1619
1714
|
|
1620
1715
|
##### 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>
|
1716
|
+
##### automatically_open_file_picker: `Boolean`<a id="automatically_open_file_picker-boolean"></a>
|
1717
|
+
Automatically open source file picker after the OAuth flow is complete. This
|
1718
|
+
flag is currently supported by BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT.
|
1719
|
+
It will be ignored for other data sources.
|
1720
|
+
|
1621
1721
|
#### 🔄 Return<a id="🔄-return"></a>
|
1622
1722
|
|
1623
1723
|
[OuthURLResponse](./lib/carbon_ruby_sdk/models/outh_url_response.rb)
|
@@ -1920,6 +2020,7 @@ result = carbon.integrations.sync_confluence(
|
|
1920
2020
|
"sync_attachments" => false,
|
1921
2021
|
"detect_audio_language" => false,
|
1922
2022
|
"transcription_service" => "assemblyai",
|
2023
|
+
"include_speaker_labels" => false,
|
1923
2024
|
"split_rows" => false,
|
1924
2025
|
},
|
1925
2026
|
)
|
@@ -2026,6 +2127,7 @@ result = carbon.integrations.sync_files(
|
|
2026
2127
|
"sync_attachments" => false,
|
2027
2128
|
"detect_audio_language" => false,
|
2028
2129
|
"transcription_service" => "assemblyai",
|
2130
|
+
"include_speaker_labels" => false,
|
2029
2131
|
"split_rows" => false,
|
2030
2132
|
},
|
2031
2133
|
)
|
@@ -2229,6 +2331,7 @@ result = carbon.integrations.sync_gmail(
|
|
2229
2331
|
"sync_attachments" => false,
|
2230
2332
|
"detect_audio_language" => false,
|
2231
2333
|
"transcription_service" => "assemblyai",
|
2334
|
+
"include_speaker_labels" => false,
|
2232
2335
|
"split_rows" => false,
|
2233
2336
|
},
|
2234
2337
|
incremental_sync: false,
|
@@ -2349,6 +2452,7 @@ result = carbon.integrations.sync_outlook(
|
|
2349
2452
|
"sync_attachments" => false,
|
2350
2453
|
"detect_audio_language" => false,
|
2351
2454
|
"transcription_service" => "assemblyai",
|
2455
|
+
"include_speaker_labels" => false,
|
2352
2456
|
"split_rows" => false,
|
2353
2457
|
},
|
2354
2458
|
incremental_sync: false,
|
@@ -2493,6 +2597,7 @@ result = carbon.integrations.sync_s3_files(
|
|
2493
2597
|
"sync_attachments" => false,
|
2494
2598
|
"detect_audio_language" => false,
|
2495
2599
|
"transcription_service" => "assemblyai",
|
2600
|
+
"include_speaker_labels" => false,
|
2496
2601
|
"split_rows" => false,
|
2497
2602
|
},
|
2498
2603
|
)
|
@@ -132,9 +132,10 @@ module Carbon
|
|
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
134
|
# @param file_types_at_source [Array<HelpdeskFileTypes>] Filter files based on their type at the source (for example help center tickets and articles)
|
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.
|
135
136
|
# @param body [GetEmbeddingDocumentsBody]
|
136
137
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
137
|
-
def get_documents(query:, k:, tags: SENTINEL, query_vector: SENTINEL, file_ids: SENTINEL, parent_file_ids: SENTINEL, include_all_children: false, tags_v2: SENTINEL, include_tags: SENTINEL, include_vectors: SENTINEL, include_raw_file: SENTINEL, hybrid_search: SENTINEL, hybrid_search_tuning_parameters: SENTINEL, media_type: SENTINEL, embedding_model: 'OPENAI', include_file_level_metadata: false, high_accuracy: false, rerank: SENTINEL, file_types_at_source: SENTINEL, extra: {})
|
138
|
+
def get_documents(query:, k:, tags: SENTINEL, query_vector: SENTINEL, file_ids: SENTINEL, parent_file_ids: SENTINEL, include_all_children: false, tags_v2: SENTINEL, include_tags: SENTINEL, include_vectors: SENTINEL, include_raw_file: SENTINEL, hybrid_search: SENTINEL, hybrid_search_tuning_parameters: SENTINEL, media_type: SENTINEL, embedding_model: 'OPENAI', include_file_level_metadata: false, high_accuracy: false, rerank: SENTINEL, file_types_at_source: SENTINEL, exclude_cold_storage_files: false, extra: {})
|
138
139
|
_body = {}
|
139
140
|
_body[:tags] = tags if tags != SENTINEL
|
140
141
|
_body[:query] = query if query != SENTINEL
|
@@ -155,6 +156,7 @@ module Carbon
|
|
155
156
|
_body[:high_accuracy] = high_accuracy if high_accuracy != SENTINEL
|
156
157
|
_body[:rerank] = rerank if rerank != SENTINEL
|
157
158
|
_body[:file_types_at_source] = file_types_at_source if file_types_at_source != SENTINEL
|
159
|
+
_body[:exclude_cold_storage_files] = exclude_cold_storage_files if exclude_cold_storage_files != SENTINEL
|
158
160
|
get_embedding_documents_body = _body
|
159
161
|
api_response = get_documents_with_http_info_impl(get_embedding_documents_body, extra)
|
160
162
|
api_response.data
|
@@ -276,9 +278,10 @@ module Carbon
|
|
276
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.
|
277
279
|
# @param rerank [RerankParamsNullable]
|
278
280
|
# @param file_types_at_source [Array<HelpdeskFileTypes>] Filter files based on their type at the source (for example help center tickets and articles)
|
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.
|
279
282
|
# @param body [GetEmbeddingDocumentsBody]
|
280
283
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
281
|
-
def get_documents_with_http_info(query:, k:, tags: SENTINEL, query_vector: SENTINEL, file_ids: SENTINEL, parent_file_ids: SENTINEL, include_all_children: false, tags_v2: SENTINEL, include_tags: SENTINEL, include_vectors: SENTINEL, include_raw_file: SENTINEL, hybrid_search: SENTINEL, hybrid_search_tuning_parameters: SENTINEL, media_type: SENTINEL, embedding_model: 'OPENAI', include_file_level_metadata: false, high_accuracy: false, rerank: SENTINEL, file_types_at_source: SENTINEL, extra: {})
|
284
|
+
def get_documents_with_http_info(query:, k:, tags: SENTINEL, query_vector: SENTINEL, file_ids: SENTINEL, parent_file_ids: SENTINEL, include_all_children: false, tags_v2: SENTINEL, include_tags: SENTINEL, include_vectors: SENTINEL, include_raw_file: SENTINEL, hybrid_search: SENTINEL, hybrid_search_tuning_parameters: SENTINEL, media_type: SENTINEL, embedding_model: 'OPENAI', include_file_level_metadata: false, high_accuracy: false, rerank: SENTINEL, file_types_at_source: SENTINEL, exclude_cold_storage_files: false, extra: {})
|
282
285
|
_body = {}
|
283
286
|
_body[:tags] = tags if tags != SENTINEL
|
284
287
|
_body[:query] = query if query != SENTINEL
|
@@ -299,6 +302,7 @@ module Carbon
|
|
299
302
|
_body[:high_accuracy] = high_accuracy if high_accuracy != SENTINEL
|
300
303
|
_body[:rerank] = rerank if rerank != SENTINEL
|
301
304
|
_body[:file_types_at_source] = file_types_at_source if file_types_at_source != SENTINEL
|
305
|
+
_body[:exclude_cold_storage_files] = exclude_cold_storage_files if exclude_cold_storage_files != SENTINEL
|
302
306
|
get_embedding_documents_body = _body
|
303
307
|
get_documents_with_http_info_impl(get_embedding_documents_body, extra)
|
304
308
|
end
|