carbon_ruby_sdk 0.2.20 → 0.2.22
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 +4 -4
- data/README.md +108 -3
- data/lib/carbon_ruby_sdk/api/embeddings_api.rb +6 -2
- data/lib/carbon_ruby_sdk/api/files_api.rb +231 -6
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +8 -4
- data/lib/carbon_ruby_sdk/models/cold_storage_props.rb +229 -0
- data/lib/carbon_ruby_sdk/models/embedding_storage_status.rb +38 -0
- data/lib/carbon_ruby_sdk/models/file_sync_config.rb +13 -1
- data/lib/carbon_ruby_sdk/models/file_sync_config_nullable.rb +13 -1
- data/lib/carbon_ruby_sdk/models/get_embedding_documents_body.rb +17 -5
- data/lib/carbon_ruby_sdk/models/modify_cold_storage_parameters_query_input.rb +235 -0
- data/lib/carbon_ruby_sdk/models/move_to_hot_storage_query_input.rb +215 -0
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +17 -6
- data/lib/carbon_ruby_sdk/models/raw_text_input.rb +14 -5
- data/lib/carbon_ruby_sdk/models/sent_webhook_payload.rb +2 -2
- data/lib/carbon_ruby_sdk/models/sync_options.rb +16 -5
- data/lib/carbon_ruby_sdk/models/upload_file_from_url_input.rb +24 -4
- data/lib/carbon_ruby_sdk/models/user_file.rb +39 -1
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +4 -0
- data/spec/api/files_api_spec.rb +25 -0
- data/spec/models/cold_storage_props_spec.rb +34 -0
- data/spec/models/embedding_storage_status_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/get_embedding_documents_body_spec.rb +6 -0
- data/spec/models/modify_cold_storage_parameters_query_input_spec.rb +40 -0
- data/spec/models/move_to_hot_storage_query_input_spec.rb +28 -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/sent_webhook_payload_spec.rb +1 -1
- data/spec/models/sync_options_spec.rb +6 -0
- data/spec/models/upload_file_from_url_input_spec.rb +12 -0
- data/spec/models/user_file_spec.rb +18 -0
- metadata +14 -2
@@ -0,0 +1,215 @@
|
|
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 MoveToHotStorageQueryInput
|
14
|
+
attr_accessor :filters
|
15
|
+
|
16
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
17
|
+
def self.attribute_map
|
18
|
+
{
|
19
|
+
:'filters' => :'filters'
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
# Returns all the JSON keys this model knows about
|
24
|
+
def self.acceptable_attributes
|
25
|
+
attribute_map.values
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.openapi_types
|
30
|
+
{
|
31
|
+
:'filters' => :'OrganizationUserFilesToSyncFilters'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# List of attributes with nullable: true
|
36
|
+
def self.openapi_nullable
|
37
|
+
Set.new([
|
38
|
+
])
|
39
|
+
end
|
40
|
+
|
41
|
+
# Initializes the object
|
42
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
43
|
+
def initialize(attributes = {})
|
44
|
+
if (!attributes.is_a?(Hash))
|
45
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::MoveToHotStorageQueryInput` initialize method"
|
46
|
+
end
|
47
|
+
|
48
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
49
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
50
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
51
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::MoveToHotStorageQueryInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
52
|
+
end
|
53
|
+
h[k.to_sym] = v
|
54
|
+
}
|
55
|
+
|
56
|
+
if attributes.key?(:'filters')
|
57
|
+
self.filters = attributes[:'filters']
|
58
|
+
end
|
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
|
+
true
|
72
|
+
end
|
73
|
+
|
74
|
+
# Checks equality by comparing each attribute.
|
75
|
+
# @param [Object] Object to be compared
|
76
|
+
def ==(o)
|
77
|
+
return true if self.equal?(o)
|
78
|
+
self.class == o.class &&
|
79
|
+
filters == o.filters
|
80
|
+
end
|
81
|
+
|
82
|
+
# @see the `==` method
|
83
|
+
# @param [Object] Object to be compared
|
84
|
+
def eql?(o)
|
85
|
+
self == o
|
86
|
+
end
|
87
|
+
|
88
|
+
# Calculates hash code according to all attributes.
|
89
|
+
# @return [Integer] Hash code
|
90
|
+
def hash
|
91
|
+
[filters].hash
|
92
|
+
end
|
93
|
+
|
94
|
+
# Builds the object from hash
|
95
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
96
|
+
# @return [Object] Returns the model itself
|
97
|
+
def self.build_from_hash(attributes)
|
98
|
+
new.build_from_hash(attributes)
|
99
|
+
end
|
100
|
+
|
101
|
+
# Builds the object from hash
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
103
|
+
# @return [Object] Returns the model itself
|
104
|
+
def build_from_hash(attributes)
|
105
|
+
return nil unless attributes.is_a?(Hash)
|
106
|
+
attributes = attributes.transform_keys(&:to_sym)
|
107
|
+
self.class.openapi_types.each_pair do |key, type|
|
108
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
109
|
+
self.send("#{key}=", nil)
|
110
|
+
elsif type =~ /\AArray<(.*)>/i
|
111
|
+
# check to ensure the input is an array given that the attribute
|
112
|
+
# is documented as an array but the input is not
|
113
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
114
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
115
|
+
end
|
116
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
117
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
self
|
122
|
+
end
|
123
|
+
|
124
|
+
# Deserializes the data based on type
|
125
|
+
# @param string type Data type
|
126
|
+
# @param string value Value to be deserialized
|
127
|
+
# @return [Object] Deserialized data
|
128
|
+
def _deserialize(type, value)
|
129
|
+
case type.to_sym
|
130
|
+
when :Time
|
131
|
+
Time.parse(value)
|
132
|
+
when :Date
|
133
|
+
Date.parse(value)
|
134
|
+
when :String
|
135
|
+
value.to_s
|
136
|
+
when :Integer
|
137
|
+
value.to_i
|
138
|
+
when :Float
|
139
|
+
value.to_f
|
140
|
+
when :Boolean
|
141
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
142
|
+
true
|
143
|
+
else
|
144
|
+
false
|
145
|
+
end
|
146
|
+
when :Object
|
147
|
+
# generic object (usually a Hash), return directly
|
148
|
+
value
|
149
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
150
|
+
inner_type = Regexp.last_match[:inner_type]
|
151
|
+
value.map { |v| _deserialize(inner_type, v) }
|
152
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
153
|
+
k_type = Regexp.last_match[:k_type]
|
154
|
+
v_type = Regexp.last_match[:v_type]
|
155
|
+
{}.tap do |hash|
|
156
|
+
value.each do |k, v|
|
157
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
else # model
|
161
|
+
# models (e.g. Pet) or oneOf
|
162
|
+
klass = Carbon.const_get(type)
|
163
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
# Returns the string representation of the object
|
168
|
+
# @return [String] String presentation of the object
|
169
|
+
def to_s
|
170
|
+
to_hash.to_s
|
171
|
+
end
|
172
|
+
|
173
|
+
# to_body is an alias to to_hash (backward compatibility)
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
175
|
+
def to_body
|
176
|
+
to_hash
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the object in the form of hash
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
181
|
+
def to_hash
|
182
|
+
hash = {}
|
183
|
+
self.class.attribute_map.each_pair do |attr, param|
|
184
|
+
value = self.send(attr)
|
185
|
+
if value.nil?
|
186
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
187
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
188
|
+
end
|
189
|
+
|
190
|
+
hash[param] = _to_hash(value)
|
191
|
+
end
|
192
|
+
hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Outputs non-array value in the form of hash
|
196
|
+
# For object, use to_hash. Otherwise, just return the value
|
197
|
+
# @param [Object] value Any valid value
|
198
|
+
# @return [Hash] Returns the value in the form of hash
|
199
|
+
def _to_hash(value)
|
200
|
+
if value.is_a?(Array)
|
201
|
+
value.compact.map { |v| _to_hash(v) }
|
202
|
+
elsif value.is_a?(Hash)
|
203
|
+
{}.tap do |hash|
|
204
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
205
|
+
end
|
206
|
+
elsif value.respond_to? :to_hash
|
207
|
+
value.to_hash
|
208
|
+
else
|
209
|
+
value
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
end
|
214
|
+
|
215
|
+
end
|
@@ -56,7 +56,7 @@ module Carbon
|
|
56
56
|
# This request id will be added to all files that get synced using the generated OAuth URL
|
57
57
|
attr_accessor :request_id
|
58
58
|
|
59
|
-
# Enable OCR for files that support it. Supported formats: pdf
|
59
|
+
# Enable OCR for files that support it. Supported formats: jpg, png, pdf
|
60
60
|
attr_accessor :use_ocr
|
61
61
|
|
62
62
|
attr_accessor :parse_pdf_tables_with_ocr
|
@@ -72,6 +72,9 @@ module Carbon
|
|
72
72
|
|
73
73
|
attr_accessor :file_sync_config
|
74
74
|
|
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
|
+
attr_accessor :automatically_open_file_picker
|
77
|
+
|
75
78
|
# Attribute mapping from ruby-style variable name to JSON key.
|
76
79
|
def self.attribute_map
|
77
80
|
{
|
@@ -100,7 +103,8 @@ module Carbon
|
|
100
103
|
:'enable_file_picker' => :'enable_file_picker',
|
101
104
|
:'sync_source_items' => :'sync_source_items',
|
102
105
|
:'incremental_sync' => :'incremental_sync',
|
103
|
-
:'file_sync_config' => :'file_sync_config'
|
106
|
+
:'file_sync_config' => :'file_sync_config',
|
107
|
+
:'automatically_open_file_picker' => :'automatically_open_file_picker'
|
104
108
|
}
|
105
109
|
end
|
106
110
|
|
@@ -137,7 +141,8 @@ module Carbon
|
|
137
141
|
:'enable_file_picker' => :'Boolean',
|
138
142
|
:'sync_source_items' => :'Boolean',
|
139
143
|
:'incremental_sync' => :'Boolean',
|
140
|
-
:'file_sync_config' => :'FileSyncConfigNullable'
|
144
|
+
:'file_sync_config' => :'FileSyncConfigNullable',
|
145
|
+
:'automatically_open_file_picker' => :'Boolean'
|
141
146
|
}
|
142
147
|
end
|
143
148
|
|
@@ -164,7 +169,8 @@ module Carbon
|
|
164
169
|
:'request_id',
|
165
170
|
:'use_ocr',
|
166
171
|
:'parse_pdf_tables_with_ocr',
|
167
|
-
:'file_sync_config'
|
172
|
+
:'file_sync_config',
|
173
|
+
:'automatically_open_file_picker'
|
168
174
|
])
|
169
175
|
end
|
170
176
|
|
@@ -314,6 +320,10 @@ module Carbon
|
|
314
320
|
if attributes.key?(:'file_sync_config')
|
315
321
|
self.file_sync_config = attributes[:'file_sync_config']
|
316
322
|
end
|
323
|
+
|
324
|
+
if attributes.key?(:'automatically_open_file_picker')
|
325
|
+
self.automatically_open_file_picker = attributes[:'automatically_open_file_picker']
|
326
|
+
end
|
317
327
|
end
|
318
328
|
|
319
329
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -364,7 +374,8 @@ module Carbon
|
|
364
374
|
enable_file_picker == o.enable_file_picker &&
|
365
375
|
sync_source_items == o.sync_source_items &&
|
366
376
|
incremental_sync == o.incremental_sync &&
|
367
|
-
file_sync_config == o.file_sync_config
|
377
|
+
file_sync_config == o.file_sync_config &&
|
378
|
+
automatically_open_file_picker == o.automatically_open_file_picker
|
368
379
|
end
|
369
380
|
|
370
381
|
# @see the `==` method
|
@@ -376,7 +387,7 @@ module Carbon
|
|
376
387
|
# Calculates hash code according to all attributes.
|
377
388
|
# @return [Integer] Hash code
|
378
389
|
def hash
|
379
|
-
[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].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
|
380
391
|
end
|
381
392
|
|
382
393
|
# Builds the object from hash
|
@@ -27,6 +27,8 @@ module Carbon
|
|
27
27
|
|
28
28
|
attr_accessor :generate_sparse_vectors
|
29
29
|
|
30
|
+
attr_accessor :cold_storage_params
|
31
|
+
|
30
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
33
|
def self.attribute_map
|
32
34
|
{
|
@@ -37,7 +39,8 @@ module Carbon
|
|
37
39
|
:'skip_embedding_generation' => :'skip_embedding_generation',
|
38
40
|
:'overwrite_file_id' => :'overwrite_file_id',
|
39
41
|
:'embedding_model' => :'embedding_model',
|
40
|
-
:'generate_sparse_vectors' => :'generate_sparse_vectors'
|
42
|
+
:'generate_sparse_vectors' => :'generate_sparse_vectors',
|
43
|
+
:'cold_storage_params' => :'cold_storage_params'
|
41
44
|
}
|
42
45
|
end
|
43
46
|
|
@@ -56,7 +59,8 @@ module Carbon
|
|
56
59
|
:'skip_embedding_generation' => :'Boolean',
|
57
60
|
:'overwrite_file_id' => :'Integer',
|
58
61
|
:'embedding_model' => :'EmbeddingGeneratorsNullable',
|
59
|
-
:'generate_sparse_vectors' => :'Boolean'
|
62
|
+
:'generate_sparse_vectors' => :'Boolean',
|
63
|
+
:'cold_storage_params' => :'ColdStorageProps'
|
60
64
|
}
|
61
65
|
end
|
62
66
|
|
@@ -68,7 +72,7 @@ module Carbon
|
|
68
72
|
:'chunk_overlap',
|
69
73
|
:'overwrite_file_id',
|
70
74
|
:'embedding_model',
|
71
|
-
:'generate_sparse_vectors'
|
75
|
+
:'generate_sparse_vectors',
|
72
76
|
])
|
73
77
|
end
|
74
78
|
|
@@ -124,6 +128,10 @@ module Carbon
|
|
124
128
|
else
|
125
129
|
self.generate_sparse_vectors = false
|
126
130
|
end
|
131
|
+
|
132
|
+
if attributes.key?(:'cold_storage_params')
|
133
|
+
self.cold_storage_params = attributes[:'cold_storage_params']
|
134
|
+
end
|
127
135
|
end
|
128
136
|
|
129
137
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -175,7 +183,8 @@ module Carbon
|
|
175
183
|
skip_embedding_generation == o.skip_embedding_generation &&
|
176
184
|
overwrite_file_id == o.overwrite_file_id &&
|
177
185
|
embedding_model == o.embedding_model &&
|
178
|
-
generate_sparse_vectors == o.generate_sparse_vectors
|
186
|
+
generate_sparse_vectors == o.generate_sparse_vectors &&
|
187
|
+
cold_storage_params == o.cold_storage_params
|
179
188
|
end
|
180
189
|
|
181
190
|
# @see the `==` method
|
@@ -187,7 +196,7 @@ module Carbon
|
|
187
196
|
# Calculates hash code according to all attributes.
|
188
197
|
# @return [Integer] Hash code
|
189
198
|
def hash
|
190
|
-
[contents, name, chunk_size, chunk_overlap, skip_embedding_generation, overwrite_file_id, embedding_model, generate_sparse_vectors].hash
|
199
|
+
[contents, name, chunk_size, chunk_overlap, skip_embedding_generation, overwrite_file_id, embedding_model, generate_sparse_vectors, cold_storage_params].hash
|
191
200
|
end
|
192
201
|
|
193
202
|
# Builds the object from hash
|
@@ -114,7 +114,7 @@ module Carbon
|
|
114
114
|
# Check to see if the all the properties in the model are valid
|
115
115
|
# @return true if the model is valid
|
116
116
|
def valid?
|
117
|
-
webhook_type_validator = EnumAttributeValidator.new('String', ["ADD", "ALL_UPLOADED_FILES_QUEUED", "CANCEL", "CHECKUP", "DATA_SOURCE_READY", "FILES_CREATED", "FILES_SKIPPED", "FILE_DELETED", "FILE_ERROR", "FILE_READY", "FILE_STATISTICS_AGGREGATED", "FILE_SYNC_LIMIT_REACHED", "ORGANIZATION_USER_DELETED", "RATE_LIMIT_ERROR", "REVOKE", "SPARSE_VECTOR_QUEUE_STATUS", "UPDATE", "WEBPAGE_ERROR", "WEBPAGE_READY", "WEBSCRAPE_URLS_READY"])
|
117
|
+
webhook_type_validator = EnumAttributeValidator.new('String', ["ADD", "ALL_UPLOADED_FILES_QUEUED", "CANCEL", "CHECKUP", "DATA_SOURCE_READY", "EMBEDDING_STORAGE_MODIFIED", "FILES_CREATED", "FILES_SKIPPED", "FILE_DELETED", "FILE_ERROR", "FILE_READY", "FILE_STATISTICS_AGGREGATED", "FILE_SYNC_LIMIT_REACHED", "MOVED_TO_COLD_STORAGE", "MOVED_TO_HOT_STORAGE", "ORGANIZATION_USER_DELETED", "RATE_LIMIT_ERROR", "REVOKE", "SPARSE_VECTOR_QUEUE_STATUS", "UPDATE", "WEBPAGE_ERROR", "WEBPAGE_READY", "WEBSCRAPE_URLS_READY"])
|
118
118
|
return false unless webhook_type_validator.valid?(@webhook_type)
|
119
119
|
true
|
120
120
|
end
|
@@ -122,7 +122,7 @@ module Carbon
|
|
122
122
|
# Custom attribute writer method checking allowed values (enum).
|
123
123
|
# @param [Object] webhook_type Object to be assigned
|
124
124
|
def webhook_type=(webhook_type)
|
125
|
-
validator = EnumAttributeValidator.new('String', ["ADD", "ALL_UPLOADED_FILES_QUEUED", "CANCEL", "CHECKUP", "DATA_SOURCE_READY", "FILES_CREATED", "FILES_SKIPPED", "FILE_DELETED", "FILE_ERROR", "FILE_READY", "FILE_STATISTICS_AGGREGATED", "FILE_SYNC_LIMIT_REACHED", "ORGANIZATION_USER_DELETED", "RATE_LIMIT_ERROR", "REVOKE", "SPARSE_VECTOR_QUEUE_STATUS", "UPDATE", "WEBPAGE_ERROR", "WEBPAGE_READY", "WEBSCRAPE_URLS_READY"])
|
125
|
+
validator = EnumAttributeValidator.new('String', ["ADD", "ALL_UPLOADED_FILES_QUEUED", "CANCEL", "CHECKUP", "DATA_SOURCE_READY", "EMBEDDING_STORAGE_MODIFIED", "FILES_CREATED", "FILES_SKIPPED", "FILE_DELETED", "FILE_ERROR", "FILE_READY", "FILE_STATISTICS_AGGREGATED", "FILE_SYNC_LIMIT_REACHED", "MOVED_TO_COLD_STORAGE", "MOVED_TO_HOT_STORAGE", "ORGANIZATION_USER_DELETED", "RATE_LIMIT_ERROR", "REVOKE", "SPARSE_VECTOR_QUEUE_STATUS", "UPDATE", "WEBPAGE_ERROR", "WEBPAGE_READY", "WEBSCRAPE_URLS_READY"])
|
126
126
|
unless validator.valid?(webhook_type)
|
127
127
|
fail ArgumentError, "invalid value for \"webhook_type\", must be one of #{validator.allowable_values}."
|
128
128
|
end
|
@@ -45,6 +45,9 @@ module Carbon
|
|
45
45
|
|
46
46
|
attr_accessor :file_sync_config
|
47
47
|
|
48
|
+
# 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.
|
49
|
+
attr_accessor :automatically_open_file_picker
|
50
|
+
|
48
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
49
52
|
def self.attribute_map
|
50
53
|
{
|
@@ -62,7 +65,8 @@ module Carbon
|
|
62
65
|
:'enable_file_picker' => :'enable_file_picker',
|
63
66
|
:'sync_source_items' => :'sync_source_items',
|
64
67
|
:'incremental_sync' => :'incremental_sync',
|
65
|
-
:'file_sync_config' => :'file_sync_config'
|
68
|
+
:'file_sync_config' => :'file_sync_config',
|
69
|
+
:'automatically_open_file_picker' => :'automatically_open_file_picker'
|
66
70
|
}
|
67
71
|
end
|
68
72
|
|
@@ -88,7 +92,8 @@ module Carbon
|
|
88
92
|
:'enable_file_picker' => :'Boolean',
|
89
93
|
:'sync_source_items' => :'Boolean',
|
90
94
|
:'incremental_sync' => :'Boolean',
|
91
|
-
:'file_sync_config' => :'FileSyncConfigNullable'
|
95
|
+
:'file_sync_config' => :'FileSyncConfigNullable',
|
96
|
+
:'automatically_open_file_picker' => :'Boolean'
|
92
97
|
}
|
93
98
|
end
|
94
99
|
|
@@ -105,7 +110,8 @@ module Carbon
|
|
105
110
|
:'max_items_per_chunk',
|
106
111
|
:'sync_files_on_connection',
|
107
112
|
:'request_id',
|
108
|
-
:'file_sync_config'
|
113
|
+
:'file_sync_config',
|
114
|
+
:'automatically_open_file_picker'
|
109
115
|
])
|
110
116
|
end
|
111
117
|
|
@@ -205,6 +211,10 @@ module Carbon
|
|
205
211
|
if attributes.key?(:'file_sync_config')
|
206
212
|
self.file_sync_config = attributes[:'file_sync_config']
|
207
213
|
end
|
214
|
+
|
215
|
+
if attributes.key?(:'automatically_open_file_picker')
|
216
|
+
self.automatically_open_file_picker = attributes[:'automatically_open_file_picker']
|
217
|
+
end
|
208
218
|
end
|
209
219
|
|
210
220
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -239,7 +249,8 @@ module Carbon
|
|
239
249
|
enable_file_picker == o.enable_file_picker &&
|
240
250
|
sync_source_items == o.sync_source_items &&
|
241
251
|
incremental_sync == o.incremental_sync &&
|
242
|
-
file_sync_config == o.file_sync_config
|
252
|
+
file_sync_config == o.file_sync_config &&
|
253
|
+
automatically_open_file_picker == o.automatically_open_file_picker
|
243
254
|
end
|
244
255
|
|
245
256
|
# @see the `==` method
|
@@ -251,7 +262,7 @@ module Carbon
|
|
251
262
|
# Calculates hash code according to all attributes.
|
252
263
|
# @return [Integer] Hash code
|
253
264
|
def hash
|
254
|
-
[tags, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, sync_files_on_connection, set_page_as_boundary, request_id, enable_file_picker, sync_source_items, incremental_sync, file_sync_config].hash
|
265
|
+
[tags, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, sync_files_on_connection, set_page_as_boundary, request_id, enable_file_picker, sync_source_items, incremental_sync, file_sync_config, automatically_open_file_picker].hash
|
255
266
|
end
|
256
267
|
|
257
268
|
# Builds the object from hash
|
@@ -40,10 +40,14 @@ module Carbon
|
|
40
40
|
|
41
41
|
attr_accessor :transcription_service
|
42
42
|
|
43
|
+
attr_accessor :include_speaker_labels
|
44
|
+
|
43
45
|
attr_accessor :media_type
|
44
46
|
|
45
47
|
attr_accessor :split_rows
|
46
48
|
|
49
|
+
attr_accessor :cold_storage_params
|
50
|
+
|
47
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
48
52
|
def self.attribute_map
|
49
53
|
{
|
@@ -61,8 +65,10 @@ module Carbon
|
|
61
65
|
:'parse_pdf_tables_with_ocr' => :'parse_pdf_tables_with_ocr',
|
62
66
|
:'detect_audio_language' => :'detect_audio_language',
|
63
67
|
:'transcription_service' => :'transcription_service',
|
68
|
+
:'include_speaker_labels' => :'include_speaker_labels',
|
64
69
|
:'media_type' => :'media_type',
|
65
|
-
:'split_rows' => :'split_rows'
|
70
|
+
:'split_rows' => :'split_rows',
|
71
|
+
:'cold_storage_params' => :'cold_storage_params'
|
66
72
|
}
|
67
73
|
end
|
68
74
|
|
@@ -88,8 +94,10 @@ module Carbon
|
|
88
94
|
:'parse_pdf_tables_with_ocr' => :'Boolean',
|
89
95
|
:'detect_audio_language' => :'Boolean',
|
90
96
|
:'transcription_service' => :'TranscriptionServiceNullable',
|
97
|
+
:'include_speaker_labels' => :'Boolean',
|
91
98
|
:'media_type' => :'FileContentTypesNullable',
|
92
|
-
:'split_rows' => :'Boolean'
|
99
|
+
:'split_rows' => :'Boolean',
|
100
|
+
:'cold_storage_params' => :'ColdStorageProps'
|
93
101
|
}
|
94
102
|
end
|
95
103
|
|
@@ -192,6 +200,12 @@ module Carbon
|
|
192
200
|
self.transcription_service = attributes[:'transcription_service']
|
193
201
|
end
|
194
202
|
|
203
|
+
if attributes.key?(:'include_speaker_labels')
|
204
|
+
self.include_speaker_labels = attributes[:'include_speaker_labels']
|
205
|
+
else
|
206
|
+
self.include_speaker_labels = false
|
207
|
+
end
|
208
|
+
|
195
209
|
if attributes.key?(:'media_type')
|
196
210
|
self.media_type = attributes[:'media_type']
|
197
211
|
end
|
@@ -201,6 +215,10 @@ module Carbon
|
|
201
215
|
else
|
202
216
|
self.split_rows = false
|
203
217
|
end
|
218
|
+
|
219
|
+
if attributes.key?(:'cold_storage_params')
|
220
|
+
self.cold_storage_params = attributes[:'cold_storage_params']
|
221
|
+
end
|
204
222
|
end
|
205
223
|
|
206
224
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -240,8 +258,10 @@ module Carbon
|
|
240
258
|
parse_pdf_tables_with_ocr == o.parse_pdf_tables_with_ocr &&
|
241
259
|
detect_audio_language == o.detect_audio_language &&
|
242
260
|
transcription_service == o.transcription_service &&
|
261
|
+
include_speaker_labels == o.include_speaker_labels &&
|
243
262
|
media_type == o.media_type &&
|
244
|
-
split_rows == o.split_rows
|
263
|
+
split_rows == o.split_rows &&
|
264
|
+
cold_storage_params == o.cold_storage_params
|
245
265
|
end
|
246
266
|
|
247
267
|
# @see the `==` method
|
@@ -253,7 +273,7 @@ module Carbon
|
|
253
273
|
# Calculates hash code according to all attributes.
|
254
274
|
# @return [Integer] Hash code
|
255
275
|
def hash
|
256
|
-
[url, file_name, chunk_size, chunk_overlap, skip_embedding_generation, set_page_as_boundary, embedding_model, generate_sparse_vectors, use_textract, prepend_filename_to_chunks, max_items_per_chunk, parse_pdf_tables_with_ocr, detect_audio_language, transcription_service, media_type, split_rows].hash
|
276
|
+
[url, file_name, chunk_size, chunk_overlap, skip_embedding_generation, set_page_as_boundary, embedding_model, generate_sparse_vectors, use_textract, prepend_filename_to_chunks, max_items_per_chunk, parse_pdf_tables_with_ocr, detect_audio_language, transcription_service, include_speaker_labels, media_type, split_rows, cold_storage_params].hash
|
257
277
|
end
|
258
278
|
|
259
279
|
# Builds the object from hash
|
@@ -75,6 +75,12 @@ module Carbon
|
|
75
75
|
|
76
76
|
attr_accessor :file_contents_deleted
|
77
77
|
|
78
|
+
attr_accessor :supports_cold_storage
|
79
|
+
|
80
|
+
attr_accessor :hot_storage_time_to_live
|
81
|
+
|
82
|
+
attr_accessor :embedding_storage_status
|
83
|
+
|
78
84
|
attr_accessor :created_at
|
79
85
|
|
80
86
|
attr_accessor :updated_at
|
@@ -114,6 +120,9 @@ module Carbon
|
|
114
120
|
:'sync_properties' => :'sync_properties',
|
115
121
|
:'messages_metadata' => :'messages_metadata',
|
116
122
|
:'file_contents_deleted' => :'file_contents_deleted',
|
123
|
+
:'supports_cold_storage' => :'supports_cold_storage',
|
124
|
+
:'hot_storage_time_to_live' => :'hot_storage_time_to_live',
|
125
|
+
:'embedding_storage_status' => :'embedding_storage_status',
|
117
126
|
:'created_at' => :'created_at',
|
118
127
|
:'updated_at' => :'updated_at'
|
119
128
|
}
|
@@ -159,6 +168,9 @@ module Carbon
|
|
159
168
|
:'sync_properties' => :'Object',
|
160
169
|
:'messages_metadata' => :'Object',
|
161
170
|
:'file_contents_deleted' => :'Boolean',
|
171
|
+
:'supports_cold_storage' => :'Boolean',
|
172
|
+
:'hot_storage_time_to_live' => :'Integer',
|
173
|
+
:'embedding_storage_status' => :'EmbeddingStorageStatus',
|
162
174
|
:'created_at' => :'Time',
|
163
175
|
:'updated_at' => :'Time'
|
164
176
|
}
|
@@ -188,6 +200,7 @@ module Carbon
|
|
188
200
|
:'source_created_at',
|
189
201
|
:'generate_sparse_vectors',
|
190
202
|
:'request_id',
|
203
|
+
:'hot_storage_time_to_live',
|
191
204
|
])
|
192
205
|
end
|
193
206
|
|
@@ -338,6 +351,18 @@ module Carbon
|
|
338
351
|
self.file_contents_deleted = false
|
339
352
|
end
|
340
353
|
|
354
|
+
if attributes.key?(:'supports_cold_storage')
|
355
|
+
self.supports_cold_storage = attributes[:'supports_cold_storage']
|
356
|
+
end
|
357
|
+
|
358
|
+
if attributes.key?(:'hot_storage_time_to_live')
|
359
|
+
self.hot_storage_time_to_live = attributes[:'hot_storage_time_to_live']
|
360
|
+
end
|
361
|
+
|
362
|
+
if attributes.key?(:'embedding_storage_status')
|
363
|
+
self.embedding_storage_status = attributes[:'embedding_storage_status']
|
364
|
+
end
|
365
|
+
|
341
366
|
if attributes.key?(:'created_at')
|
342
367
|
self.created_at = attributes[:'created_at']
|
343
368
|
end
|
@@ -395,6 +420,14 @@ module Carbon
|
|
395
420
|
invalid_properties.push('invalid value for "file_contents_deleted", file_contents_deleted cannot be nil.')
|
396
421
|
end
|
397
422
|
|
423
|
+
if @supports_cold_storage.nil?
|
424
|
+
invalid_properties.push('invalid value for "supports_cold_storage", supports_cold_storage cannot be nil.')
|
425
|
+
end
|
426
|
+
|
427
|
+
if @embedding_storage_status.nil?
|
428
|
+
invalid_properties.push('invalid value for "embedding_storage_status", embedding_storage_status cannot be nil.')
|
429
|
+
end
|
430
|
+
|
398
431
|
if @created_at.nil?
|
399
432
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
400
433
|
end
|
@@ -420,6 +453,8 @@ module Carbon
|
|
420
453
|
return false if @sync_properties.nil?
|
421
454
|
return false if @messages_metadata.nil?
|
422
455
|
return false if @file_contents_deleted.nil?
|
456
|
+
return false if @supports_cold_storage.nil?
|
457
|
+
return false if @embedding_storage_status.nil?
|
423
458
|
return false if @created_at.nil?
|
424
459
|
return false if @updated_at.nil?
|
425
460
|
true
|
@@ -462,6 +497,9 @@ module Carbon
|
|
462
497
|
sync_properties == o.sync_properties &&
|
463
498
|
messages_metadata == o.messages_metadata &&
|
464
499
|
file_contents_deleted == o.file_contents_deleted &&
|
500
|
+
supports_cold_storage == o.supports_cold_storage &&
|
501
|
+
hot_storage_time_to_live == o.hot_storage_time_to_live &&
|
502
|
+
embedding_storage_status == o.embedding_storage_status &&
|
465
503
|
created_at == o.created_at &&
|
466
504
|
updated_at == o.updated_at
|
467
505
|
end
|
@@ -475,7 +513,7 @@ module Carbon
|
|
475
513
|
# Calculates hash code according to all attributes.
|
476
514
|
# @return [Integer] Hash code
|
477
515
|
def hash
|
478
|
-
[tags, id, source, organization_id, organization_supplied_user_id, organization_user_data_source_id, external_file_id, external_url, sync_status, sync_error_message, last_sync, file_statistics, file_metadata, embedding_properties, chunk_size, chunk_overlap, chunk_properties, ocr_properties, ocr_job_started_at, name, parent_id, enable_auto_sync, presigned_url, parsed_text_url, additional_presigned_urls, skip_embedding_generation, source_created_at, generate_sparse_vectors, request_id, sync_properties, messages_metadata, file_contents_deleted, created_at, updated_at].hash
|
516
|
+
[tags, id, source, organization_id, organization_supplied_user_id, organization_user_data_source_id, external_file_id, external_url, sync_status, sync_error_message, last_sync, file_statistics, file_metadata, embedding_properties, chunk_size, chunk_overlap, chunk_properties, ocr_properties, ocr_job_started_at, name, parent_id, enable_auto_sync, presigned_url, parsed_text_url, additional_presigned_urls, skip_embedding_generation, source_created_at, generate_sparse_vectors, request_id, sync_properties, messages_metadata, file_contents_deleted, supports_cold_storage, hot_storage_time_to_live, embedding_storage_status, created_at, updated_at].hash
|
479
517
|
end
|
480
518
|
|
481
519
|
# Builds the object from hash
|
data/lib/carbon_ruby_sdk.rb
CHANGED
@@ -23,6 +23,7 @@ require 'carbon_ruby_sdk/models/chunk_properties'
|
|
23
23
|
require 'carbon_ruby_sdk/models/chunk_properties_nullable'
|
24
24
|
require 'carbon_ruby_sdk/models/chunks_and_embeddings'
|
25
25
|
require 'carbon_ruby_sdk/models/chunks_and_embeddings_upload_input'
|
26
|
+
require 'carbon_ruby_sdk/models/cold_storage_props'
|
26
27
|
require 'carbon_ruby_sdk/models/confluence_authentication'
|
27
28
|
require 'carbon_ruby_sdk/models/connect_data_source_input'
|
28
29
|
require 'carbon_ruby_sdk/models/connect_data_source_response'
|
@@ -43,6 +44,7 @@ require 'carbon_ruby_sdk/models/embedding_generators'
|
|
43
44
|
require 'carbon_ruby_sdk/models/embedding_generators_nullable'
|
44
45
|
require 'carbon_ruby_sdk/models/embedding_model'
|
45
46
|
require 'carbon_ruby_sdk/models/embedding_properties'
|
47
|
+
require 'carbon_ruby_sdk/models/embedding_storage_status'
|
46
48
|
require 'carbon_ruby_sdk/models/embeddings_and_chunks_filters'
|
47
49
|
require 'carbon_ruby_sdk/models/embeddings_and_chunks_order_by_columns'
|
48
50
|
require 'carbon_ruby_sdk/models/embeddings_and_chunks_query_input'
|
@@ -88,7 +90,9 @@ require 'carbon_ruby_sdk/models/list_users_filters'
|
|
88
90
|
require 'carbon_ruby_sdk/models/list_users_order_by_types'
|
89
91
|
require 'carbon_ruby_sdk/models/list_users_request'
|
90
92
|
require 'carbon_ruby_sdk/models/location_property_inner'
|
93
|
+
require 'carbon_ruby_sdk/models/modify_cold_storage_parameters_query_input'
|
91
94
|
require 'carbon_ruby_sdk/models/modify_user_configuration_input'
|
95
|
+
require 'carbon_ruby_sdk/models/move_to_hot_storage_query_input'
|
92
96
|
require 'carbon_ruby_sdk/models/notion_authentication'
|
93
97
|
require 'carbon_ruby_sdk/models/o_auth_authentication'
|
94
98
|
require 'carbon_ruby_sdk/models/o_auth_url_request'
|