carbon_ruby_sdk 0.2.29 → 0.2.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -9
- data/README.md +49 -7
- data/lib/carbon_ruby_sdk/api/embeddings_api.rb +2 -2
- data/lib/carbon_ruby_sdk/api/files_api.rb +21 -6
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +18 -10
- data/lib/carbon_ruby_sdk/api/utilities_api.rb +6 -2
- data/lib/carbon_ruby_sdk/models/authentication_property.rb +77 -5
- data/lib/carbon_ruby_sdk/models/auto_synced_source_types_property_inner.rb +226 -0
- data/lib/carbon_ruby_sdk/models/data_source_type.rb +3 -1
- data/lib/carbon_ruby_sdk/models/data_source_type_nullable.rb +3 -1
- data/lib/carbon_ruby_sdk/models/file_formats.rb +3 -1
- data/lib/carbon_ruby_sdk/models/file_formats_nullable.rb +3 -1
- data/lib/carbon_ruby_sdk/models/file_sync_config.rb +17 -5
- data/lib/carbon_ruby_sdk/models/file_sync_config_nullable.rb +17 -5
- data/lib/carbon_ruby_sdk/models/get_embedding_documents_body.rb +1 -1
- data/lib/carbon_ruby_sdk/models/gong_authentication.rb +254 -0
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +28 -7
- data/lib/carbon_ruby_sdk/models/{external_data_source_type.rb → oauth_based_connectors.rb} +6 -4
- data/lib/carbon_ruby_sdk/models/organization_user_files_to_sync_filters.rb +1 -1
- data/lib/carbon_ruby_sdk/models/raw_text_input.rb +16 -4
- data/lib/carbon_ruby_sdk/models/service_now_authentication.rb +296 -0
- data/lib/carbon_ruby_sdk/models/service_now_credentials.rb +262 -0
- data/lib/carbon_ruby_sdk/models/service_now_credentials_nullable.rb +263 -0
- data/lib/carbon_ruby_sdk/models/service_now_file_types.rb +37 -0
- data/lib/carbon_ruby_sdk/models/sitemap_scrape_request.rb +17 -5
- data/lib/carbon_ruby_sdk/models/sync_files_request.rb +1 -1
- data/lib/carbon_ruby_sdk/models/sync_options.rb +1 -1
- data/lib/carbon_ruby_sdk/models/upload_file_from_url_input.rb +16 -4
- data/lib/carbon_ruby_sdk/models/webscrape_request.rb +17 -5
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +7 -1
- data/spec/api/files_api_spec.rb +1 -0
- data/spec/models/authentication_property_spec.rb +30 -0
- data/spec/models/auto_synced_source_types_property_inner_spec.rb +22 -0
- data/spec/models/file_sync_config_nullable_spec.rb +6 -0
- data/spec/models/file_sync_config_spec.rb +6 -0
- data/spec/models/gong_authentication_spec.rb +46 -0
- data/spec/models/o_auth_url_request_spec.rb +12 -0
- data/spec/models/oauth_based_connectors_spec.rb +22 -0
- data/spec/models/raw_text_input_spec.rb +6 -0
- data/spec/models/service_now_authentication_spec.rb +64 -0
- data/spec/models/service_now_credentials_nullable_spec.rb +46 -0
- data/spec/models/service_now_credentials_spec.rb +46 -0
- data/spec/models/service_now_file_types_spec.rb +22 -0
- data/spec/models/sitemap_scrape_request_spec.rb +6 -0
- data/spec/models/upload_file_from_url_input_spec.rb +6 -0
- data/spec/models/webscrape_request_spec.rb +6 -0
- metadata +170 -152
- data/spec/models/external_data_source_type_spec.rb +0 -22
@@ -0,0 +1,254 @@
|
|
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 GongAuthentication
|
14
|
+
attr_accessor :source
|
15
|
+
|
16
|
+
attr_accessor :access_token
|
17
|
+
|
18
|
+
attr_accessor :refresh_token
|
19
|
+
|
20
|
+
attr_accessor :gong_account_email
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'source' => :'source',
|
26
|
+
:'access_token' => :'access_token',
|
27
|
+
:'refresh_token' => :'refresh_token',
|
28
|
+
:'gong_account_email' => :'gong_account_email'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'source' => :'Object',
|
41
|
+
:'access_token' => :'String',
|
42
|
+
:'refresh_token' => :'String',
|
43
|
+
:'gong_account_email' => :'String'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# List of attributes with nullable: true
|
48
|
+
def self.openapi_nullable
|
49
|
+
Set.new([
|
50
|
+
:'source',
|
51
|
+
:'refresh_token',
|
52
|
+
])
|
53
|
+
end
|
54
|
+
|
55
|
+
# Initializes the object
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
57
|
+
def initialize(attributes = {})
|
58
|
+
if (!attributes.is_a?(Hash))
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::GongAuthentication` initialize method"
|
60
|
+
end
|
61
|
+
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
64
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::GongAuthentication`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
66
|
+
end
|
67
|
+
h[k.to_sym] = v
|
68
|
+
}
|
69
|
+
|
70
|
+
if attributes.key?(:'source')
|
71
|
+
self.source = attributes[:'source']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.key?(:'access_token')
|
75
|
+
self.access_token = attributes[:'access_token']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'refresh_token')
|
79
|
+
self.refresh_token = attributes[:'refresh_token']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.key?(:'gong_account_email')
|
83
|
+
self.gong_account_email = attributes[:'gong_account_email']
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
88
|
+
# @return Array for valid properties with the reasons
|
89
|
+
def list_invalid_properties
|
90
|
+
invalid_properties = Array.new
|
91
|
+
if @access_token.nil?
|
92
|
+
invalid_properties.push('invalid value for "access_token", access_token cannot be nil.')
|
93
|
+
end
|
94
|
+
|
95
|
+
if @gong_account_email.nil?
|
96
|
+
invalid_properties.push('invalid value for "gong_account_email", gong_account_email cannot be nil.')
|
97
|
+
end
|
98
|
+
|
99
|
+
invalid_properties
|
100
|
+
end
|
101
|
+
|
102
|
+
# Check to see if the all the properties in the model are valid
|
103
|
+
# @return true if the model is valid
|
104
|
+
def valid?
|
105
|
+
return false if @access_token.nil?
|
106
|
+
return false if @gong_account_email.nil?
|
107
|
+
true
|
108
|
+
end
|
109
|
+
|
110
|
+
# Checks equality by comparing each attribute.
|
111
|
+
# @param [Object] Object to be compared
|
112
|
+
def ==(o)
|
113
|
+
return true if self.equal?(o)
|
114
|
+
self.class == o.class &&
|
115
|
+
source == o.source &&
|
116
|
+
access_token == o.access_token &&
|
117
|
+
refresh_token == o.refresh_token &&
|
118
|
+
gong_account_email == o.gong_account_email
|
119
|
+
end
|
120
|
+
|
121
|
+
# @see the `==` method
|
122
|
+
# @param [Object] Object to be compared
|
123
|
+
def eql?(o)
|
124
|
+
self == o
|
125
|
+
end
|
126
|
+
|
127
|
+
# Calculates hash code according to all attributes.
|
128
|
+
# @return [Integer] Hash code
|
129
|
+
def hash
|
130
|
+
[source, access_token, refresh_token, gong_account_email].hash
|
131
|
+
end
|
132
|
+
|
133
|
+
# Builds the object from hash
|
134
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
135
|
+
# @return [Object] Returns the model itself
|
136
|
+
def self.build_from_hash(attributes)
|
137
|
+
new.build_from_hash(attributes)
|
138
|
+
end
|
139
|
+
|
140
|
+
# Builds the object from hash
|
141
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
+
# @return [Object] Returns the model itself
|
143
|
+
def build_from_hash(attributes)
|
144
|
+
return nil unless attributes.is_a?(Hash)
|
145
|
+
attributes = attributes.transform_keys(&:to_sym)
|
146
|
+
self.class.openapi_types.each_pair do |key, type|
|
147
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
148
|
+
self.send("#{key}=", nil)
|
149
|
+
elsif type =~ /\AArray<(.*)>/i
|
150
|
+
# check to ensure the input is an array given that the attribute
|
151
|
+
# is documented as an array but the input is not
|
152
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
153
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
154
|
+
end
|
155
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
156
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
self
|
161
|
+
end
|
162
|
+
|
163
|
+
# Deserializes the data based on type
|
164
|
+
# @param string type Data type
|
165
|
+
# @param string value Value to be deserialized
|
166
|
+
# @return [Object] Deserialized data
|
167
|
+
def _deserialize(type, value)
|
168
|
+
case type.to_sym
|
169
|
+
when :Time
|
170
|
+
Time.parse(value)
|
171
|
+
when :Date
|
172
|
+
Date.parse(value)
|
173
|
+
when :String
|
174
|
+
value.to_s
|
175
|
+
when :Integer
|
176
|
+
value.to_i
|
177
|
+
when :Float
|
178
|
+
value.to_f
|
179
|
+
when :Boolean
|
180
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
181
|
+
true
|
182
|
+
else
|
183
|
+
false
|
184
|
+
end
|
185
|
+
when :Object
|
186
|
+
# generic object (usually a Hash), return directly
|
187
|
+
value
|
188
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
189
|
+
inner_type = Regexp.last_match[:inner_type]
|
190
|
+
value.map { |v| _deserialize(inner_type, v) }
|
191
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
192
|
+
k_type = Regexp.last_match[:k_type]
|
193
|
+
v_type = Regexp.last_match[:v_type]
|
194
|
+
{}.tap do |hash|
|
195
|
+
value.each do |k, v|
|
196
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
else # model
|
200
|
+
# models (e.g. Pet) or oneOf
|
201
|
+
klass = Carbon.const_get(type)
|
202
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
# Returns the string representation of the object
|
207
|
+
# @return [String] String presentation of the object
|
208
|
+
def to_s
|
209
|
+
to_hash.to_s
|
210
|
+
end
|
211
|
+
|
212
|
+
# to_body is an alias to to_hash (backward compatibility)
|
213
|
+
# @return [Hash] Returns the object in the form of hash
|
214
|
+
def to_body
|
215
|
+
to_hash
|
216
|
+
end
|
217
|
+
|
218
|
+
# Returns the object in the form of hash
|
219
|
+
# @return [Hash] Returns the object in the form of hash
|
220
|
+
def to_hash
|
221
|
+
hash = {}
|
222
|
+
self.class.attribute_map.each_pair do |attr, param|
|
223
|
+
value = self.send(attr)
|
224
|
+
if value.nil?
|
225
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
226
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
227
|
+
end
|
228
|
+
|
229
|
+
hash[param] = _to_hash(value)
|
230
|
+
end
|
231
|
+
hash
|
232
|
+
end
|
233
|
+
|
234
|
+
# Outputs non-array value in the form of hash
|
235
|
+
# For object, use to_hash. Otherwise, just return the value
|
236
|
+
# @param [Object] value Any valid value
|
237
|
+
# @return [Hash] Returns the value in the form of hash
|
238
|
+
def _to_hash(value)
|
239
|
+
if value.is_a?(Array)
|
240
|
+
value.compact.map { |v| _to_hash(v) }
|
241
|
+
elsif value.is_a?(Hash)
|
242
|
+
{}.tap do |hash|
|
243
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
244
|
+
end
|
245
|
+
elsif value.respond_to? :to_hash
|
246
|
+
value.to_hash
|
247
|
+
else
|
248
|
+
value
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
252
|
+
end
|
253
|
+
|
254
|
+
end
|
@@ -67,7 +67,7 @@ module Carbon
|
|
67
67
|
# Enabling this flag will fetch all available content from the source to be listed via list items endpoint
|
68
68
|
attr_accessor :sync_source_items
|
69
69
|
|
70
|
-
# Only sync files if they have not already been synced or if the embedding properties have changed. This flag is currently supported by ONEDRIVE, GOOGLE_DRIVE, BOX, DROPBOX, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT. It will be ignored for other data sources.
|
70
|
+
# Only sync files if they have not already been synced or if the embedding properties have changed. This flag is currently supported by ONEDRIVE, GOOGLE_DRIVE, BOX, DROPBOX, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT, SERVICENOW. It will be ignored for other data sources.
|
71
71
|
attr_accessor :incremental_sync
|
72
72
|
|
73
73
|
attr_accessor :file_sync_config
|
@@ -75,6 +75,11 @@ module Carbon
|
|
75
75
|
# Automatically open source file picker after the OAuth flow is complete. This flag is currently supported by BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT. It will be ignored for other data sources.
|
76
76
|
attr_accessor :automatically_open_file_picker
|
77
77
|
|
78
|
+
# If you are connecting a Gong account, you need to input the email of the account you wish to connect. This email will be used to identify your carbon data source.
|
79
|
+
attr_accessor :gong_account_email
|
80
|
+
|
81
|
+
attr_accessor :servicenow_credentials
|
82
|
+
|
78
83
|
# Attribute mapping from ruby-style variable name to JSON key.
|
79
84
|
def self.attribute_map
|
80
85
|
{
|
@@ -104,7 +109,9 @@ module Carbon
|
|
104
109
|
:'sync_source_items' => :'sync_source_items',
|
105
110
|
:'incremental_sync' => :'incremental_sync',
|
106
111
|
:'file_sync_config' => :'file_sync_config',
|
107
|
-
:'automatically_open_file_picker' => :'automatically_open_file_picker'
|
112
|
+
:'automatically_open_file_picker' => :'automatically_open_file_picker',
|
113
|
+
:'gong_account_email' => :'gong_account_email',
|
114
|
+
:'servicenow_credentials' => :'servicenow_credentials'
|
108
115
|
}
|
109
116
|
end
|
110
117
|
|
@@ -118,7 +125,7 @@ module Carbon
|
|
118
125
|
{
|
119
126
|
:'tags' => :'Object',
|
120
127
|
:'scope' => :'String',
|
121
|
-
:'service' => :'
|
128
|
+
:'service' => :'OauthBasedConnectors',
|
122
129
|
:'chunk_size' => :'Integer',
|
123
130
|
:'chunk_overlap' => :'Integer',
|
124
131
|
:'skip_embedding_generation' => :'Boolean',
|
@@ -142,7 +149,9 @@ module Carbon
|
|
142
149
|
:'sync_source_items' => :'Boolean',
|
143
150
|
:'incremental_sync' => :'Boolean',
|
144
151
|
:'file_sync_config' => :'FileSyncConfigNullable',
|
145
|
-
:'automatically_open_file_picker' => :'Boolean'
|
152
|
+
:'automatically_open_file_picker' => :'Boolean',
|
153
|
+
:'gong_account_email' => :'String',
|
154
|
+
:'servicenow_credentials' => :'ServiceNowCredentialsNullable'
|
146
155
|
}
|
147
156
|
end
|
148
157
|
|
@@ -170,7 +179,9 @@ module Carbon
|
|
170
179
|
:'use_ocr',
|
171
180
|
:'parse_pdf_tables_with_ocr',
|
172
181
|
:'file_sync_config',
|
173
|
-
:'automatically_open_file_picker'
|
182
|
+
:'automatically_open_file_picker',
|
183
|
+
:'gong_account_email',
|
184
|
+
:'servicenow_credentials'
|
174
185
|
])
|
175
186
|
end
|
176
187
|
|
@@ -324,6 +335,14 @@ module Carbon
|
|
324
335
|
if attributes.key?(:'automatically_open_file_picker')
|
325
336
|
self.automatically_open_file_picker = attributes[:'automatically_open_file_picker']
|
326
337
|
end
|
338
|
+
|
339
|
+
if attributes.key?(:'gong_account_email')
|
340
|
+
self.gong_account_email = attributes[:'gong_account_email']
|
341
|
+
end
|
342
|
+
|
343
|
+
if attributes.key?(:'servicenow_credentials')
|
344
|
+
self.servicenow_credentials = attributes[:'servicenow_credentials']
|
345
|
+
end
|
327
346
|
end
|
328
347
|
|
329
348
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -375,7 +394,9 @@ module Carbon
|
|
375
394
|
sync_source_items == o.sync_source_items &&
|
376
395
|
incremental_sync == o.incremental_sync &&
|
377
396
|
file_sync_config == o.file_sync_config &&
|
378
|
-
automatically_open_file_picker == o.automatically_open_file_picker
|
397
|
+
automatically_open_file_picker == o.automatically_open_file_picker &&
|
398
|
+
gong_account_email == o.gong_account_email &&
|
399
|
+
servicenow_credentials == o.servicenow_credentials
|
379
400
|
end
|
380
401
|
|
381
402
|
# @see the `==` method
|
@@ -387,7 +408,7 @@ module Carbon
|
|
387
408
|
# Calculates hash code according to all attributes.
|
388
409
|
# @return [Integer] Hash code
|
389
410
|
def hash
|
390
|
-
[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, incremental_sync, file_sync_config, automatically_open_file_picker].hash
|
411
|
+
[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, incremental_sync, file_sync_config, automatically_open_file_picker, gong_account_email, servicenow_credentials].hash
|
391
412
|
end
|
392
413
|
|
393
414
|
# Builds the object from hash
|
@@ -10,7 +10,7 @@ require 'date'
|
|
10
10
|
require 'time'
|
11
11
|
|
12
12
|
module Carbon
|
13
|
-
class
|
13
|
+
class OauthBasedConnectors
|
14
14
|
BOX = "BOX".freeze
|
15
15
|
CONFLUENCE = "CONFLUENCE".freeze
|
16
16
|
DROPBOX = "DROPBOX".freeze
|
@@ -26,9 +26,11 @@ module Carbon
|
|
26
26
|
SLACK = "SLACK".freeze
|
27
27
|
ZENDESK = "ZENDESK".freeze
|
28
28
|
ZOTERO = "ZOTERO".freeze
|
29
|
+
GONG = "GONG".freeze
|
30
|
+
SERVICENOW = "SERVICENOW".freeze
|
29
31
|
|
30
32
|
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
|
33
|
+
@all_vars ||= [BOX, CONFLUENCE, DROPBOX, GMAIL, GOOGLE_DRIVE, GOOGLE_CLOUD_STORAGE, INTERCOM, NOTION, ONEDRIVE, OUTLOOK, SALESFORCE, SHAREPOINT, SLACK, ZENDESK, ZOTERO, GONG, SERVICENOW].freeze
|
32
34
|
end
|
33
35
|
|
34
36
|
# Builds the enum from string
|
@@ -42,8 +44,8 @@ module Carbon
|
|
42
44
|
# @param [String] The enum value in the form of the string
|
43
45
|
# @return [String] The enum value
|
44
46
|
def build_from_hash(value)
|
45
|
-
return value if
|
46
|
-
raise "Invalid ENUM value #{value} for class #
|
47
|
+
return value if OauthBasedConnectors.all_vars.include?(value)
|
48
|
+
raise "Invalid ENUM value #{value} for class #OauthBasedConnectors"
|
47
49
|
end
|
48
50
|
end
|
49
51
|
end
|
@@ -111,7 +111,7 @@ module Carbon
|
|
111
111
|
:'sync_error_message' => :'String',
|
112
112
|
:'include_containers' => :'Boolean',
|
113
113
|
:'external_urls' => :'Array<String>',
|
114
|
-
:'file_types_at_source' => :'Array<
|
114
|
+
:'file_types_at_source' => :'Array<AutoSyncedSourceTypesPropertyInner>'
|
115
115
|
}
|
116
116
|
end
|
117
117
|
|
@@ -29,6 +29,9 @@ module Carbon
|
|
29
29
|
|
30
30
|
attr_accessor :cold_storage_params
|
31
31
|
|
32
|
+
# If this flag is enabled, the file will be chunked and stored with Carbon, but no embeddings will be generated. This overrides the skip_embedding_generation flag.
|
33
|
+
attr_accessor :generate_chunks_only
|
34
|
+
|
32
35
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
36
|
def self.attribute_map
|
34
37
|
{
|
@@ -40,7 +43,8 @@ module Carbon
|
|
40
43
|
:'overwrite_file_id' => :'overwrite_file_id',
|
41
44
|
:'embedding_model' => :'embedding_model',
|
42
45
|
:'generate_sparse_vectors' => :'generate_sparse_vectors',
|
43
|
-
:'cold_storage_params' => :'cold_storage_params'
|
46
|
+
:'cold_storage_params' => :'cold_storage_params',
|
47
|
+
:'generate_chunks_only' => :'generate_chunks_only'
|
44
48
|
}
|
45
49
|
end
|
46
50
|
|
@@ -60,7 +64,8 @@ module Carbon
|
|
60
64
|
:'overwrite_file_id' => :'Integer',
|
61
65
|
:'embedding_model' => :'EmbeddingGeneratorsNullable',
|
62
66
|
:'generate_sparse_vectors' => :'Boolean',
|
63
|
-
:'cold_storage_params' => :'ColdStorageProps'
|
67
|
+
:'cold_storage_params' => :'ColdStorageProps',
|
68
|
+
:'generate_chunks_only' => :'Boolean'
|
64
69
|
}
|
65
70
|
end
|
66
71
|
|
@@ -132,6 +137,12 @@ module Carbon
|
|
132
137
|
if attributes.key?(:'cold_storage_params')
|
133
138
|
self.cold_storage_params = attributes[:'cold_storage_params']
|
134
139
|
end
|
140
|
+
|
141
|
+
if attributes.key?(:'generate_chunks_only')
|
142
|
+
self.generate_chunks_only = attributes[:'generate_chunks_only']
|
143
|
+
else
|
144
|
+
self.generate_chunks_only = false
|
145
|
+
end
|
135
146
|
end
|
136
147
|
|
137
148
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -184,7 +195,8 @@ module Carbon
|
|
184
195
|
overwrite_file_id == o.overwrite_file_id &&
|
185
196
|
embedding_model == o.embedding_model &&
|
186
197
|
generate_sparse_vectors == o.generate_sparse_vectors &&
|
187
|
-
cold_storage_params == o.cold_storage_params
|
198
|
+
cold_storage_params == o.cold_storage_params &&
|
199
|
+
generate_chunks_only == o.generate_chunks_only
|
188
200
|
end
|
189
201
|
|
190
202
|
# @see the `==` method
|
@@ -196,7 +208,7 @@ module Carbon
|
|
196
208
|
# Calculates hash code according to all attributes.
|
197
209
|
# @return [Integer] Hash code
|
198
210
|
def hash
|
199
|
-
[contents, name, chunk_size, chunk_overlap, skip_embedding_generation, overwrite_file_id, embedding_model, generate_sparse_vectors, cold_storage_params].hash
|
211
|
+
[contents, name, chunk_size, chunk_overlap, skip_embedding_generation, overwrite_file_id, embedding_model, generate_sparse_vectors, cold_storage_params, generate_chunks_only].hash
|
200
212
|
end
|
201
213
|
|
202
214
|
# Builds the object from hash
|