carbon_ruby_sdk 0.2.13 → 0.2.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +23 -7
- data/lib/carbon_ruby_sdk/api/embeddings_api.rb +6 -2
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +20 -12
- data/lib/carbon_ruby_sdk/api/utilities_api.rb +6 -2
- data/lib/carbon_ruby_sdk/models/get_embedding_documents_body.rb +15 -5
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +2 -2
- data/lib/carbon_ruby_sdk/models/rerank_params.rb +220 -0
- data/lib/carbon_ruby_sdk/models/rerank_params_nullable.rb +221 -0
- data/lib/carbon_ruby_sdk/models/sitemap_scrape_request.rb +18 -5
- data/lib/carbon_ruby_sdk/models/sync_files_request.rb +1 -1
- data/lib/carbon_ruby_sdk/models/sync_options.rb +1 -1
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +2 -0
- data/spec/api/integrations_api_spec.rb +2 -2
- data/spec/models/get_embedding_documents_body_spec.rb +6 -0
- data/spec/models/rerank_params_nullable_spec.rb +28 -0
- data/spec/models/rerank_params_spec.rb +28 -0
- data/spec/models/sitemap_scrape_request_spec.rb +6 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06d33414be65f6bd0cd426ab4a944e8de9dcc7dca64b35d4ea90fa2ce3bf0474
|
4
|
+
data.tar.gz: 3a9d7272878fa2303e3bd0f2cf41796646f9f1689c034a5a16770db3e3fdcc02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41d5d17eb9b5f4bf0dedccadba7b29d796baddca4fe74bf4f1844b5bb52b440242bb917d6c49d074ca83598097b57483fe2cc5dc6a1acaade61cc9f5c1fb9813
|
7
|
+
data.tar.gz: 19f659c16c5845b371f99d82daf3cb8d37a5ffa88b7166e9afb7386a5e2991c2caed36c1d494a6a2237be4f0e0754b01b7bdd7e7ec6e8410f25c65754e20a436
|
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
|
-
[![npm](https://img.shields.io/badge/gem-v0.2.
|
9
|
+
[![npm](https://img.shields.io/badge/gem-v0.2.15-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.2.15)
|
10
10
|
|
11
11
|
</div>
|
12
12
|
|
@@ -91,7 +91,7 @@ Connect external data to LLMs, no matter the source.
|
|
91
91
|
Add to Gemfile:
|
92
92
|
|
93
93
|
```ruby
|
94
|
-
gem 'carbon_ruby_sdk', '~> 0.2.
|
94
|
+
gem 'carbon_ruby_sdk', '~> 0.2.15'
|
95
95
|
```
|
96
96
|
|
97
97
|
## Getting Started<a id="getting-started"></a>
|
@@ -382,6 +382,9 @@ result = carbon.embeddings.get_documents(
|
|
382
382
|
embedding_model: "OPENAI",
|
383
383
|
include_file_level_metadata: false,
|
384
384
|
high_accuracy: false,
|
385
|
+
rerank: {
|
386
|
+
"model" => "model_example",
|
387
|
+
},
|
385
388
|
)
|
386
389
|
p result
|
387
390
|
```
|
@@ -445,6 +448,7 @@ Flag to control whether or not to perform a high accuracy embedding search. By
|
|
445
448
|
default, this is set to false. If true, the search may return more accurate
|
446
449
|
results, but may take longer to complete.
|
447
450
|
|
451
|
+
##### rerank: [`RerankParamsNullable`](./lib/carbon_ruby_sdk/models/rerank_params_nullable.rb)<a id="rerank-rerankparamsnullablelibcarbon_ruby_sdkmodelsrerank_params_nullablerb"></a>
|
448
452
|
#### 🔄 Return<a id="🔄-return"></a>
|
449
453
|
|
450
454
|
[DocumentResponseList](./lib/carbon_ruby_sdk/models/document_response_list.rb)
|
@@ -1296,7 +1300,7 @@ result = carbon.integrations.connect_data_source(
|
|
1296
1300
|
"prepend_filename_to_chunks" => false,
|
1297
1301
|
"sync_files_on_connection" => true,
|
1298
1302
|
"set_page_as_boundary" => false,
|
1299
|
-
"request_id" => "
|
1303
|
+
"request_id" => "07b02a24-9429-4a3c-aa98-27ff63503082",
|
1300
1304
|
"enable_file_picker" => true,
|
1301
1305
|
"sync_source_items" => true,
|
1302
1306
|
"incremental_sync" => false,
|
@@ -1516,7 +1520,7 @@ result = carbon.integrations.get_oauth_url(
|
|
1516
1520
|
set_page_as_boundary: false,
|
1517
1521
|
data_source_id: 1,
|
1518
1522
|
connecting_new_account: false,
|
1519
|
-
request_id: "
|
1523
|
+
request_id: "d29ec177-bbc6-43c7-9b16-0ee340804c99",
|
1520
1524
|
use_ocr: false,
|
1521
1525
|
parse_pdf_tables_with_ocr: false,
|
1522
1526
|
enable_file_picker: true,
|
@@ -1577,7 +1581,7 @@ Enable OCR for files that support it. Supported formats: pdf
|
|
1577
1581
|
##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
|
1578
1582
|
##### enable_file_picker: `Boolean`<a id="enable_file_picker-boolean"></a>
|
1579
1583
|
Enable integration's file picker for sources that support it. Supported sources:
|
1580
|
-
BOX,
|
1584
|
+
BOX, GOOGLE_DRIVE, SHAREPOINT, ONEDRIVE, DROPBOX
|
1581
1585
|
|
1582
1586
|
##### sync_source_items: `Boolean`<a id="sync_source_items-boolean"></a>
|
1583
1587
|
Enabling this flag will fetch all available content from the source to be listed
|
@@ -1604,6 +1608,9 @@ other data sources.
|
|
1604
1608
|
|
1605
1609
|
|
1606
1610
|
### `carbon.integrations.list_confluence_pages`<a id="carbonintegrationslist_confluence_pages"></a>
|
1611
|
+
![Deprecated](https://img.shields.io/badge/deprecated-yellow)
|
1612
|
+
|
1613
|
+
This endpoint has been deprecated. Use /integrations/items/list instead.
|
1607
1614
|
|
1608
1615
|
To begin listing a user's Confluence pages, at least a `data_source_id` of a connected
|
1609
1616
|
Confluence account must be specified. This base request returns a list of root pages for
|
@@ -1854,6 +1861,9 @@ p result
|
|
1854
1861
|
|
1855
1862
|
|
1856
1863
|
### `carbon.integrations.sync_confluence`<a id="carbonintegrationssync_confluence"></a>
|
1864
|
+
![Deprecated](https://img.shields.io/badge/deprecated-yellow)
|
1865
|
+
|
1866
|
+
This endpoint has been deprecated. Use /integrations/files/sync instead.
|
1857
1867
|
|
1858
1868
|
After listing pages in a user's Confluence account, the set of selected page `ids` and the
|
1859
1869
|
connected account's `data_source_id` can be passed into this endpoint to sync them into
|
@@ -1877,7 +1887,7 @@ result = carbon.integrations.sync_confluence(
|
|
1877
1887
|
prepend_filename_to_chunks: false,
|
1878
1888
|
max_items_per_chunk: 1,
|
1879
1889
|
set_page_as_boundary: false,
|
1880
|
-
request_id: "
|
1890
|
+
request_id: "ca60b474-8b43-4b44-9deb-adb701e40610",
|
1881
1891
|
use_ocr: false,
|
1882
1892
|
parse_pdf_tables_with_ocr: false,
|
1883
1893
|
incremental_sync: false,
|
@@ -1982,7 +1992,7 @@ result = carbon.integrations.sync_files(
|
|
1982
1992
|
prepend_filename_to_chunks: false,
|
1983
1993
|
max_items_per_chunk: 1,
|
1984
1994
|
set_page_as_boundary: false,
|
1985
|
-
request_id: "
|
1995
|
+
request_id: "ca60b474-8b43-4b44-9deb-adb701e40610",
|
1986
1996
|
use_ocr: false,
|
1987
1997
|
parse_pdf_tables_with_ocr: false,
|
1988
1998
|
incremental_sync: false,
|
@@ -2962,6 +2972,7 @@ result = carbon.utilities.scrape_sitemap(
|
|
2962
2972
|
embedding_model: "OPENAI",
|
2963
2973
|
url_paths_to_include: [],
|
2964
2974
|
url_paths_to_exclude: [],
|
2975
|
+
urls_to_scrape: [],
|
2965
2976
|
)
|
2966
2977
|
p result
|
2967
2978
|
```
|
@@ -2991,6 +3002,11 @@ URL subpaths or directories that you want to exclude. For example if you want to
|
|
2991
3002
|
exclude URLs that start with /questions in stackoverflow.com, you will add
|
2992
3003
|
/questions/ in this input
|
2993
3004
|
|
3005
|
+
##### urls_to_scrape: Array<`String`><a id="urls_to_scrape-array"></a>
|
3006
|
+
You can submit a subset of URLs from the sitemap that should be scraped. To get
|
3007
|
+
the list of URLs, you can check out /process_sitemap endpoint. If left empty,
|
3008
|
+
all URLs from the sitemap will be scraped.
|
3009
|
+
|
2994
3010
|
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
2995
3011
|
|
2996
3012
|
`/scrape_sitemap` `POST`
|
@@ -130,9 +130,10 @@ module Carbon
|
|
130
130
|
# @param embedding_model [EmbeddingGeneratorsNullable]
|
131
131
|
# @param include_file_level_metadata [Boolean] Flag to control whether or not to include file-level metadata in the response. This metadata will be included in the `content_metadata` field of each document along with chunk/embedding level metadata.
|
132
132
|
# @param high_accuracy [Boolean] Flag to control whether or not to perform a high accuracy embedding search. By default, this is set to false. If true, the search may return more accurate results, but may take longer to complete.
|
133
|
+
# @param rerank [RerankParamsNullable]
|
133
134
|
# @param body [GetEmbeddingDocumentsBody]
|
134
135
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
135
|
-
def get_documents(query:, k:, tags: SENTINEL, query_vector: SENTINEL, file_ids: SENTINEL, parent_file_ids: SENTINEL, include_all_children: false, tags_v2: SENTINEL, include_tags: SENTINEL, include_vectors: SENTINEL, include_raw_file: SENTINEL, hybrid_search: SENTINEL, hybrid_search_tuning_parameters: SENTINEL, media_type: SENTINEL, embedding_model: 'OPENAI', include_file_level_metadata: false, high_accuracy: false, extra: {})
|
136
|
+
def get_documents(query:, k:, tags: SENTINEL, query_vector: SENTINEL, file_ids: SENTINEL, parent_file_ids: SENTINEL, include_all_children: false, tags_v2: SENTINEL, include_tags: SENTINEL, include_vectors: SENTINEL, include_raw_file: SENTINEL, hybrid_search: SENTINEL, hybrid_search_tuning_parameters: SENTINEL, media_type: SENTINEL, embedding_model: 'OPENAI', include_file_level_metadata: false, high_accuracy: false, rerank: SENTINEL, extra: {})
|
136
137
|
_body = {}
|
137
138
|
_body[:tags] = tags if tags != SENTINEL
|
138
139
|
_body[:query] = query if query != SENTINEL
|
@@ -151,6 +152,7 @@ module Carbon
|
|
151
152
|
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
152
153
|
_body[:include_file_level_metadata] = include_file_level_metadata if include_file_level_metadata != SENTINEL
|
153
154
|
_body[:high_accuracy] = high_accuracy if high_accuracy != SENTINEL
|
155
|
+
_body[:rerank] = rerank if rerank != SENTINEL
|
154
156
|
get_embedding_documents_body = _body
|
155
157
|
api_response = get_documents_with_http_info_impl(get_embedding_documents_body, extra)
|
156
158
|
api_response.data
|
@@ -270,9 +272,10 @@ module Carbon
|
|
270
272
|
# @param embedding_model [EmbeddingGeneratorsNullable]
|
271
273
|
# @param include_file_level_metadata [Boolean] Flag to control whether or not to include file-level metadata in the response. This metadata will be included in the `content_metadata` field of each document along with chunk/embedding level metadata.
|
272
274
|
# @param high_accuracy [Boolean] Flag to control whether or not to perform a high accuracy embedding search. By default, this is set to false. If true, the search may return more accurate results, but may take longer to complete.
|
275
|
+
# @param rerank [RerankParamsNullable]
|
273
276
|
# @param body [GetEmbeddingDocumentsBody]
|
274
277
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
275
|
-
def get_documents_with_http_info(query:, k:, tags: SENTINEL, query_vector: SENTINEL, file_ids: SENTINEL, parent_file_ids: SENTINEL, include_all_children: false, tags_v2: SENTINEL, include_tags: SENTINEL, include_vectors: SENTINEL, include_raw_file: SENTINEL, hybrid_search: SENTINEL, hybrid_search_tuning_parameters: SENTINEL, media_type: SENTINEL, embedding_model: 'OPENAI', include_file_level_metadata: false, high_accuracy: false, extra: {})
|
278
|
+
def get_documents_with_http_info(query:, k:, tags: SENTINEL, query_vector: SENTINEL, file_ids: SENTINEL, parent_file_ids: SENTINEL, include_all_children: false, tags_v2: SENTINEL, include_tags: SENTINEL, include_vectors: SENTINEL, include_raw_file: SENTINEL, hybrid_search: SENTINEL, hybrid_search_tuning_parameters: SENTINEL, media_type: SENTINEL, embedding_model: 'OPENAI', include_file_level_metadata: false, high_accuracy: false, rerank: SENTINEL, extra: {})
|
276
279
|
_body = {}
|
277
280
|
_body[:tags] = tags if tags != SENTINEL
|
278
281
|
_body[:query] = query if query != SENTINEL
|
@@ -291,6 +294,7 @@ module Carbon
|
|
291
294
|
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
292
295
|
_body[:include_file_level_metadata] = include_file_level_metadata if include_file_level_metadata != SENTINEL
|
293
296
|
_body[:high_accuracy] = high_accuracy if high_accuracy != SENTINEL
|
297
|
+
_body[:rerank] = rerank if rerank != SENTINEL
|
294
298
|
get_embedding_documents_body = _body
|
295
299
|
get_documents_with_http_info_impl(get_embedding_documents_body, extra)
|
296
300
|
end
|
@@ -653,13 +653,13 @@ module Carbon
|
|
653
653
|
# @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
|
654
654
|
# @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
|
655
655
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
656
|
-
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: BOX,
|
656
|
+
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: BOX, GOOGLE_DRIVE, SHAREPOINT, ONEDRIVE, DROPBOX
|
657
657
|
# @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
|
658
658
|
# @param incremental_sync [Boolean] Only sync files if they have not already been synced or if the embedding properties have changed. This flag is currently supported by ONEDRIVE, GOOGLE_DRIVE, BOX, DROPBOX, INTERCOM, GMAIL, OUTLOOK. It will be ignored for other data sources.
|
659
659
|
# @param file_sync_config [FileSyncConfigNullable]
|
660
660
|
# @param body [OAuthURLRequest]
|
661
661
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
662
|
-
def get_oauth_url(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: '
|
662
|
+
def get_oauth_url(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: 'd29ec177-bbc6-43c7-9b16-0ee340804c99', use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
663
663
|
_body = {}
|
664
664
|
_body[:tags] = tags if tags != SENTINEL
|
665
665
|
_body[:scope] = scope if scope != SENTINEL
|
@@ -721,13 +721,13 @@ module Carbon
|
|
721
721
|
# @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
|
722
722
|
# @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
|
723
723
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
724
|
-
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: BOX,
|
724
|
+
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: BOX, GOOGLE_DRIVE, SHAREPOINT, ONEDRIVE, DROPBOX
|
725
725
|
# @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
|
726
726
|
# @param incremental_sync [Boolean] Only sync files if they have not already been synced or if the embedding properties have changed. This flag is currently supported by ONEDRIVE, GOOGLE_DRIVE, BOX, DROPBOX, INTERCOM, GMAIL, OUTLOOK. It will be ignored for other data sources.
|
727
727
|
# @param file_sync_config [FileSyncConfigNullable]
|
728
728
|
# @param body [OAuthURLRequest]
|
729
729
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
730
|
-
def get_oauth_url_with_http_info(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: '
|
730
|
+
def get_oauth_url_with_http_info(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: 'd29ec177-bbc6-43c7-9b16-0ee340804c99', use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
731
731
|
_body = {}
|
732
732
|
_body[:tags] = tags if tags != SENTINEL
|
733
733
|
_body[:scope] = scope if scope != SENTINEL
|
@@ -830,6 +830,8 @@ module Carbon
|
|
830
830
|
|
831
831
|
# Confluence List
|
832
832
|
#
|
833
|
+
# This endpoint has been deprecated. Use /integrations/items/list instead.
|
834
|
+
#
|
833
835
|
# To begin listing a user's Confluence pages, at least a `data_source_id` of a connected
|
834
836
|
# Confluence account must be specified. This base request returns a list of root pages for
|
835
837
|
# every space the user has access to in a Confluence instance. To traverse further down
|
@@ -853,6 +855,8 @@ module Carbon
|
|
853
855
|
|
854
856
|
# Confluence List
|
855
857
|
#
|
858
|
+
# This endpoint has been deprecated. Use /integrations/items/list instead.
|
859
|
+
#
|
856
860
|
# To begin listing a user's Confluence pages, at least a `data_source_id` of a connected
|
857
861
|
# Confluence account must be specified. This base request returns a list of root pages for
|
858
862
|
# every space the user has access to in a Confluence instance. To traverse further down
|
@@ -874,7 +878,7 @@ module Carbon
|
|
874
878
|
end
|
875
879
|
|
876
880
|
# Confluence List
|
877
|
-
# To begin listing a user's Confluence pages, at least a `data_source_id` of a connected Confluence account must be specified. This base request returns a list of root pages for every space the user has access to in a Confluence instance. To traverse further down the user's page directory, additional requests to this endpoint can be made with the same `data_source_id` and with `parent_id` set to the id of page from a previous request. For convenience, the `has_children` property in each directory item in the response list will flag which pages will return non-empty lists of pages when set as the `parent_id`.
|
881
|
+
# This endpoint has been deprecated. Use /integrations/items/list instead. To begin listing a user's Confluence pages, at least a `data_source_id` of a connected Confluence account must be specified. This base request returns a list of root pages for every space the user has access to in a Confluence instance. To traverse further down the user's page directory, additional requests to this endpoint can be made with the same `data_source_id` and with `parent_id` set to the id of page from a previous request. For convenience, the `has_children` property in each directory item in the response list will flag which pages will return non-empty lists of pages when set as the `parent_id`.
|
878
882
|
# @param list_request [ListRequest]
|
879
883
|
# @param [Hash] opts the optional parameters
|
880
884
|
# @return [ListResponse]
|
@@ -884,7 +888,7 @@ module Carbon
|
|
884
888
|
end
|
885
889
|
|
886
890
|
# Confluence List
|
887
|
-
# To begin listing a user's Confluence pages, at least a `data_source_id` of a connected Confluence account must be specified. This base request returns a list of root pages for every space the user has access to in a Confluence instance. To traverse further down the user's page directory, additional requests to this endpoint can be made with the same `data_source_id` and with `parent_id` set to the id of page from a previous request. For convenience, the `has_children` property in each directory item in the response list will flag which pages will return non-empty lists of pages when set as the `parent_id`.
|
891
|
+
# This endpoint has been deprecated. Use /integrations/items/list instead. To begin listing a user's Confluence pages, at least a `data_source_id` of a connected Confluence account must be specified. This base request returns a list of root pages for every space the user has access to in a Confluence instance. To traverse further down the user's page directory, additional requests to this endpoint can be made with the same `data_source_id` and with `parent_id` set to the id of page from a previous request. For convenience, the `has_children` property in each directory item in the response list will flag which pages will return non-empty lists of pages when set as the `parent_id`.
|
888
892
|
# @param list_request [ListRequest]
|
889
893
|
# @param [Hash] opts the optional parameters
|
890
894
|
# @return [APIResponse] data is ListResponse, status code, headers and response
|
@@ -1617,6 +1621,8 @@ module Carbon
|
|
1617
1621
|
|
1618
1622
|
# Confluence Sync
|
1619
1623
|
#
|
1624
|
+
# This endpoint has been deprecated. Use /integrations/files/sync instead.
|
1625
|
+
#
|
1620
1626
|
# After listing pages in a user's Confluence account, the set of selected page `ids` and the
|
1621
1627
|
# connected account's `data_source_id` can be passed into this endpoint to sync them into
|
1622
1628
|
# Carbon. Additional parameters listed below can be used to associate data to the selected
|
@@ -1640,7 +1646,7 @@ module Carbon
|
|
1640
1646
|
# @param file_sync_config [FileSyncConfigNullable]
|
1641
1647
|
# @param body [SyncFilesRequest]
|
1642
1648
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1643
|
-
def sync_confluence(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '
|
1649
|
+
def sync_confluence(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: 'ca60b474-8b43-4b44-9deb-adb701e40610', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
1644
1650
|
_body = {}
|
1645
1651
|
_body[:tags] = tags if tags != SENTINEL
|
1646
1652
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1665,6 +1671,8 @@ module Carbon
|
|
1665
1671
|
|
1666
1672
|
# Confluence Sync
|
1667
1673
|
#
|
1674
|
+
# This endpoint has been deprecated. Use /integrations/files/sync instead.
|
1675
|
+
#
|
1668
1676
|
# After listing pages in a user's Confluence account, the set of selected page `ids` and the
|
1669
1677
|
# connected account's `data_source_id` can be passed into this endpoint to sync them into
|
1670
1678
|
# Carbon. Additional parameters listed below can be used to associate data to the selected
|
@@ -1688,7 +1696,7 @@ module Carbon
|
|
1688
1696
|
# @param file_sync_config [FileSyncConfigNullable]
|
1689
1697
|
# @param body [SyncFilesRequest]
|
1690
1698
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1691
|
-
def sync_confluence_with_http_info(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '
|
1699
|
+
def sync_confluence_with_http_info(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: 'ca60b474-8b43-4b44-9deb-adb701e40610', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
1692
1700
|
_body = {}
|
1693
1701
|
_body[:tags] = tags if tags != SENTINEL
|
1694
1702
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1711,7 +1719,7 @@ module Carbon
|
|
1711
1719
|
end
|
1712
1720
|
|
1713
1721
|
# Confluence Sync
|
1714
|
-
# After listing pages in a user's Confluence account, the set of selected page `ids` and the connected account's `data_source_id` can be passed into this endpoint to sync them into Carbon. Additional parameters listed below can be used to associate data to the selected pages or alter the behavior of the sync.
|
1722
|
+
# This endpoint has been deprecated. Use /integrations/files/sync instead. After listing pages in a user's Confluence account, the set of selected page `ids` and the connected account's `data_source_id` can be passed into this endpoint to sync them into Carbon. Additional parameters listed below can be used to associate data to the selected pages or alter the behavior of the sync.
|
1715
1723
|
# @param sync_files_request [SyncFilesRequest]
|
1716
1724
|
# @param [Hash] opts the optional parameters
|
1717
1725
|
# @return [GenericSuccessResponse]
|
@@ -1721,7 +1729,7 @@ module Carbon
|
|
1721
1729
|
end
|
1722
1730
|
|
1723
1731
|
# Confluence Sync
|
1724
|
-
# After listing pages in a user's Confluence account, the set of selected page `ids` and the connected account's `data_source_id` can be passed into this endpoint to sync them into Carbon. Additional parameters listed below can be used to associate data to the selected pages or alter the behavior of the sync.
|
1732
|
+
# This endpoint has been deprecated. Use /integrations/files/sync instead. After listing pages in a user's Confluence account, the set of selected page `ids` and the connected account's `data_source_id` can be passed into this endpoint to sync them into Carbon. Additional parameters listed below can be used to associate data to the selected pages or alter the behavior of the sync.
|
1725
1733
|
# @param sync_files_request [SyncFilesRequest]
|
1726
1734
|
# @param [Hash] opts the optional parameters
|
1727
1735
|
# @return [APIResponse] data is GenericSuccessResponse, status code, headers and response
|
@@ -1896,7 +1904,7 @@ module Carbon
|
|
1896
1904
|
# @param file_sync_config [FileSyncConfigNullable]
|
1897
1905
|
# @param body [SyncFilesRequest]
|
1898
1906
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1899
|
-
def sync_files(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '
|
1907
|
+
def sync_files(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: 'ca60b474-8b43-4b44-9deb-adb701e40610', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
1900
1908
|
_body = {}
|
1901
1909
|
_body[:tags] = tags if tags != SENTINEL
|
1902
1910
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1944,7 +1952,7 @@ module Carbon
|
|
1944
1952
|
# @param file_sync_config [FileSyncConfigNullable]
|
1945
1953
|
# @param body [SyncFilesRequest]
|
1946
1954
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1947
|
-
def sync_files_with_http_info(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '
|
1955
|
+
def sync_files_with_http_info(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: 'ca60b474-8b43-4b44-9deb-adb701e40610', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
1948
1956
|
_body = {}
|
1949
1957
|
_body[:tags] = tags if tags != SENTINEL
|
1950
1958
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -436,9 +436,10 @@ module Carbon
|
|
436
436
|
# @param embedding_model [EmbeddingGenerators]
|
437
437
|
# @param url_paths_to_include [Array<String>] URL subpaths or directories that you want to include. For example if you want to only include URLs that start with /questions in stackoverflow.com, you will add /questions/ in this input
|
438
438
|
# @param url_paths_to_exclude [Array<String>] URL subpaths or directories that you want to exclude. For example if you want to exclude URLs that start with /questions in stackoverflow.com, you will add /questions/ in this input
|
439
|
+
# @param urls_to_scrape [Array<String>] You can submit a subset of URLs from the sitemap that should be scraped. To get the list of URLs, you can check out /process_sitemap endpoint. If left empty, all URLs from the sitemap will be scraped.
|
439
440
|
# @param body [SitemapScrapeRequest]
|
440
441
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
441
|
-
def scrape_sitemap(url:, tags: SENTINEL, max_pages_to_scrape: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, enable_auto_sync: false, generate_sparse_vectors: false, prepend_filename_to_chunks: false, html_tags_to_skip: SENTINEL, css_classes_to_skip: SENTINEL, css_selectors_to_skip: SENTINEL, embedding_model: 'OPENAI', url_paths_to_include: SENTINEL, url_paths_to_exclude: SENTINEL, extra: {})
|
442
|
+
def scrape_sitemap(url:, tags: SENTINEL, max_pages_to_scrape: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, enable_auto_sync: false, generate_sparse_vectors: false, prepend_filename_to_chunks: false, html_tags_to_skip: SENTINEL, css_classes_to_skip: SENTINEL, css_selectors_to_skip: SENTINEL, embedding_model: 'OPENAI', url_paths_to_include: SENTINEL, url_paths_to_exclude: SENTINEL, urls_to_scrape: SENTINEL, extra: {})
|
442
443
|
_body = {}
|
443
444
|
_body[:tags] = tags if tags != SENTINEL
|
444
445
|
_body[:url] = url if url != SENTINEL
|
@@ -455,6 +456,7 @@ module Carbon
|
|
455
456
|
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
456
457
|
_body[:url_paths_to_include] = url_paths_to_include if url_paths_to_include != SENTINEL
|
457
458
|
_body[:url_paths_to_exclude] = url_paths_to_exclude if url_paths_to_exclude != SENTINEL
|
459
|
+
_body[:urls_to_scrape] = urls_to_scrape if urls_to_scrape != SENTINEL
|
458
460
|
sitemap_scrape_request = _body
|
459
461
|
api_response = scrape_sitemap_with_http_info_impl(sitemap_scrape_request, extra)
|
460
462
|
api_response.data
|
@@ -485,9 +487,10 @@ module Carbon
|
|
485
487
|
# @param embedding_model [EmbeddingGenerators]
|
486
488
|
# @param url_paths_to_include [Array<String>] URL subpaths or directories that you want to include. For example if you want to only include URLs that start with /questions in stackoverflow.com, you will add /questions/ in this input
|
487
489
|
# @param url_paths_to_exclude [Array<String>] URL subpaths or directories that you want to exclude. For example if you want to exclude URLs that start with /questions in stackoverflow.com, you will add /questions/ in this input
|
490
|
+
# @param urls_to_scrape [Array<String>] You can submit a subset of URLs from the sitemap that should be scraped. To get the list of URLs, you can check out /process_sitemap endpoint. If left empty, all URLs from the sitemap will be scraped.
|
488
491
|
# @param body [SitemapScrapeRequest]
|
489
492
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
490
|
-
def scrape_sitemap_with_http_info(url:, tags: SENTINEL, max_pages_to_scrape: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, enable_auto_sync: false, generate_sparse_vectors: false, prepend_filename_to_chunks: false, html_tags_to_skip: SENTINEL, css_classes_to_skip: SENTINEL, css_selectors_to_skip: SENTINEL, embedding_model: 'OPENAI', url_paths_to_include: SENTINEL, url_paths_to_exclude: SENTINEL, extra: {})
|
493
|
+
def scrape_sitemap_with_http_info(url:, tags: SENTINEL, max_pages_to_scrape: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, enable_auto_sync: false, generate_sparse_vectors: false, prepend_filename_to_chunks: false, html_tags_to_skip: SENTINEL, css_classes_to_skip: SENTINEL, css_selectors_to_skip: SENTINEL, embedding_model: 'OPENAI', url_paths_to_include: SENTINEL, url_paths_to_exclude: SENTINEL, urls_to_scrape: SENTINEL, extra: {})
|
491
494
|
_body = {}
|
492
495
|
_body[:tags] = tags if tags != SENTINEL
|
493
496
|
_body[:url] = url if url != SENTINEL
|
@@ -504,6 +507,7 @@ module Carbon
|
|
504
507
|
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
505
508
|
_body[:url_paths_to_include] = url_paths_to_include if url_paths_to_include != SENTINEL
|
506
509
|
_body[:url_paths_to_exclude] = url_paths_to_exclude if url_paths_to_exclude != SENTINEL
|
510
|
+
_body[:urls_to_scrape] = urls_to_scrape if urls_to_scrape != SENTINEL
|
507
511
|
sitemap_scrape_request = _body
|
508
512
|
scrape_sitemap_with_http_info_impl(sitemap_scrape_request, extra)
|
509
513
|
end
|
@@ -59,6 +59,8 @@ module Carbon
|
|
59
59
|
# Flag to control whether or not to perform a high accuracy embedding search. By default, this is set to false. If true, the search may return more accurate results, but may take longer to complete.
|
60
60
|
attr_accessor :high_accuracy
|
61
61
|
|
62
|
+
attr_accessor :rerank
|
63
|
+
|
62
64
|
# Attribute mapping from ruby-style variable name to JSON key.
|
63
65
|
def self.attribute_map
|
64
66
|
{
|
@@ -78,7 +80,8 @@ module Carbon
|
|
78
80
|
:'media_type' => :'media_type',
|
79
81
|
:'embedding_model' => :'embedding_model',
|
80
82
|
:'include_file_level_metadata' => :'include_file_level_metadata',
|
81
|
-
:'high_accuracy' => :'high_accuracy'
|
83
|
+
:'high_accuracy' => :'high_accuracy',
|
84
|
+
:'rerank' => :'rerank'
|
82
85
|
}
|
83
86
|
end
|
84
87
|
|
@@ -106,7 +109,8 @@ module Carbon
|
|
106
109
|
:'media_type' => :'FileContentTypesNullable',
|
107
110
|
:'embedding_model' => :'EmbeddingGeneratorsNullable',
|
108
111
|
:'include_file_level_metadata' => :'Boolean',
|
109
|
-
:'high_accuracy' => :'Boolean'
|
112
|
+
:'high_accuracy' => :'Boolean',
|
113
|
+
:'rerank' => :'RerankParamsNullable'
|
110
114
|
}
|
111
115
|
end
|
112
116
|
|
@@ -126,7 +130,8 @@ module Carbon
|
|
126
130
|
:'media_type',
|
127
131
|
:'embedding_model',
|
128
132
|
:'include_file_level_metadata',
|
129
|
-
:'high_accuracy'
|
133
|
+
:'high_accuracy',
|
134
|
+
:'rerank'
|
130
135
|
])
|
131
136
|
end
|
132
137
|
|
@@ -228,6 +233,10 @@ module Carbon
|
|
228
233
|
else
|
229
234
|
self.high_accuracy = false
|
230
235
|
end
|
236
|
+
|
237
|
+
if attributes.key?(:'rerank')
|
238
|
+
self.rerank = attributes[:'rerank']
|
239
|
+
end
|
231
240
|
end
|
232
241
|
|
233
242
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -312,7 +321,8 @@ module Carbon
|
|
312
321
|
media_type == o.media_type &&
|
313
322
|
embedding_model == o.embedding_model &&
|
314
323
|
include_file_level_metadata == o.include_file_level_metadata &&
|
315
|
-
high_accuracy == o.high_accuracy
|
324
|
+
high_accuracy == o.high_accuracy &&
|
325
|
+
rerank == o.rerank
|
316
326
|
end
|
317
327
|
|
318
328
|
# @see the `==` method
|
@@ -324,7 +334,7 @@ module Carbon
|
|
324
334
|
# Calculates hash code according to all attributes.
|
325
335
|
# @return [Integer] Hash code
|
326
336
|
def hash
|
327
|
-
[tags, query, query_vector, k, file_ids, parent_file_ids, include_all_children, tags_v2, include_tags, include_vectors, include_raw_file, hybrid_search, hybrid_search_tuning_parameters, media_type, embedding_model, include_file_level_metadata, high_accuracy].hash
|
337
|
+
[tags, query, query_vector, k, file_ids, parent_file_ids, include_all_children, tags_v2, include_tags, include_vectors, include_raw_file, hybrid_search, hybrid_search_tuning_parameters, media_type, embedding_model, include_file_level_metadata, high_accuracy, rerank].hash
|
328
338
|
end
|
329
339
|
|
330
340
|
# Builds the object from hash
|
@@ -61,7 +61,7 @@ module Carbon
|
|
61
61
|
|
62
62
|
attr_accessor :parse_pdf_tables_with_ocr
|
63
63
|
|
64
|
-
# Enable integration's file picker for sources that support it. Supported sources: BOX,
|
64
|
+
# Enable integration's file picker for sources that support it. Supported sources: BOX, GOOGLE_DRIVE, SHAREPOINT, ONEDRIVE, DROPBOX
|
65
65
|
attr_accessor :enable_file_picker
|
66
66
|
|
67
67
|
# Enabling this flag will fetch all available content from the source to be listed via list items endpoint
|
@@ -279,7 +279,7 @@ module Carbon
|
|
279
279
|
if attributes.key?(:'request_id')
|
280
280
|
self.request_id = attributes[:'request_id']
|
281
281
|
else
|
282
|
-
self.request_id = '
|
282
|
+
self.request_id = 'd29ec177-bbc6-43c7-9b16-0ee340804c99'
|
283
283
|
end
|
284
284
|
|
285
285
|
if attributes.key?(:'use_ocr')
|
@@ -0,0 +1,220 @@
|
|
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 RerankParams
|
14
|
+
attr_accessor :model
|
15
|
+
|
16
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
17
|
+
def self.attribute_map
|
18
|
+
{
|
19
|
+
:'model' => :'model'
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
# Returns all the JSON keys this model knows about
|
24
|
+
def self.acceptable_attributes
|
25
|
+
attribute_map.values
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.openapi_types
|
30
|
+
{
|
31
|
+
:'model' => :'String'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# List of attributes with nullable: true
|
36
|
+
def self.openapi_nullable
|
37
|
+
Set.new([
|
38
|
+
])
|
39
|
+
end
|
40
|
+
|
41
|
+
# Initializes the object
|
42
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
43
|
+
def initialize(attributes = {})
|
44
|
+
if (!attributes.is_a?(Hash))
|
45
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::RerankParams` initialize method"
|
46
|
+
end
|
47
|
+
|
48
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
49
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
50
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
51
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::RerankParams`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
52
|
+
end
|
53
|
+
h[k.to_sym] = v
|
54
|
+
}
|
55
|
+
|
56
|
+
if attributes.key?(:'model')
|
57
|
+
self.model = attributes[:'model']
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
62
|
+
# @return Array for valid properties with the reasons
|
63
|
+
def list_invalid_properties
|
64
|
+
invalid_properties = Array.new
|
65
|
+
if @model.nil?
|
66
|
+
invalid_properties.push('invalid value for "model", model cannot be nil.')
|
67
|
+
end
|
68
|
+
|
69
|
+
invalid_properties
|
70
|
+
end
|
71
|
+
|
72
|
+
# Check to see if the all the properties in the model are valid
|
73
|
+
# @return true if the model is valid
|
74
|
+
def valid?
|
75
|
+
return false if @model.nil?
|
76
|
+
true
|
77
|
+
end
|
78
|
+
|
79
|
+
# Checks equality by comparing each attribute.
|
80
|
+
# @param [Object] Object to be compared
|
81
|
+
def ==(o)
|
82
|
+
return true if self.equal?(o)
|
83
|
+
self.class == o.class &&
|
84
|
+
model == o.model
|
85
|
+
end
|
86
|
+
|
87
|
+
# @see the `==` method
|
88
|
+
# @param [Object] Object to be compared
|
89
|
+
def eql?(o)
|
90
|
+
self == o
|
91
|
+
end
|
92
|
+
|
93
|
+
# Calculates hash code according to all attributes.
|
94
|
+
# @return [Integer] Hash code
|
95
|
+
def hash
|
96
|
+
[model].hash
|
97
|
+
end
|
98
|
+
|
99
|
+
# Builds the object from hash
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
101
|
+
# @return [Object] Returns the model itself
|
102
|
+
def self.build_from_hash(attributes)
|
103
|
+
new.build_from_hash(attributes)
|
104
|
+
end
|
105
|
+
|
106
|
+
# Builds the object from hash
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
+
# @return [Object] Returns the model itself
|
109
|
+
def build_from_hash(attributes)
|
110
|
+
return nil unless attributes.is_a?(Hash)
|
111
|
+
attributes = attributes.transform_keys(&:to_sym)
|
112
|
+
self.class.openapi_types.each_pair do |key, type|
|
113
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
114
|
+
self.send("#{key}=", nil)
|
115
|
+
elsif type =~ /\AArray<(.*)>/i
|
116
|
+
# check to ensure the input is an array given that the attribute
|
117
|
+
# is documented as an array but the input is not
|
118
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
119
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
120
|
+
end
|
121
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
122
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
self
|
127
|
+
end
|
128
|
+
|
129
|
+
# Deserializes the data based on type
|
130
|
+
# @param string type Data type
|
131
|
+
# @param string value Value to be deserialized
|
132
|
+
# @return [Object] Deserialized data
|
133
|
+
def _deserialize(type, value)
|
134
|
+
case type.to_sym
|
135
|
+
when :Time
|
136
|
+
Time.parse(value)
|
137
|
+
when :Date
|
138
|
+
Date.parse(value)
|
139
|
+
when :String
|
140
|
+
value.to_s
|
141
|
+
when :Integer
|
142
|
+
value.to_i
|
143
|
+
when :Float
|
144
|
+
value.to_f
|
145
|
+
when :Boolean
|
146
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
147
|
+
true
|
148
|
+
else
|
149
|
+
false
|
150
|
+
end
|
151
|
+
when :Object
|
152
|
+
# generic object (usually a Hash), return directly
|
153
|
+
value
|
154
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
155
|
+
inner_type = Regexp.last_match[:inner_type]
|
156
|
+
value.map { |v| _deserialize(inner_type, v) }
|
157
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
158
|
+
k_type = Regexp.last_match[:k_type]
|
159
|
+
v_type = Regexp.last_match[:v_type]
|
160
|
+
{}.tap do |hash|
|
161
|
+
value.each do |k, v|
|
162
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
else # model
|
166
|
+
# models (e.g. Pet) or oneOf
|
167
|
+
klass = Carbon.const_get(type)
|
168
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
# Returns the string representation of the object
|
173
|
+
# @return [String] String presentation of the object
|
174
|
+
def to_s
|
175
|
+
to_hash.to_s
|
176
|
+
end
|
177
|
+
|
178
|
+
# to_body is an alias to to_hash (backward compatibility)
|
179
|
+
# @return [Hash] Returns the object in the form of hash
|
180
|
+
def to_body
|
181
|
+
to_hash
|
182
|
+
end
|
183
|
+
|
184
|
+
# Returns the object in the form of hash
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_hash
|
187
|
+
hash = {}
|
188
|
+
self.class.attribute_map.each_pair do |attr, param|
|
189
|
+
value = self.send(attr)
|
190
|
+
if value.nil?
|
191
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
192
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
193
|
+
end
|
194
|
+
|
195
|
+
hash[param] = _to_hash(value)
|
196
|
+
end
|
197
|
+
hash
|
198
|
+
end
|
199
|
+
|
200
|
+
# Outputs non-array value in the form of hash
|
201
|
+
# For object, use to_hash. Otherwise, just return the value
|
202
|
+
# @param [Object] value Any valid value
|
203
|
+
# @return [Hash] Returns the value in the form of hash
|
204
|
+
def _to_hash(value)
|
205
|
+
if value.is_a?(Array)
|
206
|
+
value.compact.map { |v| _to_hash(v) }
|
207
|
+
elsif value.is_a?(Hash)
|
208
|
+
{}.tap do |hash|
|
209
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
210
|
+
end
|
211
|
+
elsif value.respond_to? :to_hash
|
212
|
+
value.to_hash
|
213
|
+
else
|
214
|
+
value
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
end
|
219
|
+
|
220
|
+
end
|
@@ -0,0 +1,221 @@
|
|
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
|
+
# Parameters for reranking the chunks using a specified model. This field accepts an object with details of the reranking model to be used; either 'Cohere' or 'Jina'. If provided, the specified reranking model will reorder the retrieved chunks based on their relevance to the query.
|
14
|
+
class RerankParamsNullable
|
15
|
+
attr_accessor :model
|
16
|
+
|
17
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
18
|
+
def self.attribute_map
|
19
|
+
{
|
20
|
+
:'model' => :'model'
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
# Returns all the JSON keys this model knows about
|
25
|
+
def self.acceptable_attributes
|
26
|
+
attribute_map.values
|
27
|
+
end
|
28
|
+
|
29
|
+
# Attribute type mapping.
|
30
|
+
def self.openapi_types
|
31
|
+
{
|
32
|
+
:'model' => :'String'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# List of attributes with nullable: true
|
37
|
+
def self.openapi_nullable
|
38
|
+
Set.new([
|
39
|
+
])
|
40
|
+
end
|
41
|
+
|
42
|
+
# Initializes the object
|
43
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
44
|
+
def initialize(attributes = {})
|
45
|
+
if (!attributes.is_a?(Hash))
|
46
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::RerankParamsNullable` initialize method"
|
47
|
+
end
|
48
|
+
|
49
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
50
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
51
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
52
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::RerankParamsNullable`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
53
|
+
end
|
54
|
+
h[k.to_sym] = v
|
55
|
+
}
|
56
|
+
|
57
|
+
if attributes.key?(:'model')
|
58
|
+
self.model = attributes[:'model']
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
63
|
+
# @return Array for valid properties with the reasons
|
64
|
+
def list_invalid_properties
|
65
|
+
invalid_properties = Array.new
|
66
|
+
if @model.nil?
|
67
|
+
invalid_properties.push('invalid value for "model", model cannot be nil.')
|
68
|
+
end
|
69
|
+
|
70
|
+
invalid_properties
|
71
|
+
end
|
72
|
+
|
73
|
+
# Check to see if the all the properties in the model are valid
|
74
|
+
# @return true if the model is valid
|
75
|
+
def valid?
|
76
|
+
return false if @model.nil?
|
77
|
+
true
|
78
|
+
end
|
79
|
+
|
80
|
+
# Checks equality by comparing each attribute.
|
81
|
+
# @param [Object] Object to be compared
|
82
|
+
def ==(o)
|
83
|
+
return true if self.equal?(o)
|
84
|
+
self.class == o.class &&
|
85
|
+
model == o.model
|
86
|
+
end
|
87
|
+
|
88
|
+
# @see the `==` method
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def eql?(o)
|
91
|
+
self == o
|
92
|
+
end
|
93
|
+
|
94
|
+
# Calculates hash code according to all attributes.
|
95
|
+
# @return [Integer] Hash code
|
96
|
+
def hash
|
97
|
+
[model].hash
|
98
|
+
end
|
99
|
+
|
100
|
+
# Builds the object from hash
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
102
|
+
# @return [Object] Returns the model itself
|
103
|
+
def self.build_from_hash(attributes)
|
104
|
+
new.build_from_hash(attributes)
|
105
|
+
end
|
106
|
+
|
107
|
+
# Builds the object from hash
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
+
# @return [Object] Returns the model itself
|
110
|
+
def build_from_hash(attributes)
|
111
|
+
return nil unless attributes.is_a?(Hash)
|
112
|
+
attributes = attributes.transform_keys(&:to_sym)
|
113
|
+
self.class.openapi_types.each_pair do |key, type|
|
114
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
115
|
+
self.send("#{key}=", nil)
|
116
|
+
elsif type =~ /\AArray<(.*)>/i
|
117
|
+
# check to ensure the input is an array given that the attribute
|
118
|
+
# is documented as an array but the input is not
|
119
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
120
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
121
|
+
end
|
122
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
123
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
self
|
128
|
+
end
|
129
|
+
|
130
|
+
# Deserializes the data based on type
|
131
|
+
# @param string type Data type
|
132
|
+
# @param string value Value to be deserialized
|
133
|
+
# @return [Object] Deserialized data
|
134
|
+
def _deserialize(type, value)
|
135
|
+
case type.to_sym
|
136
|
+
when :Time
|
137
|
+
Time.parse(value)
|
138
|
+
when :Date
|
139
|
+
Date.parse(value)
|
140
|
+
when :String
|
141
|
+
value.to_s
|
142
|
+
when :Integer
|
143
|
+
value.to_i
|
144
|
+
when :Float
|
145
|
+
value.to_f
|
146
|
+
when :Boolean
|
147
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
148
|
+
true
|
149
|
+
else
|
150
|
+
false
|
151
|
+
end
|
152
|
+
when :Object
|
153
|
+
# generic object (usually a Hash), return directly
|
154
|
+
value
|
155
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
156
|
+
inner_type = Regexp.last_match[:inner_type]
|
157
|
+
value.map { |v| _deserialize(inner_type, v) }
|
158
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
159
|
+
k_type = Regexp.last_match[:k_type]
|
160
|
+
v_type = Regexp.last_match[:v_type]
|
161
|
+
{}.tap do |hash|
|
162
|
+
value.each do |k, v|
|
163
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
else # model
|
167
|
+
# models (e.g. Pet) or oneOf
|
168
|
+
klass = Carbon.const_get(type)
|
169
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
# Returns the string representation of the object
|
174
|
+
# @return [String] String presentation of the object
|
175
|
+
def to_s
|
176
|
+
to_hash.to_s
|
177
|
+
end
|
178
|
+
|
179
|
+
# to_body is an alias to to_hash (backward compatibility)
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
181
|
+
def to_body
|
182
|
+
to_hash
|
183
|
+
end
|
184
|
+
|
185
|
+
# Returns the object in the form of hash
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_hash
|
188
|
+
hash = {}
|
189
|
+
self.class.attribute_map.each_pair do |attr, param|
|
190
|
+
value = self.send(attr)
|
191
|
+
if value.nil?
|
192
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
193
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
194
|
+
end
|
195
|
+
|
196
|
+
hash[param] = _to_hash(value)
|
197
|
+
end
|
198
|
+
hash
|
199
|
+
end
|
200
|
+
|
201
|
+
# Outputs non-array value in the form of hash
|
202
|
+
# For object, use to_hash. Otherwise, just return the value
|
203
|
+
# @param [Object] value Any valid value
|
204
|
+
# @return [Hash] Returns the value in the form of hash
|
205
|
+
def _to_hash(value)
|
206
|
+
if value.is_a?(Array)
|
207
|
+
value.compact.map { |v| _to_hash(v) }
|
208
|
+
elsif value.is_a?(Hash)
|
209
|
+
{}.tap do |hash|
|
210
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
211
|
+
end
|
212
|
+
elsif value.respond_to? :to_hash
|
213
|
+
value.to_hash
|
214
|
+
else
|
215
|
+
value
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
end
|
220
|
+
|
221
|
+
end
|
@@ -43,6 +43,9 @@ module Carbon
|
|
43
43
|
# URL subpaths or directories that you want to exclude. For example if you want to exclude URLs that start with /questions in stackoverflow.com, you will add /questions/ in this input
|
44
44
|
attr_accessor :url_paths_to_exclude
|
45
45
|
|
46
|
+
# You can submit a subset of URLs from the sitemap that should be scraped. To get the list of URLs, you can check out /process_sitemap endpoint. If left empty, all URLs from the sitemap will be scraped.
|
47
|
+
attr_accessor :urls_to_scrape
|
48
|
+
|
46
49
|
# Attribute mapping from ruby-style variable name to JSON key.
|
47
50
|
def self.attribute_map
|
48
51
|
{
|
@@ -60,7 +63,8 @@ module Carbon
|
|
60
63
|
:'css_selectors_to_skip' => :'css_selectors_to_skip',
|
61
64
|
:'embedding_model' => :'embedding_model',
|
62
65
|
:'url_paths_to_include' => :'url_paths_to_include',
|
63
|
-
:'url_paths_to_exclude' => :'url_paths_to_exclude'
|
66
|
+
:'url_paths_to_exclude' => :'url_paths_to_exclude',
|
67
|
+
:'urls_to_scrape' => :'urls_to_scrape'
|
64
68
|
}
|
65
69
|
end
|
66
70
|
|
@@ -86,7 +90,8 @@ module Carbon
|
|
86
90
|
:'css_selectors_to_skip' => :'Array<String>',
|
87
91
|
:'embedding_model' => :'EmbeddingGenerators',
|
88
92
|
:'url_paths_to_include' => :'Array<String>',
|
89
|
-
:'url_paths_to_exclude' => :'Array<String>'
|
93
|
+
:'url_paths_to_exclude' => :'Array<String>',
|
94
|
+
:'urls_to_scrape' => :'Array<String>'
|
90
95
|
}
|
91
96
|
end
|
92
97
|
|
@@ -105,7 +110,8 @@ module Carbon
|
|
105
110
|
:'css_classes_to_skip',
|
106
111
|
:'css_selectors_to_skip',
|
107
112
|
:'url_paths_to_include',
|
108
|
-
:'url_paths_to_exclude'
|
113
|
+
:'url_paths_to_exclude',
|
114
|
+
:'urls_to_scrape'
|
109
115
|
])
|
110
116
|
end
|
111
117
|
|
@@ -209,6 +215,12 @@ module Carbon
|
|
209
215
|
self.url_paths_to_exclude = value
|
210
216
|
end
|
211
217
|
end
|
218
|
+
|
219
|
+
if attributes.key?(:'urls_to_scrape')
|
220
|
+
if (value = attributes[:'urls_to_scrape']).is_a?(Array)
|
221
|
+
self.urls_to_scrape = value
|
222
|
+
end
|
223
|
+
end
|
212
224
|
end
|
213
225
|
|
214
226
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -293,7 +305,8 @@ module Carbon
|
|
293
305
|
css_selectors_to_skip == o.css_selectors_to_skip &&
|
294
306
|
embedding_model == o.embedding_model &&
|
295
307
|
url_paths_to_include == o.url_paths_to_include &&
|
296
|
-
url_paths_to_exclude == o.url_paths_to_exclude
|
308
|
+
url_paths_to_exclude == o.url_paths_to_exclude &&
|
309
|
+
urls_to_scrape == o.urls_to_scrape
|
297
310
|
end
|
298
311
|
|
299
312
|
# @see the `==` method
|
@@ -305,7 +318,7 @@ module Carbon
|
|
305
318
|
# Calculates hash code according to all attributes.
|
306
319
|
# @return [Integer] Hash code
|
307
320
|
def hash
|
308
|
-
[tags, url, max_pages_to_scrape, chunk_size, chunk_overlap, skip_embedding_generation, enable_auto_sync, generate_sparse_vectors, prepend_filename_to_chunks, html_tags_to_skip, css_classes_to_skip, css_selectors_to_skip, embedding_model, url_paths_to_include, url_paths_to_exclude].hash
|
321
|
+
[tags, url, max_pages_to_scrape, chunk_size, chunk_overlap, skip_embedding_generation, enable_auto_sync, generate_sparse_vectors, prepend_filename_to_chunks, html_tags_to_skip, css_classes_to_skip, css_selectors_to_skip, embedding_model, url_paths_to_include, url_paths_to_exclude, urls_to_scrape].hash
|
309
322
|
end
|
310
323
|
|
311
324
|
# Builds the object from hash
|
@@ -187,7 +187,7 @@ module Carbon
|
|
187
187
|
if attributes.key?(:'request_id')
|
188
188
|
self.request_id = attributes[:'request_id']
|
189
189
|
else
|
190
|
-
self.request_id = '
|
190
|
+
self.request_id = 'ca60b474-8b43-4b44-9deb-adb701e40610'
|
191
191
|
end
|
192
192
|
|
193
193
|
if attributes.key?(:'use_ocr')
|
@@ -182,7 +182,7 @@ module Carbon
|
|
182
182
|
if attributes.key?(:'request_id')
|
183
183
|
self.request_id = attributes[:'request_id']
|
184
184
|
else
|
185
|
-
self.request_id = '
|
185
|
+
self.request_id = '07b02a24-9429-4a3c-aa98-27ff63503082'
|
186
186
|
end
|
187
187
|
|
188
188
|
if attributes.key?(:'enable_file_picker')
|
data/lib/carbon_ruby_sdk.rb
CHANGED
@@ -112,6 +112,8 @@ require 'carbon_ruby_sdk/models/rss_feed_input'
|
|
112
112
|
require 'carbon_ruby_sdk/models/rank_property'
|
113
113
|
require 'carbon_ruby_sdk/models/raw_text_input'
|
114
114
|
require 'carbon_ruby_sdk/models/raw_transcript_property_inner_value'
|
115
|
+
require 'carbon_ruby_sdk/models/rerank_params'
|
116
|
+
require 'carbon_ruby_sdk/models/rerank_params_nullable'
|
115
117
|
require 'carbon_ruby_sdk/models/resync_file_query_input'
|
116
118
|
require 'carbon_ruby_sdk/models/revoke_access_token_input'
|
117
119
|
require 'carbon_ruby_sdk/models/s3_auth_request'
|
@@ -98,7 +98,7 @@ describe 'IntegrationsApi' do
|
|
98
98
|
|
99
99
|
# unit tests for list_confluence_pages
|
100
100
|
# Confluence List
|
101
|
-
# To begin listing a user's Confluence pages, at least a `data_source_id` of a connected Confluence account must be specified. This base request returns a list of root pages for every space the user has access to in a Confluence instance. To traverse further down the user's page directory, additional requests to this endpoint can be made with the same `data_source_id` and with `parent_id` set to the id of page from a previous request. For convenience, the `has_children` property in each directory item in the response list will flag which pages will return non-empty lists of pages when set as the `parent_id`.
|
101
|
+
# This endpoint has been deprecated. Use /integrations/items/list instead. To begin listing a user's Confluence pages, at least a `data_source_id` of a connected Confluence account must be specified. This base request returns a list of root pages for every space the user has access to in a Confluence instance. To traverse further down the user's page directory, additional requests to this endpoint can be made with the same `data_source_id` and with `parent_id` set to the id of page from a previous request. For convenience, the `has_children` property in each directory item in the response list will flag which pages will return non-empty lists of pages when set as the `parent_id`.
|
102
102
|
# @param list_request
|
103
103
|
# @param [Hash] opts the optional parameters
|
104
104
|
# @return [ListResponse]
|
@@ -198,7 +198,7 @@ describe 'IntegrationsApi' do
|
|
198
198
|
|
199
199
|
# unit tests for sync_confluence
|
200
200
|
# Confluence Sync
|
201
|
-
# After listing pages in a user's Confluence account, the set of selected page `ids` and the connected account's `data_source_id` can be passed into this endpoint to sync them into Carbon. Additional parameters listed below can be used to associate data to the selected pages or alter the behavior of the sync.
|
201
|
+
# This endpoint has been deprecated. Use /integrations/files/sync instead. After listing pages in a user's Confluence account, the set of selected page `ids` and the connected account's `data_source_id` can be passed into this endpoint to sync them into Carbon. Additional parameters listed below can be used to associate data to the selected pages or alter the behavior of the sync.
|
202
202
|
# @param sync_files_request
|
203
203
|
# @param [Hash] opts the optional parameters
|
204
204
|
# @return [GenericSuccessResponse]
|
@@ -121,4 +121,10 @@ describe Carbon::GetEmbeddingDocumentsBody do
|
|
121
121
|
end
|
122
122
|
end
|
123
123
|
|
124
|
+
describe 'test attribute "rerank"' 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
|
+
|
124
130
|
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::RerankParamsNullable
|
14
|
+
describe Carbon::RerankParamsNullable do
|
15
|
+
let(:instance) { Carbon::RerankParamsNullable.new }
|
16
|
+
|
17
|
+
describe 'test an instance of RerankParamsNullable' do
|
18
|
+
it 'should create an instance of RerankParamsNullable' do
|
19
|
+
expect(instance).to be_instance_of(Carbon::RerankParamsNullable)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
describe 'test attribute "model"' 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
|
@@ -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::RerankParams
|
14
|
+
describe Carbon::RerankParams do
|
15
|
+
let(:instance) { Carbon::RerankParams.new }
|
16
|
+
|
17
|
+
describe 'test an instance of RerankParams' do
|
18
|
+
it 'should create an instance of RerankParams' do
|
19
|
+
expect(instance).to be_instance_of(Carbon::RerankParams)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
describe 'test attribute "model"' 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
|
@@ -109,4 +109,10 @@ describe Carbon::SitemapScrapeRequest do
|
|
109
109
|
end
|
110
110
|
end
|
111
111
|
|
112
|
+
describe 'test attribute "urls_to_scrape"' 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
|
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.
|
4
|
+
version: 0.2.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konfig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -193,6 +193,8 @@ files:
|
|
193
193
|
- lib/carbon_ruby_sdk/models/rank_property.rb
|
194
194
|
- lib/carbon_ruby_sdk/models/raw_text_input.rb
|
195
195
|
- lib/carbon_ruby_sdk/models/raw_transcript_property_inner_value.rb
|
196
|
+
- lib/carbon_ruby_sdk/models/rerank_params.rb
|
197
|
+
- lib/carbon_ruby_sdk/models/rerank_params_nullable.rb
|
196
198
|
- lib/carbon_ruby_sdk/models/resync_file_query_input.rb
|
197
199
|
- lib/carbon_ruby_sdk/models/revoke_access_token_input.rb
|
198
200
|
- lib/carbon_ruby_sdk/models/rss_feed_input.rb
|
@@ -351,6 +353,8 @@ files:
|
|
351
353
|
- spec/models/rank_property_spec.rb
|
352
354
|
- spec/models/raw_text_input_spec.rb
|
353
355
|
- spec/models/raw_transcript_property_inner_value_spec.rb
|
356
|
+
- spec/models/rerank_params_nullable_spec.rb
|
357
|
+
- spec/models/rerank_params_spec.rb
|
354
358
|
- spec/models/resync_file_query_input_spec.rb
|
355
359
|
- spec/models/revoke_access_token_input_spec.rb
|
356
360
|
- spec/models/rss_feed_input_spec.rb
|
@@ -463,6 +467,7 @@ test_files:
|
|
463
467
|
- spec/models/sync_options_spec.rb
|
464
468
|
- spec/models/file_formats_spec.rb
|
465
469
|
- spec/models/update_organization_input_spec.rb
|
470
|
+
- spec/models/rerank_params_nullable_spec.rb
|
466
471
|
- spec/models/user_request_content_spec.rb
|
467
472
|
- spec/models/gmail_sync_input_spec.rb
|
468
473
|
- spec/models/fetch_urls_request_spec.rb
|
@@ -553,6 +558,7 @@ test_files:
|
|
553
558
|
- spec/models/organization_user_data_source_order_by_columns_spec.rb
|
554
559
|
- spec/models/custom_credentials_type_spec.rb
|
555
560
|
- spec/models/file_formats_nullable_spec.rb
|
561
|
+
- spec/models/rerank_params_spec.rb
|
556
562
|
- spec/models/s3_authentication_spec.rb
|
557
563
|
- spec/models/slack_filters_spec.rb
|
558
564
|
- spec/models/file_statistics_spec.rb
|