carbon_ruby_sdk 0.2.29 → 0.2.31
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -44,6 +44,16 @@ module Carbon
|
|
44
44
|
# You can specify a Digital Ocean endpoint URL to connect a Digital Ocean Space through this endpoint. The URL should be of format <region>.digitaloceanspaces.com. It's not required for S3 buckets.
|
45
45
|
attr_accessor :endpoint_url
|
46
46
|
|
47
|
+
attr_accessor :instance_subdomain
|
48
|
+
|
49
|
+
attr_accessor :client_id
|
50
|
+
|
51
|
+
attr_accessor :client_secret
|
52
|
+
|
53
|
+
attr_accessor :redirect_uri
|
54
|
+
|
55
|
+
attr_accessor :gong_account_email
|
56
|
+
|
47
57
|
# Attribute mapping from ruby-style variable name to JSON key.
|
48
58
|
def self.attribute_map
|
49
59
|
{
|
@@ -62,7 +72,12 @@ module Carbon
|
|
62
72
|
:'api_key' => :'api_key',
|
63
73
|
:'access_key' => :'access_key',
|
64
74
|
:'access_key_secret' => :'access_key_secret',
|
65
|
-
:'endpoint_url' => :'endpoint_url'
|
75
|
+
:'endpoint_url' => :'endpoint_url',
|
76
|
+
:'instance_subdomain' => :'instance_subdomain',
|
77
|
+
:'client_id' => :'client_id',
|
78
|
+
:'client_secret' => :'client_secret',
|
79
|
+
:'redirect_uri' => :'redirect_uri',
|
80
|
+
:'gong_account_email' => :'gong_account_email'
|
66
81
|
}
|
67
82
|
end
|
68
83
|
|
@@ -89,7 +104,12 @@ module Carbon
|
|
89
104
|
:'api_key' => :'String',
|
90
105
|
:'access_key' => :'String',
|
91
106
|
:'access_key_secret' => :'String',
|
92
|
-
:'endpoint_url' => :'String'
|
107
|
+
:'endpoint_url' => :'String',
|
108
|
+
:'instance_subdomain' => :'String',
|
109
|
+
:'client_id' => :'String',
|
110
|
+
:'client_secret' => :'String',
|
111
|
+
:'redirect_uri' => :'String',
|
112
|
+
:'gong_account_email' => :'String'
|
93
113
|
}
|
94
114
|
end
|
95
115
|
|
@@ -98,7 +118,7 @@ module Carbon
|
|
98
118
|
Set.new([
|
99
119
|
:'source',
|
100
120
|
:'refresh_token',
|
101
|
-
:'endpoint_url'
|
121
|
+
:'endpoint_url',
|
102
122
|
])
|
103
123
|
end
|
104
124
|
|
@@ -109,11 +129,13 @@ module Carbon
|
|
109
129
|
:'FreskdeskAuthentication',
|
110
130
|
:'GitbookAuthetication',
|
111
131
|
:'GithubAuthentication',
|
132
|
+
:'GongAuthentication',
|
112
133
|
:'GuruAuthentication',
|
113
134
|
:'NotionAuthentication',
|
114
135
|
:'OAuthAuthentication',
|
115
136
|
:'S3Authentication',
|
116
137
|
:'SalesforceAuthentication',
|
138
|
+
:'ServiceNowAuthentication',
|
117
139
|
:'SharepointAuthentication',
|
118
140
|
:'ZendeskAuthentication',
|
119
141
|
:'ZoteroAuthentication'
|
@@ -198,6 +220,26 @@ module Carbon
|
|
198
220
|
if attributes.key?(:'endpoint_url')
|
199
221
|
self.endpoint_url = attributes[:'endpoint_url']
|
200
222
|
end
|
223
|
+
|
224
|
+
if attributes.key?(:'instance_subdomain')
|
225
|
+
self.instance_subdomain = attributes[:'instance_subdomain']
|
226
|
+
end
|
227
|
+
|
228
|
+
if attributes.key?(:'client_id')
|
229
|
+
self.client_id = attributes[:'client_id']
|
230
|
+
end
|
231
|
+
|
232
|
+
if attributes.key?(:'client_secret')
|
233
|
+
self.client_secret = attributes[:'client_secret']
|
234
|
+
end
|
235
|
+
|
236
|
+
if attributes.key?(:'redirect_uri')
|
237
|
+
self.redirect_uri = attributes[:'redirect_uri']
|
238
|
+
end
|
239
|
+
|
240
|
+
if attributes.key?(:'gong_account_email')
|
241
|
+
self.gong_account_email = attributes[:'gong_account_email']
|
242
|
+
end
|
201
243
|
end
|
202
244
|
|
203
245
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -256,6 +298,26 @@ module Carbon
|
|
256
298
|
invalid_properties.push('invalid value for "access_key_secret", access_key_secret cannot be nil.')
|
257
299
|
end
|
258
300
|
|
301
|
+
if @instance_subdomain.nil?
|
302
|
+
invalid_properties.push('invalid value for "instance_subdomain", instance_subdomain cannot be nil.')
|
303
|
+
end
|
304
|
+
|
305
|
+
if @client_id.nil?
|
306
|
+
invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
|
307
|
+
end
|
308
|
+
|
309
|
+
if @client_secret.nil?
|
310
|
+
invalid_properties.push('invalid value for "client_secret", client_secret cannot be nil.')
|
311
|
+
end
|
312
|
+
|
313
|
+
if @redirect_uri.nil?
|
314
|
+
invalid_properties.push('invalid value for "redirect_uri", redirect_uri cannot be nil.')
|
315
|
+
end
|
316
|
+
|
317
|
+
if @gong_account_email.nil?
|
318
|
+
invalid_properties.push('invalid value for "gong_account_email", gong_account_email cannot be nil.')
|
319
|
+
end
|
320
|
+
|
259
321
|
invalid_properties
|
260
322
|
end
|
261
323
|
|
@@ -275,6 +337,11 @@ module Carbon
|
|
275
337
|
return false if @api_key.nil?
|
276
338
|
return false if @access_key.nil?
|
277
339
|
return false if @access_key_secret.nil?
|
340
|
+
return false if @instance_subdomain.nil?
|
341
|
+
return false if @client_id.nil?
|
342
|
+
return false if @client_secret.nil?
|
343
|
+
return false if @redirect_uri.nil?
|
344
|
+
return false if @gong_account_email.nil?
|
278
345
|
_any_of_found = false
|
279
346
|
self.class.openapi_any_of.each do |_class|
|
280
347
|
_any_of = Carbon.const_get(_class).build_from_hash(self.to_hash)
|
@@ -310,7 +377,12 @@ module Carbon
|
|
310
377
|
api_key == o.api_key &&
|
311
378
|
access_key == o.access_key &&
|
312
379
|
access_key_secret == o.access_key_secret &&
|
313
|
-
endpoint_url == o.endpoint_url
|
380
|
+
endpoint_url == o.endpoint_url &&
|
381
|
+
instance_subdomain == o.instance_subdomain &&
|
382
|
+
client_id == o.client_id &&
|
383
|
+
client_secret == o.client_secret &&
|
384
|
+
redirect_uri == o.redirect_uri &&
|
385
|
+
gong_account_email == o.gong_account_email
|
314
386
|
end
|
315
387
|
|
316
388
|
# @see the `==` method
|
@@ -322,7 +394,7 @@ module Carbon
|
|
322
394
|
# Calculates hash code according to all attributes.
|
323
395
|
# @return [Integer] Hash code
|
324
396
|
def hash
|
325
|
-
[source, access_token, refresh_token, workspace_id, tenant_name, site_name, subdomain, access_token_secret, username, zotero_id, organization_name, domain, api_key, access_key, access_key_secret, endpoint_url].hash
|
397
|
+
[source, access_token, refresh_token, workspace_id, tenant_name, site_name, subdomain, access_token_secret, username, zotero_id, organization_name, domain, api_key, access_key, access_key_secret, endpoint_url, instance_subdomain, client_id, client_secret, redirect_uri, gong_account_email].hash
|
326
398
|
end
|
327
399
|
|
328
400
|
# Builds the object from hash
|
@@ -0,0 +1,226 @@
|
|
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 AutoSyncedSourceTypesPropertyInner
|
14
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
15
|
+
def self.attribute_map
|
16
|
+
{
|
17
|
+
}
|
18
|
+
end
|
19
|
+
|
20
|
+
# Returns all the JSON keys this model knows about
|
21
|
+
def self.acceptable_attributes
|
22
|
+
attribute_map.values
|
23
|
+
end
|
24
|
+
|
25
|
+
# Attribute type mapping.
|
26
|
+
def self.openapi_types
|
27
|
+
{
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# List of attributes with nullable: true
|
32
|
+
def self.openapi_nullable
|
33
|
+
Set.new([
|
34
|
+
])
|
35
|
+
end
|
36
|
+
|
37
|
+
# List of class defined in anyOf (OpenAPI v3)
|
38
|
+
def self.openapi_any_of
|
39
|
+
[
|
40
|
+
:'HelpdeskFileTypes',
|
41
|
+
:'ServiceNowFileTypes'
|
42
|
+
]
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::AutoSyncedSourceTypesPropertyInner` initialize method"
|
50
|
+
end
|
51
|
+
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::AutoSyncedSourceTypesPropertyInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
62
|
+
# @return Array for valid properties with the reasons
|
63
|
+
def list_invalid_properties
|
64
|
+
invalid_properties = Array.new
|
65
|
+
invalid_properties
|
66
|
+
end
|
67
|
+
|
68
|
+
# Check to see if the all the properties in the model are valid
|
69
|
+
# @return true if the model is valid
|
70
|
+
def valid?
|
71
|
+
_any_of_found = false
|
72
|
+
self.class.openapi_any_of.each do |_class|
|
73
|
+
_any_of = Carbon.const_get(_class).build_from_hash(self.to_hash)
|
74
|
+
if _any_of.valid?
|
75
|
+
_any_of_found = true
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
if !_any_of_found
|
80
|
+
return false
|
81
|
+
end
|
82
|
+
|
83
|
+
true
|
84
|
+
end
|
85
|
+
|
86
|
+
# Checks equality by comparing each attribute.
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def ==(o)
|
89
|
+
return true if self.equal?(o)
|
90
|
+
self.class == o.class
|
91
|
+
end
|
92
|
+
|
93
|
+
# @see the `==` method
|
94
|
+
# @param [Object] Object to be compared
|
95
|
+
def eql?(o)
|
96
|
+
self == o
|
97
|
+
end
|
98
|
+
|
99
|
+
# Calculates hash code according to all attributes.
|
100
|
+
# @return [Integer] Hash code
|
101
|
+
def hash
|
102
|
+
[].hash
|
103
|
+
end
|
104
|
+
|
105
|
+
# Builds the object from hash
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
+
# @return [Object] Returns the model itself
|
108
|
+
def self.build_from_hash(attributes)
|
109
|
+
new.build_from_hash(attributes)
|
110
|
+
end
|
111
|
+
|
112
|
+
# Builds the object from hash
|
113
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
114
|
+
# @return [Object] Returns the model itself
|
115
|
+
def build_from_hash(attributes)
|
116
|
+
return nil unless attributes.is_a?(Hash)
|
117
|
+
attributes = attributes.transform_keys(&:to_sym)
|
118
|
+
self.class.openapi_types.each_pair do |key, type|
|
119
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
120
|
+
self.send("#{key}=", nil)
|
121
|
+
elsif type =~ /\AArray<(.*)>/i
|
122
|
+
# check to ensure the input is an array given that the attribute
|
123
|
+
# is documented as an array but the input is not
|
124
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
125
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
126
|
+
end
|
127
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
128
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
self
|
133
|
+
end
|
134
|
+
|
135
|
+
# Deserializes the data based on type
|
136
|
+
# @param string type Data type
|
137
|
+
# @param string value Value to be deserialized
|
138
|
+
# @return [Object] Deserialized data
|
139
|
+
def _deserialize(type, value)
|
140
|
+
case type.to_sym
|
141
|
+
when :Time
|
142
|
+
Time.parse(value)
|
143
|
+
when :Date
|
144
|
+
Date.parse(value)
|
145
|
+
when :String
|
146
|
+
value.to_s
|
147
|
+
when :Integer
|
148
|
+
value.to_i
|
149
|
+
when :Float
|
150
|
+
value.to_f
|
151
|
+
when :Boolean
|
152
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
153
|
+
true
|
154
|
+
else
|
155
|
+
false
|
156
|
+
end
|
157
|
+
when :Object
|
158
|
+
# generic object (usually a Hash), return directly
|
159
|
+
value
|
160
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
161
|
+
inner_type = Regexp.last_match[:inner_type]
|
162
|
+
value.map { |v| _deserialize(inner_type, v) }
|
163
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
164
|
+
k_type = Regexp.last_match[:k_type]
|
165
|
+
v_type = Regexp.last_match[:v_type]
|
166
|
+
{}.tap do |hash|
|
167
|
+
value.each do |k, v|
|
168
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
else # model
|
172
|
+
# models (e.g. Pet) or oneOf
|
173
|
+
klass = Carbon.const_get(type)
|
174
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
# Returns the string representation of the object
|
179
|
+
# @return [String] String presentation of the object
|
180
|
+
def to_s
|
181
|
+
to_hash.to_s
|
182
|
+
end
|
183
|
+
|
184
|
+
# to_body is an alias to to_hash (backward compatibility)
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_body
|
187
|
+
to_hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Returns the object in the form of hash
|
191
|
+
# @return [Hash] Returns the object in the form of hash
|
192
|
+
def to_hash
|
193
|
+
hash = {}
|
194
|
+
self.class.attribute_map.each_pair do |attr, param|
|
195
|
+
value = self.send(attr)
|
196
|
+
if value.nil?
|
197
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
198
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
199
|
+
end
|
200
|
+
|
201
|
+
hash[param] = _to_hash(value)
|
202
|
+
end
|
203
|
+
hash
|
204
|
+
end
|
205
|
+
|
206
|
+
# Outputs non-array value in the form of hash
|
207
|
+
# For object, use to_hash. Otherwise, just return the value
|
208
|
+
# @param [Object] value Any valid value
|
209
|
+
# @return [Hash] Returns the value in the form of hash
|
210
|
+
def _to_hash(value)
|
211
|
+
if value.is_a?(Array)
|
212
|
+
value.compact.map { |v| _to_hash(v) }
|
213
|
+
elsif value.is_a?(Hash)
|
214
|
+
{}.tap do |hash|
|
215
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
216
|
+
end
|
217
|
+
elsif value.respond_to? :to_hash
|
218
|
+
value.to_hash
|
219
|
+
else
|
220
|
+
value
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
end
|
225
|
+
|
226
|
+
end
|
@@ -26,6 +26,7 @@ module Carbon
|
|
26
26
|
S3 = "S3".freeze
|
27
27
|
GMAIL = "GMAIL".freeze
|
28
28
|
OUTLOOK = "OUTLOOK".freeze
|
29
|
+
SERVICENOW = "SERVICENOW".freeze
|
29
30
|
TEXT = "TEXT".freeze
|
30
31
|
CSV = "CSV".freeze
|
31
32
|
TSV = "TSV".freeze
|
@@ -46,6 +47,7 @@ module Carbon
|
|
46
47
|
GITHUB = "GITHUB".freeze
|
47
48
|
SLACK = "SLACK".freeze
|
48
49
|
GURU = "GURU".freeze
|
50
|
+
GONG = "GONG".freeze
|
49
51
|
JPG = "JPG".freeze
|
50
52
|
PNG = "PNG".freeze
|
51
53
|
JPEG = "JPEG".freeze
|
@@ -71,7 +73,7 @@ module Carbon
|
|
71
73
|
MSG = "MSG".freeze
|
72
74
|
|
73
75
|
def self.all_vars
|
74
|
-
@all_vars ||= [GOOGLE_CLOUD_STORAGE, GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
76
|
+
@all_vars ||= [GOOGLE_CLOUD_STORAGE, GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, SERVICENOW, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, GONG, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
75
77
|
end
|
76
78
|
|
77
79
|
# Builds the enum from string
|
@@ -26,6 +26,7 @@ module Carbon
|
|
26
26
|
S3 = "S3".freeze
|
27
27
|
GMAIL = "GMAIL".freeze
|
28
28
|
OUTLOOK = "OUTLOOK".freeze
|
29
|
+
SERVICENOW = "SERVICENOW".freeze
|
29
30
|
TEXT = "TEXT".freeze
|
30
31
|
CSV = "CSV".freeze
|
31
32
|
TSV = "TSV".freeze
|
@@ -46,6 +47,7 @@ module Carbon
|
|
46
47
|
GITHUB = "GITHUB".freeze
|
47
48
|
SLACK = "SLACK".freeze
|
48
49
|
GURU = "GURU".freeze
|
50
|
+
GONG = "GONG".freeze
|
49
51
|
JPG = "JPG".freeze
|
50
52
|
PNG = "PNG".freeze
|
51
53
|
JPEG = "JPEG".freeze
|
@@ -71,7 +73,7 @@ module Carbon
|
|
71
73
|
MSG = "MSG".freeze
|
72
74
|
|
73
75
|
def self.all_vars
|
74
|
-
@all_vars ||= [GOOGLE_CLOUD_STORAGE, GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
76
|
+
@all_vars ||= [GOOGLE_CLOUD_STORAGE, GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, SERVICENOW, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, GONG, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
75
77
|
end
|
76
78
|
|
77
79
|
# Builds the enum from string
|
@@ -39,6 +39,8 @@ module Carbon
|
|
39
39
|
GITHUB = "GITHUB".freeze
|
40
40
|
SLACK = "SLACK".freeze
|
41
41
|
GURU = "GURU".freeze
|
42
|
+
SERVICENOW = "SERVICENOW".freeze
|
43
|
+
GONG = "GONG".freeze
|
42
44
|
JPG = "JPG".freeze
|
43
45
|
PNG = "PNG".freeze
|
44
46
|
MP3 = "MP3".freeze
|
@@ -63,7 +65,7 @@ module Carbon
|
|
63
65
|
MSG = "MSG".freeze
|
64
66
|
|
65
67
|
def self.all_vars
|
66
|
-
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
68
|
+
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, SERVICENOW, GONG, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
67
69
|
end
|
68
70
|
|
69
71
|
# Builds the enum from string
|
@@ -39,6 +39,8 @@ module Carbon
|
|
39
39
|
GITHUB = "GITHUB".freeze
|
40
40
|
SLACK = "SLACK".freeze
|
41
41
|
GURU = "GURU".freeze
|
42
|
+
SERVICENOW = "SERVICENOW".freeze
|
43
|
+
GONG = "GONG".freeze
|
42
44
|
JPG = "JPG".freeze
|
43
45
|
PNG = "PNG".freeze
|
44
46
|
MP3 = "MP3".freeze
|
@@ -63,7 +65,7 @@ module Carbon
|
|
63
65
|
MSG = "MSG".freeze
|
64
66
|
|
65
67
|
def self.all_vars
|
66
|
-
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
68
|
+
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, SERVICENOW, GONG, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
67
69
|
end
|
68
70
|
|
69
71
|
# Builds the enum from string
|
@@ -28,6 +28,9 @@ module Carbon
|
|
28
28
|
# Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files.
|
29
29
|
attr_accessor :split_rows
|
30
30
|
|
31
|
+
# 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.
|
32
|
+
attr_accessor :generate_chunks_only
|
33
|
+
|
31
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
32
35
|
def self.attribute_map
|
33
36
|
{
|
@@ -36,7 +39,8 @@ module Carbon
|
|
36
39
|
:'detect_audio_language' => :'detect_audio_language',
|
37
40
|
:'transcription_service' => :'transcription_service',
|
38
41
|
:'include_speaker_labels' => :'include_speaker_labels',
|
39
|
-
:'split_rows' => :'split_rows'
|
42
|
+
:'split_rows' => :'split_rows',
|
43
|
+
:'generate_chunks_only' => :'generate_chunks_only'
|
40
44
|
}
|
41
45
|
end
|
42
46
|
|
@@ -48,12 +52,13 @@ module Carbon
|
|
48
52
|
# Attribute type mapping.
|
49
53
|
def self.openapi_types
|
50
54
|
{
|
51
|
-
:'auto_synced_source_types' => :'Array<
|
55
|
+
:'auto_synced_source_types' => :'Array<AutoSyncedSourceTypesPropertyInner>',
|
52
56
|
:'sync_attachments' => :'Boolean',
|
53
57
|
:'detect_audio_language' => :'Boolean',
|
54
58
|
:'transcription_service' => :'TranscriptionServiceNullable',
|
55
59
|
:'include_speaker_labels' => :'Boolean',
|
56
|
-
:'split_rows' => :'Boolean'
|
60
|
+
:'split_rows' => :'Boolean',
|
61
|
+
:'generate_chunks_only' => :'Boolean'
|
57
62
|
}
|
58
63
|
end
|
59
64
|
|
@@ -112,6 +117,12 @@ module Carbon
|
|
112
117
|
else
|
113
118
|
self.split_rows = false
|
114
119
|
end
|
120
|
+
|
121
|
+
if attributes.key?(:'generate_chunks_only')
|
122
|
+
self.generate_chunks_only = attributes[:'generate_chunks_only']
|
123
|
+
else
|
124
|
+
self.generate_chunks_only = false
|
125
|
+
end
|
115
126
|
end
|
116
127
|
|
117
128
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -137,7 +148,8 @@ module Carbon
|
|
137
148
|
detect_audio_language == o.detect_audio_language &&
|
138
149
|
transcription_service == o.transcription_service &&
|
139
150
|
include_speaker_labels == o.include_speaker_labels &&
|
140
|
-
split_rows == o.split_rows
|
151
|
+
split_rows == o.split_rows &&
|
152
|
+
generate_chunks_only == o.generate_chunks_only
|
141
153
|
end
|
142
154
|
|
143
155
|
# @see the `==` method
|
@@ -149,7 +161,7 @@ module Carbon
|
|
149
161
|
# Calculates hash code according to all attributes.
|
150
162
|
# @return [Integer] Hash code
|
151
163
|
def hash
|
152
|
-
[auto_synced_source_types, sync_attachments, detect_audio_language, transcription_service, include_speaker_labels, split_rows].hash
|
164
|
+
[auto_synced_source_types, sync_attachments, detect_audio_language, transcription_service, include_speaker_labels, split_rows, generate_chunks_only].hash
|
153
165
|
end
|
154
166
|
|
155
167
|
# Builds the object from hash
|
@@ -29,6 +29,9 @@ module Carbon
|
|
29
29
|
# Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files.
|
30
30
|
attr_accessor :split_rows
|
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
|
{
|
@@ -37,7 +40,8 @@ module Carbon
|
|
37
40
|
:'detect_audio_language' => :'detect_audio_language',
|
38
41
|
:'transcription_service' => :'transcription_service',
|
39
42
|
:'include_speaker_labels' => :'include_speaker_labels',
|
40
|
-
:'split_rows' => :'split_rows'
|
43
|
+
:'split_rows' => :'split_rows',
|
44
|
+
:'generate_chunks_only' => :'generate_chunks_only'
|
41
45
|
}
|
42
46
|
end
|
43
47
|
|
@@ -49,12 +53,13 @@ module Carbon
|
|
49
53
|
# Attribute type mapping.
|
50
54
|
def self.openapi_types
|
51
55
|
{
|
52
|
-
:'auto_synced_source_types' => :'Array<
|
56
|
+
:'auto_synced_source_types' => :'Array<AutoSyncedSourceTypesPropertyInner>',
|
53
57
|
:'sync_attachments' => :'Boolean',
|
54
58
|
:'detect_audio_language' => :'Boolean',
|
55
59
|
:'transcription_service' => :'TranscriptionServiceNullable',
|
56
60
|
:'include_speaker_labels' => :'Boolean',
|
57
|
-
:'split_rows' => :'Boolean'
|
61
|
+
:'split_rows' => :'Boolean',
|
62
|
+
:'generate_chunks_only' => :'Boolean'
|
58
63
|
}
|
59
64
|
end
|
60
65
|
|
@@ -113,6 +118,12 @@ module Carbon
|
|
113
118
|
else
|
114
119
|
self.split_rows = false
|
115
120
|
end
|
121
|
+
|
122
|
+
if attributes.key?(:'generate_chunks_only')
|
123
|
+
self.generate_chunks_only = attributes[:'generate_chunks_only']
|
124
|
+
else
|
125
|
+
self.generate_chunks_only = false
|
126
|
+
end
|
116
127
|
end
|
117
128
|
|
118
129
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -138,7 +149,8 @@ module Carbon
|
|
138
149
|
detect_audio_language == o.detect_audio_language &&
|
139
150
|
transcription_service == o.transcription_service &&
|
140
151
|
include_speaker_labels == o.include_speaker_labels &&
|
141
|
-
split_rows == o.split_rows
|
152
|
+
split_rows == o.split_rows &&
|
153
|
+
generate_chunks_only == o.generate_chunks_only
|
142
154
|
end
|
143
155
|
|
144
156
|
# @see the `==` method
|
@@ -150,7 +162,7 @@ module Carbon
|
|
150
162
|
# Calculates hash code according to all attributes.
|
151
163
|
# @return [Integer] Hash code
|
152
164
|
def hash
|
153
|
-
[auto_synced_source_types, sync_attachments, detect_audio_language, transcription_service, include_speaker_labels, split_rows].hash
|
165
|
+
[auto_synced_source_types, sync_attachments, detect_audio_language, transcription_service, include_speaker_labels, split_rows, generate_chunks_only].hash
|
154
166
|
end
|
155
167
|
|
156
168
|
# Builds the object from hash
|
@@ -119,7 +119,7 @@ module Carbon
|
|
119
119
|
:'include_file_level_metadata' => :'Boolean',
|
120
120
|
:'high_accuracy' => :'Boolean',
|
121
121
|
:'rerank' => :'RerankParamsNullable',
|
122
|
-
:'file_types_at_source' => :'Array<
|
122
|
+
:'file_types_at_source' => :'Array<AutoSyncedSourceTypesPropertyInner>',
|
123
123
|
:'exclude_cold_storage_files' => :'Boolean'
|
124
124
|
}
|
125
125
|
end
|