carbon_ruby_sdk 0.2.17 → 0.2.19

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: 2db6ba9ac20c33dac733d58d3af75de0f423de7dbdf3f0ab898cfa7f1d941ade
4
- data.tar.gz: 8c2bf1227b2261b54dbacac8d5a0ce81b347b1e6297aec8a4a2676d93ab34b68
3
+ metadata.gz: 95f581b191a1ac4df7f158fa8ab692fe1056150fc2de70657f5dfd3562f1b77b
4
+ data.tar.gz: 652b517db6dbe9e474f2a2e76b77205fbd67176daea3afa3b28ec32186727c88
5
5
  SHA512:
6
- metadata.gz: d885f31633955f61b58cf3e7e49f3325ac6621e4ea6c28d83e00c199a5e6e59979e968559b917fbb0988f7a1e289591ee0c4a8430ca97e2dfd0a675ef41b85ce
7
- data.tar.gz: d3fbed8dc49285bf59635b40b12d1d77416cd733cf893dec372947342038dd3bff8adb90373b78be9de352b8295c9370dc16a21b284127be66622d7650b32c81
6
+ metadata.gz: 8de8c90a61acc9f1a4d85341ae9e2dcae84ba5879a675e96e39ef2f3da4cb5b4e8d4b7f04ab172f2dc38a8a460ecd22da17f4de14befafa7a6621c50dd56350e
7
+ data.tar.gz: de9de5613a5f71f9a4fd2c0145be4332cf038ede8acb0c997ffb3b9fe38ee360edd5407db509e11afd07d261824f8507dc1f4ea392010e62a7a30810e2158a94
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- carbon_ruby_sdk (0.2.16)
4
+ carbon_ruby_sdk (0.2.19)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
@@ -9,27 +9,27 @@ GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
11
  ast (2.4.2)
12
+ base64 (0.2.0)
12
13
  byebug (11.1.3)
13
14
  coderay (1.1.3)
14
15
  debug (1.8.0)
15
16
  irb (>= 1.5.0)
16
17
  reline (>= 0.3.1)
17
18
  diff-lcs (1.5.1)
18
- faraday (2.9.0)
19
- faraday-net_http (>= 2.0, < 3.2)
19
+ faraday (2.8.1)
20
+ base64
21
+ faraday-net_http (>= 2.0, < 3.1)
22
+ ruby2_keywords (>= 0.0.4)
20
23
  faraday-multipart (1.0.4)
21
24
  multipart-post (~> 2)
22
- faraday-net_http (3.1.0)
23
- net-http
25
+ faraday-net_http (3.0.2)
24
26
  io-console (0.7.2)
25
27
  irb (1.6.4)
26
28
  reline (>= 0.3.0)
27
- method_source (1.0.0)
28
- multipart-post (2.4.0)
29
- net-http (0.4.1)
30
- uri
31
- parallel (1.24.0)
32
- parser (3.3.0.5)
29
+ method_source (1.1.0)
30
+ multipart-post (2.4.1)
31
+ parallel (1.25.1)
32
+ parser (3.3.4.0)
33
33
  ast (~> 2.4.1)
34
34
  racc
35
35
  pry (0.14.2)
@@ -38,23 +38,24 @@ GEM
38
38
  pry-byebug (3.10.1)
39
39
  byebug (~> 11.0)
40
40
  pry (>= 0.13, < 0.15)
41
- racc (1.7.3)
41
+ racc (1.8.1)
42
42
  rainbow (3.1.1)
43
43
  rake (13.0.6)
44
- regexp_parser (2.9.0)
45
- reline (0.5.0)
44
+ regexp_parser (2.9.2)
45
+ reline (0.5.9)
46
46
  io-console (~> 0.5)
47
- rexml (3.2.6)
47
+ rexml (3.3.4)
48
+ strscan
48
49
  rspec (3.13.0)
49
50
  rspec-core (~> 3.13.0)
50
51
  rspec-expectations (~> 3.13.0)
51
52
  rspec-mocks (~> 3.13.0)
52
53
  rspec-core (3.13.0)
53
54
  rspec-support (~> 3.13.0)
54
- rspec-expectations (3.13.0)
55
+ rspec-expectations (3.13.1)
55
56
  diff-lcs (>= 1.2.0, < 2.0)
56
57
  rspec-support (~> 3.13.0)
57
- rspec-mocks (3.13.0)
58
+ rspec-mocks (3.13.1)
58
59
  diff-lcs (>= 1.2.0, < 2.0)
59
60
  rspec-support (~> 3.13.0)
60
61
  rspec-support (3.13.1)
@@ -67,14 +68,15 @@ GEM
67
68
  rubocop-ast (>= 1.2.0, < 2.0)
68
69
  ruby-progressbar (~> 1.7)
69
70
  unicode-display_width (>= 1.4.0, < 3.0)
70
- rubocop-ast (1.31.2)
71
- parser (>= 3.3.0.4)
71
+ rubocop-ast (1.32.0)
72
+ parser (>= 3.3.1.0)
72
73
  ruby-progressbar (1.13.0)
74
+ ruby2_keywords (0.0.5)
75
+ strscan (3.1.0)
73
76
  unicode-display_width (2.5.0)
74
- uri (0.13.0)
75
77
 
76
78
  PLATFORMS
77
- arm64-darwin-22
79
+ x86_64-linux
78
80
 
79
81
  DEPENDENCIES
80
82
  carbon_ruby_sdk!
@@ -86,4 +88,4 @@ DEPENDENCIES
86
88
  rubocop (~> 1.12.1)
87
89
 
88
90
  BUNDLED WITH
89
- 2.4.19
91
+ 2.4.22
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.17-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.2.17)
9
+ [![npm](https://img.shields.io/badge/gem-v0.2.19-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.2.19)
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.17'
94
+ gem 'carbon_ruby_sdk', '~> 0.2.19'
95
95
  ```
96
96
 
97
97
  ## Getting Started<a id="getting-started"></a>
@@ -198,7 +198,7 @@ result = carbon.data_sources.query_user_data_sources(
198
198
  order_by: "created_at",
199
199
  order_dir: "desc",
200
200
  filters: {
201
- "source" => "GOOGLE_DRIVE",
201
+ "source" => "GOOGLE_CLOUD_STORAGE",
202
202
  },
203
203
  )
204
204
  p result
@@ -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,6 @@ 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" => "bdd2d0b8-c211-49bd-b70a-4889ae5fab99",
1311
1317
  "enable_file_picker" => true,
1312
1318
  "sync_source_items" => true,
1313
1319
  "incremental_sync" => false,
@@ -1458,13 +1464,16 @@ via list items endpoint
1458
1464
 
1459
1465
  ### `carbon.integrations.create_aws_iam_user`<a id="carbonintegrationscreate_aws_iam_user"></a>
1460
1466
 
1461
- Create a new IAM user with permissions to:
1467
+ This endpoint can be used to connect S3 as well as Digital Ocean Spaces (S3 compatible)
1468
+ For S3, create a new IAM user with permissions to:
1462
1469
  <ol>
1463
1470
  <li>List all buckets.</li>
1464
1471
  <li>Read from the specific buckets and objects to sync with Carbon. Ensure any future buckets or objects carry
1465
1472
  the same permissions.</li>
1466
1473
  </ol>
1467
- Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand.
1474
+ Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand.
1475
+ For Digital Ocean Spaces, generate the above credentials in your Applications and API page here https://cloud.digitalocean.com/account/api/spaces.
1476
+ Endpoint URL is required to connect Digital Ocean Spaces.
1468
1477
 
1469
1478
  #### 🛠️ Usage<a id="🛠️-usage"></a>
1470
1479
 
@@ -1473,6 +1482,7 @@ result = carbon.integrations.create_aws_iam_user(
1473
1482
  access_key: "string_example",
1474
1483
  access_key_secret: "string_example",
1475
1484
  sync_source_items: true,
1485
+ endpoint_url: "string_example",
1476
1486
  )
1477
1487
  p result
1478
1488
  ```
@@ -1485,6 +1495,11 @@ p result
1485
1495
  Enabling this flag will fetch all available content from the source to be listed
1486
1496
  via list items endpoint
1487
1497
 
1498
+ ##### endpoint_url: `String`<a id="endpoint_url-string"></a>
1499
+ You can specify a Digital Ocean endpoint URL to connect a Digital Ocean Space
1500
+ through this endpoint. The URL should be of format
1501
+ <region>.digitaloceanspaces.com. It's not required for S3 buckets.
1502
+
1488
1503
  #### 🔄 Return<a id="🔄-return"></a>
1489
1504
 
1490
1505
  [OrganizationUserDataSourceAPI](./lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb)
@@ -1509,7 +1524,7 @@ success state.
1509
1524
 
1510
1525
  ```ruby
1511
1526
  result = carbon.integrations.get_oauth_url(
1512
- service: "GOOGLE_DRIVE",
1527
+ service: "GOOGLE_CLOUD_STORAGE",
1513
1528
  tags: None,
1514
1529
  scope: "string_example",
1515
1530
  chunk_size: 1500,
@@ -1528,7 +1543,7 @@ result = carbon.integrations.get_oauth_url(
1528
1543
  set_page_as_boundary: false,
1529
1544
  data_source_id: 1,
1530
1545
  connecting_new_account: false,
1531
- request_id: "77c4d6f4-3ef2-43d4-8481-476a74fd5178",
1546
+ request_id: "string_example",
1532
1547
  use_ocr: false,
1533
1548
  parse_pdf_tables_with_ocr: false,
1534
1549
  enable_file_picker: true,
@@ -1896,7 +1911,7 @@ result = carbon.integrations.sync_confluence(
1896
1911
  prepend_filename_to_chunks: false,
1897
1912
  max_items_per_chunk: 1,
1898
1913
  set_page_as_boundary: false,
1899
- request_id: "0a2f743b-fe89-4193-86c3-87ca6d2ffc43",
1914
+ request_id: "string_example",
1900
1915
  use_ocr: false,
1901
1916
  parse_pdf_tables_with_ocr: false,
1902
1917
  incremental_sync: false,
@@ -2002,7 +2017,7 @@ result = carbon.integrations.sync_files(
2002
2017
  prepend_filename_to_chunks: false,
2003
2018
  max_items_per_chunk: 1,
2004
2019
  set_page_as_boundary: false,
2005
- request_id: "0a2f743b-fe89-4193-86c3-87ca6d2ffc43",
2020
+ request_id: "string_example",
2006
2021
  use_ocr: false,
2007
2022
  parse_pdf_tables_with_ocr: false,
2008
2023
  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
@@ -508,24 +508,29 @@ module Carbon
508
508
 
509
509
  # S3 Auth
510
510
  #
511
- # Create a new IAM user with permissions to:
511
+ # This endpoint can be used to connect S3 as well as Digital Ocean Spaces (S3 compatible)
512
+ # For S3, create a new IAM user with permissions to:
512
513
  # <ol>
513
514
  # <li>List all buckets.</li>
514
515
  # <li>Read from the specific buckets and objects to sync with Carbon. Ensure any future buckets or objects carry
515
516
  # the same permissions.</li>
516
517
  # </ol>
517
- # Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand.
518
+ # Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand.
519
+ # For Digital Ocean Spaces, generate the above credentials in your Applications and API page here https://cloud.digitalocean.com/account/api/spaces.
520
+ # Endpoint URL is required to connect Digital Ocean Spaces.
518
521
  #
519
522
  # @param access_key [String]
520
523
  # @param access_key_secret [String]
521
524
  # @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
525
+ # @param endpoint_url [String] You can specify a Digital Ocean endpoint URL to connect a Digital Ocean Space through this endpoint. The URL should be of format <region>.digitaloceanspaces.com. It's not required for S3 buckets.
522
526
  # @param body [S3AuthRequest]
523
527
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
524
- def create_aws_iam_user(access_key:, access_key_secret:, sync_source_items: true, extra: {})
528
+ def create_aws_iam_user(access_key:, access_key_secret:, sync_source_items: true, endpoint_url: SENTINEL, extra: {})
525
529
  _body = {}
526
530
  _body[:access_key] = access_key if access_key != SENTINEL
527
531
  _body[:access_key_secret] = access_key_secret if access_key_secret != SENTINEL
528
532
  _body[:sync_source_items] = sync_source_items if sync_source_items != SENTINEL
533
+ _body[:endpoint_url] = endpoint_url if endpoint_url != SENTINEL
529
534
  s3_auth_request = _body
530
535
  api_response = create_aws_iam_user_with_http_info_impl(s3_auth_request, extra)
531
536
  api_response.data
@@ -533,30 +538,35 @@ module Carbon
533
538
 
534
539
  # S3 Auth
535
540
  #
536
- # Create a new IAM user with permissions to:
541
+ # This endpoint can be used to connect S3 as well as Digital Ocean Spaces (S3 compatible)
542
+ # For S3, create a new IAM user with permissions to:
537
543
  # <ol>
538
544
  # <li>List all buckets.</li>
539
545
  # <li>Read from the specific buckets and objects to sync with Carbon. Ensure any future buckets or objects carry
540
546
  # the same permissions.</li>
541
547
  # </ol>
542
- # Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand.
548
+ # Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand.
549
+ # For Digital Ocean Spaces, generate the above credentials in your Applications and API page here https://cloud.digitalocean.com/account/api/spaces.
550
+ # Endpoint URL is required to connect Digital Ocean Spaces.
543
551
  #
544
552
  # @param access_key [String]
545
553
  # @param access_key_secret [String]
546
554
  # @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
555
+ # @param endpoint_url [String] You can specify a Digital Ocean endpoint URL to connect a Digital Ocean Space through this endpoint. The URL should be of format <region>.digitaloceanspaces.com. It's not required for S3 buckets.
547
556
  # @param body [S3AuthRequest]
548
557
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
549
- def create_aws_iam_user_with_http_info(access_key:, access_key_secret:, sync_source_items: true, extra: {})
558
+ def create_aws_iam_user_with_http_info(access_key:, access_key_secret:, sync_source_items: true, endpoint_url: SENTINEL, extra: {})
550
559
  _body = {}
551
560
  _body[:access_key] = access_key if access_key != SENTINEL
552
561
  _body[:access_key_secret] = access_key_secret if access_key_secret != SENTINEL
553
562
  _body[:sync_source_items] = sync_source_items if sync_source_items != SENTINEL
563
+ _body[:endpoint_url] = endpoint_url if endpoint_url != SENTINEL
554
564
  s3_auth_request = _body
555
565
  create_aws_iam_user_with_http_info_impl(s3_auth_request, extra)
556
566
  end
557
567
 
558
568
  # S3 Auth
559
- # Create a new IAM user with permissions to: <ol> <li>List all buckets.</li> <li>Read from the specific buckets and objects to sync with Carbon. Ensure any future buckets or objects carry the same permissions.</li> </ol> Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand.
569
+ # This endpoint can be used to connect S3 as well as Digital Ocean Spaces (S3 compatible) For S3, create a new IAM user with permissions to: <ol> <li>List all buckets.</li> <li>Read from the specific buckets and objects to sync with Carbon. Ensure any future buckets or objects carry the same permissions.</li> </ol> Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand. For Digital Ocean Spaces, generate the above credentials in your Applications and API page here https://cloud.digitalocean.com/account/api/spaces. Endpoint URL is required to connect Digital Ocean Spaces.
560
570
  # @param s3_auth_request [S3AuthRequest]
561
571
  # @param [Hash] opts the optional parameters
562
572
  # @return [OrganizationUserDataSourceAPI]
@@ -566,7 +576,7 @@ module Carbon
566
576
  end
567
577
 
568
578
  # S3 Auth
569
- # Create a new IAM user with permissions to: &lt;ol&gt; &lt;li&gt;List all buckets.&lt;/li&gt; &lt;li&gt;Read from the specific buckets and objects to sync with Carbon. Ensure any future buckets or objects carry the same permissions.&lt;/li&gt; &lt;/ol&gt; Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand.
579
+ # This endpoint can be used to connect S3 as well as Digital Ocean Spaces (S3 compatible) For S3, create a new IAM user with permissions to: &lt;ol&gt; &lt;li&gt;List all buckets.&lt;/li&gt; &lt;li&gt;Read from the specific buckets and objects to sync with Carbon. Ensure any future buckets or objects carry the same permissions.&lt;/li&gt; &lt;/ol&gt; Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand. For Digital Ocean Spaces, generate the above credentials in your Applications and API page here https://cloud.digitalocean.com/account/api/spaces. Endpoint URL is required to connect Digital Ocean Spaces.
570
580
  # @param s3_auth_request [S3AuthRequest]
571
581
  # @param [Hash] opts the optional parameters
572
582
  # @return [APIResponse] data is OrganizationUserDataSourceAPI, status code, headers and response
@@ -659,7 +669,7 @@ module Carbon
659
669
  # @param file_sync_config [FileSyncConfigNullable]
660
670
  # @param body [OAuthURLRequest]
661
671
  # @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: '77c4d6f4-3ef2-43d4-8481-476a74fd5178', 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: {})
672
+ 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, sync_source_items: true, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
663
673
  _body = {}
664
674
  _body[:tags] = tags if tags != SENTINEL
665
675
  _body[:scope] = scope if scope != SENTINEL
@@ -727,7 +737,7 @@ module Carbon
727
737
  # @param file_sync_config [FileSyncConfigNullable]
728
738
  # @param body [OAuthURLRequest]
729
739
  # @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: '77c4d6f4-3ef2-43d4-8481-476a74fd5178', 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: {})
740
+ 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, sync_source_items: true, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
731
741
  _body = {}
732
742
  _body[:tags] = tags if tags != SENTINEL
733
743
  _body[:scope] = scope if scope != SENTINEL
@@ -1646,7 +1656,7 @@ module Carbon
1646
1656
  # @param file_sync_config [FileSyncConfigNullable]
1647
1657
  # @param body [SyncFilesRequest]
1648
1658
  # @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: '0a2f743b-fe89-4193-86c3-87ca6d2ffc43', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
1659
+ 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: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
1650
1660
  _body = {}
1651
1661
  _body[:tags] = tags if tags != SENTINEL
1652
1662
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
@@ -1696,7 +1706,7 @@ module Carbon
1696
1706
  # @param file_sync_config [FileSyncConfigNullable]
1697
1707
  # @param body [SyncFilesRequest]
1698
1708
  # @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: '0a2f743b-fe89-4193-86c3-87ca6d2ffc43', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
1709
+ 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: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
1700
1710
  _body = {}
1701
1711
  _body[:tags] = tags if tags != SENTINEL
1702
1712
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
@@ -1904,7 +1914,7 @@ module Carbon
1904
1914
  # @param file_sync_config [FileSyncConfigNullable]
1905
1915
  # @param body [SyncFilesRequest]
1906
1916
  # @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: '0a2f743b-fe89-4193-86c3-87ca6d2ffc43', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
1917
+ 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: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
1908
1918
  _body = {}
1909
1919
  _body[:tags] = tags if tags != SENTINEL
1910
1920
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
@@ -1952,7 +1962,7 @@ module Carbon
1952
1962
  # @param file_sync_config [FileSyncConfigNullable]
1953
1963
  # @param body [SyncFilesRequest]
1954
1964
  # @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: '0a2f743b-fe89-4193-86c3-87ca6d2ffc43', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
1965
+ 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: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
1956
1966
  _body = {}
1957
1967
  _body[:tags] = tags if tags != SENTINEL
1958
1968
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
@@ -41,6 +41,9 @@ module Carbon
41
41
 
42
42
  attr_accessor :access_key_secret
43
43
 
44
+ # You can specify a Digital Ocean endpoint URL to connect a Digital Ocean Space through this endpoint. The URL should be of format <region>.digitaloceanspaces.com. It's not required for S3 buckets.
45
+ attr_accessor :endpoint_url
46
+
44
47
  # Attribute mapping from ruby-style variable name to JSON key.
45
48
  def self.attribute_map
46
49
  {
@@ -58,7 +61,8 @@ module Carbon
58
61
  :'domain' => :'domain',
59
62
  :'api_key' => :'api_key',
60
63
  :'access_key' => :'access_key',
61
- :'access_key_secret' => :'access_key_secret'
64
+ :'access_key_secret' => :'access_key_secret',
65
+ :'endpoint_url' => :'endpoint_url'
62
66
  }
63
67
  end
64
68
 
@@ -84,7 +88,8 @@ module Carbon
84
88
  :'domain' => :'String',
85
89
  :'api_key' => :'String',
86
90
  :'access_key' => :'String',
87
- :'access_key_secret' => :'String'
91
+ :'access_key_secret' => :'String',
92
+ :'endpoint_url' => :'String'
88
93
  }
89
94
  end
90
95
 
@@ -93,6 +98,7 @@ module Carbon
93
98
  Set.new([
94
99
  :'source',
95
100
  :'refresh_token',
101
+ :'endpoint_url'
96
102
  ])
97
103
  end
98
104
 
@@ -187,6 +193,10 @@ module Carbon
187
193
  if attributes.key?(:'access_key_secret')
188
194
  self.access_key_secret = attributes[:'access_key_secret']
189
195
  end
196
+
197
+ if attributes.key?(:'endpoint_url')
198
+ self.endpoint_url = attributes[:'endpoint_url']
199
+ end
190
200
  end
191
201
 
192
202
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -298,7 +308,8 @@ module Carbon
298
308
  domain == o.domain &&
299
309
  api_key == o.api_key &&
300
310
  access_key == o.access_key &&
301
- access_key_secret == o.access_key_secret
311
+ access_key_secret == o.access_key_secret &&
312
+ endpoint_url == o.endpoint_url
302
313
  end
303
314
 
304
315
  # @see the `==` method
@@ -310,7 +321,7 @@ module Carbon
310
321
  # Calculates hash code according to all attributes.
311
322
  # @return [Integer] Hash code
312
323
  def hash
313
- [source, access_token, refresh_token, workspace_id, tenant_name, site_name, subdomain, access_token_secret, username, zotero_id, organization_name, domain, api_key, access_key, access_key_secret].hash
324
+ [source, access_token, refresh_token, workspace_id, tenant_name, site_name, subdomain, access_token_secret, username, zotero_id, organization_name, domain, api_key, access_key, access_key_secret, endpoint_url].hash
314
325
  end
315
326
 
316
327
  # Builds the object from hash
@@ -11,6 +11,7 @@ require 'time'
11
11
 
12
12
  module Carbon
13
13
  class DataSourceType
14
+ GOOGLE_CLOUD_STORAGE = "GOOGLE_CLOUD_STORAGE".freeze
14
15
  GOOGLE_DRIVE = "GOOGLE_DRIVE".freeze
15
16
  NOTION = "NOTION".freeze
16
17
  NOTION_DATABASE = "NOTION_DATABASE".freeze
@@ -68,7 +69,7 @@ module Carbon
68
69
  EML = "EML".freeze
69
70
 
70
71
  def self.all_vars
71
- @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, HTML, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, SLACK, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML].freeze
72
+ @all_vars ||= [GOOGLE_CLOUD_STORAGE, 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, HTML, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, SLACK, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML].freeze
72
73
  end
73
74
 
74
75
  # Builds the enum from string
@@ -11,6 +11,7 @@ require 'time'
11
11
 
12
12
  module Carbon
13
13
  class DataSourceTypeNullable
14
+ GOOGLE_CLOUD_STORAGE = "GOOGLE_CLOUD_STORAGE".freeze
14
15
  GOOGLE_DRIVE = "GOOGLE_DRIVE".freeze
15
16
  NOTION = "NOTION".freeze
16
17
  NOTION_DATABASE = "NOTION_DATABASE".freeze
@@ -68,7 +69,7 @@ module Carbon
68
69
  EML = "EML".freeze
69
70
 
70
71
  def self.all_vars
71
- @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, HTML, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, SLACK, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML].freeze
72
+ @all_vars ||= [GOOGLE_CLOUD_STORAGE, 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, HTML, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, SLACK, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML].freeze
72
73
  end
73
74
 
74
75
  # Builds the enum from string
@@ -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
@@ -161,6 +161,7 @@ module Carbon
161
161
  :'sync_files_on_connection',
162
162
  :'data_source_id',
163
163
  :'connecting_new_account',
164
+ :'request_id',
164
165
  :'use_ocr',
165
166
  :'parse_pdf_tables_with_ocr',
166
167
  :'file_sync_config'
@@ -278,8 +279,6 @@ module Carbon
278
279
 
279
280
  if attributes.key?(:'request_id')
280
281
  self.request_id = attributes[:'request_id']
281
- else
282
- self.request_id = '77c4d6f4-3ef2-43d4-8481-476a74fd5178'
283
282
  end
284
283
 
285
284
  if attributes.key?(:'use_ocr')