carbon_ruby_sdk 0.2.20 → 0.2.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/README.md +108 -3
  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 +8 -4
  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_options.rb +16 -5
  18. data/lib/carbon_ruby_sdk/models/upload_file_from_url_input.rb +24 -4
  19. data/lib/carbon_ruby_sdk/models/user_file.rb +39 -1
  20. data/lib/carbon_ruby_sdk/version.rb +1 -1
  21. data/lib/carbon_ruby_sdk.rb +4 -0
  22. data/spec/api/files_api_spec.rb +25 -0
  23. data/spec/models/cold_storage_props_spec.rb +34 -0
  24. data/spec/models/embedding_storage_status_spec.rb +22 -0
  25. data/spec/models/file_sync_config_nullable_spec.rb +6 -0
  26. data/spec/models/file_sync_config_spec.rb +6 -0
  27. data/spec/models/get_embedding_documents_body_spec.rb +6 -0
  28. data/spec/models/modify_cold_storage_parameters_query_input_spec.rb +40 -0
  29. data/spec/models/move_to_hot_storage_query_input_spec.rb +28 -0
  30. data/spec/models/o_auth_url_request_spec.rb +6 -0
  31. data/spec/models/raw_text_input_spec.rb +6 -0
  32. data/spec/models/sent_webhook_payload_spec.rb +1 -1
  33. data/spec/models/sync_options_spec.rb +6 -0
  34. data/spec/models/upload_file_from_url_input_spec.rb +12 -0
  35. data/spec/models/user_file_spec.rb +18 -0
  36. metadata +14 -2
@@ -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
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carbon_ruby_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.20
4
+ version: 0.2.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konfig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-08 00:00:00.000000000 Z
11
+ date: 2024-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -105,6 +105,7 @@ files:
105
105
  - lib/carbon_ruby_sdk/models/chunk_properties_nullable.rb
106
106
  - lib/carbon_ruby_sdk/models/chunks_and_embeddings.rb
107
107
  - lib/carbon_ruby_sdk/models/chunks_and_embeddings_upload_input.rb
108
+ - lib/carbon_ruby_sdk/models/cold_storage_props.rb
108
109
  - lib/carbon_ruby_sdk/models/confluence_authentication.rb
109
110
  - lib/carbon_ruby_sdk/models/connect_data_source_input.rb
110
111
  - lib/carbon_ruby_sdk/models/connect_data_source_response.rb
@@ -125,6 +126,7 @@ files:
125
126
  - lib/carbon_ruby_sdk/models/embedding_generators_nullable.rb
126
127
  - lib/carbon_ruby_sdk/models/embedding_model.rb
127
128
  - lib/carbon_ruby_sdk/models/embedding_properties.rb
129
+ - lib/carbon_ruby_sdk/models/embedding_storage_status.rb
128
130
  - lib/carbon_ruby_sdk/models/embeddings_and_chunks_filters.rb
129
131
  - lib/carbon_ruby_sdk/models/embeddings_and_chunks_order_by_columns.rb
130
132
  - lib/carbon_ruby_sdk/models/embeddings_and_chunks_query_input.rb
@@ -170,7 +172,9 @@ files:
170
172
  - lib/carbon_ruby_sdk/models/list_users_order_by_types.rb
171
173
  - lib/carbon_ruby_sdk/models/list_users_request.rb
172
174
  - lib/carbon_ruby_sdk/models/location_property_inner.rb
175
+ - lib/carbon_ruby_sdk/models/modify_cold_storage_parameters_query_input.rb
173
176
  - lib/carbon_ruby_sdk/models/modify_user_configuration_input.rb
177
+ - lib/carbon_ruby_sdk/models/move_to_hot_storage_query_input.rb
174
178
  - lib/carbon_ruby_sdk/models/notion_authentication.rb
175
179
  - lib/carbon_ruby_sdk/models/o_auth_authentication.rb
176
180
  - lib/carbon_ruby_sdk/models/o_auth_url_request.rb
@@ -274,6 +278,7 @@ files:
274
278
  - spec/models/chunk_properties_spec.rb
275
279
  - spec/models/chunks_and_embeddings_spec.rb
276
280
  - spec/models/chunks_and_embeddings_upload_input_spec.rb
281
+ - spec/models/cold_storage_props_spec.rb
277
282
  - spec/models/confluence_authentication_spec.rb
278
283
  - spec/models/connect_data_source_input_spec.rb
279
284
  - spec/models/connect_data_source_response_spec.rb
@@ -294,6 +299,7 @@ files:
294
299
  - spec/models/embedding_generators_spec.rb
295
300
  - spec/models/embedding_model_spec.rb
296
301
  - spec/models/embedding_properties_spec.rb
302
+ - spec/models/embedding_storage_status_spec.rb
297
303
  - spec/models/embeddings_and_chunks_filters_spec.rb
298
304
  - spec/models/embeddings_and_chunks_order_by_columns_spec.rb
299
305
  - spec/models/embeddings_and_chunks_query_input_spec.rb
@@ -339,7 +345,9 @@ files:
339
345
  - spec/models/list_users_order_by_types_spec.rb
340
346
  - spec/models/list_users_request_spec.rb
341
347
  - spec/models/location_property_inner_spec.rb
348
+ - spec/models/modify_cold_storage_parameters_query_input_spec.rb
342
349
  - spec/models/modify_user_configuration_input_spec.rb
350
+ - spec/models/move_to_hot_storage_query_input_spec.rb
343
351
  - spec/models/notion_authentication_spec.rb
344
352
  - spec/models/o_auth_authentication_spec.rb
345
353
  - spec/models/o_auth_url_request_spec.rb
@@ -469,8 +477,10 @@ test_files:
469
477
  - spec/models/list_users_filters_spec.rb
470
478
  - spec/models/object_type_spec.rb
471
479
  - spec/models/raw_transcript_property_inner_value_spec.rb
480
+ - spec/models/embedding_storage_status_spec.rb
472
481
  - spec/models/organization_user_data_source_query_input_spec.rb
473
482
  - spec/models/ids_property_spec.rb
483
+ - spec/models/cold_storage_props_spec.rb
474
484
  - spec/models/salesforce_authentication_spec.rb
475
485
  - spec/models/white_labeling_response_spec.rb
476
486
  - spec/models/update_users_input_spec.rb
@@ -594,12 +604,14 @@ test_files:
594
604
  - spec/models/embedding_properties_spec.rb
595
605
  - spec/models/file_sync_config_nullable_spec.rb
596
606
  - spec/models/fetch_urls_response_spec.rb
607
+ - spec/models/move_to_hot_storage_query_input_spec.rb
597
608
  - spec/models/webhook_no_key_spec.rb
598
609
  - spec/models/s3_get_file_input_spec.rb
599
610
  - spec/models/zendesk_authentication_spec.rb
600
611
  - spec/models/user_request_content_spec.rb
601
612
  - spec/models/helpdesk_file_types_spec.rb
602
613
  - spec/models/upload_file_from_url_input_spec.rb
614
+ - spec/models/modify_cold_storage_parameters_query_input_spec.rb
603
615
  - spec/models/file_content_types_spec.rb
604
616
  - spec/models/sync_directory_request_spec.rb
605
617
  - spec/models/user_web_pages_filters_spec.rb