carbon_ruby_sdk 0.2.48 → 0.2.50
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +58 -22
- data/lib/carbon_ruby_sdk/api/data_sources_api.rb +106 -2
- data/lib/carbon_ruby_sdk/api/embeddings_api.rb +4 -4
- data/lib/carbon_ruby_sdk/api/files_api.rb +22 -22
- data/lib/carbon_ruby_sdk/api/github_api.rb +6 -6
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +22 -22
- data/lib/carbon_ruby_sdk/api/users_api.rb +10 -6
- data/lib/carbon_ruby_sdk/api/utilities_api.rb +4 -4
- data/lib/carbon_ruby_sdk/api/webhooks_api.rb +2 -2
- data/lib/carbon_ruby_sdk/api/white_label_api.rb +2 -2
- data/lib/carbon_ruby_sdk/models/authentication_property.rb +6 -2
- data/lib/carbon_ruby_sdk/models/auto_sync_enabled_sources_property.rb +1 -1
- data/lib/carbon_ruby_sdk/models/azure_blob_file_sync_input.rb +0 -2
- data/lib/carbon_ruby_sdk/models/azure_blob_storage_authentication.rb +6 -2
- data/lib/carbon_ruby_sdk/models/azure_blob_storage_types.rb +35 -0
- data/lib/carbon_ruby_sdk/models/chunk_properties.rb +0 -10
- data/lib/carbon_ruby_sdk/models/chunk_properties_nullable.rb +0 -10
- data/lib/carbon_ruby_sdk/models/comments_input.rb +0 -2
- data/lib/carbon_ruby_sdk/models/configuration_keys.rb +35 -0
- data/lib/carbon_ruby_sdk/models/confluence_authentication.rb +6 -2
- data/lib/carbon_ruby_sdk/models/confluence_authentication_source.rb +35 -0
- data/lib/carbon_ruby_sdk/models/data_source_extended_input.rb +35 -0
- data/lib/carbon_ruby_sdk/models/directory_item.rb +0 -10
- data/lib/carbon_ruby_sdk/models/embedding_model.rb +1 -1
- data/lib/carbon_ruby_sdk/models/embeddings_and_chunks_query_input.rb +0 -4
- data/lib/carbon_ruby_sdk/models/embeddings_and_chunks_query_input_v2.rb +0 -4
- data/lib/carbon_ruby_sdk/models/freskdesk_authentication.rb +6 -2
- data/lib/carbon_ruby_sdk/models/freskdesk_authentication_source.rb +35 -0
- data/lib/carbon_ruby_sdk/models/gitbook_authetication.rb +6 -2
- data/lib/carbon_ruby_sdk/models/gitbook_authetication_source.rb +35 -0
- data/lib/carbon_ruby_sdk/models/gitbook_connect_request.rb +0 -2
- data/lib/carbon_ruby_sdk/models/gitbook_sync_request.rb +0 -2
- data/lib/carbon_ruby_sdk/models/github_authentication.rb +6 -2
- data/lib/carbon_ruby_sdk/models/github_authentication_source.rb +35 -0
- data/lib/carbon_ruby_sdk/models/gmail_sync_input.rb +0 -2
- data/lib/carbon_ruby_sdk/models/gong_authentication.rb +6 -2
- data/lib/carbon_ruby_sdk/models/gong_authentication_source.rb +35 -0
- data/lib/carbon_ruby_sdk/models/google_drive_white_label_input.rb +6 -2
- data/lib/carbon_ruby_sdk/models/google_drive_white_label_input_data_source_type.rb +35 -0
- data/lib/carbon_ruby_sdk/models/guru_authentication.rb +6 -2
- data/lib/carbon_ruby_sdk/models/guru_authentication_source.rb +35 -0
- data/lib/carbon_ruby_sdk/models/guru_connect_request.rb +0 -2
- data/lib/carbon_ruby_sdk/models/issues_filter.rb +0 -2
- data/lib/carbon_ruby_sdk/models/issues_input.rb +0 -2
- data/lib/carbon_ruby_sdk/models/item_types_property_inner.rb +1 -1
- data/lib/carbon_ruby_sdk/models/list_data_source_items_request.rb +0 -4
- data/lib/carbon_ruby_sdk/models/list_user_response.rb +0 -10
- data/lib/carbon_ruby_sdk/models/list_users_request.rb +0 -4
- data/lib/carbon_ruby_sdk/models/list_white_label_request.rb +0 -4
- data/lib/carbon_ruby_sdk/models/modify_user_configuration_input.rb +1 -1
- data/lib/carbon_ruby_sdk/models/multi_modal_embedding_generators.rb +35 -0
- data/lib/carbon_ruby_sdk/models/notion_authentication.rb +6 -2
- data/lib/carbon_ruby_sdk/models/notion_authentication_source.rb +35 -0
- data/lib/carbon_ruby_sdk/models/one_drive_authentication.rb +6 -2
- data/lib/carbon_ruby_sdk/models/one_drive_authentication_source.rb +35 -0
- data/lib/carbon_ruby_sdk/models/organization_response.rb +0 -20
- data/lib/carbon_ruby_sdk/models/organization_user_data_source_query_input.rb +0 -4
- data/lib/carbon_ruby_sdk/models/organization_user_files_to_sync_query_input.rb +0 -8
- data/lib/carbon_ruby_sdk/models/outlook_sync_input.rb +0 -2
- data/lib/carbon_ruby_sdk/models/pull_request_filters.rb +0 -2
- data/lib/carbon_ruby_sdk/models/pull_requests_input.rb +0 -2
- data/lib/carbon_ruby_sdk/models/rss_feed_input.rb +0 -2
- data/lib/carbon_ruby_sdk/models/s3_authentication.rb +6 -2
- data/lib/carbon_ruby_sdk/models/s3_authentication_source.rb +35 -0
- data/lib/carbon_ruby_sdk/models/s3_file_sync_input.rb +1 -2
- data/lib/carbon_ruby_sdk/models/s3_get_file_input.rb +15 -5
- data/lib/carbon_ruby_sdk/models/salesforce_authentication.rb +6 -2
- data/lib/carbon_ruby_sdk/models/salesforce_authentication_source.rb +35 -0
- data/lib/carbon_ruby_sdk/models/service_now_authentication.rb +6 -2
- data/lib/carbon_ruby_sdk/models/service_now_authentication_source.rb +35 -0
- data/lib/carbon_ruby_sdk/models/sharepoint_authentication.rb +6 -2
- data/lib/carbon_ruby_sdk/models/sharepoint_authentication_source.rb +35 -0
- data/lib/carbon_ruby_sdk/models/sitemap_scrape_request.rb +0 -2
- data/lib/carbon_ruby_sdk/models/slack_sync_request.rb +0 -2
- data/lib/carbon_ruby_sdk/models/source.rb +35 -0
- data/lib/carbon_ruby_sdk/models/update_users_input.rb +27 -1
- data/lib/carbon_ruby_sdk/models/upload_file_from_url_input.rb +0 -2
- data/lib/carbon_ruby_sdk/models/user_configuration.rb +31 -5
- data/lib/carbon_ruby_sdk/models/user_configuration_nullable.rb +31 -5
- data/lib/carbon_ruby_sdk/models/user_file.rb +0 -20
- data/lib/carbon_ruby_sdk/models/user_response.rb +0 -15
- data/lib/carbon_ruby_sdk/models/user_web_pages_request.rb +0 -4
- data/lib/carbon_ruby_sdk/models/webhook_query_input.rb +0 -4
- data/lib/carbon_ruby_sdk/models/webscrape_request.rb +0 -2
- data/lib/carbon_ruby_sdk/models/white_labeling_response.rb +0 -5
- data/lib/carbon_ruby_sdk/models/zendesk_authentication.rb +6 -2
- data/lib/carbon_ruby_sdk/models/zendesk_authentication_source.rb +35 -0
- data/lib/carbon_ruby_sdk/models/zotero_authentication.rb +6 -2
- data/lib/carbon_ruby_sdk/models/zotero_authentication_source.rb +35 -0
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +20 -0
- data/spec/api/data_sources_api_spec.rb +11 -0
- data/spec/models/azure_blob_storage_types_spec.rb +22 -0
- data/spec/models/configuration_keys_spec.rb +22 -0
- data/spec/models/confluence_authentication_source_spec.rb +22 -0
- data/spec/models/data_source_extended_input_spec.rb +22 -0
- data/spec/models/freskdesk_authentication_source_spec.rb +22 -0
- data/spec/models/gitbook_authetication_source_spec.rb +22 -0
- data/spec/models/github_authentication_source_spec.rb +22 -0
- data/spec/models/gong_authentication_source_spec.rb +22 -0
- data/spec/models/google_drive_white_label_input_data_source_type_spec.rb +22 -0
- data/spec/models/guru_authentication_source_spec.rb +22 -0
- data/spec/models/multi_modal_embedding_generators_spec.rb +22 -0
- data/spec/models/notion_authentication_source_spec.rb +22 -0
- data/spec/models/one_drive_authentication_source_spec.rb +22 -0
- data/spec/models/s3_authentication_source_spec.rb +22 -0
- data/spec/models/s3_get_file_input_spec.rb +6 -0
- data/spec/models/salesforce_authentication_source_spec.rb +22 -0
- data/spec/models/service_now_authentication_source_spec.rb +22 -0
- data/spec/models/sharepoint_authentication_source_spec.rb +22 -0
- data/spec/models/source_spec.rb +22 -0
- data/spec/models/update_users_input_spec.rb +6 -0
- data/spec/models/user_configuration_nullable_spec.rb +6 -0
- data/spec/models/user_configuration_spec.rb +6 -0
- data/spec/models/zendesk_authentication_source_spec.rb +22 -0
- data/spec/models/zotero_authentication_source_spec.rb +22 -0
- metadata +62 -2
@@ -150,14 +150,6 @@ module Carbon
|
|
150
150
|
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
151
151
|
end
|
152
152
|
|
153
|
-
if @custom_limits.nil?
|
154
|
-
invalid_properties.push('invalid value for "custom_limits", custom_limits cannot be nil.')
|
155
|
-
end
|
156
|
-
|
157
|
-
if @auto_sync_enabled_sources.nil?
|
158
|
-
invalid_properties.push('invalid value for "auto_sync_enabled_sources", auto_sync_enabled_sources cannot be nil.')
|
159
|
-
end
|
160
|
-
|
161
153
|
invalid_properties
|
162
154
|
end
|
163
155
|
|
@@ -169,8 +161,6 @@ module Carbon
|
|
169
161
|
return false if @organization_supplied_user_id.nil?
|
170
162
|
return false if @created_at.nil?
|
171
163
|
return false if @updated_at.nil?
|
172
|
-
return false if @custom_limits.nil?
|
173
|
-
return false if @auto_sync_enabled_sources.nil?
|
174
164
|
true
|
175
165
|
end
|
176
166
|
|
@@ -79,14 +79,10 @@ module Carbon
|
|
79
79
|
|
80
80
|
if attributes.key?(:'order_by')
|
81
81
|
self.order_by = attributes[:'order_by']
|
82
|
-
else
|
83
|
-
self.order_by = 'created_at'
|
84
82
|
end
|
85
83
|
|
86
84
|
if attributes.key?(:'order_dir')
|
87
85
|
self.order_dir = attributes[:'order_dir']
|
88
|
-
else
|
89
|
-
self.order_dir = 'desc'
|
90
86
|
end
|
91
87
|
|
92
88
|
if attributes.key?(:'include_count')
|
@@ -71,14 +71,10 @@ module Carbon
|
|
71
71
|
|
72
72
|
if attributes.key?(:'order_by')
|
73
73
|
self.order_by = attributes[:'order_by']
|
74
|
-
else
|
75
|
-
self.order_by = 'created_at'
|
76
74
|
end
|
77
75
|
|
78
76
|
if attributes.key?(:'order_dir')
|
79
77
|
self.order_dir = attributes[:'order_dir']
|
80
|
-
else
|
81
|
-
self.order_dir = 'asc'
|
82
78
|
end
|
83
79
|
|
84
80
|
if attributes.key?(:'filters')
|
@@ -0,0 +1,35 @@
|
|
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 MultiModalEmbeddingGenerators
|
14
|
+
VERTEX_MULTIMODAL = "VERTEX_MULTIMODAL".freeze
|
15
|
+
|
16
|
+
def self.all_vars
|
17
|
+
@all_vars ||= [VERTEX_MULTIMODAL].freeze
|
18
|
+
end
|
19
|
+
|
20
|
+
# Builds the enum from string
|
21
|
+
# @param [String] The enum value in the form of the string
|
22
|
+
# @return [String] The enum value
|
23
|
+
def self.build_from_hash(value)
|
24
|
+
new.build_from_hash(value)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Builds the enum from string
|
28
|
+
# @param [String] The enum value in the form of the string
|
29
|
+
# @return [String] The enum value
|
30
|
+
def build_from_hash(value)
|
31
|
+
return value if MultiModalEmbeddingGenerators.all_vars.include?(value)
|
32
|
+
raise "Invalid ENUM value #{value} for class #MultiModalEmbeddingGenerators"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -34,7 +34,7 @@ module Carbon
|
|
34
34
|
# Attribute type mapping.
|
35
35
|
def self.openapi_types
|
36
36
|
{
|
37
|
-
:'source' => :'
|
37
|
+
:'source' => :'NotionAuthenticationSource',
|
38
38
|
:'access_token' => :'String',
|
39
39
|
:'workspace_id' => :'String'
|
40
40
|
}
|
@@ -43,7 +43,6 @@ module Carbon
|
|
43
43
|
# List of attributes with nullable: true
|
44
44
|
def self.openapi_nullable
|
45
45
|
Set.new([
|
46
|
-
:'source',
|
47
46
|
])
|
48
47
|
end
|
49
48
|
|
@@ -79,6 +78,10 @@ module Carbon
|
|
79
78
|
# @return Array for valid properties with the reasons
|
80
79
|
def list_invalid_properties
|
81
80
|
invalid_properties = Array.new
|
81
|
+
if @source.nil?
|
82
|
+
invalid_properties.push('invalid value for "source", source cannot be nil.')
|
83
|
+
end
|
84
|
+
|
82
85
|
if @access_token.nil?
|
83
86
|
invalid_properties.push('invalid value for "access_token", access_token cannot be nil.')
|
84
87
|
end
|
@@ -93,6 +96,7 @@ module Carbon
|
|
93
96
|
# Check to see if the all the properties in the model are valid
|
94
97
|
# @return true if the model is valid
|
95
98
|
def valid?
|
99
|
+
return false if @source.nil?
|
96
100
|
return false if @access_token.nil?
|
97
101
|
return false if @workspace_id.nil?
|
98
102
|
true
|
@@ -0,0 +1,35 @@
|
|
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 NotionAuthenticationSource
|
14
|
+
NOTION = "NOTION".freeze
|
15
|
+
|
16
|
+
def self.all_vars
|
17
|
+
@all_vars ||= [NOTION].freeze
|
18
|
+
end
|
19
|
+
|
20
|
+
# Builds the enum from string
|
21
|
+
# @param [String] The enum value in the form of the string
|
22
|
+
# @return [String] The enum value
|
23
|
+
def self.build_from_hash(value)
|
24
|
+
new.build_from_hash(value)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Builds the enum from string
|
28
|
+
# @param [String] The enum value in the form of the string
|
29
|
+
# @return [String] The enum value
|
30
|
+
def build_from_hash(value)
|
31
|
+
return value if NotionAuthenticationSource.all_vars.include?(value)
|
32
|
+
raise "Invalid ENUM value #{value} for class #NotionAuthenticationSource"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -37,7 +37,7 @@ module Carbon
|
|
37
37
|
# Attribute type mapping.
|
38
38
|
def self.openapi_types
|
39
39
|
{
|
40
|
-
:'source' => :'
|
40
|
+
:'source' => :'OneDriveAuthenticationSource',
|
41
41
|
:'access_token' => :'String',
|
42
42
|
:'refresh_token' => :'String',
|
43
43
|
:'tenant_name' => :'String'
|
@@ -47,7 +47,6 @@ module Carbon
|
|
47
47
|
# List of attributes with nullable: true
|
48
48
|
def self.openapi_nullable
|
49
49
|
Set.new([
|
50
|
-
:'source',
|
51
50
|
:'refresh_token',
|
52
51
|
:'tenant_name'
|
53
52
|
])
|
@@ -89,6 +88,10 @@ module Carbon
|
|
89
88
|
# @return Array for valid properties with the reasons
|
90
89
|
def list_invalid_properties
|
91
90
|
invalid_properties = Array.new
|
91
|
+
if @source.nil?
|
92
|
+
invalid_properties.push('invalid value for "source", source cannot be nil.')
|
93
|
+
end
|
94
|
+
|
92
95
|
if @access_token.nil?
|
93
96
|
invalid_properties.push('invalid value for "access_token", access_token cannot be nil.')
|
94
97
|
end
|
@@ -99,6 +102,7 @@ module Carbon
|
|
99
102
|
# Check to see if the all the properties in the model are valid
|
100
103
|
# @return true if the model is valid
|
101
104
|
def valid?
|
105
|
+
return false if @source.nil?
|
102
106
|
return false if @access_token.nil?
|
103
107
|
true
|
104
108
|
end
|
@@ -0,0 +1,35 @@
|
|
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 OneDriveAuthenticationSource
|
14
|
+
ONEDRIVE = "ONEDRIVE".freeze
|
15
|
+
|
16
|
+
def self.all_vars
|
17
|
+
@all_vars ||= [ONEDRIVE].freeze
|
18
|
+
end
|
19
|
+
|
20
|
+
# Builds the enum from string
|
21
|
+
# @param [String] The enum value in the form of the string
|
22
|
+
# @return [String] The enum value
|
23
|
+
def self.build_from_hash(value)
|
24
|
+
new.build_from_hash(value)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Builds the enum from string
|
28
|
+
# @param [String] The enum value in the form of the string
|
29
|
+
# @return [String] The enum value
|
30
|
+
def build_from_hash(value)
|
31
|
+
return value if OneDriveAuthenticationSource.all_vars.include?(value)
|
32
|
+
raise "Invalid ENUM value #{value} for class #OneDriveAuthenticationSource"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -264,22 +264,6 @@ module Carbon
|
|
264
264
|
invalid_properties.push('invalid value for "aggregate_num_files_by_file_format", aggregate_num_files_by_file_format cannot be nil.')
|
265
265
|
end
|
266
266
|
|
267
|
-
if @connector_settings.nil?
|
268
|
-
invalid_properties.push('invalid value for "connector_settings", connector_settings cannot be nil.')
|
269
|
-
end
|
270
|
-
|
271
|
-
if @global_user_config.nil?
|
272
|
-
invalid_properties.push('invalid value for "global_user_config", global_user_config cannot be nil.')
|
273
|
-
end
|
274
|
-
|
275
|
-
if @file_sync_usage.nil?
|
276
|
-
invalid_properties.push('invalid value for "file_sync_usage", file_sync_usage cannot be nil.')
|
277
|
-
end
|
278
|
-
|
279
|
-
if @logging_settings.nil?
|
280
|
-
invalid_properties.push('invalid value for "logging_settings", logging_settings cannot be nil.')
|
281
|
-
end
|
282
|
-
|
283
267
|
if @created_at.nil?
|
284
268
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
285
269
|
end
|
@@ -303,10 +287,6 @@ module Carbon
|
|
303
287
|
return false if @aggregate_num_embeddings.nil?
|
304
288
|
return false if @aggregate_num_files_by_source.nil?
|
305
289
|
return false if @aggregate_num_files_by_file_format.nil?
|
306
|
-
return false if @connector_settings.nil?
|
307
|
-
return false if @global_user_config.nil?
|
308
|
-
return false if @file_sync_usage.nil?
|
309
|
-
return false if @logging_settings.nil?
|
310
290
|
return false if @created_at.nil?
|
311
291
|
return false if @updated_at.nil?
|
312
292
|
true
|
@@ -71,14 +71,10 @@ module Carbon
|
|
71
71
|
|
72
72
|
if attributes.key?(:'order_by')
|
73
73
|
self.order_by = attributes[:'order_by']
|
74
|
-
else
|
75
|
-
self.order_by = 'updated_at'
|
76
74
|
end
|
77
75
|
|
78
76
|
if attributes.key?(:'order_dir')
|
79
77
|
self.order_dir = attributes[:'order_dir']
|
80
|
-
else
|
81
|
-
self.order_dir = 'asc'
|
82
78
|
end
|
83
79
|
|
84
80
|
if attributes.key?(:'filters')
|
@@ -11,16 +11,12 @@ require 'time'
|
|
11
11
|
|
12
12
|
module Carbon
|
13
13
|
class OrganizationUserFilesToSyncQueryInput
|
14
|
-
# Pagination parameters for the query.
|
15
14
|
attr_accessor :pagination
|
16
15
|
|
17
|
-
# The field on OrganizationUserFilesToSYnc to order the results by.
|
18
16
|
attr_accessor :order_by
|
19
17
|
|
20
|
-
# The direction to order the results by.
|
21
18
|
attr_accessor :order_dir
|
22
19
|
|
23
|
-
# Filters to apply to the query.
|
24
20
|
attr_accessor :filters
|
25
21
|
|
26
22
|
# If true, the query will return presigned URLs for the raw file. Only relevant for the /user_files_v2 endpoint.
|
@@ -98,14 +94,10 @@ module Carbon
|
|
98
94
|
|
99
95
|
if attributes.key?(:'order_by')
|
100
96
|
self.order_by = attributes[:'order_by']
|
101
|
-
else
|
102
|
-
self.order_by = 'updated_at'
|
103
97
|
end
|
104
98
|
|
105
99
|
if attributes.key?(:'order_dir')
|
106
100
|
self.order_dir = attributes[:'order_dir']
|
107
|
-
else
|
108
|
-
self.order_dir = 'asc'
|
109
101
|
end
|
110
102
|
|
111
103
|
if attributes.key?(:'filters')
|
@@ -38,7 +38,7 @@ module Carbon
|
|
38
38
|
# Attribute type mapping.
|
39
39
|
def self.openapi_types
|
40
40
|
{
|
41
|
-
:'source' => :'
|
41
|
+
:'source' => :'S3AuthenticationSource',
|
42
42
|
:'access_key' => :'String',
|
43
43
|
:'access_key_secret' => :'String',
|
44
44
|
:'endpoint_url' => :'String'
|
@@ -48,7 +48,6 @@ module Carbon
|
|
48
48
|
# List of attributes with nullable: true
|
49
49
|
def self.openapi_nullable
|
50
50
|
Set.new([
|
51
|
-
:'source',
|
52
51
|
:'endpoint_url'
|
53
52
|
])
|
54
53
|
end
|
@@ -89,6 +88,10 @@ module Carbon
|
|
89
88
|
# @return Array for valid properties with the reasons
|
90
89
|
def list_invalid_properties
|
91
90
|
invalid_properties = Array.new
|
91
|
+
if @source.nil?
|
92
|
+
invalid_properties.push('invalid value for "source", source cannot be nil.')
|
93
|
+
end
|
94
|
+
|
92
95
|
if @access_key.nil?
|
93
96
|
invalid_properties.push('invalid value for "access_key", access_key cannot be nil.')
|
94
97
|
end
|
@@ -103,6 +106,7 @@ module Carbon
|
|
103
106
|
# Check to see if the all the properties in the model are valid
|
104
107
|
# @return true if the model is valid
|
105
108
|
def valid?
|
109
|
+
return false if @source.nil?
|
106
110
|
return false if @access_key.nil?
|
107
111
|
return false if @access_key_secret.nil?
|
108
112
|
true
|
@@ -0,0 +1,35 @@
|
|
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 S3AuthenticationSource
|
14
|
+
S3 = "S3".freeze
|
15
|
+
|
16
|
+
def self.all_vars
|
17
|
+
@all_vars ||= [S3].freeze
|
18
|
+
end
|
19
|
+
|
20
|
+
# Builds the enum from string
|
21
|
+
# @param [String] The enum value in the form of the string
|
22
|
+
# @return [String] The enum value
|
23
|
+
def self.build_from_hash(value)
|
24
|
+
new.build_from_hash(value)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Builds the enum from string
|
28
|
+
# @param [String] The enum value in the form of the string
|
29
|
+
# @return [String] The enum value
|
30
|
+
def build_from_hash(value)
|
31
|
+
return value if S3AuthenticationSource.all_vars.include?(value)
|
32
|
+
raise "Invalid ENUM value #{value} for class #S3AuthenticationSource"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -13,6 +13,7 @@ module Carbon
|
|
13
13
|
class S3FileSyncInput
|
14
14
|
attr_accessor :tags
|
15
15
|
|
16
|
+
# Each input should be one of the following: A bucket name, a bucket name and a prefix, or a bucket name and an object key. A prefix is the common path for all objects you want to sync. Paths should end with a forward slash.
|
16
17
|
attr_accessor :ids
|
17
18
|
|
18
19
|
attr_accessor :chunk_size
|
@@ -152,8 +153,6 @@ module Carbon
|
|
152
153
|
|
153
154
|
if attributes.key?(:'embedding_model')
|
154
155
|
self.embedding_model = attributes[:'embedding_model']
|
155
|
-
else
|
156
|
-
self.embedding_model = 'OPENAI'
|
157
156
|
end
|
158
157
|
|
159
158
|
if attributes.key?(:'generate_sparse_vectors')
|
@@ -15,11 +15,14 @@ module Carbon
|
|
15
15
|
|
16
16
|
attr_accessor :bucket
|
17
17
|
|
18
|
+
attr_accessor :prefix
|
19
|
+
|
18
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
19
21
|
def self.attribute_map
|
20
22
|
{
|
21
23
|
:'id' => :'id',
|
22
|
-
:'bucket' => :'bucket'
|
24
|
+
:'bucket' => :'bucket',
|
25
|
+
:'prefix' => :'prefix'
|
23
26
|
}
|
24
27
|
end
|
25
28
|
|
@@ -32,7 +35,8 @@ module Carbon
|
|
32
35
|
def self.openapi_types
|
33
36
|
{
|
34
37
|
:'id' => :'String',
|
35
|
-
:'bucket' => :'String'
|
38
|
+
:'bucket' => :'String',
|
39
|
+
:'prefix' => :'String'
|
36
40
|
}
|
37
41
|
end
|
38
42
|
|
@@ -40,7 +44,8 @@ module Carbon
|
|
40
44
|
def self.openapi_nullable
|
41
45
|
Set.new([
|
42
46
|
:'id',
|
43
|
-
:'bucket'
|
47
|
+
:'bucket',
|
48
|
+
:'prefix'
|
44
49
|
])
|
45
50
|
end
|
46
51
|
|
@@ -66,6 +71,10 @@ module Carbon
|
|
66
71
|
if attributes.key?(:'bucket')
|
67
72
|
self.bucket = attributes[:'bucket']
|
68
73
|
end
|
74
|
+
|
75
|
+
if attributes.key?(:'prefix')
|
76
|
+
self.prefix = attributes[:'prefix']
|
77
|
+
end
|
69
78
|
end
|
70
79
|
|
71
80
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -87,7 +96,8 @@ module Carbon
|
|
87
96
|
return true if self.equal?(o)
|
88
97
|
self.class == o.class &&
|
89
98
|
id == o.id &&
|
90
|
-
bucket == o.bucket
|
99
|
+
bucket == o.bucket &&
|
100
|
+
prefix == o.prefix
|
91
101
|
end
|
92
102
|
|
93
103
|
# @see the `==` method
|
@@ -99,7 +109,7 @@ module Carbon
|
|
99
109
|
# Calculates hash code according to all attributes.
|
100
110
|
# @return [Integer] Hash code
|
101
111
|
def hash
|
102
|
-
[id, bucket].hash
|
112
|
+
[id, bucket, prefix].hash
|
103
113
|
end
|
104
114
|
|
105
115
|
# Builds the object from hash
|
@@ -37,7 +37,7 @@ module Carbon
|
|
37
37
|
# Attribute type mapping.
|
38
38
|
def self.openapi_types
|
39
39
|
{
|
40
|
-
:'source' => :'
|
40
|
+
:'source' => :'SalesforceAuthenticationSource',
|
41
41
|
:'access_token' => :'String',
|
42
42
|
:'refresh_token' => :'String',
|
43
43
|
:'domain' => :'String'
|
@@ -47,7 +47,6 @@ module Carbon
|
|
47
47
|
# List of attributes with nullable: true
|
48
48
|
def self.openapi_nullable
|
49
49
|
Set.new([
|
50
|
-
:'source',
|
51
50
|
:'refresh_token',
|
52
51
|
])
|
53
52
|
end
|
@@ -88,6 +87,10 @@ module Carbon
|
|
88
87
|
# @return Array for valid properties with the reasons
|
89
88
|
def list_invalid_properties
|
90
89
|
invalid_properties = Array.new
|
90
|
+
if @source.nil?
|
91
|
+
invalid_properties.push('invalid value for "source", source cannot be nil.')
|
92
|
+
end
|
93
|
+
|
91
94
|
if @access_token.nil?
|
92
95
|
invalid_properties.push('invalid value for "access_token", access_token cannot be nil.')
|
93
96
|
end
|
@@ -102,6 +105,7 @@ module Carbon
|
|
102
105
|
# Check to see if the all the properties in the model are valid
|
103
106
|
# @return true if the model is valid
|
104
107
|
def valid?
|
108
|
+
return false if @source.nil?
|
105
109
|
return false if @access_token.nil?
|
106
110
|
return false if @domain.nil?
|
107
111
|
true
|
@@ -0,0 +1,35 @@
|
|
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 SalesforceAuthenticationSource
|
14
|
+
SALESFORCE = "SALESFORCE".freeze
|
15
|
+
|
16
|
+
def self.all_vars
|
17
|
+
@all_vars ||= [SALESFORCE].freeze
|
18
|
+
end
|
19
|
+
|
20
|
+
# Builds the enum from string
|
21
|
+
# @param [String] The enum value in the form of the string
|
22
|
+
# @return [String] The enum value
|
23
|
+
def self.build_from_hash(value)
|
24
|
+
new.build_from_hash(value)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Builds the enum from string
|
28
|
+
# @param [String] The enum value in the form of the string
|
29
|
+
# @return [String] The enum value
|
30
|
+
def build_from_hash(value)
|
31
|
+
return value if SalesforceAuthenticationSource.all_vars.include?(value)
|
32
|
+
raise "Invalid ENUM value #{value} for class #SalesforceAuthenticationSource"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -46,7 +46,7 @@ module Carbon
|
|
46
46
|
# Attribute type mapping.
|
47
47
|
def self.openapi_types
|
48
48
|
{
|
49
|
-
:'source' => :'
|
49
|
+
:'source' => :'ServiceNowAuthenticationSource',
|
50
50
|
:'access_token' => :'String',
|
51
51
|
:'refresh_token' => :'String',
|
52
52
|
:'instance_subdomain' => :'String',
|
@@ -59,7 +59,6 @@ module Carbon
|
|
59
59
|
# List of attributes with nullable: true
|
60
60
|
def self.openapi_nullable
|
61
61
|
Set.new([
|
62
|
-
:'source',
|
63
62
|
:'refresh_token',
|
64
63
|
])
|
65
64
|
end
|
@@ -112,6 +111,10 @@ module Carbon
|
|
112
111
|
# @return Array for valid properties with the reasons
|
113
112
|
def list_invalid_properties
|
114
113
|
invalid_properties = Array.new
|
114
|
+
if @source.nil?
|
115
|
+
invalid_properties.push('invalid value for "source", source cannot be nil.')
|
116
|
+
end
|
117
|
+
|
115
118
|
if @access_token.nil?
|
116
119
|
invalid_properties.push('invalid value for "access_token", access_token cannot be nil.')
|
117
120
|
end
|
@@ -138,6 +141,7 @@ module Carbon
|
|
138
141
|
# Check to see if the all the properties in the model are valid
|
139
142
|
# @return true if the model is valid
|
140
143
|
def valid?
|
144
|
+
return false if @source.nil?
|
141
145
|
return false if @access_token.nil?
|
142
146
|
return false if @instance_subdomain.nil?
|
143
147
|
return false if @client_id.nil?
|
@@ -0,0 +1,35 @@
|
|
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 ServiceNowAuthenticationSource
|
14
|
+
SERVICENOW = "SERVICENOW".freeze
|
15
|
+
|
16
|
+
def self.all_vars
|
17
|
+
@all_vars ||= [SERVICENOW].freeze
|
18
|
+
end
|
19
|
+
|
20
|
+
# Builds the enum from string
|
21
|
+
# @param [String] The enum value in the form of the string
|
22
|
+
# @return [String] The enum value
|
23
|
+
def self.build_from_hash(value)
|
24
|
+
new.build_from_hash(value)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Builds the enum from string
|
28
|
+
# @param [String] The enum value in the form of the string
|
29
|
+
# @return [String] The enum value
|
30
|
+
def build_from_hash(value)
|
31
|
+
return value if ServiceNowAuthenticationSource.all_vars.include?(value)
|
32
|
+
raise "Invalid ENUM value #{value} for class #ServiceNowAuthenticationSource"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|