carbon_ruby_sdk 0.1.4 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +56 -9
  4. data/lib/carbon_ruby_sdk/api/embeddings_api.rb +10 -2
  5. data/lib/carbon_ruby_sdk/api/files_api.rb +6 -2
  6. data/lib/carbon_ruby_sdk/api/integrations_api.rb +72 -19
  7. data/lib/carbon_ruby_sdk/models/chunks_and_embeddings.rb +1 -5
  8. data/lib/carbon_ruby_sdk/models/chunks_and_embeddings_upload_input.rb +24 -4
  9. data/lib/carbon_ruby_sdk/models/embedding_generators.rb +6 -1
  10. data/lib/carbon_ruby_sdk/models/embedding_generators_nullable.rb +6 -1
  11. data/lib/carbon_ruby_sdk/models/file_formats.rb +1 -6
  12. data/lib/carbon_ruby_sdk/models/file_formats_nullable.rb +1 -6
  13. data/lib/carbon_ruby_sdk/models/gmail_sync_input.rb +15 -5
  14. data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +29 -4
  15. data/lib/carbon_ruby_sdk/models/outh_url_response.rb +220 -0
  16. data/lib/carbon_ruby_sdk/models/outlook_sync_input.rb +15 -5
  17. data/lib/carbon_ruby_sdk/models/resync_file_query_input.rb +16 -5
  18. data/lib/carbon_ruby_sdk/models/s3_file_sync_input.rb +14 -4
  19. data/lib/carbon_ruby_sdk/version.rb +1 -1
  20. data/lib/carbon_ruby_sdk.rb +1 -0
  21. data/spec/api/integrations_api_spec.rb +5 -1
  22. data/spec/models/chunks_and_embeddings_upload_input_spec.rb +12 -0
  23. data/spec/models/gmail_sync_input_spec.rb +6 -0
  24. data/spec/models/o_auth_url_request_spec.rb +12 -0
  25. data/spec/models/outh_url_response_spec.rb +28 -0
  26. data/spec/models/outlook_sync_input_spec.rb +6 -0
  27. data/spec/models/resync_file_query_input_spec.rb +6 -0
  28. data/spec/models/s3_file_sync_input_spec.rb +6 -0
  29. metadata +5 -2
@@ -17,12 +17,15 @@ module Carbon
17
17
 
18
18
  attr_accessor :chunk_overlap
19
19
 
20
+ attr_accessor :force_embedding_generation
21
+
20
22
  # Attribute mapping from ruby-style variable name to JSON key.
21
23
  def self.attribute_map
22
24
  {
23
25
  :'file_id' => :'file_id',
24
26
  :'chunk_size' => :'chunk_size',
25
- :'chunk_overlap' => :'chunk_overlap'
27
+ :'chunk_overlap' => :'chunk_overlap',
28
+ :'force_embedding_generation' => :'force_embedding_generation'
26
29
  }
27
30
  end
28
31
 
@@ -36,7 +39,8 @@ module Carbon
36
39
  {
37
40
  :'file_id' => :'Integer',
38
41
  :'chunk_size' => :'Integer',
39
- :'chunk_overlap' => :'Integer'
42
+ :'chunk_overlap' => :'Integer',
43
+ :'force_embedding_generation' => :'Boolean'
40
44
  }
41
45
  end
42
46
 
@@ -44,7 +48,7 @@ module Carbon
44
48
  def self.openapi_nullable
45
49
  Set.new([
46
50
  :'chunk_size',
47
- :'chunk_overlap'
51
+ :'chunk_overlap',
48
52
  ])
49
53
  end
50
54
 
@@ -74,6 +78,12 @@ module Carbon
74
78
  if attributes.key?(:'chunk_overlap')
75
79
  self.chunk_overlap = attributes[:'chunk_overlap']
76
80
  end
81
+
82
+ if attributes.key?(:'force_embedding_generation')
83
+ self.force_embedding_generation = attributes[:'force_embedding_generation']
84
+ else
85
+ self.force_embedding_generation = false
86
+ end
77
87
  end
78
88
 
79
89
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -101,7 +111,8 @@ module Carbon
101
111
  self.class == o.class &&
102
112
  file_id == o.file_id &&
103
113
  chunk_size == o.chunk_size &&
104
- chunk_overlap == o.chunk_overlap
114
+ chunk_overlap == o.chunk_overlap &&
115
+ force_embedding_generation == o.force_embedding_generation
105
116
  end
106
117
 
107
118
  # @see the `==` method
@@ -113,7 +124,7 @@ module Carbon
113
124
  # Calculates hash code according to all attributes.
114
125
  # @return [Integer] Hash code
115
126
  def hash
116
- [file_id, chunk_size, chunk_overlap].hash
127
+ [file_id, chunk_size, chunk_overlap, force_embedding_generation].hash
117
128
  end
118
129
 
119
130
  # Builds the object from hash
@@ -31,6 +31,8 @@ module Carbon
31
31
 
32
32
  attr_accessor :set_page_as_boundary
33
33
 
34
+ attr_accessor :data_source_id
35
+
34
36
  # Attribute mapping from ruby-style variable name to JSON key.
35
37
  def self.attribute_map
36
38
  {
@@ -43,7 +45,8 @@ module Carbon
43
45
  :'generate_sparse_vectors' => :'generate_sparse_vectors',
44
46
  :'prepend_filename_to_chunks' => :'prepend_filename_to_chunks',
45
47
  :'max_items_per_chunk' => :'max_items_per_chunk',
46
- :'set_page_as_boundary' => :'set_page_as_boundary'
48
+ :'set_page_as_boundary' => :'set_page_as_boundary',
49
+ :'data_source_id' => :'data_source_id'
47
50
  }
48
51
  end
49
52
 
@@ -64,7 +67,8 @@ module Carbon
64
67
  :'generate_sparse_vectors' => :'Boolean',
65
68
  :'prepend_filename_to_chunks' => :'Boolean',
66
69
  :'max_items_per_chunk' => :'Integer',
67
- :'set_page_as_boundary' => :'Boolean'
70
+ :'set_page_as_boundary' => :'Boolean',
71
+ :'data_source_id' => :'Integer'
68
72
  }
69
73
  end
70
74
 
@@ -78,6 +82,7 @@ module Carbon
78
82
  :'generate_sparse_vectors',
79
83
  :'prepend_filename_to_chunks',
80
84
  :'max_items_per_chunk',
85
+ :'data_source_id'
81
86
  ])
82
87
  end
83
88
 
@@ -151,6 +156,10 @@ module Carbon
151
156
  else
152
157
  self.set_page_as_boundary = false
153
158
  end
159
+
160
+ if attributes.key?(:'data_source_id')
161
+ self.data_source_id = attributes[:'data_source_id']
162
+ end
154
163
  end
155
164
 
156
165
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -185,7 +194,8 @@ module Carbon
185
194
  generate_sparse_vectors == o.generate_sparse_vectors &&
186
195
  prepend_filename_to_chunks == o.prepend_filename_to_chunks &&
187
196
  max_items_per_chunk == o.max_items_per_chunk &&
188
- set_page_as_boundary == o.set_page_as_boundary
197
+ set_page_as_boundary == o.set_page_as_boundary &&
198
+ data_source_id == o.data_source_id
189
199
  end
190
200
 
191
201
  # @see the `==` method
@@ -197,7 +207,7 @@ module Carbon
197
207
  # Calculates hash code according to all attributes.
198
208
  # @return [Integer] Hash code
199
209
  def hash
200
- [tags, ids, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, set_page_as_boundary].hash
210
+ [tags, ids, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, set_page_as_boundary, data_source_id].hash
201
211
  end
202
212
 
203
213
  # 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.4'
10
+ VERSION = '0.1.6'
11
11
  end
@@ -76,6 +76,7 @@ require 'carbon_ruby_sdk/models/organization_user_file_tags_remove'
76
76
  require 'carbon_ruby_sdk/models/organization_user_files_to_sync_filters'
77
77
  require 'carbon_ruby_sdk/models/organization_user_files_to_sync_order_by_types'
78
78
  require 'carbon_ruby_sdk/models/organization_user_files_to_sync_query_input'
79
+ require 'carbon_ruby_sdk/models/outh_url_response'
79
80
  require 'carbon_ruby_sdk/models/outlook_sync_input'
80
81
  require 'carbon_ruby_sdk/models/pagination'
81
82
  require 'carbon_ruby_sdk/models/presigned_url_response'
@@ -64,9 +64,10 @@ describe 'IntegrationsApi' do
64
64
 
65
65
  # unit tests for get_oauth_url
66
66
  # Get Oauth Url
67
+ # This endpoint can be used to generate the following URLs - An OAuth URL for OAuth based connectors - A file syncing URL which skips the OAuth flow if the user already has a valid access token and takes them to the success state.
67
68
  # @param o_auth_url_request
68
69
  # @param [Hash] opts the optional parameters
69
- # @return [Object]
70
+ # @return [OuthURLResponse]
70
71
  describe 'get_oauth_url test' do
71
72
  it 'should work' do
72
73
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -100,6 +101,7 @@ describe 'IntegrationsApi' do
100
101
  # Outlook Folders
101
102
  # After connecting your Outlook account, you can use this endpoint to list all of your folders on outlook. This includes both system folders like \"inbox\" and user created folders.
102
103
  # @param [Hash] opts the optional parameters
104
+ # @option opts [Integer] :data_source_id
103
105
  # @return [Object]
104
106
  describe 'list_folders test' do
105
107
  it 'should work' do
@@ -123,6 +125,7 @@ describe 'IntegrationsApi' do
123
125
  # Gmail Labels
124
126
  # After connecting your Gmail account, you can use this endpoint to list all of your labels. User created labels will have the type \"user\" and Gmail's default labels will have the type \"system\"
125
127
  # @param [Hash] opts the optional parameters
128
+ # @option opts [Integer] :data_source_id
126
129
  # @return [Object]
127
130
  describe 'list_labels test' do
128
131
  it 'should work' do
@@ -134,6 +137,7 @@ describe 'IntegrationsApi' do
134
137
  # Outlook Categories
135
138
  # After connecting your Outlook account, you can use this endpoint to list all of your categories on outlook. We currently support listing up to 250 categories.
136
139
  # @param [Hash] opts the optional parameters
140
+ # @option opts [Integer] :data_source_id
137
141
  # @return [Object]
138
142
  describe 'list_outlook_categories test' do
139
143
  it 'should work' do
@@ -37,4 +37,16 @@ describe Carbon::ChunksAndEmbeddingsUploadInput do
37
37
  end
38
38
  end
39
39
 
40
+ describe 'test attribute "chunks_only"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "custom_credentials"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
40
52
  end
@@ -67,4 +67,10 @@ describe Carbon::GmailSyncInput do
67
67
  end
68
68
  end
69
69
 
70
+ describe 'test attribute "data_source_id"' do
71
+ it 'should work' do
72
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
73
+ end
74
+ end
75
+
70
76
  end
@@ -121,4 +121,16 @@ describe Carbon::OAuthURLRequest do
121
121
  end
122
122
  end
123
123
 
124
+ describe 'test attribute "data_source_id"' do
125
+ it 'should work' do
126
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
127
+ end
128
+ end
129
+
130
+ describe 'test attribute "connecting_new_account"' do
131
+ it 'should work' do
132
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
133
+ end
134
+ end
135
+
124
136
  end
@@ -0,0 +1,28 @@
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::OuthURLResponse
14
+ describe Carbon::OuthURLResponse do
15
+ let(:instance) { Carbon::OuthURLResponse.new }
16
+
17
+ describe 'test an instance of OuthURLResponse' do
18
+ it 'should create an instance of OuthURLResponse' do
19
+ expect(instance).to be_instance_of(Carbon::OuthURLResponse)
20
+ end
21
+ end
22
+ describe 'test attribute "oauth_url"' do
23
+ it 'should work' do
24
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
25
+ end
26
+ end
27
+
28
+ end
@@ -73,4 +73,10 @@ describe Carbon::OutlookSyncInput do
73
73
  end
74
74
  end
75
75
 
76
+ describe 'test attribute "data_source_id"' do
77
+ it 'should work' do
78
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
79
+ end
80
+ end
81
+
76
82
  end
@@ -37,4 +37,10 @@ describe Carbon::ResyncFileQueryInput do
37
37
  end
38
38
  end
39
39
 
40
+ describe 'test attribute "force_embedding_generation"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
40
46
  end
@@ -79,4 +79,10 @@ describe Carbon::S3FileSyncInput do
79
79
  end
80
80
  end
81
81
 
82
+ describe 'test attribute "data_source_id"' 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
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.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konfig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-06 00:00:00.000000000 Z
11
+ date: 2024-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -159,6 +159,7 @@ files:
159
159
  - lib/carbon_ruby_sdk/models/organization_user_files_to_sync_filters.rb
160
160
  - lib/carbon_ruby_sdk/models/organization_user_files_to_sync_order_by_types.rb
161
161
  - lib/carbon_ruby_sdk/models/organization_user_files_to_sync_query_input.rb
162
+ - lib/carbon_ruby_sdk/models/outh_url_response.rb
162
163
  - lib/carbon_ruby_sdk/models/outlook_sync_input.rb
163
164
  - lib/carbon_ruby_sdk/models/pagination.rb
164
165
  - lib/carbon_ruby_sdk/models/presigned_url_response.rb
@@ -271,6 +272,7 @@ files:
271
272
  - spec/models/organization_user_files_to_sync_filters_spec.rb
272
273
  - spec/models/organization_user_files_to_sync_order_by_types_spec.rb
273
274
  - spec/models/organization_user_files_to_sync_query_input_spec.rb
275
+ - spec/models/outh_url_response_spec.rb
274
276
  - spec/models/outlook_sync_input_spec.rb
275
277
  - spec/models/pagination_spec.rb
276
278
  - spec/models/presigned_url_response_spec.rb
@@ -440,6 +442,7 @@ test_files:
440
442
  - spec/models/delete_users_input_spec.rb
441
443
  - spec/models/webhook_no_key_spec.rb
442
444
  - spec/models/s3_file_sync_input_spec.rb
445
+ - spec/models/outh_url_response_spec.rb
443
446
  - spec/models/sync_directory_request_spec.rb
444
447
  - spec/models/file_statistics_nullable_spec.rb
445
448
  - spec/models/embeddings_and_chunks_order_by_columns_spec.rb