carbon_ruby_sdk 0.2.17 → 0.2.18
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 +13 -6
- data/lib/carbon_ruby_sdk/api/embeddings_api.rb +6 -2
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +6 -6
- data/lib/carbon_ruby_sdk/models/get_embedding_documents_body.rb +18 -5
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +1 -1
- data/lib/carbon_ruby_sdk/models/organization_user_files_to_sync_filters.rb +18 -5
- data/lib/carbon_ruby_sdk/models/sent_webhook_payload.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/version.rb +1 -1
- data/spec/models/get_embedding_documents_body_spec.rb +6 -0
- data/spec/models/organization_user_files_to_sync_filters_spec.rb +6 -0
- data/spec/models/sent_webhook_payload_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 621a55f88f43768897cf3086257a2c73bb47a8417043d4576e9097069c979a75
|
4
|
+
data.tar.gz: 8a19d96655e5c7230b5dc1d4d34ed2faae53b270e78a973ffae5396041c8ed40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 610cc7b260e629e544ae15e90b0120276403d5beb06936613b6cc7956272a3761c596ad8d8cb34ad2d91b66b1ba55ebdf25fcf2606139ea3976eae842bb98823
|
7
|
+
data.tar.gz: 8d082ccc3c69fe4b64f47462f3b97cfab0ea508b2cba1cac9db5efc4975461f823d40c39a5ce9e610d09a3ab37a20397770fd6d634c7bb54c32d24587ab2b32a
|
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.18)
|
10
10
|
|
11
11
|
</div>
|
12
12
|
|
@@ -91,7 +91,7 @@ Connect external data to LLMs, no matter the source.
|
|
91
91
|
Add to Gemfile:
|
92
92
|
|
93
93
|
```ruby
|
94
|
-
gem 'carbon_ruby_sdk', '~> 0.2.
|
94
|
+
gem 'carbon_ruby_sdk', '~> 0.2.18'
|
95
95
|
```
|
96
96
|
|
97
97
|
## Getting Started<a id="getting-started"></a>
|
@@ -385,6 +385,9 @@ result = carbon.embeddings.get_documents(
|
|
385
385
|
rerank: {
|
386
386
|
"model" => "model_example",
|
387
387
|
},
|
388
|
+
file_types_at_source: [
|
389
|
+
"string_example"
|
390
|
+
],
|
388
391
|
)
|
389
392
|
p result
|
390
393
|
```
|
@@ -449,6 +452,10 @@ default, this is set to false. If true, the search may return more accurate
|
|
449
452
|
results, but may take longer to complete.
|
450
453
|
|
451
454
|
##### rerank: [`RerankParamsNullable`](./lib/carbon_ruby_sdk/models/rerank_params_nullable.rb)<a id="rerank-rerankparamsnullablelibcarbon_ruby_sdkmodelsrerank_params_nullablerb"></a>
|
455
|
+
##### file_types_at_source: Array<[`HelpdeskFileTypes`](./lib/carbon_ruby_sdk/models/helpdesk_file_types.rb)><a id="file_types_at_source-array"></a>
|
456
|
+
Filter files based on their type at the source (for example help center tickets
|
457
|
+
and articles)
|
458
|
+
|
452
459
|
#### 🔄 Return<a id="🔄-return"></a>
|
453
460
|
|
454
461
|
[DocumentResponseList](./lib/carbon_ruby_sdk/models/document_response_list.rb)
|
@@ -1307,7 +1314,7 @@ result = carbon.integrations.connect_data_source(
|
|
1307
1314
|
"prepend_filename_to_chunks" => false,
|
1308
1315
|
"sync_files_on_connection" => true,
|
1309
1316
|
"set_page_as_boundary" => false,
|
1310
|
-
"request_id" => "
|
1317
|
+
"request_id" => "f5e8c193-f7e1-4e45-9be5-6aa157dfe3c3",
|
1311
1318
|
"enable_file_picker" => true,
|
1312
1319
|
"sync_source_items" => true,
|
1313
1320
|
"incremental_sync" => false,
|
@@ -1528,7 +1535,7 @@ result = carbon.integrations.get_oauth_url(
|
|
1528
1535
|
set_page_as_boundary: false,
|
1529
1536
|
data_source_id: 1,
|
1530
1537
|
connecting_new_account: false,
|
1531
|
-
request_id: "
|
1538
|
+
request_id: "c4055754-ba2d-4f57-a990-6e990abbbd90",
|
1532
1539
|
use_ocr: false,
|
1533
1540
|
parse_pdf_tables_with_ocr: false,
|
1534
1541
|
enable_file_picker: true,
|
@@ -1896,7 +1903,7 @@ result = carbon.integrations.sync_confluence(
|
|
1896
1903
|
prepend_filename_to_chunks: false,
|
1897
1904
|
max_items_per_chunk: 1,
|
1898
1905
|
set_page_as_boundary: false,
|
1899
|
-
request_id: "
|
1906
|
+
request_id: "991e89b6-1e71-41e1-bdc4-4dd475f21696",
|
1900
1907
|
use_ocr: false,
|
1901
1908
|
parse_pdf_tables_with_ocr: false,
|
1902
1909
|
incremental_sync: false,
|
@@ -2002,7 +2009,7 @@ result = carbon.integrations.sync_files(
|
|
2002
2009
|
prepend_filename_to_chunks: false,
|
2003
2010
|
max_items_per_chunk: 1,
|
2004
2011
|
set_page_as_boundary: false,
|
2005
|
-
request_id: "
|
2012
|
+
request_id: "991e89b6-1e71-41e1-bdc4-4dd475f21696",
|
2006
2013
|
use_ocr: false,
|
2007
2014
|
parse_pdf_tables_with_ocr: false,
|
2008
2015
|
incremental_sync: false,
|
@@ -131,9 +131,10 @@ 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<HelpdeskFileTypes>] Filter files based on their type at the source (for example help center tickets and articles)
|
134
135
|
# @param body [GetEmbeddingDocumentsBody]
|
135
136
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
136
|
-
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, extra: {})
|
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: {})
|
137
138
|
_body = {}
|
138
139
|
_body[:tags] = tags if tags != SENTINEL
|
139
140
|
_body[:query] = query if query != SENTINEL
|
@@ -153,6 +154,7 @@ module Carbon
|
|
153
154
|
_body[:include_file_level_metadata] = include_file_level_metadata if include_file_level_metadata != SENTINEL
|
154
155
|
_body[:high_accuracy] = high_accuracy if high_accuracy != SENTINEL
|
155
156
|
_body[:rerank] = rerank if rerank != SENTINEL
|
157
|
+
_body[:file_types_at_source] = file_types_at_source if file_types_at_source != SENTINEL
|
156
158
|
get_embedding_documents_body = _body
|
157
159
|
api_response = get_documents_with_http_info_impl(get_embedding_documents_body, extra)
|
158
160
|
api_response.data
|
@@ -273,9 +275,10 @@ module Carbon
|
|
273
275
|
# @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.
|
274
276
|
# @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.
|
275
277
|
# @param rerank [RerankParamsNullable]
|
278
|
+
# @param file_types_at_source [Array<HelpdeskFileTypes>] Filter files based on their type at the source (for example help center tickets and articles)
|
276
279
|
# @param body [GetEmbeddingDocumentsBody]
|
277
280
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
278
|
-
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, extra: {})
|
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: {})
|
279
282
|
_body = {}
|
280
283
|
_body[:tags] = tags if tags != SENTINEL
|
281
284
|
_body[:query] = query if query != SENTINEL
|
@@ -295,6 +298,7 @@ module Carbon
|
|
295
298
|
_body[:include_file_level_metadata] = include_file_level_metadata if include_file_level_metadata != SENTINEL
|
296
299
|
_body[:high_accuracy] = high_accuracy if high_accuracy != SENTINEL
|
297
300
|
_body[:rerank] = rerank if rerank != SENTINEL
|
301
|
+
_body[:file_types_at_source] = file_types_at_source if file_types_at_source != SENTINEL
|
298
302
|
get_embedding_documents_body = _body
|
299
303
|
get_documents_with_http_info_impl(get_embedding_documents_body, extra)
|
300
304
|
end
|
@@ -659,7 +659,7 @@ module Carbon
|
|
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: 'c4055754-ba2d-4f57-a990-6e990abbbd90', 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
|
@@ -727,7 +727,7 @@ module Carbon
|
|
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: 'c4055754-ba2d-4f57-a990-6e990abbbd90', 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
|
@@ -1646,7 +1646,7 @@ module Carbon
|
|
1646
1646
|
# @param file_sync_config [FileSyncConfigNullable]
|
1647
1647
|
# @param body [SyncFilesRequest]
|
1648
1648
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1649
|
-
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: '
|
1649
|
+
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: '991e89b6-1e71-41e1-bdc4-4dd475f21696', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
1650
1650
|
_body = {}
|
1651
1651
|
_body[:tags] = tags if tags != SENTINEL
|
1652
1652
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1696,7 +1696,7 @@ module Carbon
|
|
1696
1696
|
# @param file_sync_config [FileSyncConfigNullable]
|
1697
1697
|
# @param body [SyncFilesRequest]
|
1698
1698
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1699
|
-
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: '
|
1699
|
+
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: '991e89b6-1e71-41e1-bdc4-4dd475f21696', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
1700
1700
|
_body = {}
|
1701
1701
|
_body[:tags] = tags if tags != SENTINEL
|
1702
1702
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1904,7 +1904,7 @@ module Carbon
|
|
1904
1904
|
# @param file_sync_config [FileSyncConfigNullable]
|
1905
1905
|
# @param body [SyncFilesRequest]
|
1906
1906
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1907
|
-
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: '
|
1907
|
+
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: '991e89b6-1e71-41e1-bdc4-4dd475f21696', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
1908
1908
|
_body = {}
|
1909
1909
|
_body[:tags] = tags if tags != SENTINEL
|
1910
1910
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1952,7 +1952,7 @@ module Carbon
|
|
1952
1952
|
# @param file_sync_config [FileSyncConfigNullable]
|
1953
1953
|
# @param body [SyncFilesRequest]
|
1954
1954
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1955
|
-
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: '
|
1955
|
+
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: '991e89b6-1e71-41e1-bdc4-4dd475f21696', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
1956
1956
|
_body = {}
|
1957
1957
|
_body[:tags] = tags if tags != SENTINEL
|
1958
1958
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -61,6 +61,9 @@ module Carbon
|
|
61
61
|
|
62
62
|
attr_accessor :rerank
|
63
63
|
|
64
|
+
# Filter files based on their type at the source (for example help center tickets and articles)
|
65
|
+
attr_accessor :file_types_at_source
|
66
|
+
|
64
67
|
# Attribute mapping from ruby-style variable name to JSON key.
|
65
68
|
def self.attribute_map
|
66
69
|
{
|
@@ -81,7 +84,8 @@ module Carbon
|
|
81
84
|
:'embedding_model' => :'embedding_model',
|
82
85
|
:'include_file_level_metadata' => :'include_file_level_metadata',
|
83
86
|
:'high_accuracy' => :'high_accuracy',
|
84
|
-
:'rerank' => :'rerank'
|
87
|
+
:'rerank' => :'rerank',
|
88
|
+
:'file_types_at_source' => :'file_types_at_source'
|
85
89
|
}
|
86
90
|
end
|
87
91
|
|
@@ -110,7 +114,8 @@ module Carbon
|
|
110
114
|
:'embedding_model' => :'EmbeddingGeneratorsNullable',
|
111
115
|
:'include_file_level_metadata' => :'Boolean',
|
112
116
|
:'high_accuracy' => :'Boolean',
|
113
|
-
:'rerank' => :'RerankParamsNullable'
|
117
|
+
:'rerank' => :'RerankParamsNullable',
|
118
|
+
:'file_types_at_source' => :'Array<HelpdeskFileTypes>'
|
114
119
|
}
|
115
120
|
end
|
116
121
|
|
@@ -131,7 +136,8 @@ module Carbon
|
|
131
136
|
:'embedding_model',
|
132
137
|
:'include_file_level_metadata',
|
133
138
|
:'high_accuracy',
|
134
|
-
:'rerank'
|
139
|
+
:'rerank',
|
140
|
+
:'file_types_at_source'
|
135
141
|
])
|
136
142
|
end
|
137
143
|
|
@@ -237,6 +243,12 @@ module Carbon
|
|
237
243
|
if attributes.key?(:'rerank')
|
238
244
|
self.rerank = attributes[:'rerank']
|
239
245
|
end
|
246
|
+
|
247
|
+
if attributes.key?(:'file_types_at_source')
|
248
|
+
if (value = attributes[:'file_types_at_source']).is_a?(Array)
|
249
|
+
self.file_types_at_source = value
|
250
|
+
end
|
251
|
+
end
|
240
252
|
end
|
241
253
|
|
242
254
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -322,7 +334,8 @@ module Carbon
|
|
322
334
|
embedding_model == o.embedding_model &&
|
323
335
|
include_file_level_metadata == o.include_file_level_metadata &&
|
324
336
|
high_accuracy == o.high_accuracy &&
|
325
|
-
rerank == o.rerank
|
337
|
+
rerank == o.rerank &&
|
338
|
+
file_types_at_source == o.file_types_at_source
|
326
339
|
end
|
327
340
|
|
328
341
|
# @see the `==` method
|
@@ -334,7 +347,7 @@ module Carbon
|
|
334
347
|
# Calculates hash code according to all attributes.
|
335
348
|
# @return [Integer] Hash code
|
336
349
|
def hash
|
337
|
-
[tags, query, query_vector, k, file_ids, parent_file_ids, include_all_children, tags_v2, include_tags, include_vectors, include_raw_file, hybrid_search, hybrid_search_tuning_parameters, media_type, embedding_model, include_file_level_metadata, high_accuracy, rerank].hash
|
350
|
+
[tags, query, query_vector, k, file_ids, parent_file_ids, include_all_children, tags_v2, include_tags, include_vectors, include_raw_file, hybrid_search, hybrid_search_tuning_parameters, media_type, embedding_model, include_file_level_metadata, high_accuracy, rerank, file_types_at_source].hash
|
338
351
|
end
|
339
352
|
|
340
353
|
# Builds the object from hash
|
@@ -279,7 +279,7 @@ module Carbon
|
|
279
279
|
if attributes.key?(:'request_id')
|
280
280
|
self.request_id = attributes[:'request_id']
|
281
281
|
else
|
282
|
-
self.request_id = '
|
282
|
+
self.request_id = 'c4055754-ba2d-4f57-a990-6e990abbbd90'
|
283
283
|
end
|
284
284
|
|
285
285
|
if attributes.key?(:'use_ocr')
|
@@ -59,6 +59,9 @@ module Carbon
|
|
59
59
|
# The external URLs of the files. The query will return files with these external URLs.
|
60
60
|
attr_accessor :external_urls
|
61
61
|
|
62
|
+
# Filter files based on their type at the source (for example help center tickets and articles)
|
63
|
+
attr_accessor :file_types_at_source
|
64
|
+
|
62
65
|
# Attribute mapping from ruby-style variable name to JSON key.
|
63
66
|
def self.attribute_map
|
64
67
|
{
|
@@ -78,7 +81,8 @@ module Carbon
|
|
78
81
|
:'request_ids' => :'request_ids',
|
79
82
|
:'sync_error_message' => :'sync_error_message',
|
80
83
|
:'include_containers' => :'include_containers',
|
81
|
-
:'external_urls' => :'external_urls'
|
84
|
+
:'external_urls' => :'external_urls',
|
85
|
+
:'file_types_at_source' => :'file_types_at_source'
|
82
86
|
}
|
83
87
|
end
|
84
88
|
|
@@ -106,7 +110,8 @@ module Carbon
|
|
106
110
|
:'request_ids' => :'Array<String>',
|
107
111
|
:'sync_error_message' => :'String',
|
108
112
|
:'include_containers' => :'Boolean',
|
109
|
-
:'external_urls' => :'Array<String>'
|
113
|
+
:'external_urls' => :'Array<String>',
|
114
|
+
:'file_types_at_source' => :'Array<HelpdeskFileTypes>'
|
110
115
|
}
|
111
116
|
end
|
112
117
|
|
@@ -127,7 +132,8 @@ module Carbon
|
|
127
132
|
:'request_ids',
|
128
133
|
:'sync_error_message',
|
129
134
|
:'include_containers',
|
130
|
-
:'external_urls'
|
135
|
+
:'external_urls',
|
136
|
+
:'file_types_at_source'
|
131
137
|
])
|
132
138
|
end
|
133
139
|
|
@@ -235,6 +241,12 @@ module Carbon
|
|
235
241
|
self.external_urls = value
|
236
242
|
end
|
237
243
|
end
|
244
|
+
|
245
|
+
if attributes.key?(:'file_types_at_source')
|
246
|
+
if (value = attributes[:'file_types_at_source']).is_a?(Array)
|
247
|
+
self.file_types_at_source = value
|
248
|
+
end
|
249
|
+
end
|
238
250
|
end
|
239
251
|
|
240
252
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -286,7 +298,8 @@ module Carbon
|
|
286
298
|
request_ids == o.request_ids &&
|
287
299
|
sync_error_message == o.sync_error_message &&
|
288
300
|
include_containers == o.include_containers &&
|
289
|
-
external_urls == o.external_urls
|
301
|
+
external_urls == o.external_urls &&
|
302
|
+
file_types_at_source == o.file_types_at_source
|
290
303
|
end
|
291
304
|
|
292
305
|
# @see the `==` method
|
@@ -298,7 +311,7 @@ module Carbon
|
|
298
311
|
# Calculates hash code according to all attributes.
|
299
312
|
# @return [Integer] Hash code
|
300
313
|
def hash
|
301
|
-
[tags, source, name, tags_v2, ids, external_file_ids, sync_statuses, parent_file_ids, organization_user_data_source_id, embedding_generators, root_files_only, include_all_children, non_synced_only, request_ids, sync_error_message, include_containers, external_urls].hash
|
314
|
+
[tags, source, name, tags_v2, ids, external_file_ids, sync_statuses, parent_file_ids, organization_user_data_source_id, embedding_generators, root_files_only, include_all_children, non_synced_only, request_ids, sync_error_message, include_containers, external_urls, file_types_at_source].hash
|
302
315
|
end
|
303
316
|
|
304
317
|
# Builds the object from hash
|
@@ -114,7 +114,7 @@ module Carbon
|
|
114
114
|
# Check to see if the all the properties in the model are valid
|
115
115
|
# @return true if the model is valid
|
116
116
|
def valid?
|
117
|
-
webhook_type_validator = EnumAttributeValidator.new('String', ["ALL_UPLOADED_FILES_QUEUED", "CHECKUP", "DATA_SOURCE_READY", "FILES_CREATED", "FILES_SKIPPED", "FILE_DELETED", "FILE_ERROR", "FILE_READY", "FILE_STATISTICS_AGGREGATED", "FILE_SYNC_LIMIT_REACHED", "ORGANIZATION_USER_DELETED", "RATE_LIMIT_ERROR", "SPARSE_VECTOR_QUEUE_STATUS", "WEBPAGE_ERROR", "WEBPAGE_READY", "WEBSCRAPE_URLS_READY"])
|
117
|
+
webhook_type_validator = EnumAttributeValidator.new('String', ["ADD", "ALL_UPLOADED_FILES_QUEUED", "CANCEL", "CHECKUP", "DATA_SOURCE_READY", "FILES_CREATED", "FILES_SKIPPED", "FILE_DELETED", "FILE_ERROR", "FILE_READY", "FILE_STATISTICS_AGGREGATED", "FILE_SYNC_LIMIT_REACHED", "ORGANIZATION_USER_DELETED", "RATE_LIMIT_ERROR", "REVOKE", "SPARSE_VECTOR_QUEUE_STATUS", "UPDATE", "WEBPAGE_ERROR", "WEBPAGE_READY", "WEBSCRAPE_URLS_READY"])
|
118
118
|
return false unless webhook_type_validator.valid?(@webhook_type)
|
119
119
|
true
|
120
120
|
end
|
@@ -122,7 +122,7 @@ module Carbon
|
|
122
122
|
# Custom attribute writer method checking allowed values (enum).
|
123
123
|
# @param [Object] webhook_type Object to be assigned
|
124
124
|
def webhook_type=(webhook_type)
|
125
|
-
validator = EnumAttributeValidator.new('String', ["ALL_UPLOADED_FILES_QUEUED", "CHECKUP", "DATA_SOURCE_READY", "FILES_CREATED", "FILES_SKIPPED", "FILE_DELETED", "FILE_ERROR", "FILE_READY", "FILE_STATISTICS_AGGREGATED", "FILE_SYNC_LIMIT_REACHED", "ORGANIZATION_USER_DELETED", "RATE_LIMIT_ERROR", "SPARSE_VECTOR_QUEUE_STATUS", "WEBPAGE_ERROR", "WEBPAGE_READY", "WEBSCRAPE_URLS_READY"])
|
125
|
+
validator = EnumAttributeValidator.new('String', ["ADD", "ALL_UPLOADED_FILES_QUEUED", "CANCEL", "CHECKUP", "DATA_SOURCE_READY", "FILES_CREATED", "FILES_SKIPPED", "FILE_DELETED", "FILE_ERROR", "FILE_READY", "FILE_STATISTICS_AGGREGATED", "FILE_SYNC_LIMIT_REACHED", "ORGANIZATION_USER_DELETED", "RATE_LIMIT_ERROR", "REVOKE", "SPARSE_VECTOR_QUEUE_STATUS", "UPDATE", "WEBPAGE_ERROR", "WEBPAGE_READY", "WEBSCRAPE_URLS_READY"])
|
126
126
|
unless validator.valid?(webhook_type)
|
127
127
|
fail ArgumentError, "invalid value for \"webhook_type\", must be one of #{validator.allowable_values}."
|
128
128
|
end
|
@@ -187,7 +187,7 @@ module Carbon
|
|
187
187
|
if attributes.key?(:'request_id')
|
188
188
|
self.request_id = attributes[:'request_id']
|
189
189
|
else
|
190
|
-
self.request_id = '
|
190
|
+
self.request_id = '991e89b6-1e71-41e1-bdc4-4dd475f21696'
|
191
191
|
end
|
192
192
|
|
193
193
|
if attributes.key?(:'use_ocr')
|
@@ -182,7 +182,7 @@ module Carbon
|
|
182
182
|
if attributes.key?(:'request_id')
|
183
183
|
self.request_id = attributes[:'request_id']
|
184
184
|
else
|
185
|
-
self.request_id = '
|
185
|
+
self.request_id = 'f5e8c193-f7e1-4e45-9be5-6aa157dfe3c3'
|
186
186
|
end
|
187
187
|
|
188
188
|
if attributes.key?(:'enable_file_picker')
|
@@ -127,4 +127,10 @@ describe Carbon::GetEmbeddingDocumentsBody do
|
|
127
127
|
end
|
128
128
|
end
|
129
129
|
|
130
|
+
describe 'test attribute "file_types_at_source"' do
|
131
|
+
it 'should work' do
|
132
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
130
136
|
end
|
@@ -121,4 +121,10 @@ describe Carbon::OrganizationUserFilesToSyncFilters do
|
|
121
121
|
end
|
122
122
|
end
|
123
123
|
|
124
|
+
describe 'test attribute "file_types_at_source"' do
|
125
|
+
it 'should work' do
|
126
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
124
130
|
end
|
@@ -22,7 +22,7 @@ describe Carbon::SentWebhookPayload do
|
|
22
22
|
describe 'test attribute "webhook_type"' do
|
23
23
|
it 'should work' do
|
24
24
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
25
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ALL_UPLOADED_FILES_QUEUED", "CHECKUP", "DATA_SOURCE_READY", "FILES_CREATED", "FILES_SKIPPED", "FILE_DELETED", "FILE_ERROR", "FILE_READY", "FILE_STATISTICS_AGGREGATED", "FILE_SYNC_LIMIT_REACHED", "ORGANIZATION_USER_DELETED", "RATE_LIMIT_ERROR", "SPARSE_VECTOR_QUEUE_STATUS", "WEBPAGE_ERROR", "WEBPAGE_READY", "WEBSCRAPE_URLS_READY"])
|
25
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ADD", "ALL_UPLOADED_FILES_QUEUED", "CANCEL", "CHECKUP", "DATA_SOURCE_READY", "FILES_CREATED", "FILES_SKIPPED", "FILE_DELETED", "FILE_ERROR", "FILE_READY", "FILE_STATISTICS_AGGREGATED", "FILE_SYNC_LIMIT_REACHED", "ORGANIZATION_USER_DELETED", "RATE_LIMIT_ERROR", "REVOKE", "SPARSE_VECTOR_QUEUE_STATUS", "UPDATE", "WEBPAGE_ERROR", "WEBPAGE_READY", "WEBSCRAPE_URLS_READY"])
|
26
26
|
# validator.allowable_values.each do |value|
|
27
27
|
# expect { instance.webhook_type = value }.not_to raise_error
|
28
28
|
# end
|