carbon_ruby_sdk 0.1.34 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +42 -9
- data/lib/carbon_ruby_sdk/api/files_api.rb +13 -6
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +8 -8
- data/lib/carbon_ruby_sdk/api/organizations_api.rb +83 -0
- data/lib/carbon_ruby_sdk/models/data_source_type.rb +9 -3
- data/lib/carbon_ruby_sdk/models/data_source_type_nullable.rb +9 -3
- data/lib/carbon_ruby_sdk/models/embedding_model.rb +227 -0
- data/lib/carbon_ruby_sdk/models/file_content_types.rb +3 -1
- data/lib/carbon_ruby_sdk/models/file_content_types_nullable.rb +3 -1
- data/lib/carbon_ruby_sdk/models/file_formats.rb +9 -3
- data/lib/carbon_ruby_sdk/models/file_formats_nullable.rb +9 -3
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +2 -2
- data/lib/carbon_ruby_sdk/models/organization_response.rb +39 -1
- 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/user_response.rb +85 -1
- data/lib/carbon_ruby_sdk/models/webhook.rb +25 -1
- data/lib/carbon_ruby_sdk/models/webhook_no_key.rb +25 -1
- data/lib/carbon_ruby_sdk/models/webhook_status.rb +36 -0
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +2 -0
- data/spec/api/files_api_spec.rb +2 -1
- data/spec/api/organizations_api_spec.rb +11 -0
- data/spec/models/embedding_model_spec.rb +22 -0
- data/spec/models/organization_response_spec.rb +18 -0
- data/spec/models/user_response_spec.rb +36 -0
- data/spec/models/webhook_no_key_spec.rb +12 -0
- data/spec/models/webhook_spec.rb +12 -0
- data/spec/models/webhook_status_spec.rb +22 -0
- metadata +8 -2
@@ -0,0 +1,227 @@
|
|
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
|
+
# Embedding model that will be used to embed file chunks.
|
14
|
+
class EmbeddingModel
|
15
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
16
|
+
def self.attribute_map
|
17
|
+
{
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
# Returns all the JSON keys this model knows about
|
22
|
+
def self.acceptable_attributes
|
23
|
+
attribute_map.values
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.openapi_types
|
28
|
+
{
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# List of attributes with nullable: true
|
33
|
+
def self.openapi_nullable
|
34
|
+
Set.new([
|
35
|
+
])
|
36
|
+
end
|
37
|
+
|
38
|
+
# List of class defined in anyOf (OpenAPI v3)
|
39
|
+
def self.openapi_any_of
|
40
|
+
[
|
41
|
+
:'String',
|
42
|
+
:'TextEmbeddingGenerators'
|
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::EmbeddingModel` 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::EmbeddingModel`. 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
|
+
end
|
61
|
+
|
62
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
63
|
+
# @return Array for valid properties with the reasons
|
64
|
+
def list_invalid_properties
|
65
|
+
invalid_properties = Array.new
|
66
|
+
invalid_properties
|
67
|
+
end
|
68
|
+
|
69
|
+
# Check to see if the all the properties in the model are valid
|
70
|
+
# @return true if the model is valid
|
71
|
+
def valid?
|
72
|
+
_any_of_found = false
|
73
|
+
self.class.openapi_any_of.each do |_class|
|
74
|
+
_any_of = Carbon.const_get(_class).build_from_hash(self.to_hash)
|
75
|
+
if _any_of.valid?
|
76
|
+
_any_of_found = true
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
if !_any_of_found
|
81
|
+
return false
|
82
|
+
end
|
83
|
+
|
84
|
+
true
|
85
|
+
end
|
86
|
+
|
87
|
+
# Checks equality by comparing each attribute.
|
88
|
+
# @param [Object] Object to be compared
|
89
|
+
def ==(o)
|
90
|
+
return true if self.equal?(o)
|
91
|
+
self.class == o.class
|
92
|
+
end
|
93
|
+
|
94
|
+
# @see the `==` method
|
95
|
+
# @param [Object] Object to be compared
|
96
|
+
def eql?(o)
|
97
|
+
self == o
|
98
|
+
end
|
99
|
+
|
100
|
+
# Calculates hash code according to all attributes.
|
101
|
+
# @return [Integer] Hash code
|
102
|
+
def hash
|
103
|
+
[].hash
|
104
|
+
end
|
105
|
+
|
106
|
+
# Builds the object from hash
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
+
# @return [Object] Returns the model itself
|
109
|
+
def self.build_from_hash(attributes)
|
110
|
+
new.build_from_hash(attributes)
|
111
|
+
end
|
112
|
+
|
113
|
+
# Builds the object from hash
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
115
|
+
# @return [Object] Returns the model itself
|
116
|
+
def build_from_hash(attributes)
|
117
|
+
return nil unless attributes.is_a?(Hash)
|
118
|
+
attributes = attributes.transform_keys(&:to_sym)
|
119
|
+
self.class.openapi_types.each_pair do |key, type|
|
120
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
121
|
+
self.send("#{key}=", nil)
|
122
|
+
elsif type =~ /\AArray<(.*)>/i
|
123
|
+
# check to ensure the input is an array given that the attribute
|
124
|
+
# is documented as an array but the input is not
|
125
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
126
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
127
|
+
end
|
128
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
129
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
self
|
134
|
+
end
|
135
|
+
|
136
|
+
# Deserializes the data based on type
|
137
|
+
# @param string type Data type
|
138
|
+
# @param string value Value to be deserialized
|
139
|
+
# @return [Object] Deserialized data
|
140
|
+
def _deserialize(type, value)
|
141
|
+
case type.to_sym
|
142
|
+
when :Time
|
143
|
+
Time.parse(value)
|
144
|
+
when :Date
|
145
|
+
Date.parse(value)
|
146
|
+
when :String
|
147
|
+
value.to_s
|
148
|
+
when :Integer
|
149
|
+
value.to_i
|
150
|
+
when :Float
|
151
|
+
value.to_f
|
152
|
+
when :Boolean
|
153
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
154
|
+
true
|
155
|
+
else
|
156
|
+
false
|
157
|
+
end
|
158
|
+
when :Object
|
159
|
+
# generic object (usually a Hash), return directly
|
160
|
+
value
|
161
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
162
|
+
inner_type = Regexp.last_match[:inner_type]
|
163
|
+
value.map { |v| _deserialize(inner_type, v) }
|
164
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
165
|
+
k_type = Regexp.last_match[:k_type]
|
166
|
+
v_type = Regexp.last_match[:v_type]
|
167
|
+
{}.tap do |hash|
|
168
|
+
value.each do |k, v|
|
169
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
else # model
|
173
|
+
# models (e.g. Pet) or oneOf
|
174
|
+
klass = Carbon.const_get(type)
|
175
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the string representation of the object
|
180
|
+
# @return [String] String presentation of the object
|
181
|
+
def to_s
|
182
|
+
to_hash.to_s
|
183
|
+
end
|
184
|
+
|
185
|
+
# to_body is an alias to to_hash (backward compatibility)
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_body
|
188
|
+
to_hash
|
189
|
+
end
|
190
|
+
|
191
|
+
# Returns the object in the form of hash
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
193
|
+
def to_hash
|
194
|
+
hash = {}
|
195
|
+
self.class.attribute_map.each_pair do |attr, param|
|
196
|
+
value = self.send(attr)
|
197
|
+
if value.nil?
|
198
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
199
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
200
|
+
end
|
201
|
+
|
202
|
+
hash[param] = _to_hash(value)
|
203
|
+
end
|
204
|
+
hash
|
205
|
+
end
|
206
|
+
|
207
|
+
# Outputs non-array value in the form of hash
|
208
|
+
# For object, use to_hash. Otherwise, just return the value
|
209
|
+
# @param [Object] value Any valid value
|
210
|
+
# @return [Hash] Returns the value in the form of hash
|
211
|
+
def _to_hash(value)
|
212
|
+
if value.is_a?(Array)
|
213
|
+
value.compact.map { |v| _to_hash(v) }
|
214
|
+
elsif value.is_a?(Hash)
|
215
|
+
{}.tap do |hash|
|
216
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
217
|
+
end
|
218
|
+
elsif value.respond_to? :to_hash
|
219
|
+
value.to_hash
|
220
|
+
else
|
221
|
+
value
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
end
|
226
|
+
|
227
|
+
end
|
@@ -13,9 +13,11 @@ module Carbon
|
|
13
13
|
class FileContentTypes
|
14
14
|
TEXT = "TEXT".freeze
|
15
15
|
IMAGE = "IMAGE".freeze
|
16
|
+
AUDIO = "AUDIO".freeze
|
17
|
+
VIDEO = "VIDEO".freeze
|
16
18
|
|
17
19
|
def self.all_vars
|
18
|
-
@all_vars ||= [TEXT, IMAGE].freeze
|
20
|
+
@all_vars ||= [TEXT, IMAGE, AUDIO, VIDEO].freeze
|
19
21
|
end
|
20
22
|
|
21
23
|
# Builds the enum from string
|
@@ -13,9 +13,11 @@ module Carbon
|
|
13
13
|
class FileContentTypesNullable
|
14
14
|
TEXT = "TEXT".freeze
|
15
15
|
IMAGE = "IMAGE".freeze
|
16
|
+
AUDIO = "AUDIO".freeze
|
17
|
+
VIDEO = "VIDEO".freeze
|
16
18
|
|
17
19
|
def self.all_vars
|
18
|
-
@all_vars ||= [TEXT, IMAGE].freeze
|
20
|
+
@all_vars ||= [TEXT, IMAGE, AUDIO, VIDEO].freeze
|
19
21
|
end
|
20
22
|
|
21
23
|
# Builds the enum from string
|
@@ -39,9 +39,7 @@ module Carbon
|
|
39
39
|
GITHUB = "GITHUB".freeze
|
40
40
|
JPG = "JPG".freeze
|
41
41
|
PNG = "PNG".freeze
|
42
|
-
MPEG = "MPEG".freeze
|
43
42
|
MP3 = "MP3".freeze
|
44
|
-
MP4 = "MP4".freeze
|
45
43
|
MP2 = "MP2".freeze
|
46
44
|
AAC = "AAC".freeze
|
47
45
|
WAV = "WAV".freeze
|
@@ -50,10 +48,18 @@ module Carbon
|
|
50
48
|
M4_A = "M4A".freeze
|
51
49
|
OGG = "OGG".freeze
|
52
50
|
OPUS = "OPUS".freeze
|
51
|
+
MPEG = "MPEG".freeze
|
52
|
+
MPG = "MPG".freeze
|
53
|
+
MP4 = "MP4".freeze
|
54
|
+
WMV = "WMV".freeze
|
55
|
+
AVI = "AVI".freeze
|
56
|
+
MOV = "MOV".freeze
|
57
|
+
MKV = "MKV".freeze
|
58
|
+
FLV = "FLV".freeze
|
53
59
|
WEBM = "WEBM".freeze
|
54
60
|
|
55
61
|
def self.all_vars
|
56
|
-
@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, JPG, PNG,
|
62
|
+
@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, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM].freeze
|
57
63
|
end
|
58
64
|
|
59
65
|
# Builds the enum from string
|
@@ -39,9 +39,7 @@ module Carbon
|
|
39
39
|
GITHUB = "GITHUB".freeze
|
40
40
|
JPG = "JPG".freeze
|
41
41
|
PNG = "PNG".freeze
|
42
|
-
MPEG = "MPEG".freeze
|
43
42
|
MP3 = "MP3".freeze
|
44
|
-
MP4 = "MP4".freeze
|
45
43
|
MP2 = "MP2".freeze
|
46
44
|
AAC = "AAC".freeze
|
47
45
|
WAV = "WAV".freeze
|
@@ -50,10 +48,18 @@ module Carbon
|
|
50
48
|
M4_A = "M4A".freeze
|
51
49
|
OGG = "OGG".freeze
|
52
50
|
OPUS = "OPUS".freeze
|
51
|
+
MPEG = "MPEG".freeze
|
52
|
+
MPG = "MPG".freeze
|
53
|
+
MP4 = "MP4".freeze
|
54
|
+
WMV = "WMV".freeze
|
55
|
+
AVI = "AVI".freeze
|
56
|
+
MOV = "MOV".freeze
|
57
|
+
MKV = "MKV".freeze
|
58
|
+
FLV = "FLV".freeze
|
53
59
|
WEBM = "WEBM".freeze
|
54
60
|
|
55
61
|
def self.all_vars
|
56
|
-
@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, JPG, PNG,
|
62
|
+
@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, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM].freeze
|
57
63
|
end
|
58
64
|
|
59
65
|
# Builds the enum from string
|
@@ -61,7 +61,7 @@ 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:
|
64
|
+
# Enable integration's file picker for sources that support it. Supported sources: DROPBOX, SHAREPOINT, ONEDRIVE, BOX, GOOGLE_DRIVE
|
65
65
|
attr_accessor :enable_file_picker
|
66
66
|
|
67
67
|
# Enabling this flag will fetch all available content from the source to be listed via list items endpoint
|
@@ -279,7 +279,7 @@ module Carbon
|
|
279
279
|
if attributes.key?(:'request_id')
|
280
280
|
self.request_id = attributes[:'request_id']
|
281
281
|
else
|
282
|
-
self.request_id = '
|
282
|
+
self.request_id = 'ce1b1ec8-be64-491c-9159-c40f85fa0073'
|
283
283
|
end
|
284
284
|
|
285
285
|
if attributes.key?(:'use_ocr')
|
@@ -31,6 +31,12 @@ module Carbon
|
|
31
31
|
|
32
32
|
attr_accessor :aggregate_num_embeddings
|
33
33
|
|
34
|
+
attr_accessor :aggregate_num_files_by_source
|
35
|
+
|
36
|
+
attr_accessor :aggregate_num_files_by_file_format
|
37
|
+
|
38
|
+
attr_accessor :file_statistics_aggregated_at
|
39
|
+
|
34
40
|
attr_accessor :period_ends_at
|
35
41
|
|
36
42
|
attr_accessor :cancel_at_period_end
|
@@ -54,6 +60,9 @@ module Carbon
|
|
54
60
|
:'aggregate_num_characters' => :'aggregate_num_characters',
|
55
61
|
:'aggregate_num_tokens' => :'aggregate_num_tokens',
|
56
62
|
:'aggregate_num_embeddings' => :'aggregate_num_embeddings',
|
63
|
+
:'aggregate_num_files_by_source' => :'aggregate_num_files_by_source',
|
64
|
+
:'aggregate_num_files_by_file_format' => :'aggregate_num_files_by_file_format',
|
65
|
+
:'file_statistics_aggregated_at' => :'file_statistics_aggregated_at',
|
57
66
|
:'period_ends_at' => :'period_ends_at',
|
58
67
|
:'cancel_at_period_end' => :'cancel_at_period_end',
|
59
68
|
:'global_user_config' => :'global_user_config',
|
@@ -80,6 +89,9 @@ module Carbon
|
|
80
89
|
:'aggregate_num_characters' => :'Object',
|
81
90
|
:'aggregate_num_tokens' => :'Object',
|
82
91
|
:'aggregate_num_embeddings' => :'Object',
|
92
|
+
:'aggregate_num_files_by_source' => :'Object',
|
93
|
+
:'aggregate_num_files_by_file_format' => :'Object',
|
94
|
+
:'file_statistics_aggregated_at' => :'Time',
|
83
95
|
:'period_ends_at' => :'Time',
|
84
96
|
:'cancel_at_period_end' => :'Boolean',
|
85
97
|
:'global_user_config' => :'Object',
|
@@ -94,6 +106,7 @@ module Carbon
|
|
94
106
|
:'nickname',
|
95
107
|
:'custom_branding',
|
96
108
|
:'custom_limits',
|
109
|
+
:'file_statistics_aggregated_at',
|
97
110
|
:'period_ends_at',
|
98
111
|
:'cancel_at_period_end',
|
99
112
|
])
|
@@ -154,6 +167,18 @@ module Carbon
|
|
154
167
|
self.aggregate_num_embeddings = attributes[:'aggregate_num_embeddings']
|
155
168
|
end
|
156
169
|
|
170
|
+
if attributes.key?(:'aggregate_num_files_by_source')
|
171
|
+
self.aggregate_num_files_by_source = attributes[:'aggregate_num_files_by_source']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes.key?(:'aggregate_num_files_by_file_format')
|
175
|
+
self.aggregate_num_files_by_file_format = attributes[:'aggregate_num_files_by_file_format']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.key?(:'file_statistics_aggregated_at')
|
179
|
+
self.file_statistics_aggregated_at = attributes[:'file_statistics_aggregated_at']
|
180
|
+
end
|
181
|
+
|
157
182
|
if attributes.key?(:'period_ends_at')
|
158
183
|
self.period_ends_at = attributes[:'period_ends_at']
|
159
184
|
end
|
@@ -207,6 +232,14 @@ module Carbon
|
|
207
232
|
invalid_properties.push('invalid value for "aggregate_num_embeddings", aggregate_num_embeddings cannot be nil.')
|
208
233
|
end
|
209
234
|
|
235
|
+
if @aggregate_num_files_by_source.nil?
|
236
|
+
invalid_properties.push('invalid value for "aggregate_num_files_by_source", aggregate_num_files_by_source cannot be nil.')
|
237
|
+
end
|
238
|
+
|
239
|
+
if @aggregate_num_files_by_file_format.nil?
|
240
|
+
invalid_properties.push('invalid value for "aggregate_num_files_by_file_format", aggregate_num_files_by_file_format cannot be nil.')
|
241
|
+
end
|
242
|
+
|
210
243
|
if @global_user_config.nil?
|
211
244
|
invalid_properties.push('invalid value for "global_user_config", global_user_config cannot be nil.')
|
212
245
|
end
|
@@ -232,6 +265,8 @@ module Carbon
|
|
232
265
|
return false if @aggregate_num_characters.nil?
|
233
266
|
return false if @aggregate_num_tokens.nil?
|
234
267
|
return false if @aggregate_num_embeddings.nil?
|
268
|
+
return false if @aggregate_num_files_by_source.nil?
|
269
|
+
return false if @aggregate_num_files_by_file_format.nil?
|
235
270
|
return false if @global_user_config.nil?
|
236
271
|
return false if @created_at.nil?
|
237
272
|
return false if @updated_at.nil?
|
@@ -253,6 +288,9 @@ module Carbon
|
|
253
288
|
aggregate_num_characters == o.aggregate_num_characters &&
|
254
289
|
aggregate_num_tokens == o.aggregate_num_tokens &&
|
255
290
|
aggregate_num_embeddings == o.aggregate_num_embeddings &&
|
291
|
+
aggregate_num_files_by_source == o.aggregate_num_files_by_source &&
|
292
|
+
aggregate_num_files_by_file_format == o.aggregate_num_files_by_file_format &&
|
293
|
+
file_statistics_aggregated_at == o.file_statistics_aggregated_at &&
|
256
294
|
period_ends_at == o.period_ends_at &&
|
257
295
|
cancel_at_period_end == o.cancel_at_period_end &&
|
258
296
|
global_user_config == o.global_user_config &&
|
@@ -269,7 +307,7 @@ module Carbon
|
|
269
307
|
# Calculates hash code according to all attributes.
|
270
308
|
# @return [Integer] Hash code
|
271
309
|
def hash
|
272
|
-
[id, name, nickname, remove_branding, custom_branding, custom_limits, aggregate_file_size, aggregate_num_characters, aggregate_num_tokens, aggregate_num_embeddings, period_ends_at, cancel_at_period_end, global_user_config, created_at, updated_at].hash
|
310
|
+
[id, name, nickname, remove_branding, custom_branding, custom_limits, aggregate_file_size, aggregate_num_characters, aggregate_num_tokens, aggregate_num_embeddings, aggregate_num_files_by_source, aggregate_num_files_by_file_format, file_statistics_aggregated_at, period_ends_at, cancel_at_period_end, global_user_config, created_at, updated_at].hash
|
273
311
|
end
|
274
312
|
|
275
313
|
# Builds the object from hash
|
@@ -187,7 +187,7 @@ module Carbon
|
|
187
187
|
if attributes.key?(:'request_id')
|
188
188
|
self.request_id = attributes[:'request_id']
|
189
189
|
else
|
190
|
-
self.request_id = '
|
190
|
+
self.request_id = '9fe9190e-384f-4baa-a416-d51ed93d1be7'
|
191
191
|
end
|
192
192
|
|
193
193
|
if attributes.key?(:'use_ocr')
|
@@ -182,7 +182,7 @@ module Carbon
|
|
182
182
|
if attributes.key?(:'request_id')
|
183
183
|
self.request_id = attributes[:'request_id']
|
184
184
|
else
|
185
|
-
self.request_id = '
|
185
|
+
self.request_id = 'fceb0182-329c-4e45-953b-885c747cf4a3'
|
186
186
|
end
|
187
187
|
|
188
188
|
if attributes.key?(:'enable_file_picker')
|
@@ -29,6 +29,18 @@ module Carbon
|
|
29
29
|
|
30
30
|
attr_accessor :num_tokens_synced
|
31
31
|
|
32
|
+
attr_accessor :aggregate_file_size
|
33
|
+
|
34
|
+
attr_accessor :aggregate_num_characters
|
35
|
+
|
36
|
+
attr_accessor :aggregate_num_tokens
|
37
|
+
|
38
|
+
attr_accessor :aggregate_num_embeddings
|
39
|
+
|
40
|
+
attr_accessor :aggregate_num_files_by_source
|
41
|
+
|
42
|
+
attr_accessor :aggregate_num_files_by_file_format
|
43
|
+
|
32
44
|
attr_accessor :unique_file_tags
|
33
45
|
|
34
46
|
attr_accessor :enabled_features
|
@@ -49,6 +61,12 @@ module Carbon
|
|
49
61
|
:'num_files_synced' => :'num_files_synced',
|
50
62
|
:'num_characters_synced' => :'num_characters_synced',
|
51
63
|
:'num_tokens_synced' => :'num_tokens_synced',
|
64
|
+
:'aggregate_file_size' => :'aggregate_file_size',
|
65
|
+
:'aggregate_num_characters' => :'aggregate_num_characters',
|
66
|
+
:'aggregate_num_tokens' => :'aggregate_num_tokens',
|
67
|
+
:'aggregate_num_embeddings' => :'aggregate_num_embeddings',
|
68
|
+
:'aggregate_num_files_by_source' => :'aggregate_num_files_by_source',
|
69
|
+
:'aggregate_num_files_by_file_format' => :'aggregate_num_files_by_file_format',
|
52
70
|
:'unique_file_tags' => :'unique_file_tags',
|
53
71
|
:'enabled_features' => :'enabled_features',
|
54
72
|
:'custom_limits' => :'custom_limits',
|
@@ -73,6 +91,12 @@ module Carbon
|
|
73
91
|
:'num_files_synced' => :'Integer',
|
74
92
|
:'num_characters_synced' => :'Integer',
|
75
93
|
:'num_tokens_synced' => :'Integer',
|
94
|
+
:'aggregate_file_size' => :'Object',
|
95
|
+
:'aggregate_num_characters' => :'Object',
|
96
|
+
:'aggregate_num_tokens' => :'Object',
|
97
|
+
:'aggregate_num_embeddings' => :'Object',
|
98
|
+
:'aggregate_num_files_by_source' => :'Object',
|
99
|
+
:'aggregate_num_files_by_file_format' => :'Object',
|
76
100
|
:'unique_file_tags' => :'Array<Object>',
|
77
101
|
:'enabled_features' => :'Object',
|
78
102
|
:'custom_limits' => :'Object',
|
@@ -139,6 +163,30 @@ module Carbon
|
|
139
163
|
self.num_tokens_synced = attributes[:'num_tokens_synced']
|
140
164
|
end
|
141
165
|
|
166
|
+
if attributes.key?(:'aggregate_file_size')
|
167
|
+
self.aggregate_file_size = attributes[:'aggregate_file_size']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.key?(:'aggregate_num_characters')
|
171
|
+
self.aggregate_num_characters = attributes[:'aggregate_num_characters']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes.key?(:'aggregate_num_tokens')
|
175
|
+
self.aggregate_num_tokens = attributes[:'aggregate_num_tokens']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.key?(:'aggregate_num_embeddings')
|
179
|
+
self.aggregate_num_embeddings = attributes[:'aggregate_num_embeddings']
|
180
|
+
end
|
181
|
+
|
182
|
+
if attributes.key?(:'aggregate_num_files_by_source')
|
183
|
+
self.aggregate_num_files_by_source = attributes[:'aggregate_num_files_by_source']
|
184
|
+
end
|
185
|
+
|
186
|
+
if attributes.key?(:'aggregate_num_files_by_file_format')
|
187
|
+
self.aggregate_num_files_by_file_format = attributes[:'aggregate_num_files_by_file_format']
|
188
|
+
end
|
189
|
+
|
142
190
|
if attributes.key?(:'unique_file_tags')
|
143
191
|
if (value = attributes[:'unique_file_tags']).is_a?(Array)
|
144
192
|
self.unique_file_tags = value
|
@@ -196,6 +244,30 @@ module Carbon
|
|
196
244
|
invalid_properties.push('invalid value for "num_tokens_synced", num_tokens_synced cannot be nil.')
|
197
245
|
end
|
198
246
|
|
247
|
+
if @aggregate_file_size.nil?
|
248
|
+
invalid_properties.push('invalid value for "aggregate_file_size", aggregate_file_size cannot be nil.')
|
249
|
+
end
|
250
|
+
|
251
|
+
if @aggregate_num_characters.nil?
|
252
|
+
invalid_properties.push('invalid value for "aggregate_num_characters", aggregate_num_characters cannot be nil.')
|
253
|
+
end
|
254
|
+
|
255
|
+
if @aggregate_num_tokens.nil?
|
256
|
+
invalid_properties.push('invalid value for "aggregate_num_tokens", aggregate_num_tokens cannot be nil.')
|
257
|
+
end
|
258
|
+
|
259
|
+
if @aggregate_num_embeddings.nil?
|
260
|
+
invalid_properties.push('invalid value for "aggregate_num_embeddings", aggregate_num_embeddings cannot be nil.')
|
261
|
+
end
|
262
|
+
|
263
|
+
if @aggregate_num_files_by_source.nil?
|
264
|
+
invalid_properties.push('invalid value for "aggregate_num_files_by_source", aggregate_num_files_by_source cannot be nil.')
|
265
|
+
end
|
266
|
+
|
267
|
+
if @aggregate_num_files_by_file_format.nil?
|
268
|
+
invalid_properties.push('invalid value for "aggregate_num_files_by_file_format", aggregate_num_files_by_file_format cannot be nil.')
|
269
|
+
end
|
270
|
+
|
199
271
|
if @unique_file_tags.nil?
|
200
272
|
invalid_properties.push('invalid value for "unique_file_tags", unique_file_tags cannot be nil.')
|
201
273
|
end
|
@@ -222,6 +294,12 @@ module Carbon
|
|
222
294
|
return false if @num_files_synced.nil?
|
223
295
|
return false if @num_characters_synced.nil?
|
224
296
|
return false if @num_tokens_synced.nil?
|
297
|
+
return false if @aggregate_file_size.nil?
|
298
|
+
return false if @aggregate_num_characters.nil?
|
299
|
+
return false if @aggregate_num_tokens.nil?
|
300
|
+
return false if @aggregate_num_embeddings.nil?
|
301
|
+
return false if @aggregate_num_files_by_source.nil?
|
302
|
+
return false if @aggregate_num_files_by_file_format.nil?
|
225
303
|
return false if @unique_file_tags.nil?
|
226
304
|
return false if @custom_limits.nil?
|
227
305
|
return false if @auto_sync_enabled_sources.nil?
|
@@ -242,6 +320,12 @@ module Carbon
|
|
242
320
|
num_files_synced == o.num_files_synced &&
|
243
321
|
num_characters_synced == o.num_characters_synced &&
|
244
322
|
num_tokens_synced == o.num_tokens_synced &&
|
323
|
+
aggregate_file_size == o.aggregate_file_size &&
|
324
|
+
aggregate_num_characters == o.aggregate_num_characters &&
|
325
|
+
aggregate_num_tokens == o.aggregate_num_tokens &&
|
326
|
+
aggregate_num_embeddings == o.aggregate_num_embeddings &&
|
327
|
+
aggregate_num_files_by_source == o.aggregate_num_files_by_source &&
|
328
|
+
aggregate_num_files_by_file_format == o.aggregate_num_files_by_file_format &&
|
245
329
|
unique_file_tags == o.unique_file_tags &&
|
246
330
|
enabled_features == o.enabled_features &&
|
247
331
|
custom_limits == o.custom_limits &&
|
@@ -257,7 +341,7 @@ module Carbon
|
|
257
341
|
# Calculates hash code according to all attributes.
|
258
342
|
# @return [Integer] Hash code
|
259
343
|
def hash
|
260
|
-
[id, organization_id, organization_supplied_user_id, created_at, updated_at, deleted_at, num_files_synced, num_characters_synced, num_tokens_synced, unique_file_tags, enabled_features, custom_limits, auto_sync_enabled_sources].hash
|
344
|
+
[id, organization_id, organization_supplied_user_id, created_at, updated_at, deleted_at, num_files_synced, num_characters_synced, num_tokens_synced, aggregate_file_size, aggregate_num_characters, aggregate_num_tokens, aggregate_num_embeddings, aggregate_num_files_by_source, aggregate_num_files_by_file_format, unique_file_tags, enabled_features, custom_limits, auto_sync_enabled_sources].hash
|
261
345
|
end
|
262
346
|
|
263
347
|
# Builds the object from hash
|
@@ -19,6 +19,10 @@ module Carbon
|
|
19
19
|
|
20
20
|
attr_accessor :signing_key
|
21
21
|
|
22
|
+
attr_accessor :status
|
23
|
+
|
24
|
+
attr_accessor :status_reason
|
25
|
+
|
22
26
|
attr_accessor :created_at
|
23
27
|
|
24
28
|
attr_accessor :updated_at
|
@@ -30,6 +34,8 @@ module Carbon
|
|
30
34
|
:'organization_id' => :'organization_id',
|
31
35
|
:'url' => :'url',
|
32
36
|
:'signing_key' => :'signing_key',
|
37
|
+
:'status' => :'status',
|
38
|
+
:'status_reason' => :'status_reason',
|
33
39
|
:'created_at' => :'created_at',
|
34
40
|
:'updated_at' => :'updated_at'
|
35
41
|
}
|
@@ -47,6 +53,8 @@ module Carbon
|
|
47
53
|
:'organization_id' => :'Integer',
|
48
54
|
:'url' => :'String',
|
49
55
|
:'signing_key' => :'String',
|
56
|
+
:'status' => :'WebhookStatus',
|
57
|
+
:'status_reason' => :'String',
|
50
58
|
:'created_at' => :'Time',
|
51
59
|
:'updated_at' => :'Time'
|
52
60
|
}
|
@@ -55,6 +63,7 @@ module Carbon
|
|
55
63
|
# List of attributes with nullable: true
|
56
64
|
def self.openapi_nullable
|
57
65
|
Set.new([
|
66
|
+
:'status_reason',
|
58
67
|
])
|
59
68
|
end
|
60
69
|
|
@@ -89,6 +98,14 @@ module Carbon
|
|
89
98
|
self.signing_key = attributes[:'signing_key']
|
90
99
|
end
|
91
100
|
|
101
|
+
if attributes.key?(:'status')
|
102
|
+
self.status = attributes[:'status']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.key?(:'status_reason')
|
106
|
+
self.status_reason = attributes[:'status_reason']
|
107
|
+
end
|
108
|
+
|
92
109
|
if attributes.key?(:'created_at')
|
93
110
|
self.created_at = attributes[:'created_at']
|
94
111
|
end
|
@@ -118,6 +135,10 @@ module Carbon
|
|
118
135
|
invalid_properties.push('invalid value for "signing_key", signing_key cannot be nil.')
|
119
136
|
end
|
120
137
|
|
138
|
+
if @status.nil?
|
139
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
140
|
+
end
|
141
|
+
|
121
142
|
if @created_at.nil?
|
122
143
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
123
144
|
end
|
@@ -136,6 +157,7 @@ module Carbon
|
|
136
157
|
return false if @organization_id.nil?
|
137
158
|
return false if @url.nil?
|
138
159
|
return false if @signing_key.nil?
|
160
|
+
return false if @status.nil?
|
139
161
|
return false if @created_at.nil?
|
140
162
|
return false if @updated_at.nil?
|
141
163
|
true
|
@@ -150,6 +172,8 @@ module Carbon
|
|
150
172
|
organization_id == o.organization_id &&
|
151
173
|
url == o.url &&
|
152
174
|
signing_key == o.signing_key &&
|
175
|
+
status == o.status &&
|
176
|
+
status_reason == o.status_reason &&
|
153
177
|
created_at == o.created_at &&
|
154
178
|
updated_at == o.updated_at
|
155
179
|
end
|
@@ -163,7 +187,7 @@ module Carbon
|
|
163
187
|
# Calculates hash code according to all attributes.
|
164
188
|
# @return [Integer] Hash code
|
165
189
|
def hash
|
166
|
-
[id, organization_id, url, signing_key, created_at, updated_at].hash
|
190
|
+
[id, organization_id, url, signing_key, status, status_reason, created_at, updated_at].hash
|
167
191
|
end
|
168
192
|
|
169
193
|
# Builds the object from hash
|