carbon_ruby_sdk 0.2.19 → 0.2.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/README.md +113 -8
  4. data/lib/carbon_ruby_sdk/api/embeddings_api.rb +6 -2
  5. data/lib/carbon_ruby_sdk/api/files_api.rb +231 -6
  6. data/lib/carbon_ruby_sdk/api/integrations_api.rb +12 -8
  7. data/lib/carbon_ruby_sdk/models/cold_storage_props.rb +229 -0
  8. data/lib/carbon_ruby_sdk/models/embedding_storage_status.rb +38 -0
  9. data/lib/carbon_ruby_sdk/models/file_sync_config.rb +13 -1
  10. data/lib/carbon_ruby_sdk/models/file_sync_config_nullable.rb +13 -1
  11. data/lib/carbon_ruby_sdk/models/get_embedding_documents_body.rb +17 -5
  12. data/lib/carbon_ruby_sdk/models/modify_cold_storage_parameters_query_input.rb +235 -0
  13. data/lib/carbon_ruby_sdk/models/move_to_hot_storage_query_input.rb +215 -0
  14. data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +17 -6
  15. data/lib/carbon_ruby_sdk/models/raw_text_input.rb +14 -5
  16. data/lib/carbon_ruby_sdk/models/sent_webhook_payload.rb +2 -2
  17. data/lib/carbon_ruby_sdk/models/sync_files_request.rb +1 -1
  18. data/lib/carbon_ruby_sdk/models/sync_options.rb +17 -6
  19. data/lib/carbon_ruby_sdk/models/upload_file_from_url_input.rb +24 -4
  20. data/lib/carbon_ruby_sdk/models/user_file.rb +39 -1
  21. data/lib/carbon_ruby_sdk/version.rb +1 -1
  22. data/lib/carbon_ruby_sdk.rb +4 -0
  23. data/spec/api/files_api_spec.rb +25 -0
  24. data/spec/models/cold_storage_props_spec.rb +34 -0
  25. data/spec/models/embedding_storage_status_spec.rb +22 -0
  26. data/spec/models/file_sync_config_nullable_spec.rb +6 -0
  27. data/spec/models/file_sync_config_spec.rb +6 -0
  28. data/spec/models/get_embedding_documents_body_spec.rb +6 -0
  29. data/spec/models/modify_cold_storage_parameters_query_input_spec.rb +40 -0
  30. data/spec/models/move_to_hot_storage_query_input_spec.rb +28 -0
  31. data/spec/models/o_auth_url_request_spec.rb +6 -0
  32. data/spec/models/raw_text_input_spec.rb +6 -0
  33. data/spec/models/sent_webhook_payload_spec.rb +1 -1
  34. data/spec/models/sync_options_spec.rb +6 -0
  35. data/spec/models/upload_file_from_url_input_spec.rb +12 -0
  36. data/spec/models/user_file_spec.rb +18 -0
  37. metadata +158 -146
@@ -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'
@@ -106,6 +106,28 @@ describe 'FilesApi' do
106
106
  end
107
107
  end
108
108
 
109
+ # unit tests for modify_cold_storage_parameters
110
+ # Modify Cold Storage Parameters
111
+ # @param modify_cold_storage_parameters_query_input
112
+ # @param [Hash] opts the optional parameters
113
+ # @return [Boolean]
114
+ describe 'modify_cold_storage_parameters test' do
115
+ it 'should work' do
116
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
117
+ end
118
+ end
119
+
120
+ # unit tests for move_to_hot_storage
121
+ # Move To Hot Storage
122
+ # @param move_to_hot_storage_query_input
123
+ # @param [Hash] opts the optional parameters
124
+ # @return [Boolean]
125
+ describe 'move_to_hot_storage test' do
126
+ it 'should work' do
127
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
128
+ end
129
+ end
130
+
109
131
  # unit tests for query_user_files
110
132
  # User Files V2
111
133
  # For pre-filtering documents, using `tags_v2` is preferred to using `tags` (which is now deprecated). If both `tags_v2` and `tags` are specified, `tags` is ignored. `tags_v2` enables building complex filters through the use of \"AND\", \"OR\", and negation logic. Take the below input as an example: ```json { \"OR\": [ { \"key\": \"subject\", \"value\": \"holy-bible\", \"negate\": false }, { \"key\": \"person-of-interest\", \"value\": \"jesus christ\", \"negate\": false }, { \"key\": \"genre\", \"value\": \"religion\", \"negate\": true } { \"AND\": [ { \"key\": \"subject\", \"value\": \"tao-te-ching\", \"negate\": false }, { \"key\": \"author\", \"value\": \"lao-tzu\", \"negate\": false } ] } ] } ``` In this case, files will be filtered such that: 1. \"subject\" = \"holy-bible\" OR 2. \"person-of-interest\" = \"jesus christ\" OR 3. \"genre\" != \"religion\" OR 4. \"subject\" = \"tao-te-ching\" AND \"author\" = \"lao-tzu\" Note that the top level of the query must be either an \"OR\" or \"AND\" array. Currently, nesting is limited to 3. For tag blocks (those with \"key\", \"value\", and \"negate\" keys), the following typing rules apply: 1. \"key\" isn't optional and must be a `string` 2. \"value\" isn't optional and can be `any` or list[`any`] 3. \"negate\" is optional and must be `true` or `false`. If present and `true`, then the filter block is negated in the resulting query. It is `false` by default.
@@ -159,8 +181,11 @@ describe 'FilesApi' do
159
181
  # @option opts [Boolean] :parse_pdf_tables_with_ocr Whether to use rich table parsing when `use_ocr` is enabled.
160
182
  # @option opts [Boolean] :detect_audio_language Whether to automatically detect the language of the uploaded audio file.
161
183
  # @option opts [TranscriptionServiceNullable] :transcription_service The transcription service to use for audio files. If no service is specified, 'deepgram' will be used.
184
+ # @option opts [Boolean] :include_speaker_labels Detect multiple speakers and label segments of speech by speaker for audio files.
162
185
  # @option opts [FileContentTypesNullable] :media_type The media type of the file. If not provided, it will be inferred from the file extension.
163
186
  # @option opts [Boolean] :split_rows Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files.
187
+ # @option opts [Boolean] :enable_cold_storage Enable cold storage for the file. If set to true, the file will be moved to cold storage after a certain period of inactivity. Default is false.
188
+ # @option opts [Integer] :hot_storage_time_to_live Time in seconds after which the file will be moved to cold storage.
164
189
  # @return [UserFile]
165
190
  describe 'upload test' do
166
191
  it 'should work' do
@@ -0,0 +1,34 @@
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 'spec_helper'
10
+ require 'json'
11
+ require 'date'
12
+
13
+ # Unit tests for Carbon::ColdStorageProps
14
+ describe Carbon::ColdStorageProps do
15
+ let(:instance) { Carbon::ColdStorageProps.new }
16
+
17
+ describe 'test an instance of ColdStorageProps' do
18
+ it 'should create an instance of ColdStorageProps' do
19
+ expect(instance).to be_instance_of(Carbon::ColdStorageProps)
20
+ end
21
+ end
22
+ describe 'test attribute "enable_cold_storage"' do
23
+ it 'should work' do
24
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
25
+ end
26
+ end
27
+
28
+ describe 'test attribute "hot_storage_time_to_live"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ end
@@ -0,0 +1,22 @@
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 'spec_helper'
10
+ require 'json'
11
+ require 'date'
12
+
13
+ # Unit tests for Carbon::EmbeddingStorageStatus
14
+ describe Carbon::EmbeddingStorageStatus do
15
+ let(:instance) { Carbon::EmbeddingStorageStatus.new }
16
+
17
+ describe 'test an instance of EmbeddingStorageStatus' do
18
+ it 'should create an instance of EmbeddingStorageStatus' do
19
+ expect(instance).to be_instance_of(Carbon::EmbeddingStorageStatus)
20
+ end
21
+ end
22
+ end
@@ -43,6 +43,12 @@ describe Carbon::FileSyncConfigNullable do
43
43
  end
44
44
  end
45
45
 
46
+ describe 'test attribute "include_speaker_labels"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
46
52
  describe 'test attribute "split_rows"' do
47
53
  it 'should work' do
48
54
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -43,6 +43,12 @@ describe Carbon::FileSyncConfig do
43
43
  end
44
44
  end
45
45
 
46
+ describe 'test attribute "include_speaker_labels"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
46
52
  describe 'test attribute "split_rows"' do
47
53
  it 'should work' do
48
54
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -133,4 +133,10 @@ describe Carbon::GetEmbeddingDocumentsBody do
133
133
  end
134
134
  end
135
135
 
136
+ describe 'test attribute "exclude_cold_storage_files"' do
137
+ it 'should work' do
138
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
139
+ end
140
+ end
141
+
136
142
  end
@@ -0,0 +1,40 @@
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 'spec_helper'
10
+ require 'json'
11
+ require 'date'
12
+
13
+ # Unit tests for Carbon::ModifyColdStorageParametersQueryInput
14
+ describe Carbon::ModifyColdStorageParametersQueryInput do
15
+ let(:instance) { Carbon::ModifyColdStorageParametersQueryInput.new }
16
+
17
+ describe 'test an instance of ModifyColdStorageParametersQueryInput' do
18
+ it 'should create an instance of ModifyColdStorageParametersQueryInput' do
19
+ expect(instance).to be_instance_of(Carbon::ModifyColdStorageParametersQueryInput)
20
+ end
21
+ end
22
+ describe 'test attribute "filters"' do
23
+ it 'should work' do
24
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
25
+ end
26
+ end
27
+
28
+ describe 'test attribute "enable_cold_storage"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "hot_storage_time_to_live"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ end
@@ -0,0 +1,28 @@
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 'spec_helper'
10
+ require 'json'
11
+ require 'date'
12
+
13
+ # Unit tests for Carbon::MoveToHotStorageQueryInput
14
+ describe Carbon::MoveToHotStorageQueryInput do
15
+ let(:instance) { Carbon::MoveToHotStorageQueryInput.new }
16
+
17
+ describe 'test an instance of MoveToHotStorageQueryInput' do
18
+ it 'should create an instance of MoveToHotStorageQueryInput' do
19
+ expect(instance).to be_instance_of(Carbon::MoveToHotStorageQueryInput)
20
+ end
21
+ end
22
+ describe 'test attribute "filters"' do
23
+ it 'should work' do
24
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
25
+ end
26
+ end
27
+
28
+ end
@@ -175,4 +175,10 @@ describe Carbon::OAuthURLRequest do
175
175
  end
176
176
  end
177
177
 
178
+ describe 'test attribute "automatically_open_file_picker"' do
179
+ it 'should work' do
180
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
181
+ end
182
+ end
183
+
178
184
  end
@@ -67,4 +67,10 @@ describe Carbon::RawTextInput do
67
67
  end
68
68
  end
69
69
 
70
+ describe 'test attribute "cold_storage_params"' do
71
+ it 'should work' do
72
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
73
+ end
74
+ end
75
+
70
76
  end
@@ -22,7 +22,7 @@ describe Carbon::SentWebhookPayload do
22
22
  describe 'test attribute "webhook_type"' do
23
23
  it 'should work' do
24
24
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
25
- # validator = Petstore::EnumTest::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"])
25
+ # validator = Petstore::EnumTest::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"])
26
26
  # validator.allowable_values.each do |value|
27
27
  # expect { instance.webhook_type = value }.not_to raise_error
28
28
  # end
@@ -109,4 +109,10 @@ describe Carbon::SyncOptions do
109
109
  end
110
110
  end
111
111
 
112
+ describe 'test attribute "automatically_open_file_picker"' do
113
+ it 'should work' do
114
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
115
+ end
116
+ end
117
+
112
118
  end
@@ -103,6 +103,12 @@ describe Carbon::UploadFileFromUrlInput do
103
103
  end
104
104
  end
105
105
 
106
+ describe 'test attribute "include_speaker_labels"' do
107
+ it 'should work' do
108
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
109
+ end
110
+ end
111
+
106
112
  describe 'test attribute "media_type"' do
107
113
  it 'should work' do
108
114
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -115,4 +121,10 @@ describe Carbon::UploadFileFromUrlInput do
115
121
  end
116
122
  end
117
123
 
124
+ describe 'test attribute "cold_storage_params"' do
125
+ it 'should work' do
126
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
127
+ end
128
+ end
129
+
118
130
  end
@@ -211,6 +211,24 @@ describe Carbon::UserFile do
211
211
  end
212
212
  end
213
213
 
214
+ describe 'test attribute "supports_cold_storage"' do
215
+ it 'should work' do
216
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
217
+ end
218
+ end
219
+
220
+ describe 'test attribute "hot_storage_time_to_live"' do
221
+ it 'should work' do
222
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
223
+ end
224
+ end
225
+
226
+ describe 'test attribute "embedding_storage_status"' do
227
+ it 'should work' do
228
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
229
+ end
230
+ end
231
+
214
232
  describe 'test attribute "created_at"' do
215
233
  it 'should work' do
216
234
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers