carbon_ruby_sdk 0.1.16 → 0.1.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b9c59c27e714c201ab1212acc804208dfaedf059bad3f9d5043f51ed9ec9feb
4
- data.tar.gz: eef702a430ef7bee9eb012cb5041e0edf25edfabe42716c9149c06f11c01e225
3
+ metadata.gz: 839fe56ac65336fa1bdf96a70f15650082dea496ad4a4c0b51a8b233fad54809
4
+ data.tar.gz: b5cbd86d98e6f0cf33b2aae90dd92a25cacdc3d669177699afe9529360749cc0
5
5
  SHA512:
6
- metadata.gz: c05fe1d2089fafbf63df59c8eb207c0ebc8586bcc4c77fc280834f189f9eb607557e13af512f2f7a43baf91fc3a9c64b490d0d95bae29857a6e833aea04f3ea3
7
- data.tar.gz: f90d950b0c378bd7b732be4775c92f775d368674c033d9abf8d06930cc13ccea1b43e920e3d13756175872d470da72bea1d803e5c73ffe0636ed584966e3e337
6
+ metadata.gz: e0e78234fde535d43ec86edf82d88664c26576fdd58e9eb92c149d5785a2a2502da89ba4063798107b60603f39828294c4e8fd7229de9d4bb8af765e51b69f1c
7
+ data.tar.gz: 88af831f2ba0f5e216daaa6166889195757df579c401fd76bb28c61219a11c26d6ed05dce7b7d696b6ce9899d6b918d5f5560996d43f5a619d1859fcbd511fb7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- carbon_ruby_sdk (0.1.15)
4
+ carbon_ruby_sdk (0.1.18)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
@@ -42,7 +42,7 @@ GEM
42
42
  rainbow (3.1.1)
43
43
  rake (13.0.6)
44
44
  regexp_parser (2.9.0)
45
- reline (0.5.0)
45
+ reline (0.4.2)
46
46
  io-console (~> 0.5)
47
47
  rexml (3.2.6)
48
48
  rspec (3.13.0)
@@ -67,14 +67,14 @@ GEM
67
67
  rubocop-ast (>= 1.2.0, < 2.0)
68
68
  ruby-progressbar (~> 1.7)
69
69
  unicode-display_width (>= 1.4.0, < 3.0)
70
- rubocop-ast (1.31.2)
71
- parser (>= 3.3.0.4)
70
+ rubocop-ast (1.30.0)
71
+ parser (>= 3.2.1.0)
72
72
  ruby-progressbar (1.13.0)
73
73
  unicode-display_width (2.5.0)
74
74
  uri (0.13.0)
75
75
 
76
76
  PLATFORMS
77
- arm64-darwin-22
77
+ arm64-darwin-21
78
78
 
79
79
  DEPENDENCIES
80
80
  carbon_ruby_sdk!
@@ -86,4 +86,4 @@ DEPENDENCIES
86
86
  rubocop (~> 1.12.1)
87
87
 
88
88
  BUNDLED WITH
89
- 2.4.19
89
+ 2.3.7
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.1.16-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.1.16)
9
+ [![npm](https://img.shields.io/badge/gem-v0.1.18-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.1.18)
10
10
 
11
11
  </div>
12
12
 
@@ -80,7 +80,7 @@ Connect external data to LLMs, no matter the source.
80
80
  Add to Gemfile:
81
81
 
82
82
  ```ruby
83
- gem 'carbon_ruby_sdk', '~> 0.1.16'
83
+ gem 'carbon_ruby_sdk', '~> 0.1.18'
84
84
  ```
85
85
 
86
86
  ## Getting Started<a id="getting-started"></a>
@@ -356,6 +356,7 @@ result = carbon.embeddings.get_documents(
356
356
  parent_file_ids: [
357
357
  1
358
358
  ],
359
+ include_all_children: false,
359
360
  tags_v2: {
360
361
  },
361
362
  include_tags: true,
@@ -397,6 +398,10 @@ Optional list of file IDs to limit the search to
397
398
  Optional list of parent file IDs to limit the search to. A parent file describes
398
399
  a file to which another file belongs (e.g. a folder)
399
400
 
401
+ ##### include_all_children: `Boolean`<a id="include_all_children-boolean"></a>
402
+ Flag to control whether or not to include all children of filtered files in the
403
+ embedding search.
404
+
400
405
  ##### tags_v2: `Object`<a id="tags_v2-object"></a>
401
406
  A set of tags to limit the search to. Use this instead of `tags`, which is
402
407
  deprecated.
@@ -1186,6 +1191,7 @@ result = carbon.integrations.connect_data_source(
1186
1191
  "prepend_filename_to_chunks" => false,
1187
1192
  "sync_files_on_connection" => true,
1188
1193
  "set_page_as_boundary" => false,
1194
+ "enable_file_picker" => true,
1189
1195
  },
1190
1196
  )
1191
1197
  p result
@@ -1383,6 +1389,7 @@ result = carbon.integrations.get_oauth_url(
1383
1389
  request_id: "string_example",
1384
1390
  use_ocr: false,
1385
1391
  parse_pdf_tables_with_ocr: false,
1392
+ enable_file_picker: true,
1386
1393
  )
1387
1394
  p result
1388
1395
  ```
@@ -1430,6 +1437,10 @@ OAuth URL
1430
1437
  Enable OCR for files that support it. Supported formats: pdf
1431
1438
 
1432
1439
  ##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
1440
+ ##### enable_file_picker: `Boolean`<a id="enable_file_picker-boolean"></a>
1441
+ Enable integration's file picker for sources that support it. Supported sources:
1442
+ GOOGLE_DRIVE, ONEDRIVE, BOX, SHAREPOINT, DROPBOX
1443
+
1433
1444
  #### 🔄 Return<a id="🔄-return"></a>
1434
1445
 
1435
1446
  [OuthURLResponse](./lib/carbon_ruby_sdk/models/outh_url_response.rb)
@@ -2265,7 +2276,8 @@ result = carbon.users.update_users(
2265
2276
  auto_sync_enabled_sources: [
2266
2277
  "string_example"
2267
2278
  ],
2268
- file_upload_limit: 1,
2279
+ max_files: -1,
2280
+ max_files_per_upload: -1,
2269
2281
  )
2270
2282
  p result
2271
2283
  ```
@@ -2276,9 +2288,15 @@ p result
2276
2288
  List of organization supplied user IDs
2277
2289
 
2278
2290
  ##### auto_sync_enabled_sources: [`AutoSyncEnabledSourcesProperty`](./lib/carbon_ruby_sdk/models/auto_sync_enabled_sources_property.rb)<a id="auto_sync_enabled_sources-autosyncenabledsourcespropertylibcarbon_ruby_sdkmodelsauto_sync_enabled_sources_propertyrb"></a>
2279
- ##### file_upload_limit: `Integer`<a id="file_upload_limit-integer"></a>
2280
- Custom file upload limit for the user. If set, then the user will not be allowed
2281
- to upload more files than this limit
2291
+ ##### max_files: `Integer`<a id="max_files-integer"></a>
2292
+ Custom file upload limit for the user over *all* user's files across all
2293
+ uploads. If set, then the user will not be allowed to upload more files than
2294
+ this limit. If not set, or if set to -1, then the user will have no limit.
2295
+
2296
+ ##### max_files_per_upload: `Integer`<a id="max_files_per_upload-integer"></a>
2297
+ Custom file upload limit for the user across a single upload. If set, then the
2298
+ user will not be allowed to upload more files than this limit in a single
2299
+ upload. If not set, or if set to -1, then the user will have no limit.
2282
2300
 
2283
2301
  #### 🔄 Return<a id="🔄-return"></a>
2284
2302
 
@@ -119,6 +119,7 @@ module Carbon
119
119
  # @param query_vector [Array<Float>] Optional query vector for which to get related chunks and embeddings. It must have been generated by the same model used to generate the embeddings across which the search is being conducted. Cannot provide both `query` and `query_vector`.
120
120
  # @param file_ids [Array<Integer>] Optional list of file IDs to limit the search to
121
121
  # @param parent_file_ids [Array<Integer>] Optional list of parent file IDs to limit the search to. A parent file describes a file to which another file belongs (e.g. a folder)
122
+ # @param include_all_children [Boolean] Flag to control whether or not to include all children of filtered files in the embedding search.
122
123
  # @param tags_v2 [Object] A set of tags to limit the search to. Use this instead of `tags`, which is deprecated.
123
124
  # @param include_tags [Boolean] Flag to control whether or not to include tags for each chunk in the response.
124
125
  # @param include_vectors [Boolean] Flag to control whether or not to include embedding vectors in the response.
@@ -129,7 +130,7 @@ module Carbon
129
130
  # @param embedding_model [EmbeddingGeneratorsNullable]
130
131
  # @param body [GetEmbeddingDocumentsBody]
131
132
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
132
- def get_documents(query:, k:, tags: SENTINEL, query_vector: SENTINEL, file_ids: SENTINEL, parent_file_ids: SENTINEL, tags_v2: SENTINEL, include_tags: SENTINEL, include_vectors: SENTINEL, include_raw_file: SENTINEL, hybrid_search: SENTINEL, hybrid_search_tuning_parameters: SENTINEL, media_type: 'TEXT', embedding_model: 'OPENAI', extra: {})
133
+ 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: 'TEXT', embedding_model: 'OPENAI', extra: {})
133
134
  _body = {}
134
135
  _body[:tags] = tags if tags != SENTINEL
135
136
  _body[:query] = query if query != SENTINEL
@@ -137,6 +138,7 @@ module Carbon
137
138
  _body[:k] = k if k != SENTINEL
138
139
  _body[:file_ids] = file_ids if file_ids != SENTINEL
139
140
  _body[:parent_file_ids] = parent_file_ids if parent_file_ids != SENTINEL
141
+ _body[:include_all_children] = include_all_children if include_all_children != SENTINEL
140
142
  _body[:tags_v2] = tags_v2 if tags_v2 != SENTINEL
141
143
  _body[:include_tags] = include_tags if include_tags != SENTINEL
142
144
  _body[:include_vectors] = include_vectors if include_vectors != SENTINEL
@@ -253,6 +255,7 @@ module Carbon
253
255
  # @param query_vector [Array<Float>] Optional query vector for which to get related chunks and embeddings. It must have been generated by the same model used to generate the embeddings across which the search is being conducted. Cannot provide both `query` and `query_vector`.
254
256
  # @param file_ids [Array<Integer>] Optional list of file IDs to limit the search to
255
257
  # @param parent_file_ids [Array<Integer>] Optional list of parent file IDs to limit the search to. A parent file describes a file to which another file belongs (e.g. a folder)
258
+ # @param include_all_children [Boolean] Flag to control whether or not to include all children of filtered files in the embedding search.
256
259
  # @param tags_v2 [Object] A set of tags to limit the search to. Use this instead of `tags`, which is deprecated.
257
260
  # @param include_tags [Boolean] Flag to control whether or not to include tags for each chunk in the response.
258
261
  # @param include_vectors [Boolean] Flag to control whether or not to include embedding vectors in the response.
@@ -263,7 +266,7 @@ module Carbon
263
266
  # @param embedding_model [EmbeddingGeneratorsNullable]
264
267
  # @param body [GetEmbeddingDocumentsBody]
265
268
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
266
- def get_documents_with_http_info(query:, k:, tags: SENTINEL, query_vector: SENTINEL, file_ids: SENTINEL, parent_file_ids: SENTINEL, tags_v2: SENTINEL, include_tags: SENTINEL, include_vectors: SENTINEL, include_raw_file: SENTINEL, hybrid_search: SENTINEL, hybrid_search_tuning_parameters: SENTINEL, media_type: 'TEXT', embedding_model: 'OPENAI', extra: {})
269
+ 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: 'TEXT', embedding_model: 'OPENAI', extra: {})
267
270
  _body = {}
268
271
  _body[:tags] = tags if tags != SENTINEL
269
272
  _body[:query] = query if query != SENTINEL
@@ -271,6 +274,7 @@ module Carbon
271
274
  _body[:k] = k if k != SENTINEL
272
275
  _body[:file_ids] = file_ids if file_ids != SENTINEL
273
276
  _body[:parent_file_ids] = parent_file_ids if parent_file_ids != SENTINEL
277
+ _body[:include_all_children] = include_all_children if include_all_children != SENTINEL
274
278
  _body[:tags_v2] = tags_v2 if tags_v2 != SENTINEL
275
279
  _body[:include_tags] = include_tags if include_tags != SENTINEL
276
280
  _body[:include_vectors] = include_vectors if include_vectors != SENTINEL
@@ -545,9 +545,10 @@ module Carbon
545
545
  # @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
546
546
  # @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
547
547
  # @param parse_pdf_tables_with_ocr [Boolean]
548
+ # @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: GOOGLE_DRIVE, ONEDRIVE, BOX, SHAREPOINT, DROPBOX
548
549
  # @param body [OAuthURLRequest]
549
550
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
550
- def get_oauth_url(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
551
+ def get_oauth_url(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, extra: {})
551
552
  _body = {}
552
553
  _body[:tags] = tags if tags != SENTINEL
553
554
  _body[:scope] = scope if scope != SENTINEL
@@ -571,6 +572,7 @@ module Carbon
571
572
  _body[:request_id] = request_id if request_id != SENTINEL
572
573
  _body[:use_ocr] = use_ocr if use_ocr != SENTINEL
573
574
  _body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
575
+ _body[:enable_file_picker] = enable_file_picker if enable_file_picker != SENTINEL
574
576
  o_auth_url_request = _body
575
577
  api_response = get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
576
578
  api_response.data
@@ -605,9 +607,10 @@ module Carbon
605
607
  # @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
606
608
  # @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
607
609
  # @param parse_pdf_tables_with_ocr [Boolean]
610
+ # @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: GOOGLE_DRIVE, ONEDRIVE, BOX, SHAREPOINT, DROPBOX
608
611
  # @param body [OAuthURLRequest]
609
612
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
610
- def get_oauth_url_with_http_info(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
613
+ def get_oauth_url_with_http_info(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, extra: {})
611
614
  _body = {}
612
615
  _body[:tags] = tags if tags != SENTINEL
613
616
  _body[:scope] = scope if scope != SENTINEL
@@ -631,6 +634,7 @@ module Carbon
631
634
  _body[:request_id] = request_id if request_id != SENTINEL
632
635
  _body[:use_ocr] = use_ocr if use_ocr != SENTINEL
633
636
  _body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
637
+ _body[:enable_file_picker] = enable_file_picker if enable_file_picker != SENTINEL
634
638
  o_auth_url_request = _body
635
639
  get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
636
640
  end
@@ -300,14 +300,16 @@ module Carbon
300
300
  #
301
301
  # @param customer_ids [Array<String>] List of organization supplied user IDs
302
302
  # @param auto_sync_enabled_sources [AutoSyncEnabledSourcesProperty]
303
- # @param file_upload_limit [Integer] Custom file upload limit for the user. If set, then the user will not be allowed to upload more files than this limit
303
+ # @param max_files [Integer] Custom file upload limit for the user over *all* user's files across all uploads. If set, then the user will not be allowed to upload more files than this limit. If not set, or if set to -1, then the user will have no limit.
304
+ # @param max_files_per_upload [Integer] Custom file upload limit for the user across a single upload. If set, then the user will not be allowed to upload more files than this limit in a single upload. If not set, or if set to -1, then the user will have no limit.
304
305
  # @param body [UpdateUsersInput]
305
306
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
306
- def update_users(customer_ids:, auto_sync_enabled_sources: SENTINEL, file_upload_limit: SENTINEL, extra: {})
307
+ def update_users(customer_ids:, auto_sync_enabled_sources: SENTINEL, max_files: SENTINEL, max_files_per_upload: SENTINEL, extra: {})
307
308
  _body = {}
308
309
  _body[:customer_ids] = customer_ids if customer_ids != SENTINEL
309
310
  _body[:auto_sync_enabled_sources] = auto_sync_enabled_sources if auto_sync_enabled_sources != SENTINEL
310
- _body[:file_upload_limit] = file_upload_limit if file_upload_limit != SENTINEL
311
+ _body[:max_files] = max_files if max_files != SENTINEL
312
+ _body[:max_files_per_upload] = max_files_per_upload if max_files_per_upload != SENTINEL
311
313
  update_users_input = _body
312
314
  api_response = update_users_with_http_info_impl(update_users_input, extra)
313
315
  api_response.data
@@ -317,14 +319,16 @@ module Carbon
317
319
  #
318
320
  # @param customer_ids [Array<String>] List of organization supplied user IDs
319
321
  # @param auto_sync_enabled_sources [AutoSyncEnabledSourcesProperty]
320
- # @param file_upload_limit [Integer] Custom file upload limit for the user. If set, then the user will not be allowed to upload more files than this limit
322
+ # @param max_files [Integer] Custom file upload limit for the user over *all* user's files across all uploads. If set, then the user will not be allowed to upload more files than this limit. If not set, or if set to -1, then the user will have no limit.
323
+ # @param max_files_per_upload [Integer] Custom file upload limit for the user across a single upload. If set, then the user will not be allowed to upload more files than this limit in a single upload. If not set, or if set to -1, then the user will have no limit.
321
324
  # @param body [UpdateUsersInput]
322
325
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
323
- def update_users_with_http_info(customer_ids:, auto_sync_enabled_sources: SENTINEL, file_upload_limit: SENTINEL, extra: {})
326
+ def update_users_with_http_info(customer_ids:, auto_sync_enabled_sources: SENTINEL, max_files: SENTINEL, max_files_per_upload: SENTINEL, extra: {})
324
327
  _body = {}
325
328
  _body[:customer_ids] = customer_ids if customer_ids != SENTINEL
326
329
  _body[:auto_sync_enabled_sources] = auto_sync_enabled_sources if auto_sync_enabled_sources != SENTINEL
327
- _body[:file_upload_limit] = file_upload_limit if file_upload_limit != SENTINEL
330
+ _body[:max_files] = max_files if max_files != SENTINEL
331
+ _body[:max_files_per_upload] = max_files_per_upload if max_files_per_upload != SENTINEL
328
332
  update_users_input = _body
329
333
  update_users_with_http_info_impl(update_users_input, extra)
330
334
  end
@@ -43,6 +43,7 @@ module Carbon
43
43
  SALESFORCE = "SALESFORCE".freeze
44
44
  JPG = "JPG".freeze
45
45
  PNG = "PNG".freeze
46
+ JPEG = "JPEG".freeze
46
47
  MP3 = "MP3".freeze
47
48
  MP4 = "MP4".freeze
48
49
  MP2 = "MP2".freeze
@@ -56,7 +57,7 @@ module Carbon
56
57
  WEBM = "WEBM".freeze
57
58
 
58
59
  def self.all_vars
59
- @all_vars ||= [GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, JPG, PNG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
60
+ @all_vars ||= [GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, JPG, PNG, JPEG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
60
61
  end
61
62
 
62
63
  # Builds the enum from string
@@ -43,6 +43,7 @@ module Carbon
43
43
  SALESFORCE = "SALESFORCE".freeze
44
44
  JPG = "JPG".freeze
45
45
  PNG = "PNG".freeze
46
+ JPEG = "JPEG".freeze
46
47
  MP3 = "MP3".freeze
47
48
  MP4 = "MP4".freeze
48
49
  MP2 = "MP2".freeze
@@ -56,7 +57,7 @@ module Carbon
56
57
  WEBM = "WEBM".freeze
57
58
 
58
59
  def self.all_vars
59
- @all_vars ||= [GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, JPG, PNG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
60
+ @all_vars ||= [GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, JPG, PNG, JPEG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
60
61
  end
61
62
 
62
63
  # Builds the enum from string
@@ -29,6 +29,9 @@ module Carbon
29
29
  # Optional list of parent file IDs to limit the search to. A parent file describes a file to which another file belongs (e.g. a folder)
30
30
  attr_accessor :parent_file_ids
31
31
 
32
+ # Flag to control whether or not to include all children of filtered files in the embedding search.
33
+ attr_accessor :include_all_children
34
+
32
35
  # A set of tags to limit the search to. Use this instead of `tags`, which is deprecated.
33
36
  attr_accessor :tags_v2
34
37
 
@@ -60,6 +63,7 @@ module Carbon
60
63
  :'k' => :'k',
61
64
  :'file_ids' => :'file_ids',
62
65
  :'parent_file_ids' => :'parent_file_ids',
66
+ :'include_all_children' => :'include_all_children',
63
67
  :'tags_v2' => :'tags_v2',
64
68
  :'include_tags' => :'include_tags',
65
69
  :'include_vectors' => :'include_vectors',
@@ -85,6 +89,7 @@ module Carbon
85
89
  :'k' => :'Integer',
86
90
  :'file_ids' => :'Array<Integer>',
87
91
  :'parent_file_ids' => :'Array<Integer>',
92
+ :'include_all_children' => :'Boolean',
88
93
  :'tags_v2' => :'Object',
89
94
  :'include_tags' => :'Boolean',
90
95
  :'include_vectors' => :'Boolean',
@@ -161,6 +166,12 @@ module Carbon
161
166
  end
162
167
  end
163
168
 
169
+ if attributes.key?(:'include_all_children')
170
+ self.include_all_children = attributes[:'include_all_children']
171
+ else
172
+ self.include_all_children = false
173
+ end
174
+
164
175
  if attributes.key?(:'tags_v2')
165
176
  self.tags_v2 = attributes[:'tags_v2']
166
177
  end
@@ -270,6 +281,7 @@ module Carbon
270
281
  k == o.k &&
271
282
  file_ids == o.file_ids &&
272
283
  parent_file_ids == o.parent_file_ids &&
284
+ include_all_children == o.include_all_children &&
273
285
  tags_v2 == o.tags_v2 &&
274
286
  include_tags == o.include_tags &&
275
287
  include_vectors == o.include_vectors &&
@@ -289,7 +301,7 @@ module Carbon
289
301
  # Calculates hash code according to all attributes.
290
302
  # @return [Integer] Hash code
291
303
  def hash
292
- [tags, query, query_vector, k, file_ids, parent_file_ids, tags_v2, include_tags, include_vectors, include_raw_file, hybrid_search, hybrid_search_tuning_parameters, media_type, embedding_model].hash
304
+ [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].hash
293
305
  end
294
306
 
295
307
  # Builds the object from hash
@@ -61,6 +61,9 @@ module Carbon
61
61
 
62
62
  attr_accessor :parse_pdf_tables_with_ocr
63
63
 
64
+ # Enable integration's file picker for sources that support it. Supported sources: GOOGLE_DRIVE, ONEDRIVE, BOX, SHAREPOINT, DROPBOX
65
+ attr_accessor :enable_file_picker
66
+
64
67
  # Attribute mapping from ruby-style variable name to JSON key.
65
68
  def self.attribute_map
66
69
  {
@@ -85,7 +88,8 @@ module Carbon
85
88
  :'connecting_new_account' => :'connecting_new_account',
86
89
  :'request_id' => :'request_id',
87
90
  :'use_ocr' => :'use_ocr',
88
- :'parse_pdf_tables_with_ocr' => :'parse_pdf_tables_with_ocr'
91
+ :'parse_pdf_tables_with_ocr' => :'parse_pdf_tables_with_ocr',
92
+ :'enable_file_picker' => :'enable_file_picker'
89
93
  }
90
94
  end
91
95
 
@@ -118,7 +122,8 @@ module Carbon
118
122
  :'connecting_new_account' => :'Boolean',
119
123
  :'request_id' => :'String',
120
124
  :'use_ocr' => :'Boolean',
121
- :'parse_pdf_tables_with_ocr' => :'Boolean'
125
+ :'parse_pdf_tables_with_ocr' => :'Boolean',
126
+ :'enable_file_picker' => :'Boolean'
122
127
  }
123
128
  end
124
129
 
@@ -144,7 +149,7 @@ module Carbon
144
149
  :'connecting_new_account',
145
150
  :'request_id',
146
151
  :'use_ocr',
147
- :'parse_pdf_tables_with_ocr'
152
+ :'parse_pdf_tables_with_ocr',
148
153
  ])
149
154
  end
150
155
 
@@ -272,6 +277,12 @@ module Carbon
272
277
  else
273
278
  self.parse_pdf_tables_with_ocr = false
274
279
  end
280
+
281
+ if attributes.key?(:'enable_file_picker')
282
+ self.enable_file_picker = attributes[:'enable_file_picker']
283
+ else
284
+ self.enable_file_picker = true
285
+ end
275
286
  end
276
287
 
277
288
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -318,7 +329,8 @@ module Carbon
318
329
  connecting_new_account == o.connecting_new_account &&
319
330
  request_id == o.request_id &&
320
331
  use_ocr == o.use_ocr &&
321
- parse_pdf_tables_with_ocr == o.parse_pdf_tables_with_ocr
332
+ parse_pdf_tables_with_ocr == o.parse_pdf_tables_with_ocr &&
333
+ enable_file_picker == o.enable_file_picker
322
334
  end
323
335
 
324
336
  # @see the `==` method
@@ -330,7 +342,7 @@ module Carbon
330
342
  # Calculates hash code according to all attributes.
331
343
  # @return [Integer] Hash code
332
344
  def hash
333
- [tags, scope, service, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, zendesk_subdomain, microsoft_tenant, sharepoint_site_name, confluence_subdomain, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, salesforce_domain, sync_files_on_connection, set_page_as_boundary, data_source_id, connecting_new_account, request_id, use_ocr, parse_pdf_tables_with_ocr].hash
345
+ [tags, scope, service, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, zendesk_subdomain, microsoft_tenant, sharepoint_site_name, confluence_subdomain, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, salesforce_domain, sync_files_on_connection, set_page_as_boundary, data_source_id, connecting_new_account, request_id, use_ocr, parse_pdf_tables_with_ocr, enable_file_picker].hash
334
346
  end
335
347
 
336
348
  # Builds the object from hash
@@ -33,6 +33,8 @@ module Carbon
33
33
 
34
34
  attr_accessor :set_page_as_boundary
35
35
 
36
+ attr_accessor :enable_file_picker
37
+
36
38
  # Attribute mapping from ruby-style variable name to JSON key.
37
39
  def self.attribute_map
38
40
  {
@@ -45,7 +47,8 @@ module Carbon
45
47
  :'prepend_filename_to_chunks' => :'prepend_filename_to_chunks',
46
48
  :'max_items_per_chunk' => :'max_items_per_chunk',
47
49
  :'sync_files_on_connection' => :'sync_files_on_connection',
48
- :'set_page_as_boundary' => :'set_page_as_boundary'
50
+ :'set_page_as_boundary' => :'set_page_as_boundary',
51
+ :'enable_file_picker' => :'enable_file_picker'
49
52
  }
50
53
  end
51
54
 
@@ -66,7 +69,8 @@ module Carbon
66
69
  :'prepend_filename_to_chunks' => :'Boolean',
67
70
  :'max_items_per_chunk' => :'Integer',
68
71
  :'sync_files_on_connection' => :'Boolean',
69
- :'set_page_as_boundary' => :'Boolean'
72
+ :'set_page_as_boundary' => :'Boolean',
73
+ :'enable_file_picker' => :'Boolean'
70
74
  }
71
75
  end
72
76
 
@@ -155,6 +159,12 @@ module Carbon
155
159
  else
156
160
  self.set_page_as_boundary = false
157
161
  end
162
+
163
+ if attributes.key?(:'enable_file_picker')
164
+ self.enable_file_picker = attributes[:'enable_file_picker']
165
+ else
166
+ self.enable_file_picker = true
167
+ end
158
168
  end
159
169
 
160
170
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -184,7 +194,8 @@ module Carbon
184
194
  prepend_filename_to_chunks == o.prepend_filename_to_chunks &&
185
195
  max_items_per_chunk == o.max_items_per_chunk &&
186
196
  sync_files_on_connection == o.sync_files_on_connection &&
187
- set_page_as_boundary == o.set_page_as_boundary
197
+ set_page_as_boundary == o.set_page_as_boundary &&
198
+ enable_file_picker == o.enable_file_picker
188
199
  end
189
200
 
190
201
  # @see the `==` method
@@ -196,7 +207,7 @@ module Carbon
196
207
  # Calculates hash code according to all attributes.
197
208
  # @return [Integer] Hash code
198
209
  def hash
199
- [tags, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, sync_files_on_connection, set_page_as_boundary].hash
210
+ [tags, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, sync_files_on_connection, set_page_as_boundary, enable_file_picker].hash
200
211
  end
201
212
 
202
213
  # Builds the object from hash
@@ -16,15 +16,19 @@ module Carbon
16
16
 
17
17
  attr_accessor :auto_sync_enabled_sources
18
18
 
19
- # Custom file upload limit for the user. If set, then the user will not be allowed to upload more files than this limit
20
- attr_accessor :file_upload_limit
19
+ # Custom file upload limit for the user over *all* user's files across all uploads. If set, then the user will not be allowed to upload more files than this limit. If not set, or if set to -1, then the user will have no limit.
20
+ attr_accessor :max_files
21
+
22
+ # Custom file upload limit for the user across a single upload. If set, then the user will not be allowed to upload more files than this limit in a single upload. If not set, or if set to -1, then the user will have no limit.
23
+ attr_accessor :max_files_per_upload
21
24
 
22
25
  # Attribute mapping from ruby-style variable name to JSON key.
23
26
  def self.attribute_map
24
27
  {
25
28
  :'customer_ids' => :'customer_ids',
26
29
  :'auto_sync_enabled_sources' => :'auto_sync_enabled_sources',
27
- :'file_upload_limit' => :'file_upload_limit'
30
+ :'max_files' => :'max_files',
31
+ :'max_files_per_upload' => :'max_files_per_upload'
28
32
  }
29
33
  end
30
34
 
@@ -38,7 +42,8 @@ module Carbon
38
42
  {
39
43
  :'customer_ids' => :'Array<String>',
40
44
  :'auto_sync_enabled_sources' => :'AutoSyncEnabledSourcesProperty',
41
- :'file_upload_limit' => :'Integer'
45
+ :'max_files' => :'Integer',
46
+ :'max_files_per_upload' => :'Integer'
42
47
  }
43
48
  end
44
49
 
@@ -46,7 +51,8 @@ module Carbon
46
51
  def self.openapi_nullable
47
52
  Set.new([
48
53
  :'auto_sync_enabled_sources',
49
- :'file_upload_limit'
54
+ :'max_files',
55
+ :'max_files_per_upload'
50
56
  ])
51
57
  end
52
58
 
@@ -75,8 +81,12 @@ module Carbon
75
81
  self.auto_sync_enabled_sources = attributes[:'auto_sync_enabled_sources']
76
82
  end
77
83
 
78
- if attributes.key?(:'file_upload_limit')
79
- self.file_upload_limit = attributes[:'file_upload_limit']
84
+ if attributes.key?(:'max_files')
85
+ self.max_files = attributes[:'max_files']
86
+ end
87
+
88
+ if attributes.key?(:'max_files_per_upload')
89
+ self.max_files_per_upload = attributes[:'max_files_per_upload']
80
90
  end
81
91
  end
82
92
 
@@ -92,6 +102,14 @@ module Carbon
92
102
  invalid_properties.push('invalid value for "customer_ids", number of items must be less than or equal to 100.')
93
103
  end
94
104
 
105
+ if !@max_files.nil? && @max_files < -1
106
+ invalid_properties.push('invalid value for "max_files", must be greater than or equal to -1.')
107
+ end
108
+
109
+ if !@max_files_per_upload.nil? && @max_files_per_upload < -1
110
+ invalid_properties.push('invalid value for "max_files_per_upload", must be greater than or equal to -1.')
111
+ end
112
+
95
113
  invalid_properties
96
114
  end
97
115
 
@@ -100,6 +118,8 @@ module Carbon
100
118
  def valid?
101
119
  return false if @customer_ids.nil?
102
120
  return false if @customer_ids.length > 100
121
+ return false if !@max_files.nil? && @max_files < -1
122
+ return false if !@max_files_per_upload.nil? && @max_files_per_upload < -1
103
123
  true
104
124
  end
105
125
 
@@ -117,6 +137,26 @@ module Carbon
117
137
  @customer_ids = customer_ids
118
138
  end
119
139
 
140
+ # Custom attribute writer method with validation
141
+ # @param [Object] max_files Value to be assigned
142
+ def max_files=(max_files)
143
+ if !max_files.nil? && max_files < -1
144
+ fail ArgumentError, 'invalid value for "max_files", must be greater than or equal to -1.'
145
+ end
146
+
147
+ @max_files = max_files
148
+ end
149
+
150
+ # Custom attribute writer method with validation
151
+ # @param [Object] max_files_per_upload Value to be assigned
152
+ def max_files_per_upload=(max_files_per_upload)
153
+ if !max_files_per_upload.nil? && max_files_per_upload < -1
154
+ fail ArgumentError, 'invalid value for "max_files_per_upload", must be greater than or equal to -1.'
155
+ end
156
+
157
+ @max_files_per_upload = max_files_per_upload
158
+ end
159
+
120
160
  # Checks equality by comparing each attribute.
121
161
  # @param [Object] Object to be compared
122
162
  def ==(o)
@@ -124,7 +164,8 @@ module Carbon
124
164
  self.class == o.class &&
125
165
  customer_ids == o.customer_ids &&
126
166
  auto_sync_enabled_sources == o.auto_sync_enabled_sources &&
127
- file_upload_limit == o.file_upload_limit
167
+ max_files == o.max_files &&
168
+ max_files_per_upload == o.max_files_per_upload
128
169
  end
129
170
 
130
171
  # @see the `==` method
@@ -136,7 +177,7 @@ module Carbon
136
177
  # Calculates hash code according to all attributes.
137
178
  # @return [Integer] Hash code
138
179
  def hash
139
- [customer_ids, auto_sync_enabled_sources, file_upload_limit].hash
180
+ [customer_ids, auto_sync_enabled_sources, max_files, max_files_per_upload].hash
140
181
  end
141
182
 
142
183
  # Builds the object from hash
@@ -7,5 +7,5 @@ The version of the OpenAPI document: 1.0.0
7
7
  =end
8
8
 
9
9
  module Carbon
10
- VERSION = '0.1.16'
10
+ VERSION = '0.1.18'
11
11
  end
@@ -55,6 +55,12 @@ describe Carbon::GetEmbeddingDocumentsBody do
55
55
  end
56
56
  end
57
57
 
58
+ describe 'test attribute "include_all_children"' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
61
+ end
62
+ end
63
+
58
64
  describe 'test attribute "tags_v2"' do
59
65
  it 'should work' do
60
66
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -151,4 +151,10 @@ describe Carbon::OAuthURLRequest do
151
151
  end
152
152
  end
153
153
 
154
+ describe 'test attribute "enable_file_picker"' do
155
+ it 'should work' do
156
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
157
+ end
158
+ end
159
+
154
160
  end
@@ -79,4 +79,10 @@ describe Carbon::SyncOptions do
79
79
  end
80
80
  end
81
81
 
82
+ describe 'test attribute "enable_file_picker"' do
83
+ it 'should work' do
84
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
85
+ end
86
+ end
87
+
82
88
  end
@@ -31,7 +31,13 @@ describe Carbon::UpdateUsersInput do
31
31
  end
32
32
  end
33
33
 
34
- describe 'test attribute "file_upload_limit"' do
34
+ describe 'test attribute "max_files"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "max_files_per_upload"' do
35
41
  it 'should work' do
36
42
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carbon_ruby_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konfig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-10 00:00:00.000000000 Z
11
+ date: 2024-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -372,7 +372,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
372
372
  - !ruby/object:Gem::Version
373
373
  version: '0'
374
374
  requirements: []
375
- rubygems_version: 3.4.10
375
+ rubygems_version: 3.3.7
376
376
  signing_key:
377
377
  specification_version: 4
378
378
  summary: Carbon Ruby Gem