carbon_ruby_sdk 0.1.22 → 0.1.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +104 -8
  4. data/lib/carbon_ruby_sdk/api/embeddings_api.rb +2 -2
  5. data/lib/carbon_ruby_sdk/api/integrations_api.rb +252 -18
  6. data/lib/carbon_ruby_sdk/models/chunks_and_embeddings_upload_input.rb +4 -2
  7. data/lib/carbon_ruby_sdk/models/custom_credentials_type.rb +39 -0
  8. data/lib/carbon_ruby_sdk/models/embedding_generators.rb +2 -1
  9. data/lib/carbon_ruby_sdk/models/embedding_generators_nullable.rb +2 -1
  10. data/lib/carbon_ruby_sdk/models/external_source_items_order_by.rb +37 -0
  11. data/lib/carbon_ruby_sdk/models/fresh_desk_connect_request.rb +17 -5
  12. data/lib/carbon_ruby_sdk/models/gitbook_connect_request.rb +17 -5
  13. data/lib/carbon_ruby_sdk/models/github_connect_request.rb +16 -4
  14. data/lib/carbon_ruby_sdk/models/github_fetch_repos_request.rb +260 -0
  15. data/lib/carbon_ruby_sdk/models/list_data_source_items_request.rb +26 -4
  16. data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +19 -6
  17. data/lib/carbon_ruby_sdk/models/order_dir_v2.rb +36 -0
  18. data/lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb +19 -5
  19. data/lib/carbon_ruby_sdk/models/s3_auth_request.rb +16 -4
  20. data/lib/carbon_ruby_sdk/models/sync_files_request.rb +2 -1
  21. data/lib/carbon_ruby_sdk/models/sync_options.rb +18 -5
  22. data/lib/carbon_ruby_sdk/models/text_embedding_generators.rb +7 -1
  23. data/lib/carbon_ruby_sdk/version.rb +1 -1
  24. data/lib/carbon_ruby_sdk.rb +4 -0
  25. data/spec/api/integrations_api_spec.rb +26 -0
  26. data/spec/models/custom_credentials_type_spec.rb +22 -0
  27. data/spec/models/external_source_items_order_by_spec.rb +22 -0
  28. data/spec/models/fresh_desk_connect_request_spec.rb +6 -0
  29. data/spec/models/gitbook_connect_request_spec.rb +6 -0
  30. data/spec/models/github_connect_request_spec.rb +6 -0
  31. data/spec/models/github_fetch_repos_request_spec.rb +34 -0
  32. data/spec/models/list_data_source_items_request_spec.rb +12 -0
  33. data/spec/models/o_auth_url_request_spec.rb +6 -0
  34. data/spec/models/order_dir_v2_spec.rb +22 -0
  35. data/spec/models/organization_user_data_source_api_spec.rb +6 -0
  36. data/spec/models/s3_auth_request_spec.rb +6 -0
  37. data/spec/models/sync_options_spec.rb +6 -0
  38. metadata +14 -2
@@ -33,6 +33,9 @@ module Carbon
33
33
 
34
34
  attr_accessor :request_id
35
35
 
36
+ # Enabling this flag will fetch all available content from the source to be listed via list items endpoint
37
+ attr_accessor :sync_source_items
38
+
36
39
  # Attribute mapping from ruby-style variable name to JSON key.
37
40
  def self.attribute_map
38
41
  {
@@ -46,7 +49,8 @@ module Carbon
46
49
  :'generate_sparse_vectors' => :'generate_sparse_vectors',
47
50
  :'prepend_filename_to_chunks' => :'prepend_filename_to_chunks',
48
51
  :'sync_files_on_connection' => :'sync_files_on_connection',
49
- :'request_id' => :'request_id'
52
+ :'request_id' => :'request_id',
53
+ :'sync_source_items' => :'sync_source_items'
50
54
  }
51
55
  end
52
56
 
@@ -68,7 +72,8 @@ module Carbon
68
72
  :'generate_sparse_vectors' => :'Boolean',
69
73
  :'prepend_filename_to_chunks' => :'Boolean',
70
74
  :'sync_files_on_connection' => :'Boolean',
71
- :'request_id' => :'String'
75
+ :'request_id' => :'String',
76
+ :'sync_source_items' => :'Boolean'
72
77
  }
73
78
  end
74
79
 
@@ -83,7 +88,7 @@ module Carbon
83
88
  :'generate_sparse_vectors',
84
89
  :'prepend_filename_to_chunks',
85
90
  :'sync_files_on_connection',
86
- :'request_id'
91
+ :'request_id',
87
92
  ])
88
93
  end
89
94
 
@@ -159,6 +164,12 @@ module Carbon
159
164
  if attributes.key?(:'request_id')
160
165
  self.request_id = attributes[:'request_id']
161
166
  end
167
+
168
+ if attributes.key?(:'sync_source_items')
169
+ self.sync_source_items = attributes[:'sync_source_items']
170
+ else
171
+ self.sync_source_items = true
172
+ end
162
173
  end
163
174
 
164
175
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -199,7 +210,8 @@ module Carbon
199
210
  generate_sparse_vectors == o.generate_sparse_vectors &&
200
211
  prepend_filename_to_chunks == o.prepend_filename_to_chunks &&
201
212
  sync_files_on_connection == o.sync_files_on_connection &&
202
- request_id == o.request_id
213
+ request_id == o.request_id &&
214
+ sync_source_items == o.sync_source_items
203
215
  end
204
216
 
205
217
  # @see the `==` method
@@ -211,7 +223,7 @@ module Carbon
211
223
  # Calculates hash code according to all attributes.
212
224
  # @return [Integer] Hash code
213
225
  def hash
214
- [tags, domain, api_key, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, sync_files_on_connection, request_id].hash
226
+ [tags, domain, api_key, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, sync_files_on_connection, request_id, sync_source_items].hash
215
227
  end
216
228
 
217
229
  # Builds the object from hash
@@ -33,6 +33,9 @@ module Carbon
33
33
 
34
34
  attr_accessor :request_id
35
35
 
36
+ # Enabling this flag will fetch all available content from the source to be listed via list items endpoint
37
+ attr_accessor :sync_source_items
38
+
36
39
  # Attribute mapping from ruby-style variable name to JSON key.
37
40
  def self.attribute_map
38
41
  {
@@ -46,7 +49,8 @@ module Carbon
46
49
  :'generate_sparse_vectors' => :'generate_sparse_vectors',
47
50
  :'prepend_filename_to_chunks' => :'prepend_filename_to_chunks',
48
51
  :'sync_files_on_connection' => :'sync_files_on_connection',
49
- :'request_id' => :'request_id'
52
+ :'request_id' => :'request_id',
53
+ :'sync_source_items' => :'sync_source_items'
50
54
  }
51
55
  end
52
56
 
@@ -68,7 +72,8 @@ module Carbon
68
72
  :'generate_sparse_vectors' => :'Boolean',
69
73
  :'prepend_filename_to_chunks' => :'Boolean',
70
74
  :'sync_files_on_connection' => :'Boolean',
71
- :'request_id' => :'String'
75
+ :'request_id' => :'String',
76
+ :'sync_source_items' => :'Boolean'
72
77
  }
73
78
  end
74
79
 
@@ -82,7 +87,7 @@ module Carbon
82
87
  :'generate_sparse_vectors',
83
88
  :'prepend_filename_to_chunks',
84
89
  :'sync_files_on_connection',
85
- :'request_id'
90
+ :'request_id',
86
91
  ])
87
92
  end
88
93
 
@@ -158,6 +163,12 @@ module Carbon
158
163
  if attributes.key?(:'request_id')
159
164
  self.request_id = attributes[:'request_id']
160
165
  end
166
+
167
+ if attributes.key?(:'sync_source_items')
168
+ self.sync_source_items = attributes[:'sync_source_items']
169
+ else
170
+ self.sync_source_items = true
171
+ end
161
172
  end
162
173
 
163
174
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -198,7 +209,8 @@ module Carbon
198
209
  generate_sparse_vectors == o.generate_sparse_vectors &&
199
210
  prepend_filename_to_chunks == o.prepend_filename_to_chunks &&
200
211
  sync_files_on_connection == o.sync_files_on_connection &&
201
- request_id == o.request_id
212
+ request_id == o.request_id &&
213
+ sync_source_items == o.sync_source_items
202
214
  end
203
215
 
204
216
  # @see the `==` method
@@ -210,7 +222,7 @@ module Carbon
210
222
  # Calculates hash code according to all attributes.
211
223
  # @return [Integer] Hash code
212
224
  def hash
213
- [tags, organization, access_token, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, sync_files_on_connection, request_id].hash
225
+ [tags, organization, access_token, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, sync_files_on_connection, request_id, sync_source_items].hash
214
226
  end
215
227
 
216
228
  # Builds the object from hash
@@ -15,11 +15,15 @@ module Carbon
15
15
 
16
16
  attr_accessor :access_token
17
17
 
18
+ # Enabling this flag will fetch all available content from the source to be listed via list items endpoint
19
+ attr_accessor :sync_source_items
20
+
18
21
  # Attribute mapping from ruby-style variable name to JSON key.
19
22
  def self.attribute_map
20
23
  {
21
24
  :'username' => :'username',
22
- :'access_token' => :'access_token'
25
+ :'access_token' => :'access_token',
26
+ :'sync_source_items' => :'sync_source_items'
23
27
  }
24
28
  end
25
29
 
@@ -32,7 +36,8 @@ module Carbon
32
36
  def self.openapi_types
33
37
  {
34
38
  :'username' => :'String',
35
- :'access_token' => :'String'
39
+ :'access_token' => :'String',
40
+ :'sync_source_items' => :'Boolean'
36
41
  }
37
42
  end
38
43
 
@@ -64,6 +69,12 @@ module Carbon
64
69
  if attributes.key?(:'access_token')
65
70
  self.access_token = attributes[:'access_token']
66
71
  end
72
+
73
+ if attributes.key?(:'sync_source_items')
74
+ self.sync_source_items = attributes[:'sync_source_items']
75
+ else
76
+ self.sync_source_items = false
77
+ end
67
78
  end
68
79
 
69
80
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -95,7 +106,8 @@ module Carbon
95
106
  return true if self.equal?(o)
96
107
  self.class == o.class &&
97
108
  username == o.username &&
98
- access_token == o.access_token
109
+ access_token == o.access_token &&
110
+ sync_source_items == o.sync_source_items
99
111
  end
100
112
 
101
113
  # @see the `==` method
@@ -107,7 +119,7 @@ module Carbon
107
119
  # Calculates hash code according to all attributes.
108
120
  # @return [Integer] Hash code
109
121
  def hash
110
- [username, access_token].hash
122
+ [username, access_token, sync_source_items].hash
111
123
  end
112
124
 
113
125
  # Builds the object from hash
@@ -0,0 +1,260 @@
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 GithubFetchReposRequest
14
+ attr_accessor :repos
15
+
16
+ attr_accessor :data_source_id
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'repos' => :'repos',
22
+ :'data_source_id' => :'data_source_id'
23
+ }
24
+ end
25
+
26
+ # Returns all the JSON keys this model knows about
27
+ def self.acceptable_attributes
28
+ attribute_map.values
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.openapi_types
33
+ {
34
+ :'repos' => :'Array<String>',
35
+ :'data_source_id' => :'Integer'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ :'data_source_id'
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::GithubFetchReposRequest` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::GithubFetchReposRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'repos')
62
+ if (value = attributes[:'repos']).is_a?(Array)
63
+ self.repos = value
64
+ end
65
+ end
66
+
67
+ if attributes.key?(:'data_source_id')
68
+ self.data_source_id = attributes[:'data_source_id']
69
+ end
70
+ end
71
+
72
+ # Show invalid properties with the reasons. Usually used together with valid?
73
+ # @return Array for valid properties with the reasons
74
+ def list_invalid_properties
75
+ invalid_properties = Array.new
76
+ if @repos.nil?
77
+ invalid_properties.push('invalid value for "repos", repos cannot be nil.')
78
+ end
79
+
80
+ if @repos.length > 25
81
+ invalid_properties.push('invalid value for "repos", number of items must be less than or equal to 25.')
82
+ end
83
+
84
+ if @repos.length < 1
85
+ invalid_properties.push('invalid value for "repos", number of items must be greater than or equal to 1.')
86
+ end
87
+
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ return false if @repos.nil?
95
+ return false if @repos.length > 25
96
+ return false if @repos.length < 1
97
+ true
98
+ end
99
+
100
+ # Custom attribute writer method with validation
101
+ # @param [Object] repos Value to be assigned
102
+ def repos=(repos)
103
+ if repos.nil?
104
+ fail ArgumentError, 'repos cannot be nil'
105
+ end
106
+
107
+ if repos.length > 25
108
+ fail ArgumentError, 'invalid value for "repos", number of items must be less than or equal to 25.'
109
+ end
110
+
111
+ if repos.length < 1
112
+ fail ArgumentError, 'invalid value for "repos", number of items must be greater than or equal to 1.'
113
+ end
114
+
115
+ @repos = repos
116
+ end
117
+
118
+ # Checks equality by comparing each attribute.
119
+ # @param [Object] Object to be compared
120
+ def ==(o)
121
+ return true if self.equal?(o)
122
+ self.class == o.class &&
123
+ repos == o.repos &&
124
+ data_source_id == o.data_source_id
125
+ end
126
+
127
+ # @see the `==` method
128
+ # @param [Object] Object to be compared
129
+ def eql?(o)
130
+ self == o
131
+ end
132
+
133
+ # Calculates hash code according to all attributes.
134
+ # @return [Integer] Hash code
135
+ def hash
136
+ [repos, data_source_id].hash
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def self.build_from_hash(attributes)
143
+ new.build_from_hash(attributes)
144
+ end
145
+
146
+ # Builds the object from hash
147
+ # @param [Hash] attributes Model attributes in the form of hash
148
+ # @return [Object] Returns the model itself
149
+ def build_from_hash(attributes)
150
+ return nil unless attributes.is_a?(Hash)
151
+ attributes = attributes.transform_keys(&:to_sym)
152
+ self.class.openapi_types.each_pair do |key, type|
153
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
154
+ self.send("#{key}=", nil)
155
+ elsif type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
159
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
160
+ end
161
+ elsif !attributes[self.class.attribute_map[key]].nil?
162
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
163
+ end
164
+ end
165
+
166
+ self
167
+ end
168
+
169
+ # Deserializes the data based on type
170
+ # @param string type Data type
171
+ # @param string value Value to be deserialized
172
+ # @return [Object] Deserialized data
173
+ def _deserialize(type, value)
174
+ case type.to_sym
175
+ when :Time
176
+ Time.parse(value)
177
+ when :Date
178
+ Date.parse(value)
179
+ when :String
180
+ value.to_s
181
+ when :Integer
182
+ value.to_i
183
+ when :Float
184
+ value.to_f
185
+ when :Boolean
186
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
187
+ true
188
+ else
189
+ false
190
+ end
191
+ when :Object
192
+ # generic object (usually a Hash), return directly
193
+ value
194
+ when /\AArray<(?<inner_type>.+)>\z/
195
+ inner_type = Regexp.last_match[:inner_type]
196
+ value.map { |v| _deserialize(inner_type, v) }
197
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
198
+ k_type = Regexp.last_match[:k_type]
199
+ v_type = Regexp.last_match[:v_type]
200
+ {}.tap do |hash|
201
+ value.each do |k, v|
202
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
203
+ end
204
+ end
205
+ else # model
206
+ # models (e.g. Pet) or oneOf
207
+ klass = Carbon.const_get(type)
208
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
209
+ end
210
+ end
211
+
212
+ # Returns the string representation of the object
213
+ # @return [String] String presentation of the object
214
+ def to_s
215
+ to_hash.to_s
216
+ end
217
+
218
+ # to_body is an alias to to_hash (backward compatibility)
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_body
221
+ to_hash
222
+ end
223
+
224
+ # Returns the object in the form of hash
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_hash
227
+ hash = {}
228
+ self.class.attribute_map.each_pair do |attr, param|
229
+ value = self.send(attr)
230
+ if value.nil?
231
+ is_nullable = self.class.openapi_nullable.include?(attr)
232
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
233
+ end
234
+
235
+ hash[param] = _to_hash(value)
236
+ end
237
+ hash
238
+ end
239
+
240
+ # Outputs non-array value in the form of hash
241
+ # For object, use to_hash. Otherwise, just return the value
242
+ # @param [Object] value Any valid value
243
+ # @return [Hash] Returns the value in the form of hash
244
+ def _to_hash(value)
245
+ if value.is_a?(Array)
246
+ value.compact.map { |v| _to_hash(v) }
247
+ elsif value.is_a?(Hash)
248
+ {}.tap do |hash|
249
+ value.each { |k, v| hash[k] = _to_hash(v) }
250
+ end
251
+ elsif value.respond_to? :to_hash
252
+ value.to_hash
253
+ else
254
+ value
255
+ end
256
+ end
257
+
258
+ end
259
+
260
+ end
@@ -19,13 +19,19 @@ module Carbon
19
19
 
20
20
  attr_accessor :pagination
21
21
 
22
+ attr_accessor :order_by
23
+
24
+ attr_accessor :order_dir
25
+
22
26
  # Attribute mapping from ruby-style variable name to JSON key.
23
27
  def self.attribute_map
24
28
  {
25
29
  :'data_source_id' => :'data_source_id',
26
30
  :'parent_id' => :'parent_id',
27
31
  :'filters' => :'filters',
28
- :'pagination' => :'pagination'
32
+ :'pagination' => :'pagination',
33
+ :'order_by' => :'order_by',
34
+ :'order_dir' => :'order_dir'
29
35
  }
30
36
  end
31
37
 
@@ -40,7 +46,9 @@ module Carbon
40
46
  :'data_source_id' => :'Integer',
41
47
  :'parent_id' => :'String',
42
48
  :'filters' => :'ListItemsFiltersNullable',
43
- :'pagination' => :'Pagination'
49
+ :'pagination' => :'Pagination',
50
+ :'order_by' => :'ExternalSourceItemsOrderBy',
51
+ :'order_dir' => :'OrderDirV2'
44
52
  }
45
53
  end
46
54
 
@@ -82,6 +90,18 @@ module Carbon
82
90
  if attributes.key?(:'pagination')
83
91
  self.pagination = attributes[:'pagination']
84
92
  end
93
+
94
+ if attributes.key?(:'order_by')
95
+ self.order_by = attributes[:'order_by']
96
+ else
97
+ self.order_by = 'name'
98
+ end
99
+
100
+ if attributes.key?(:'order_dir')
101
+ self.order_dir = attributes[:'order_dir']
102
+ else
103
+ self.order_dir = 'asc'
104
+ end
85
105
  end
86
106
 
87
107
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -110,7 +130,9 @@ module Carbon
110
130
  data_source_id == o.data_source_id &&
111
131
  parent_id == o.parent_id &&
112
132
  filters == o.filters &&
113
- pagination == o.pagination
133
+ pagination == o.pagination &&
134
+ order_by == o.order_by &&
135
+ order_dir == o.order_dir
114
136
  end
115
137
 
116
138
  # @see the `==` method
@@ -122,7 +144,7 @@ module Carbon
122
144
  # Calculates hash code according to all attributes.
123
145
  # @return [Integer] Hash code
124
146
  def hash
125
- [data_source_id, parent_id, filters, pagination].hash
147
+ [data_source_id, parent_id, filters, pagination, order_by, order_dir].hash
126
148
  end
127
149
 
128
150
  # Builds the object from hash
@@ -61,9 +61,12 @@ 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: ONEDRIVE, DROPBOX, BOX, GOOGLE_DRIVE, SHAREPOINT
64
+ # Enable integration's file picker for sources that support it. Supported sources: GOOGLE_DRIVE, BOX, ONEDRIVE, DROPBOX, SHAREPOINT
65
65
  attr_accessor :enable_file_picker
66
66
 
67
+ # Enabling this flag will fetch all available content from the source to be listed via list items endpoint
68
+ attr_accessor :sync_source_items
69
+
67
70
  # Attribute mapping from ruby-style variable name to JSON key.
68
71
  def self.attribute_map
69
72
  {
@@ -89,7 +92,8 @@ module Carbon
89
92
  :'request_id' => :'request_id',
90
93
  :'use_ocr' => :'use_ocr',
91
94
  :'parse_pdf_tables_with_ocr' => :'parse_pdf_tables_with_ocr',
92
- :'enable_file_picker' => :'enable_file_picker'
95
+ :'enable_file_picker' => :'enable_file_picker',
96
+ :'sync_source_items' => :'sync_source_items'
93
97
  }
94
98
  end
95
99
 
@@ -123,7 +127,8 @@ module Carbon
123
127
  :'request_id' => :'String',
124
128
  :'use_ocr' => :'Boolean',
125
129
  :'parse_pdf_tables_with_ocr' => :'Boolean',
126
- :'enable_file_picker' => :'Boolean'
130
+ :'enable_file_picker' => :'Boolean',
131
+ :'sync_source_items' => :'Boolean'
127
132
  }
128
133
  end
129
134
 
@@ -147,7 +152,6 @@ module Carbon
147
152
  :'sync_files_on_connection',
148
153
  :'data_source_id',
149
154
  :'connecting_new_account',
150
- :'request_id',
151
155
  :'use_ocr',
152
156
  :'parse_pdf_tables_with_ocr',
153
157
  ])
@@ -264,6 +268,8 @@ module Carbon
264
268
 
265
269
  if attributes.key?(:'request_id')
266
270
  self.request_id = attributes[:'request_id']
271
+ else
272
+ self.request_id = 'ae840422-78ad-45c5-a0bd-019c2b2e8443'
267
273
  end
268
274
 
269
275
  if attributes.key?(:'use_ocr')
@@ -283,6 +289,12 @@ module Carbon
283
289
  else
284
290
  self.enable_file_picker = true
285
291
  end
292
+
293
+ if attributes.key?(:'sync_source_items')
294
+ self.sync_source_items = attributes[:'sync_source_items']
295
+ else
296
+ self.sync_source_items = true
297
+ end
286
298
  end
287
299
 
288
300
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -330,7 +342,8 @@ module Carbon
330
342
  request_id == o.request_id &&
331
343
  use_ocr == o.use_ocr &&
332
344
  parse_pdf_tables_with_ocr == o.parse_pdf_tables_with_ocr &&
333
- enable_file_picker == o.enable_file_picker
345
+ enable_file_picker == o.enable_file_picker &&
346
+ sync_source_items == o.sync_source_items
334
347
  end
335
348
 
336
349
  # @see the `==` method
@@ -342,7 +355,7 @@ module Carbon
342
355
  # Calculates hash code according to all attributes.
343
356
  # @return [Integer] Hash code
344
357
  def hash
345
- [tags, scope, service, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, zendesk_subdomain, microsoft_tenant, sharepoint_site_name, confluence_subdomain, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, salesforce_domain, sync_files_on_connection, set_page_as_boundary, data_source_id, connecting_new_account, request_id, use_ocr, parse_pdf_tables_with_ocr, enable_file_picker].hash
358
+ [tags, scope, service, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, zendesk_subdomain, microsoft_tenant, sharepoint_site_name, confluence_subdomain, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, salesforce_domain, sync_files_on_connection, set_page_as_boundary, data_source_id, connecting_new_account, request_id, use_ocr, parse_pdf_tables_with_ocr, enable_file_picker, sync_source_items].hash
346
359
  end
347
360
 
348
361
  # Builds the object from hash
@@ -0,0 +1,36 @@
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 OrderDirV2
14
+ ASC = "asc".freeze
15
+ DESC = "desc".freeze
16
+
17
+ def self.all_vars
18
+ @all_vars ||= [ASC, DESC].freeze
19
+ end
20
+
21
+ # Builds the enum from string
22
+ # @param [String] The enum value in the form of the string
23
+ # @return [String] The enum value
24
+ def self.build_from_hash(value)
25
+ new.build_from_hash(value)
26
+ end
27
+
28
+ # Builds the enum from string
29
+ # @param [String] The enum value in the form of the string
30
+ # @return [String] The enum value
31
+ def build_from_hash(value)
32
+ return value if OrderDirV2.all_vars.include?(value)
33
+ raise "Invalid ENUM value #{value} for class #OrderDirV2"
34
+ end
35
+ end
36
+ end