carbon_ruby_sdk 0.2.28 → 0.2.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -7
- data/README.md +109 -6
- 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 +166 -10
- data/lib/carbon_ruby_sdk/api/utilities_api.rb +6 -2
- data/lib/carbon_ruby_sdk/models/authentication_property.rb +63 -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 +4 -1
- data/lib/carbon_ruby_sdk/models/data_source_type_nullable.rb +4 -1
- data/lib/carbon_ruby_sdk/models/external_data_source_type.rb +2 -1
- data/lib/carbon_ruby_sdk/models/file_formats.rb +4 -1
- data/lib/carbon_ruby_sdk/models/file_formats_nullable.rb +4 -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/guru_authentication.rb +244 -0
- data/lib/carbon_ruby_sdk/models/guru_connect_request.rb +359 -0
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +16 -6
- 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 -0
- data/spec/api/files_api_spec.rb +1 -0
- data/spec/api/integrations_api_spec.rb +13 -1
- data/spec/models/authentication_property_spec.rb +24 -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/guru_authentication_spec.rb +40 -0
- data/spec/models/guru_connect_request_spec.rb +100 -0
- data/spec/models/o_auth_url_request_spec.rb +6 -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 +169 -148
@@ -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
|
@@ -45,6 +46,7 @@ module Carbon
|
|
45
46
|
SALESFORCE = "SALESFORCE".freeze
|
46
47
|
GITHUB = "GITHUB".freeze
|
47
48
|
SLACK = "SLACK".freeze
|
49
|
+
GURU = "GURU".freeze
|
48
50
|
JPG = "JPG".freeze
|
49
51
|
PNG = "PNG".freeze
|
50
52
|
JPEG = "JPEG".freeze
|
@@ -67,9 +69,10 @@ module Carbon
|
|
67
69
|
FLV = "FLV".freeze
|
68
70
|
WEBM = "WEBM".freeze
|
69
71
|
EML = "EML".freeze
|
72
|
+
MSG = "MSG".freeze
|
70
73
|
|
71
74
|
def self.all_vars
|
72
|
-
@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, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML].freeze
|
75
|
+
@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, 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
|
73
76
|
end
|
74
77
|
|
75
78
|
# 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
|
@@ -45,6 +46,7 @@ module Carbon
|
|
45
46
|
SALESFORCE = "SALESFORCE".freeze
|
46
47
|
GITHUB = "GITHUB".freeze
|
47
48
|
SLACK = "SLACK".freeze
|
49
|
+
GURU = "GURU".freeze
|
48
50
|
JPG = "JPG".freeze
|
49
51
|
PNG = "PNG".freeze
|
50
52
|
JPEG = "JPEG".freeze
|
@@ -67,9 +69,10 @@ module Carbon
|
|
67
69
|
FLV = "FLV".freeze
|
68
70
|
WEBM = "WEBM".freeze
|
69
71
|
EML = "EML".freeze
|
72
|
+
MSG = "MSG".freeze
|
70
73
|
|
71
74
|
def self.all_vars
|
72
|
-
@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, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML].freeze
|
75
|
+
@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, 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
|
73
76
|
end
|
74
77
|
|
75
78
|
# Builds the enum from string
|
@@ -26,9 +26,10 @@ module Carbon
|
|
26
26
|
SLACK = "SLACK".freeze
|
27
27
|
ZENDESK = "ZENDESK".freeze
|
28
28
|
ZOTERO = "ZOTERO".freeze
|
29
|
+
SERVICENOW = "SERVICENOW".freeze
|
29
30
|
|
30
31
|
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
|
+
@all_vars ||= [BOX, CONFLUENCE, DROPBOX, GMAIL, GOOGLE_DRIVE, GOOGLE_CLOUD_STORAGE, INTERCOM, NOTION, ONEDRIVE, OUTLOOK, SALESFORCE, SHAREPOINT, SLACK, ZENDESK, ZOTERO, SERVICENOW].freeze
|
32
33
|
end
|
33
34
|
|
34
35
|
# Builds the enum from string
|
@@ -38,6 +38,8 @@ module Carbon
|
|
38
38
|
SALESFORCE = "SALESFORCE".freeze
|
39
39
|
GITHUB = "GITHUB".freeze
|
40
40
|
SLACK = "SLACK".freeze
|
41
|
+
GURU = "GURU".freeze
|
42
|
+
SERVICENOW = "SERVICENOW".freeze
|
41
43
|
JPG = "JPG".freeze
|
42
44
|
PNG = "PNG".freeze
|
43
45
|
MP3 = "MP3".freeze
|
@@ -59,9 +61,10 @@ module Carbon
|
|
59
61
|
FLV = "FLV".freeze
|
60
62
|
WEBM = "WEBM".freeze
|
61
63
|
EML = "EML".freeze
|
64
|
+
MSG = "MSG".freeze
|
62
65
|
|
63
66
|
def self.all_vars
|
64
|
-
@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, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML].freeze
|
67
|
+
@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, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
65
68
|
end
|
66
69
|
|
67
70
|
# Builds the enum from string
|
@@ -38,6 +38,8 @@ module Carbon
|
|
38
38
|
SALESFORCE = "SALESFORCE".freeze
|
39
39
|
GITHUB = "GITHUB".freeze
|
40
40
|
SLACK = "SLACK".freeze
|
41
|
+
GURU = "GURU".freeze
|
42
|
+
SERVICENOW = "SERVICENOW".freeze
|
41
43
|
JPG = "JPG".freeze
|
42
44
|
PNG = "PNG".freeze
|
43
45
|
MP3 = "MP3".freeze
|
@@ -59,9 +61,10 @@ module Carbon
|
|
59
61
|
FLV = "FLV".freeze
|
60
62
|
WEBM = "WEBM".freeze
|
61
63
|
EML = "EML".freeze
|
64
|
+
MSG = "MSG".freeze
|
62
65
|
|
63
66
|
def self.all_vars
|
64
|
-
@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, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML].freeze
|
67
|
+
@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, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
65
68
|
end
|
66
69
|
|
67
70
|
# 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
|