carbon_ruby_sdk 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +13 -3
- data/lib/carbon_ruby_sdk/api/files_api.rb +6 -6
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +8 -8
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +1 -0
- data/lib/carbon_ruby_sdk/models/s3_file_sync_input.rb +1 -0
- data/lib/carbon_ruby_sdk/models/sync_files_request.rb +1 -0
- data/lib/carbon_ruby_sdk/models/sync_options.rb +1 -0
- data/lib/carbon_ruby_sdk/models/upload_file_from_url_input.rb +1 -0
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/spec/api/files_api_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c209fcd399aa1413a587d8fb3bc56ab173b56052522fdb5aa6f180a5bec9b5d3
|
4
|
+
data.tar.gz: 43aceb3e7bb7ac9dd9ad1a5e16746acc79d90a7de5fd907fbcc26ff3b6f1e2d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28401ee97a6b8271954bac68c85cc0bdbc2ff5c75f6489f7d588fde1842745ddde812f9e969f4d7d3b9837af6ff5eaa2e53480e3cba4928bc2d4e2d76131a4fa
|
7
|
+
data.tar.gz: fdc346900eb6f16ecf77464d9d2b08d80b3a22464dec67c218a501f2410685fe578c4870577d62bceb9d7dc918e03c50840135c65dc43c8060f230084c1b20e6
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
Connect external data to LLMs, no matter the source.
|
8
8
|
|
9
|
-
[](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.1.8)
|
10
10
|
|
11
11
|
</div>
|
12
12
|
|
@@ -78,7 +78,7 @@ Connect external data to LLMs, no matter the source.
|
|
78
78
|
Add to Gemfile:
|
79
79
|
|
80
80
|
```ruby
|
81
|
-
gem 'carbon_ruby_sdk', '~> 0.1.
|
81
|
+
gem 'carbon_ruby_sdk', '~> 0.1.8'
|
82
82
|
```
|
83
83
|
|
84
84
|
## Getting Started<a id="getting-started"></a>
|
@@ -981,7 +981,7 @@ the file to be a candidate for hybrid search.
|
|
981
981
|
Whether or not to prepend the file's name to chunks.
|
982
982
|
|
983
983
|
##### max_items_per_chunk: `Integer`<a id="max_items_per_chunk-integer"></a>
|
984
|
-
Number of objects per chunk. For json files only.
|
984
|
+
Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
985
985
|
|
986
986
|
#### 🔄 Return<a id="🔄-return"></a>
|
987
987
|
|
@@ -1032,6 +1032,8 @@ p result
|
|
1032
1032
|
##### use_textract: `Boolean`<a id="use_textract-boolean"></a>
|
1033
1033
|
##### prepend_filename_to_chunks: `Boolean`<a id="prepend_filename_to_chunks-boolean"></a>
|
1034
1034
|
##### max_items_per_chunk: `Integer`<a id="max_items_per_chunk-integer"></a>
|
1035
|
+
Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1036
|
+
|
1035
1037
|
#### 🔄 Return<a id="🔄-return"></a>
|
1036
1038
|
|
1037
1039
|
[UserFile](./lib/carbon_ruby_sdk/models/user_file.rb)
|
@@ -1348,6 +1350,8 @@ p result
|
|
1348
1350
|
##### generate_sparse_vectors: `Boolean`<a id="generate_sparse_vectors-boolean"></a>
|
1349
1351
|
##### prepend_filename_to_chunks: `Boolean`<a id="prepend_filename_to_chunks-boolean"></a>
|
1350
1352
|
##### max_items_per_chunk: `Integer`<a id="max_items_per_chunk-integer"></a>
|
1353
|
+
Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1354
|
+
|
1351
1355
|
##### salesforce_domain: `String`<a id="salesforce_domain-string"></a>
|
1352
1356
|
##### sync_files_on_connection: `Boolean`<a id="sync_files_on_connection-boolean"></a>
|
1353
1357
|
Used to specify whether Carbon should attempt to sync all your files
|
@@ -1594,6 +1598,8 @@ p result
|
|
1594
1598
|
##### generate_sparse_vectors: `Boolean`<a id="generate_sparse_vectors-boolean"></a>
|
1595
1599
|
##### prepend_filename_to_chunks: `Boolean`<a id="prepend_filename_to_chunks-boolean"></a>
|
1596
1600
|
##### max_items_per_chunk: `Integer`<a id="max_items_per_chunk-integer"></a>
|
1601
|
+
Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1602
|
+
|
1597
1603
|
##### set_page_as_boundary: `Boolean`<a id="set_page_as_boundary-boolean"></a>
|
1598
1604
|
#### 🔄 Return<a id="🔄-return"></a>
|
1599
1605
|
|
@@ -1677,6 +1683,8 @@ p result
|
|
1677
1683
|
##### generate_sparse_vectors: `Boolean`<a id="generate_sparse_vectors-boolean"></a>
|
1678
1684
|
##### prepend_filename_to_chunks: `Boolean`<a id="prepend_filename_to_chunks-boolean"></a>
|
1679
1685
|
##### max_items_per_chunk: `Integer`<a id="max_items_per_chunk-integer"></a>
|
1686
|
+
Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1687
|
+
|
1680
1688
|
##### set_page_as_boundary: `Boolean`<a id="set_page_as_boundary-boolean"></a>
|
1681
1689
|
#### 🔄 Return<a id="🔄-return"></a>
|
1682
1690
|
|
@@ -2017,6 +2025,8 @@ p result
|
|
2017
2025
|
##### generate_sparse_vectors: `Boolean`<a id="generate_sparse_vectors-boolean"></a>
|
2018
2026
|
##### prepend_filename_to_chunks: `Boolean`<a id="prepend_filename_to_chunks-boolean"></a>
|
2019
2027
|
##### max_items_per_chunk: `Integer`<a id="max_items_per_chunk-integer"></a>
|
2028
|
+
Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
2029
|
+
|
2020
2030
|
##### set_page_as_boundary: `Boolean`<a id="set_page_as_boundary-boolean"></a>
|
2021
2031
|
##### data_source_id: `Integer`<a id="data_source_id-integer"></a>
|
2022
2032
|
#### 🔄 Return<a id="🔄-return"></a>
|
@@ -1074,7 +1074,7 @@ module Carbon
|
|
1074
1074
|
# @param use_ocr [Boolean] Whether or not to use OCR when processing files. Only valid for PDFs. Useful for documents with tables, images, and/or scanned text.
|
1075
1075
|
# @param generate_sparse_vectors [Boolean] Whether or not to generate sparse vectors for the file. This is *required* for the file to be a candidate for hybrid search.
|
1076
1076
|
# @param prepend_filename_to_chunks [Boolean] Whether or not to prepend the file's name to chunks.
|
1077
|
-
# @param max_items_per_chunk [Integer] Number of objects per chunk. For json files only.
|
1077
|
+
# @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1078
1078
|
# @param body [BodyCreateUploadFileUploadfilePost]
|
1079
1079
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1080
1080
|
def upload(file:, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: SENTINEL, use_ocr: false, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, extra: {})
|
@@ -1131,7 +1131,7 @@ module Carbon
|
|
1131
1131
|
# @param use_ocr [Boolean] Whether or not to use OCR when processing files. Only valid for PDFs. Useful for documents with tables, images, and/or scanned text.
|
1132
1132
|
# @param generate_sparse_vectors [Boolean] Whether or not to generate sparse vectors for the file. This is *required* for the file to be a candidate for hybrid search.
|
1133
1133
|
# @param prepend_filename_to_chunks [Boolean] Whether or not to prepend the file's name to chunks.
|
1134
|
-
# @param max_items_per_chunk [Integer] Number of objects per chunk. For json files only.
|
1134
|
+
# @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1135
1135
|
# @param body [BodyCreateUploadFileUploadfilePost]
|
1136
1136
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1137
1137
|
def upload_with_http_info(file:, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: SENTINEL, use_ocr: false, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, extra: {})
|
@@ -1163,7 +1163,7 @@ module Carbon
|
|
1163
1163
|
# @option opts [Boolean] :use_ocr Whether or not to use OCR when processing files. Only valid for PDFs. Useful for documents with tables, images, and/or scanned text. (default to false)
|
1164
1164
|
# @option opts [Boolean] :generate_sparse_vectors Whether or not to generate sparse vectors for the file. This is *required* for the file to be a candidate for hybrid search. (default to false)
|
1165
1165
|
# @option opts [Boolean] :prepend_filename_to_chunks Whether or not to prepend the file's name to chunks. (default to false)
|
1166
|
-
# @option opts [Integer] :max_items_per_chunk Number of objects per chunk. For json files only.
|
1166
|
+
# @option opts [Integer] :max_items_per_chunk Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1167
1167
|
# @return [UserFile]
|
1168
1168
|
private def upload_impl(file, body_create_upload_file_uploadfile_post, opts = {})
|
1169
1169
|
data, _status_code, _headers = upload_with_http_info(file, body_create_upload_file_uploadfile_post, opts)
|
@@ -1183,7 +1183,7 @@ module Carbon
|
|
1183
1183
|
# @option opts [Boolean] :use_ocr Whether or not to use OCR when processing files. Only valid for PDFs. Useful for documents with tables, images, and/or scanned text. (default to false)
|
1184
1184
|
# @option opts [Boolean] :generate_sparse_vectors Whether or not to generate sparse vectors for the file. This is *required* for the file to be a candidate for hybrid search. (default to false)
|
1185
1185
|
# @option opts [Boolean] :prepend_filename_to_chunks Whether or not to prepend the file's name to chunks. (default to false)
|
1186
|
-
# @option opts [Integer] :max_items_per_chunk Number of objects per chunk. For json files only.
|
1186
|
+
# @option opts [Integer] :max_items_per_chunk Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1187
1187
|
# @return [APIResponse] data is UserFile, status code, headers and response
|
1188
1188
|
private def upload_with_http_info_impl(file, body_create_upload_file_uploadfile_post, opts = {})
|
1189
1189
|
if @api_client.config.debugging
|
@@ -1265,7 +1265,7 @@ module Carbon
|
|
1265
1265
|
# @param generate_sparse_vectors [Boolean]
|
1266
1266
|
# @param use_textract [Boolean]
|
1267
1267
|
# @param prepend_filename_to_chunks [Boolean]
|
1268
|
-
# @param max_items_per_chunk [Integer]
|
1268
|
+
# @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1269
1269
|
# @param body [UploadFileFromUrlInput]
|
1270
1270
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1271
1271
|
def upload_from_url(url:, file_name: SENTINEL, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, use_textract: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, extra: {})
|
@@ -1298,7 +1298,7 @@ module Carbon
|
|
1298
1298
|
# @param generate_sparse_vectors [Boolean]
|
1299
1299
|
# @param use_textract [Boolean]
|
1300
1300
|
# @param prepend_filename_to_chunks [Boolean]
|
1301
|
-
# @param max_items_per_chunk [Integer]
|
1301
|
+
# @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1302
1302
|
# @param body [UploadFileFromUrlInput]
|
1303
1303
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1304
1304
|
def upload_from_url_with_http_info(url:, file_name: SENTINEL, chunk_size: SENTINEL, chunk_overlap: SENTINEL, skip_embedding_generation: false, set_page_as_boundary: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, use_textract: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, extra: {})
|
@@ -528,7 +528,7 @@ module Carbon
|
|
528
528
|
# @param confluence_subdomain [String]
|
529
529
|
# @param generate_sparse_vectors [Boolean]
|
530
530
|
# @param prepend_filename_to_chunks [Boolean]
|
531
|
-
# @param max_items_per_chunk [Integer]
|
531
|
+
# @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
532
532
|
# @param salesforce_domain [String]
|
533
533
|
# @param sync_files_on_connection [Boolean] Used to specify whether Carbon should attempt to sync all your files automatically when authorization is complete. This is only supported for a subset of connectors and will be ignored for the rest. Supported connectors: Intercom, Zendesk, Gitbook, Confluence, Salesforce, Freshdesk
|
534
534
|
# @param set_page_as_boundary [Boolean]
|
@@ -582,7 +582,7 @@ module Carbon
|
|
582
582
|
# @param confluence_subdomain [String]
|
583
583
|
# @param generate_sparse_vectors [Boolean]
|
584
584
|
# @param prepend_filename_to_chunks [Boolean]
|
585
|
-
# @param max_items_per_chunk [Integer]
|
585
|
+
# @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
586
586
|
# @param salesforce_domain [String]
|
587
587
|
# @param sync_files_on_connection [Boolean] Used to specify whether Carbon should attempt to sync all your files automatically when authorization is complete. This is only supported for a subset of connectors and will be ignored for the rest. Supported connectors: Intercom, Zendesk, Gitbook, Confluence, Salesforce, Freshdesk
|
588
588
|
# @param set_page_as_boundary [Boolean]
|
@@ -1258,7 +1258,7 @@ module Carbon
|
|
1258
1258
|
# @param embedding_model [EmbeddingGeneratorsNullable]
|
1259
1259
|
# @param generate_sparse_vectors [Boolean]
|
1260
1260
|
# @param prepend_filename_to_chunks [Boolean]
|
1261
|
-
# @param max_items_per_chunk [Integer]
|
1261
|
+
# @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1262
1262
|
# @param set_page_as_boundary [Boolean]
|
1263
1263
|
# @param body [SyncFilesRequest]
|
1264
1264
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -1296,7 +1296,7 @@ module Carbon
|
|
1296
1296
|
# @param embedding_model [EmbeddingGeneratorsNullable]
|
1297
1297
|
# @param generate_sparse_vectors [Boolean]
|
1298
1298
|
# @param prepend_filename_to_chunks [Boolean]
|
1299
|
-
# @param max_items_per_chunk [Integer]
|
1299
|
+
# @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1300
1300
|
# @param set_page_as_boundary [Boolean]
|
1301
1301
|
# @param body [SyncFilesRequest]
|
1302
1302
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -1494,7 +1494,7 @@ module Carbon
|
|
1494
1494
|
# @param embedding_model [EmbeddingGeneratorsNullable]
|
1495
1495
|
# @param generate_sparse_vectors [Boolean]
|
1496
1496
|
# @param prepend_filename_to_chunks [Boolean]
|
1497
|
-
# @param max_items_per_chunk [Integer]
|
1497
|
+
# @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1498
1498
|
# @param set_page_as_boundary [Boolean]
|
1499
1499
|
# @param body [SyncFilesRequest]
|
1500
1500
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -1532,7 +1532,7 @@ module Carbon
|
|
1532
1532
|
# @param embedding_model [EmbeddingGeneratorsNullable]
|
1533
1533
|
# @param generate_sparse_vectors [Boolean]
|
1534
1534
|
# @param prepend_filename_to_chunks [Boolean]
|
1535
|
-
# @param max_items_per_chunk [Integer]
|
1535
|
+
# @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1536
1536
|
# @param set_page_as_boundary [Boolean]
|
1537
1537
|
# @param body [SyncFilesRequest]
|
1538
1538
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
@@ -2368,7 +2368,7 @@ module Carbon
|
|
2368
2368
|
# @param embedding_model [EmbeddingGenerators]
|
2369
2369
|
# @param generate_sparse_vectors [Boolean]
|
2370
2370
|
# @param prepend_filename_to_chunks [Boolean]
|
2371
|
-
# @param max_items_per_chunk [Integer]
|
2371
|
+
# @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
2372
2372
|
# @param set_page_as_boundary [Boolean]
|
2373
2373
|
# @param data_source_id [Integer]
|
2374
2374
|
# @param body [S3FileSyncInput]
|
@@ -2405,7 +2405,7 @@ module Carbon
|
|
2405
2405
|
# @param embedding_model [EmbeddingGenerators]
|
2406
2406
|
# @param generate_sparse_vectors [Boolean]
|
2407
2407
|
# @param prepend_filename_to_chunks [Boolean]
|
2408
|
-
# @param max_items_per_chunk [Integer]
|
2408
|
+
# @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
2409
2409
|
# @param set_page_as_boundary [Boolean]
|
2410
2410
|
# @param data_source_id [Integer]
|
2411
2411
|
# @param body [S3FileSyncInput]
|
@@ -25,6 +25,7 @@ module Carbon
|
|
25
25
|
|
26
26
|
attr_accessor :prepend_filename_to_chunks
|
27
27
|
|
28
|
+
# Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
28
29
|
attr_accessor :max_items_per_chunk
|
29
30
|
|
30
31
|
# Used to specify whether Carbon should attempt to sync all your files automatically when authorization is complete. This is only supported for a subset of connectors and will be ignored for the rest. Supported connectors: Intercom, Zendesk, Gitbook, Confluence, Salesforce, Freshdesk
|
data/spec/api/files_api_spec.rb
CHANGED
@@ -144,7 +144,7 @@ describe 'FilesApi' do
|
|
144
144
|
# @option opts [Boolean] :use_ocr Whether or not to use OCR when processing files. Only valid for PDFs. Useful for documents with tables, images, and/or scanned text.
|
145
145
|
# @option opts [Boolean] :generate_sparse_vectors Whether or not to generate sparse vectors for the file. This is *required* for the file to be a candidate for hybrid search.
|
146
146
|
# @option opts [Boolean] :prepend_filename_to_chunks Whether or not to prepend the file's name to chunks.
|
147
|
-
# @option opts [Integer] :max_items_per_chunk Number of objects per chunk. For json files only.
|
147
|
+
# @option opts [Integer] :max_items_per_chunk Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
148
148
|
# @return [UserFile]
|
149
149
|
describe 'upload test' do
|
150
150
|
it 'should work' do
|
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.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konfig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|