carbon_ruby_sdk 0.2.25 → 0.2.27

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: 744d7329a0dd05a7632f4b4738194bea0627fb74b8fe2f9f35f9bc18c073f885
4
- data.tar.gz: 966a7e4c665bc51a25afa98e53ef4d162eaed77a09e0d5a8d95e269fe53e8aa9
3
+ metadata.gz: '00969f44903e2698da2cdf106e0051ceeeff09c68652799607ce5e5fae9b7a3a'
4
+ data.tar.gz: b59ee278e57db1ce4f5003787f146158865a172b782f6fcf73c5881a1c74d3e4
5
5
  SHA512:
6
- metadata.gz: 436e1932ef9c0933cdefa4646123806d5a342c29700bf9a01c4104e1d31e1e9511400e63c436137361c80943fc8d4fe3c3d87a410c06c10dc6b7c6bb0d54e790
7
- data.tar.gz: 1b4199c6ae7fc7f2ea6761aa308614672e1871b8f81f75da2ac7ac87e405260649c0fcfa0edc4011ffde778a83762d990251bc4b8662accf8dc1af9948a32bea
6
+ metadata.gz: d8f090188e03d6a29d1cbd2164799b513fd4498c573ad4ab8b3ea4839e448bec35831e0065e4409b77429dc044d76bddc64b2d187147b8c1590e72b33e703ad8
7
+ data.tar.gz: abfdbe67b5f27b6e015980f2fc633195cf3fd7b6126b9cacc2e65144418d923c6348acf7c40dd52d990f8ebe0224043c836918960144e268872f894eca0d97d8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- carbon_ruby_sdk (0.2.25)
4
+ carbon_ruby_sdk (0.2.27)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
@@ -44,7 +44,7 @@ GEM
44
44
  regexp_parser (2.9.2)
45
45
  reline (0.5.9)
46
46
  io-console (~> 0.5)
47
- rexml (3.3.5)
47
+ rexml (3.3.6)
48
48
  strscan
49
49
  rspec (3.13.0)
50
50
  rspec-core (~> 3.13.0)
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Connect external data to LLMs, no matter the source.
8
8
 
9
- [![npm](https://img.shields.io/badge/gem-v0.2.25-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.2.25)
9
+ [![npm](https://img.shields.io/badge/gem-v0.2.27-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.2.27)
10
10
 
11
11
  </div>
12
12
 
@@ -93,7 +93,7 @@ Connect external data to LLMs, no matter the source.
93
93
  Add to Gemfile:
94
94
 
95
95
  ```ruby
96
- gem 'carbon_ruby_sdk', '~> 0.2.25'
96
+ gem 'carbon_ruby_sdk', '~> 0.2.27'
97
97
  ```
98
98
 
99
99
  ## Getting Started<a id="getting-started"></a>
@@ -1566,7 +1566,7 @@ the same permissions.</li>
1566
1566
  </ol>
1567
1567
  Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand.
1568
1568
  For Digital Ocean Spaces, generate the above credentials in your Applications and API page here https://cloud.digitalocean.com/account/api/spaces.
1569
- Endpoint URL is required to connect Digital Ocean Spaces.
1569
+ Endpoint URL is required to connect Digital Ocean Spaces. It should look like <<region>>.digitaloceanspaces.com
1570
1570
 
1571
1571
  #### 🛠️ Usage<a id="🛠️-usage"></a>
1572
1572
 
@@ -1617,7 +1617,7 @@ success state.
1617
1617
 
1618
1618
  ```ruby
1619
1619
  result = carbon.integrations.get_oauth_url(
1620
- service: "GOOGLE_CLOUD_STORAGE",
1620
+ service: "BOX",
1621
1621
  tags: None,
1622
1622
  scope: "string_example",
1623
1623
  chunk_size: 1500,
@@ -1657,7 +1657,7 @@ p result
1657
1657
 
1658
1658
  #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1659
1659
 
1660
- ##### service: [`DataSourceType`](./lib/carbon_ruby_sdk/models/data_source_type.rb)<a id="service-datasourcetypelibcarbon_ruby_sdkmodelsdata_source_typerb"></a>
1660
+ ##### service: [`ExternalDataSourceType`](./lib/carbon_ruby_sdk/models/external_data_source_type.rb)<a id="service-externaldatasourcetypelibcarbon_ruby_sdkmodelsexternal_data_source_typerb"></a>
1661
1661
  ##### tags: `Object`<a id="tags-object"></a>
1662
1662
  ##### scope: `String`<a id="scope-string"></a>
1663
1663
  ##### chunk_size: `Integer`<a id="chunk_size-integer"></a>
@@ -1695,7 +1695,7 @@ This request id will be added to all files that get synced using the generated
1695
1695
  OAuth URL
1696
1696
 
1697
1697
  ##### use_ocr: `Boolean`<a id="use_ocr-boolean"></a>
1698
- Enable OCR for files that support it. Supported formats: pdf, jpg, png
1698
+ Enable OCR for files that support it. Supported formats: pdf, png, jpg
1699
1699
 
1700
1700
  ##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
1701
1701
  ##### enable_file_picker: `Boolean`<a id="enable_file_picker-boolean"></a>
@@ -517,7 +517,7 @@ module Carbon
517
517
  # </ol>
518
518
  # Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand.
519
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.
520
+ # Endpoint URL is required to connect Digital Ocean Spaces. It should look like <<region>>.digitaloceanspaces.com
521
521
  #
522
522
  # @param access_key [String]
523
523
  # @param access_key_secret [String]
@@ -547,7 +547,7 @@ module Carbon
547
547
  # </ol>
548
548
  # Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand.
549
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.
550
+ # Endpoint URL is required to connect Digital Ocean Spaces. It should look like <<region>>.digitaloceanspaces.com
551
551
  #
552
552
  # @param access_key [String]
553
553
  # @param access_key_secret [String]
@@ -566,7 +566,7 @@ module Carbon
566
566
  end
567
567
 
568
568
  # S3 Auth
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.
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. It should look like <<region>>.digitaloceanspaces.com
570
570
  # @param s3_auth_request [S3AuthRequest]
571
571
  # @param [Hash] opts the optional parameters
572
572
  # @return [OrganizationUserDataSourceAPI]
@@ -576,7 +576,7 @@ module Carbon
576
576
  end
577
577
 
578
578
  # S3 Auth
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.
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. It should look like &lt;&lt;region&gt;&gt;.digitaloceanspaces.com
580
580
  # @param s3_auth_request [S3AuthRequest]
581
581
  # @param [Hash] opts the optional parameters
582
582
  # @return [APIResponse] data is OrganizationUserDataSourceAPI, status code, headers and response
@@ -641,7 +641,7 @@ module Carbon
641
641
  # - A file syncing URL which skips the OAuth flow if the user already has a valid access token and takes them to the
642
642
  # success state.
643
643
  #
644
- # @param service [DataSourceType]
644
+ # @param service [ExternalDataSourceType]
645
645
  # @param tags [Object]
646
646
  # @param scope [String]
647
647
  # @param chunk_size [Integer]
@@ -661,7 +661,7 @@ module Carbon
661
661
  # @param data_source_id [Integer] Used to specify a data source to sync from if you have multiple connected. It can be skipped if you only have one data source of that type connected or are connecting a new account.
662
662
  # @param connecting_new_account [Boolean] Used to connect a new data source. If not specified, we will attempt to create a sync URL for an existing data source based on type and ID.
663
663
  # @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
664
- # @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf, jpg, png
664
+ # @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf, png, jpg
665
665
  # @param parse_pdf_tables_with_ocr [Boolean]
666
666
  # @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT
667
667
  # @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
@@ -711,7 +711,7 @@ module Carbon
711
711
  # - A file syncing URL which skips the OAuth flow if the user already has a valid access token and takes them to the
712
712
  # success state.
713
713
  #
714
- # @param service [DataSourceType]
714
+ # @param service [ExternalDataSourceType]
715
715
  # @param tags [Object]
716
716
  # @param scope [String]
717
717
  # @param chunk_size [Integer]
@@ -731,7 +731,7 @@ module Carbon
731
731
  # @param data_source_id [Integer] Used to specify a data source to sync from if you have multiple connected. It can be skipped if you only have one data source of that type connected or are connecting a new account.
732
732
  # @param connecting_new_account [Boolean] Used to connect a new data source. If not specified, we will attempt to create a sync URL for an existing data source based on type and ID.
733
733
  # @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
734
- # @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf, jpg, png
734
+ # @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf, png, jpg
735
735
  # @param parse_pdf_tables_with_ocr [Boolean]
736
736
  # @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT
737
737
  # @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
@@ -0,0 +1,49 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'date'
10
+ require 'time'
11
+
12
+ module Carbon
13
+ class ExternalDataSourceType
14
+ BOX = "BOX".freeze
15
+ CONFLUENCE = "CONFLUENCE".freeze
16
+ DROPBOX = "DROPBOX".freeze
17
+ GMAIL = "GMAIL".freeze
18
+ GOOGLE_DRIVE = "GOOGLE_DRIVE".freeze
19
+ GOOGLE_CLOUD_STORAGE = "GOOGLE_CLOUD_STORAGE".freeze
20
+ INTERCOM = "INTERCOM".freeze
21
+ NOTION = "NOTION".freeze
22
+ ONEDRIVE = "ONEDRIVE".freeze
23
+ OUTLOOK = "OUTLOOK".freeze
24
+ SALESFORCE = "SALESFORCE".freeze
25
+ SHAREPOINT = "SHAREPOINT".freeze
26
+ SLACK = "SLACK".freeze
27
+ ZENDESK = "ZENDESK".freeze
28
+ ZOTERO = "ZOTERO".freeze
29
+
30
+ def self.all_vars
31
+ @all_vars ||= [BOX, CONFLUENCE, DROPBOX, GMAIL, GOOGLE_DRIVE, GOOGLE_CLOUD_STORAGE, INTERCOM, NOTION, ONEDRIVE, OUTLOOK, SALESFORCE, SHAREPOINT, SLACK, ZENDESK, ZOTERO].freeze
32
+ end
33
+
34
+ # Builds the enum from string
35
+ # @param [String] The enum value in the form of the string
36
+ # @return [String] The enum value
37
+ def self.build_from_hash(value)
38
+ new.build_from_hash(value)
39
+ end
40
+
41
+ # Builds the enum from string
42
+ # @param [String] The enum value in the form of the string
43
+ # @return [String] The enum value
44
+ def build_from_hash(value)
45
+ return value if ExternalDataSourceType.all_vars.include?(value)
46
+ raise "Invalid ENUM value #{value} for class #ExternalDataSourceType"
47
+ end
48
+ end
49
+ end
@@ -56,7 +56,7 @@ module Carbon
56
56
  # This request id will be added to all files that get synced using the generated OAuth URL
57
57
  attr_accessor :request_id
58
58
 
59
- # Enable OCR for files that support it. Supported formats: pdf, jpg, png
59
+ # Enable OCR for files that support it. Supported formats: pdf, png, jpg
60
60
  attr_accessor :use_ocr
61
61
 
62
62
  attr_accessor :parse_pdf_tables_with_ocr
@@ -118,7 +118,7 @@ module Carbon
118
118
  {
119
119
  :'tags' => :'Object',
120
120
  :'scope' => :'String',
121
- :'service' => :'DataSourceType',
121
+ :'service' => :'ExternalDataSourceType',
122
122
  :'chunk_size' => :'Integer',
123
123
  :'chunk_overlap' => :'Integer',
124
124
  :'skip_embedding_generation' => :'Boolean',
@@ -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.2.25'
10
+ VERSION = '0.2.27'
11
11
  end
@@ -50,6 +50,7 @@ require 'carbon_ruby_sdk/models/embeddings_and_chunks_order_by_columns'
50
50
  require 'carbon_ruby_sdk/models/embeddings_and_chunks_query_input'
51
51
  require 'carbon_ruby_sdk/models/embeddings_and_chunks_query_input_v2'
52
52
  require 'carbon_ruby_sdk/models/embeddings_and_chunks_response'
53
+ require 'carbon_ruby_sdk/models/external_data_source_type'
53
54
  require 'carbon_ruby_sdk/models/external_file_sync_statuses'
54
55
  require 'carbon_ruby_sdk/models/external_source_item'
55
56
  require 'carbon_ruby_sdk/models/external_source_items_order_by'
@@ -74,7 +74,7 @@ describe 'IntegrationsApi' do
74
74
 
75
75
  # unit tests for create_aws_iam_user
76
76
  # S3 Auth
77
- # 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.
77
+ # 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. It should look like &lt;&lt;region&gt;&gt;.digitaloceanspaces.com
78
78
  # @param s3_auth_request
79
79
  # @param [Hash] opts the optional parameters
80
80
  # @return [OrganizationUserDataSourceAPI]
@@ -0,0 +1,22 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'spec_helper'
10
+ require 'json'
11
+ require 'date'
12
+
13
+ # Unit tests for Carbon::ExternalDataSourceType
14
+ describe Carbon::ExternalDataSourceType do
15
+ let(:instance) { Carbon::ExternalDataSourceType.new }
16
+
17
+ describe 'test an instance of ExternalDataSourceType' do
18
+ it 'should create an instance of ExternalDataSourceType' do
19
+ expect(instance).to be_instance_of(Carbon::ExternalDataSourceType)
20
+ end
21
+ end
22
+ 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.2.25
4
+ version: 0.2.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konfig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-21 00:00:00.000000000 Z
11
+ date: 2024-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -132,6 +132,7 @@ files:
132
132
  - lib/carbon_ruby_sdk/models/embeddings_and_chunks_query_input.rb
133
133
  - lib/carbon_ruby_sdk/models/embeddings_and_chunks_query_input_v2.rb
134
134
  - lib/carbon_ruby_sdk/models/embeddings_and_chunks_response.rb
135
+ - lib/carbon_ruby_sdk/models/external_data_source_type.rb
135
136
  - lib/carbon_ruby_sdk/models/external_file_sync_statuses.rb
136
137
  - lib/carbon_ruby_sdk/models/external_source_item.rb
137
138
  - lib/carbon_ruby_sdk/models/external_source_items_order_by.rb
@@ -305,6 +306,7 @@ files:
305
306
  - spec/models/embeddings_and_chunks_query_input_spec.rb
306
307
  - spec/models/embeddings_and_chunks_query_input_v2_spec.rb
307
308
  - spec/models/embeddings_and_chunks_response_spec.rb
309
+ - spec/models/external_data_source_type_spec.rb
308
310
  - spec/models/external_file_sync_statuses_spec.rb
309
311
  - spec/models/external_source_item_spec.rb
310
312
  - spec/models/external_source_items_order_by_spec.rb
@@ -600,6 +602,7 @@ test_files:
600
602
  - spec/models/list_users_request_spec.rb
601
603
  - spec/models/gitbook_sync_request_spec.rb
602
604
  - spec/models/http_validation_error_spec.rb
605
+ - spec/models/external_data_source_type_spec.rb
603
606
  - spec/models/embedding_and_chunk_spec.rb
604
607
  - spec/models/embedding_properties_spec.rb
605
608
  - spec/models/file_sync_config_nullable_spec.rb