carbon_ruby_sdk 0.2.48 → 0.2.49

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -3
  3. data/README.md +54 -22
  4. data/lib/carbon_ruby_sdk/api/data_sources_api.rb +106 -2
  5. data/lib/carbon_ruby_sdk/api/embeddings_api.rb +4 -4
  6. data/lib/carbon_ruby_sdk/api/files_api.rb +22 -22
  7. data/lib/carbon_ruby_sdk/api/github_api.rb +6 -6
  8. data/lib/carbon_ruby_sdk/api/integrations_api.rb +20 -20
  9. data/lib/carbon_ruby_sdk/api/users_api.rb +10 -6
  10. data/lib/carbon_ruby_sdk/api/utilities_api.rb +4 -4
  11. data/lib/carbon_ruby_sdk/api/webhooks_api.rb +2 -2
  12. data/lib/carbon_ruby_sdk/api/white_label_api.rb +2 -2
  13. data/lib/carbon_ruby_sdk/models/authentication_property.rb +6 -2
  14. data/lib/carbon_ruby_sdk/models/auto_sync_enabled_sources_property.rb +1 -1
  15. data/lib/carbon_ruby_sdk/models/azure_blob_file_sync_input.rb +0 -2
  16. data/lib/carbon_ruby_sdk/models/azure_blob_storage_authentication.rb +6 -2
  17. data/lib/carbon_ruby_sdk/models/azure_blob_storage_types.rb +35 -0
  18. data/lib/carbon_ruby_sdk/models/chunk_properties.rb +0 -10
  19. data/lib/carbon_ruby_sdk/models/chunk_properties_nullable.rb +0 -10
  20. data/lib/carbon_ruby_sdk/models/comments_input.rb +0 -2
  21. data/lib/carbon_ruby_sdk/models/configuration_keys.rb +35 -0
  22. data/lib/carbon_ruby_sdk/models/confluence_authentication.rb +6 -2
  23. data/lib/carbon_ruby_sdk/models/confluence_authentication_source.rb +35 -0
  24. data/lib/carbon_ruby_sdk/models/data_source_extended_input.rb +35 -0
  25. data/lib/carbon_ruby_sdk/models/directory_item.rb +0 -10
  26. data/lib/carbon_ruby_sdk/models/embedding_model.rb +1 -1
  27. data/lib/carbon_ruby_sdk/models/embeddings_and_chunks_query_input.rb +0 -4
  28. data/lib/carbon_ruby_sdk/models/embeddings_and_chunks_query_input_v2.rb +0 -4
  29. data/lib/carbon_ruby_sdk/models/freskdesk_authentication.rb +6 -2
  30. data/lib/carbon_ruby_sdk/models/freskdesk_authentication_source.rb +35 -0
  31. data/lib/carbon_ruby_sdk/models/gitbook_authetication.rb +6 -2
  32. data/lib/carbon_ruby_sdk/models/gitbook_authetication_source.rb +35 -0
  33. data/lib/carbon_ruby_sdk/models/gitbook_connect_request.rb +0 -2
  34. data/lib/carbon_ruby_sdk/models/gitbook_sync_request.rb +0 -2
  35. data/lib/carbon_ruby_sdk/models/github_authentication.rb +6 -2
  36. data/lib/carbon_ruby_sdk/models/github_authentication_source.rb +35 -0
  37. data/lib/carbon_ruby_sdk/models/gmail_sync_input.rb +0 -2
  38. data/lib/carbon_ruby_sdk/models/gong_authentication.rb +6 -2
  39. data/lib/carbon_ruby_sdk/models/gong_authentication_source.rb +35 -0
  40. data/lib/carbon_ruby_sdk/models/google_drive_white_label_input.rb +6 -2
  41. data/lib/carbon_ruby_sdk/models/google_drive_white_label_input_data_source_type.rb +35 -0
  42. data/lib/carbon_ruby_sdk/models/guru_authentication.rb +6 -2
  43. data/lib/carbon_ruby_sdk/models/guru_authentication_source.rb +35 -0
  44. data/lib/carbon_ruby_sdk/models/guru_connect_request.rb +0 -2
  45. data/lib/carbon_ruby_sdk/models/issues_filter.rb +0 -2
  46. data/lib/carbon_ruby_sdk/models/issues_input.rb +0 -2
  47. data/lib/carbon_ruby_sdk/models/item_types_property_inner.rb +1 -1
  48. data/lib/carbon_ruby_sdk/models/list_data_source_items_request.rb +0 -4
  49. data/lib/carbon_ruby_sdk/models/list_user_response.rb +0 -10
  50. data/lib/carbon_ruby_sdk/models/list_users_request.rb +0 -4
  51. data/lib/carbon_ruby_sdk/models/list_white_label_request.rb +0 -4
  52. data/lib/carbon_ruby_sdk/models/modify_user_configuration_input.rb +1 -1
  53. data/lib/carbon_ruby_sdk/models/multi_modal_embedding_generators.rb +35 -0
  54. data/lib/carbon_ruby_sdk/models/notion_authentication.rb +6 -2
  55. data/lib/carbon_ruby_sdk/models/notion_authentication_source.rb +35 -0
  56. data/lib/carbon_ruby_sdk/models/one_drive_authentication.rb +6 -2
  57. data/lib/carbon_ruby_sdk/models/one_drive_authentication_source.rb +35 -0
  58. data/lib/carbon_ruby_sdk/models/organization_response.rb +0 -20
  59. data/lib/carbon_ruby_sdk/models/organization_user_data_source_query_input.rb +0 -4
  60. data/lib/carbon_ruby_sdk/models/organization_user_files_to_sync_query_input.rb +0 -8
  61. data/lib/carbon_ruby_sdk/models/outlook_sync_input.rb +0 -2
  62. data/lib/carbon_ruby_sdk/models/pull_request_filters.rb +0 -2
  63. data/lib/carbon_ruby_sdk/models/pull_requests_input.rb +0 -2
  64. data/lib/carbon_ruby_sdk/models/rss_feed_input.rb +0 -2
  65. data/lib/carbon_ruby_sdk/models/s3_authentication.rb +6 -2
  66. data/lib/carbon_ruby_sdk/models/s3_authentication_source.rb +35 -0
  67. data/lib/carbon_ruby_sdk/models/s3_file_sync_input.rb +0 -2
  68. data/lib/carbon_ruby_sdk/models/salesforce_authentication.rb +6 -2
  69. data/lib/carbon_ruby_sdk/models/salesforce_authentication_source.rb +35 -0
  70. data/lib/carbon_ruby_sdk/models/service_now_authentication.rb +6 -2
  71. data/lib/carbon_ruby_sdk/models/service_now_authentication_source.rb +35 -0
  72. data/lib/carbon_ruby_sdk/models/sharepoint_authentication.rb +6 -2
  73. data/lib/carbon_ruby_sdk/models/sharepoint_authentication_source.rb +35 -0
  74. data/lib/carbon_ruby_sdk/models/sitemap_scrape_request.rb +0 -2
  75. data/lib/carbon_ruby_sdk/models/slack_sync_request.rb +0 -2
  76. data/lib/carbon_ruby_sdk/models/source.rb +35 -0
  77. data/lib/carbon_ruby_sdk/models/update_users_input.rb +27 -1
  78. data/lib/carbon_ruby_sdk/models/upload_file_from_url_input.rb +0 -2
  79. data/lib/carbon_ruby_sdk/models/user_configuration.rb +31 -5
  80. data/lib/carbon_ruby_sdk/models/user_configuration_nullable.rb +31 -5
  81. data/lib/carbon_ruby_sdk/models/user_file.rb +0 -20
  82. data/lib/carbon_ruby_sdk/models/user_response.rb +0 -15
  83. data/lib/carbon_ruby_sdk/models/user_web_pages_request.rb +0 -4
  84. data/lib/carbon_ruby_sdk/models/webhook_query_input.rb +0 -4
  85. data/lib/carbon_ruby_sdk/models/webscrape_request.rb +0 -2
  86. data/lib/carbon_ruby_sdk/models/white_labeling_response.rb +0 -5
  87. data/lib/carbon_ruby_sdk/models/zendesk_authentication.rb +6 -2
  88. data/lib/carbon_ruby_sdk/models/zendesk_authentication_source.rb +35 -0
  89. data/lib/carbon_ruby_sdk/models/zotero_authentication.rb +6 -2
  90. data/lib/carbon_ruby_sdk/models/zotero_authentication_source.rb +35 -0
  91. data/lib/carbon_ruby_sdk/version.rb +1 -1
  92. data/lib/carbon_ruby_sdk.rb +20 -0
  93. data/spec/api/data_sources_api_spec.rb +11 -0
  94. data/spec/models/azure_blob_storage_types_spec.rb +22 -0
  95. data/spec/models/configuration_keys_spec.rb +22 -0
  96. data/spec/models/confluence_authentication_source_spec.rb +22 -0
  97. data/spec/models/data_source_extended_input_spec.rb +22 -0
  98. data/spec/models/freskdesk_authentication_source_spec.rb +22 -0
  99. data/spec/models/gitbook_authetication_source_spec.rb +22 -0
  100. data/spec/models/github_authentication_source_spec.rb +22 -0
  101. data/spec/models/gong_authentication_source_spec.rb +22 -0
  102. data/spec/models/google_drive_white_label_input_data_source_type_spec.rb +22 -0
  103. data/spec/models/guru_authentication_source_spec.rb +22 -0
  104. data/spec/models/multi_modal_embedding_generators_spec.rb +22 -0
  105. data/spec/models/notion_authentication_source_spec.rb +22 -0
  106. data/spec/models/one_drive_authentication_source_spec.rb +22 -0
  107. data/spec/models/s3_authentication_source_spec.rb +22 -0
  108. data/spec/models/salesforce_authentication_source_spec.rb +22 -0
  109. data/spec/models/service_now_authentication_source_spec.rb +22 -0
  110. data/spec/models/sharepoint_authentication_source_spec.rb +22 -0
  111. data/spec/models/source_spec.rb +22 -0
  112. data/spec/models/update_users_input_spec.rb +6 -0
  113. data/spec/models/user_configuration_nullable_spec.rb +6 -0
  114. data/spec/models/user_configuration_spec.rb +6 -0
  115. data/spec/models/zendesk_authentication_source_spec.rb +22 -0
  116. data/spec/models/zotero_authentication_source_spec.rb +22 -0
  117. metadata +62 -2
@@ -31,7 +31,7 @@ module Carbon
31
31
  # Attribute type mapping.
32
32
  def self.openapi_types
33
33
  {
34
- :'configuration_key_name' => :'String',
34
+ :'configuration_key_name' => :'ConfigurationKeys',
35
35
  :'value' => :'Object'
36
36
  }
37
37
  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 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' => :'Object',
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' => :'Object',
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')
@@ -150,8 +150,6 @@ module Carbon
150
150
 
151
151
  if attributes.key?(:'embedding_model')
152
152
  self.embedding_model = attributes[:'embedding_model']
153
- else
154
- self.embedding_model = 'OPENAI'
155
153
  end
156
154
 
157
155
  if attributes.key?(:'generate_sparse_vectors')
@@ -67,8 +67,6 @@ module Carbon
67
67
 
68
68
  if attributes.key?(:'state')
69
69
  self.state = attributes[:'state']
70
- else
71
- self.state = 'open'
72
70
  end
73
71
 
74
72
  if attributes.key?(:'base')
@@ -124,8 +124,6 @@ module Carbon
124
124
 
125
125
  if attributes.key?(:'order_by')
126
126
  self.order_by = attributes[:'order_by']
127
- else
128
- self.order_by = 'created'
129
127
  end
130
128
 
131
129
  if attributes.key?(:'order_dir')
@@ -125,8 +125,6 @@ module Carbon
125
125
 
126
126
  if attributes.key?(:'embedding_model')
127
127
  self.embedding_model = attributes[:'embedding_model']
128
- else
129
- self.embedding_model = 'OPENAI'
130
128
  end
131
129
 
132
130
  if attributes.key?(:'generate_sparse_vectors')
@@ -38,7 +38,7 @@ module Carbon
38
38
  # Attribute type mapping.
39
39
  def self.openapi_types
40
40
  {
41
- :'source' => :'Object',
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
@@ -152,8 +152,6 @@ module Carbon
152
152
 
153
153
  if attributes.key?(:'embedding_model')
154
154
  self.embedding_model = attributes[:'embedding_model']
155
- else
156
- self.embedding_model = 'OPENAI'
157
155
  end
158
156
 
159
157
  if attributes.key?(:'generate_sparse_vectors')
@@ -37,7 +37,7 @@ module Carbon
37
37
  # Attribute type mapping.
38
38
  def self.openapi_types
39
39
  {
40
- :'source' => :'Object',
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' => :'Object',
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
@@ -40,7 +40,7 @@ module Carbon
40
40
  # Attribute type mapping.
41
41
  def self.openapi_types
42
42
  {
43
- :'source' => :'Object',
43
+ :'source' => :'SharepointAuthenticationSource',
44
44
  :'access_token' => :'String',
45
45
  :'refresh_token' => :'String',
46
46
  :'tenant_name' => :'String',
@@ -51,7 +51,6 @@ module Carbon
51
51
  # List of attributes with nullable: true
52
52
  def self.openapi_nullable
53
53
  Set.new([
54
- :'source',
55
54
  :'refresh_token',
56
55
  :'tenant_name',
57
56
  :'site_name'
@@ -98,6 +97,10 @@ module Carbon
98
97
  # @return Array for valid properties with the reasons
99
98
  def list_invalid_properties
100
99
  invalid_properties = Array.new
100
+ if @source.nil?
101
+ invalid_properties.push('invalid value for "source", source cannot be nil.')
102
+ end
103
+
101
104
  if @access_token.nil?
102
105
  invalid_properties.push('invalid value for "access_token", access_token cannot be nil.')
103
106
  end
@@ -108,6 +111,7 @@ module Carbon
108
111
  # Check to see if the all the properties in the model are valid
109
112
  # @return true if the model is valid
110
113
  def valid?
114
+ return false if @source.nil?
111
115
  return false if @access_token.nil?
112
116
  true
113
117
  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 SharepointAuthenticationSource
14
+ SHAREPOINT = "SHAREPOINT".freeze
15
+
16
+ def self.all_vars
17
+ @all_vars ||= [SHAREPOINT].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 SharepointAuthenticationSource.all_vars.include?(value)
32
+ raise "Invalid ENUM value #{value} for class #SharepointAuthenticationSource"
33
+ end
34
+ end
35
+ end
@@ -221,8 +221,6 @@ module Carbon
221
221
 
222
222
  if attributes.key?(:'embedding_model')
223
223
  self.embedding_model = attributes[:'embedding_model']
224
- else
225
- self.embedding_model = 'OPENAI'
226
224
  end
227
225
 
228
226
  if attributes.key?(:'url_paths_to_include')
@@ -125,8 +125,6 @@ module Carbon
125
125
 
126
126
  if attributes.key?(:'embedding_model')
127
127
  self.embedding_model = attributes[:'embedding_model']
128
- else
129
- self.embedding_model = 'OPENAI'
130
128
  end
131
129
 
132
130
  if attributes.key?(:'generate_sparse_vectors')
@@ -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 Source
14
+ AZURE_BLOB_STORAGE = "AZURE_BLOB_STORAGE".freeze
15
+
16
+ def self.all_vars
17
+ @all_vars ||= [AZURE_BLOB_STORAGE].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 Source.all_vars.include?(value)
32
+ raise "Invalid ENUM value #{value} for class #Source"
33
+ end
34
+ end
35
+ end