carbon_ruby_sdk 0.1.25 → 0.1.26

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: 52f030ea7716673312a486e5e740dcfd63dd0f9476829d1a4a60450454ba9cd8
4
- data.tar.gz: e92848e3b73bb218c3971309c3115c1b539414284f3e48728e995c84ad3e5c1e
3
+ metadata.gz: 4df15c006e45848696f32fa5cff53262a27cd3679d984728e3b03032bb20fb2d
4
+ data.tar.gz: 3bb4f46ac23fcb9b560de22c539f6280c7cbc4d717ff7b762ecff53f3a953ca2
5
5
  SHA512:
6
- metadata.gz: 7c3f1177e45e581f8a2a6abdb43e2bb7a7af9b4080859aef1d53e4ec34ba9a3c3505dfa4df51ff66258f8ba5a5d63279025e606d02b10e56a3129723b31d3a9a
7
- data.tar.gz: b7a46ce54599d55341b36f7361d7c67810b19e7d074311ff9b9e9116270ffbaa172fafd8e460aea62e9ab38b152e238cd02b337e2a5e4c601aee3cddb82af6e1
6
+ metadata.gz: 561bd129472800a3028d531465beb98ba98794a2e813c477d72aa308c58128f9f912a1fc09a967aca5d9de0d16dc435d518ae3715c288707b5ea840f1be6082a
7
+ data.tar.gz: 3dfa67d79380d9a687dccb456fbab1ce19422564c498eec958d4df186276d090754814224ad6bd20588e23b28adb3a80c2125d93ef2771d22d41a6e55c55afdb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- carbon_ruby_sdk (0.1.24)
4
+ carbon_ruby_sdk (0.1.25)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
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.25-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.1.25)
9
+ [![npm](https://img.shields.io/badge/gem-v0.1.26-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.1.26)
10
10
 
11
11
  </div>
12
12
 
@@ -84,7 +84,7 @@ Connect external data to LLMs, no matter the source.
84
84
  Add to Gemfile:
85
85
 
86
86
  ```ruby
87
- gem 'carbon_ruby_sdk', '~> 0.1.25'
87
+ gem 'carbon_ruby_sdk', '~> 0.1.26'
88
88
  ```
89
89
 
90
90
  ## Getting Started<a id="getting-started"></a>
@@ -1197,7 +1197,7 @@ result = carbon.integrations.connect_data_source(
1197
1197
  "prepend_filename_to_chunks" => false,
1198
1198
  "sync_files_on_connection" => true,
1199
1199
  "set_page_as_boundary" => false,
1200
- "request_id" => "18492fc0-bd2f-48d4-a035-8d12f762cc76",
1200
+ "request_id" => "875454df-996d-4d26-83e0-756af9628ed0",
1201
1201
  "enable_file_picker" => true,
1202
1202
  "sync_source_items" => true,
1203
1203
  },
@@ -1409,7 +1409,7 @@ result = carbon.integrations.get_oauth_url(
1409
1409
  set_page_as_boundary: false,
1410
1410
  data_source_id: 1,
1411
1411
  connecting_new_account: false,
1412
- request_id: "1975f217-47e4-4867-8acd-5bdb2858049b",
1412
+ request_id: "fc8dfd30-8e4c-4f40-acc5-f05b3cc961d2",
1413
1413
  use_ocr: false,
1414
1414
  parse_pdf_tables_with_ocr: false,
1415
1415
  enable_file_picker: true,
@@ -1463,7 +1463,7 @@ Enable OCR for files that support it. Supported formats: pdf
1463
1463
  ##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
1464
1464
  ##### enable_file_picker: `Boolean`<a id="enable_file_picker-boolean"></a>
1465
1465
  Enable integration's file picker for sources that support it. Supported sources:
1466
- BOX, SHAREPOINT, ONEDRIVE, DROPBOX, GOOGLE_DRIVE
1466
+ GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT, DROPBOX, BOX
1467
1467
 
1468
1468
  ##### sync_source_items: `Boolean`<a id="sync_source_items-boolean"></a>
1469
1469
  Enabling this flag will fetch all available content from the source to be listed
@@ -1719,7 +1719,7 @@ result = carbon.integrations.sync_confluence(
1719
1719
  prepend_filename_to_chunks: false,
1720
1720
  max_items_per_chunk: 1,
1721
1721
  set_page_as_boundary: false,
1722
- request_id: "a7c990f4-5923-47b5-a9f8-6ef5416fe5c3",
1722
+ request_id: "2446df66-66dd-4ea3-b248-a416d886e087",
1723
1723
  use_ocr: false,
1724
1724
  parse_pdf_tables_with_ocr: false,
1725
1725
  )
@@ -1810,7 +1810,7 @@ result = carbon.integrations.sync_files(
1810
1810
  prepend_filename_to_chunks: false,
1811
1811
  max_items_per_chunk: 1,
1812
1812
  set_page_as_boundary: false,
1813
- request_id: "a7c990f4-5923-47b5-a9f8-6ef5416fe5c3",
1813
+ request_id: "2446df66-66dd-4ea3-b248-a416d886e087",
1814
1814
  use_ocr: false,
1815
1815
  parse_pdf_tables_with_ocr: false,
1816
1816
  )
@@ -557,11 +557,11 @@ module Carbon
557
557
  # @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
558
558
  # @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
559
559
  # @param parse_pdf_tables_with_ocr [Boolean]
560
- # @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: BOX, SHAREPOINT, ONEDRIVE, DROPBOX, GOOGLE_DRIVE
560
+ # @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT, DROPBOX, BOX
561
561
  # @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
562
562
  # @param body [OAuthURLRequest]
563
563
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
564
- 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: '1975f217-47e4-4867-8acd-5bdb2858049b', use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, extra: {})
564
+ 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: 'fc8dfd30-8e4c-4f40-acc5-f05b3cc961d2', use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, extra: {})
565
565
  _body = {}
566
566
  _body[:tags] = tags if tags != SENTINEL
567
567
  _body[:scope] = scope if scope != SENTINEL
@@ -621,11 +621,11 @@ module Carbon
621
621
  # @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
622
622
  # @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
623
623
  # @param parse_pdf_tables_with_ocr [Boolean]
624
- # @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: BOX, SHAREPOINT, ONEDRIVE, DROPBOX, GOOGLE_DRIVE
624
+ # @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT, DROPBOX, BOX
625
625
  # @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
626
626
  # @param body [OAuthURLRequest]
627
627
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
628
- 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: '1975f217-47e4-4867-8acd-5bdb2858049b', use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, extra: {})
628
+ 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: 'fc8dfd30-8e4c-4f40-acc5-f05b3cc961d2', use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, extra: {})
629
629
  _body = {}
630
630
  _body[:tags] = tags if tags != SENTINEL
631
631
  _body[:scope] = scope if scope != SENTINEL
@@ -1417,7 +1417,7 @@ module Carbon
1417
1417
  # @param parse_pdf_tables_with_ocr [Boolean]
1418
1418
  # @param body [SyncFilesRequest]
1419
1419
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1420
- 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: 'a7c990f4-5923-47b5-a9f8-6ef5416fe5c3', use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
1420
+ 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: '2446df66-66dd-4ea3-b248-a416d886e087', use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
1421
1421
  _body = {}
1422
1422
  _body[:tags] = tags if tags != SENTINEL
1423
1423
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
@@ -1461,7 +1461,7 @@ module Carbon
1461
1461
  # @param parse_pdf_tables_with_ocr [Boolean]
1462
1462
  # @param body [SyncFilesRequest]
1463
1463
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1464
- 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: 'a7c990f4-5923-47b5-a9f8-6ef5416fe5c3', use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
1464
+ 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: '2446df66-66dd-4ea3-b248-a416d886e087', use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
1465
1465
  _body = {}
1466
1466
  _body[:tags] = tags if tags != SENTINEL
1467
1467
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
@@ -1665,7 +1665,7 @@ module Carbon
1665
1665
  # @param parse_pdf_tables_with_ocr [Boolean]
1666
1666
  # @param body [SyncFilesRequest]
1667
1667
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1668
- 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: 'a7c990f4-5923-47b5-a9f8-6ef5416fe5c3', use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
1668
+ 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: '2446df66-66dd-4ea3-b248-a416d886e087', use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
1669
1669
  _body = {}
1670
1670
  _body[:tags] = tags if tags != SENTINEL
1671
1671
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
@@ -1709,7 +1709,7 @@ module Carbon
1709
1709
  # @param parse_pdf_tables_with_ocr [Boolean]
1710
1710
  # @param body [SyncFilesRequest]
1711
1711
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1712
- 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: 'a7c990f4-5923-47b5-a9f8-6ef5416fe5c3', use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
1712
+ 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: '2446df66-66dd-4ea3-b248-a416d886e087', use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
1713
1713
  _body = {}
1714
1714
  _body[:tags] = tags if tags != SENTINEL
1715
1715
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
@@ -61,7 +61,7 @@ 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: BOX, SHAREPOINT, ONEDRIVE, DROPBOX, GOOGLE_DRIVE
64
+ # Enable integration's file picker for sources that support it. Supported sources: GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT, DROPBOX, BOX
65
65
  attr_accessor :enable_file_picker
66
66
 
67
67
  # Enabling this flag will fetch all available content from the source to be listed via list items endpoint
@@ -269,7 +269,7 @@ module Carbon
269
269
  if attributes.key?(:'request_id')
270
270
  self.request_id = attributes[:'request_id']
271
271
  else
272
- self.request_id = '1975f217-47e4-4867-8acd-5bdb2858049b'
272
+ self.request_id = 'fc8dfd30-8e4c-4f40-acc5-f05b3cc961d2'
273
273
  end
274
274
 
275
275
  if attributes.key?(:'use_ocr')
@@ -53,6 +53,9 @@ module Carbon
53
53
  # The error message of the file. The query will return files with error messages that contain this string. To search for files with no error message, use an empty string.
54
54
  attr_accessor :sync_error_message
55
55
 
56
+ # If true, the query will return containers in the response. Containers are files that group other files together and have no content themselves. Default behavior is to include containers.
57
+ attr_accessor :include_containers
58
+
56
59
  # Attribute mapping from ruby-style variable name to JSON key.
57
60
  def self.attribute_map
58
61
  {
@@ -70,7 +73,8 @@ module Carbon
70
73
  :'include_all_children' => :'include_all_children',
71
74
  :'non_synced_only' => :'non_synced_only',
72
75
  :'request_ids' => :'request_ids',
73
- :'sync_error_message' => :'sync_error_message'
76
+ :'sync_error_message' => :'sync_error_message',
77
+ :'include_containers' => :'include_containers'
74
78
  }
75
79
  end
76
80
 
@@ -96,7 +100,8 @@ module Carbon
96
100
  :'include_all_children' => :'Boolean',
97
101
  :'non_synced_only' => :'Boolean',
98
102
  :'request_ids' => :'Array<String>',
99
- :'sync_error_message' => :'String'
103
+ :'sync_error_message' => :'String',
104
+ :'include_containers' => :'Boolean'
100
105
  }
101
106
  end
102
107
 
@@ -115,7 +120,8 @@ module Carbon
115
120
  :'embedding_generators',
116
121
  :'root_files_only',
117
122
  :'request_ids',
118
- :'sync_error_message'
123
+ :'sync_error_message',
124
+ :'include_containers'
119
125
  ])
120
126
  end
121
127
 
@@ -213,6 +219,10 @@ module Carbon
213
219
  if attributes.key?(:'sync_error_message')
214
220
  self.sync_error_message = attributes[:'sync_error_message']
215
221
  end
222
+
223
+ if attributes.key?(:'include_containers')
224
+ self.include_containers = attributes[:'include_containers']
225
+ end
216
226
  end
217
227
 
218
228
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -262,7 +272,8 @@ module Carbon
262
272
  include_all_children == o.include_all_children &&
263
273
  non_synced_only == o.non_synced_only &&
264
274
  request_ids == o.request_ids &&
265
- sync_error_message == o.sync_error_message
275
+ sync_error_message == o.sync_error_message &&
276
+ include_containers == o.include_containers
266
277
  end
267
278
 
268
279
  # @see the `==` method
@@ -274,7 +285,7 @@ module Carbon
274
285
  # Calculates hash code according to all attributes.
275
286
  # @return [Integer] Hash code
276
287
  def hash
277
- [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].hash
288
+ [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].hash
278
289
  end
279
290
 
280
291
  # Builds the object from hash
@@ -177,7 +177,7 @@ module Carbon
177
177
  if attributes.key?(:'request_id')
178
178
  self.request_id = attributes[:'request_id']
179
179
  else
180
- self.request_id = 'a7c990f4-5923-47b5-a9f8-6ef5416fe5c3'
180
+ self.request_id = '2446df66-66dd-4ea3-b248-a416d886e087'
181
181
  end
182
182
 
183
183
  if attributes.key?(:'use_ocr')
@@ -172,7 +172,7 @@ module Carbon
172
172
  if attributes.key?(:'request_id')
173
173
  self.request_id = attributes[:'request_id']
174
174
  else
175
- self.request_id = '18492fc0-bd2f-48d4-a035-8d12f762cc76'
175
+ self.request_id = '875454df-996d-4d26-83e0-756af9628ed0'
176
176
  end
177
177
 
178
178
  if attributes.key?(:'enable_file_picker')
@@ -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.25'
10
+ VERSION = '0.1.26'
11
11
  end
@@ -109,4 +109,10 @@ describe Carbon::OrganizationUserFilesToSyncFilters do
109
109
  end
110
110
  end
111
111
 
112
+ describe 'test attribute "include_containers"' do
113
+ it 'should work' do
114
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
115
+ end
116
+ end
117
+
112
118
  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.25
4
+ version: 0.1.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konfig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-07 00:00:00.000000000 Z
11
+ date: 2024-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday