carbon_ruby_sdk 0.2.8 → 0.2.10
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 +99 -7
- data/lib/carbon_ruby_sdk/api/embeddings_api.rb +114 -2
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +8 -8
- data/lib/carbon_ruby_sdk/api/users_api.rb +114 -0
- data/lib/carbon_ruby_sdk/models/embeddings_and_chunks_query_input_v2.rb +262 -0
- data/lib/carbon_ruby_sdk/models/get_embedding_documents_body.rb +18 -5
- data/lib/carbon_ruby_sdk/models/list_user_response.rb +326 -0
- data/lib/carbon_ruby_sdk/models/list_users_filters.rb +232 -0
- data/lib/carbon_ruby_sdk/models/list_users_order_by_types.rb +36 -0
- data/lib/carbon_ruby_sdk/models/list_users_request.rb +257 -0
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +2 -2
- 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/models/user_list_response.rb +232 -0
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +6 -0
- data/spec/api/embeddings_api_spec.rb +11 -0
- data/spec/api/users_api_spec.rb +12 -0
- data/spec/models/embeddings_and_chunks_query_input_v2_spec.rb +52 -0
- data/spec/models/get_embedding_documents_body_spec.rb +6 -0
- data/spec/models/list_user_response_spec.rb +76 -0
- data/spec/models/list_users_filters_spec.rb +34 -0
- data/spec/models/list_users_order_by_types_spec.rb +22 -0
- data/spec/models/list_users_request_spec.rb +52 -0
- data/spec/models/user_list_response_spec.rb +34 -0
- metadata +20 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0452b3148ad8c62797e52048a749496808ff574b6eba205e50e10eb514e373e8
|
4
|
+
data.tar.gz: 0d0c67926c3a58fd000729a39961f7ec09590b9150993de85ea7795125ada5ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff2a8b2277d6274d6832544fc74f43554a3a006da0f09fd8b08f039bafc835a5948a27237c7a452f2b27f21353a4599e5cff7c343c4322615ff40d99bc96beb1
|
7
|
+
data.tar.gz: 65c402649df16ef2af3f1e4dedac7128d04d35af85e4c02c03315263f2138d7003a934bf6cb8cf758e171ccb8ee5c6db08e93b75d03e2524e9eec642464b7905
|
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.10-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.2.10)
|
10
10
|
|
11
11
|
</div>
|
12
12
|
|
@@ -24,6 +24,7 @@ Connect external data to LLMs, no matter the source.
|
|
24
24
|
* [`carbon.data_sources.revoke_access_token`](#carbondata_sourcesrevoke_access_token)
|
25
25
|
* [`carbon.embeddings.get_documents`](#carbonembeddingsget_documents)
|
26
26
|
* [`carbon.embeddings.get_embeddings_and_chunks`](#carbonembeddingsget_embeddings_and_chunks)
|
27
|
+
* [`carbon.embeddings.list`](#carbonembeddingslist)
|
27
28
|
* [`carbon.embeddings.upload_chunks_and_embeddings`](#carbonembeddingsupload_chunks_and_embeddings)
|
28
29
|
* [`carbon.files.create_user_file_tags`](#carbonfilescreate_user_file_tags)
|
29
30
|
* [`carbon.files.delete`](#carbonfilesdelete)
|
@@ -68,6 +69,7 @@ Connect external data to LLMs, no matter the source.
|
|
68
69
|
* [`carbon.organizations.update_stats`](#carbonorganizationsupdate_stats)
|
69
70
|
* [`carbon.users.delete`](#carbonusersdelete)
|
70
71
|
* [`carbon.users.get`](#carbonusersget)
|
72
|
+
* [`carbon.users.list`](#carbonuserslist)
|
71
73
|
* [`carbon.users.toggle_user_features`](#carbonuserstoggle_user_features)
|
72
74
|
* [`carbon.users.update_users`](#carbonusersupdate_users)
|
73
75
|
* [`carbon.utilities.fetch_urls`](#carbonutilitiesfetch_urls)
|
@@ -89,7 +91,7 @@ Connect external data to LLMs, no matter the source.
|
|
89
91
|
Add to Gemfile:
|
90
92
|
|
91
93
|
```ruby
|
92
|
-
gem 'carbon_ruby_sdk', '~> 0.2.
|
94
|
+
gem 'carbon_ruby_sdk', '~> 0.2.10'
|
93
95
|
```
|
94
96
|
|
95
97
|
## Getting Started<a id="getting-started"></a>
|
@@ -378,6 +380,7 @@ result = carbon.embeddings.get_documents(
|
|
378
380
|
},
|
379
381
|
media_type: "TEXT",
|
380
382
|
embedding_model: "OPENAI",
|
383
|
+
include_file_level_metadata: false,
|
381
384
|
)
|
382
385
|
p result
|
383
386
|
```
|
@@ -431,6 +434,11 @@ Flag to control whether or not to perform hybrid search.
|
|
431
434
|
##### hybrid_search_tuning_parameters: [`HybridSearchTuningParamsNullable`](./lib/carbon_ruby_sdk/models/hybrid_search_tuning_params_nullable.rb)<a id="hybrid_search_tuning_parameters-hybridsearchtuningparamsnullablelibcarbon_ruby_sdkmodelshybrid_search_tuning_params_nullablerb"></a>
|
432
435
|
##### media_type: [`FileContentTypesNullable`](./lib/carbon_ruby_sdk/models/file_content_types_nullable.rb)<a id="media_type-filecontenttypesnullablelibcarbon_ruby_sdkmodelsfile_content_types_nullablerb"></a>
|
433
436
|
##### embedding_model: [`EmbeddingGeneratorsNullable`](./lib/carbon_ruby_sdk/models/embedding_generators_nullable.rb)<a id="embedding_model-embeddinggeneratorsnullablelibcarbon_ruby_sdkmodelsembedding_generators_nullablerb"></a>
|
437
|
+
##### include_file_level_metadata: `Boolean`<a id="include_file_level_metadata-boolean"></a>
|
438
|
+
Flag to control whether or not to include file-level metadata in the response.
|
439
|
+
This metadata will be included in the `content_metadata` field of each document
|
440
|
+
along with chunk/embedding level metadata.
|
441
|
+
|
434
442
|
#### 🔄 Return<a id="🔄-return"></a>
|
435
443
|
|
436
444
|
[DocumentResponseList](./lib/carbon_ruby_sdk/models/document_response_list.rb)
|
@@ -487,6 +495,49 @@ p result
|
|
487
495
|
---
|
488
496
|
|
489
497
|
|
498
|
+
### `carbon.embeddings.list`<a id="carbonembeddingslist"></a>
|
499
|
+
|
500
|
+
Retrieve Embeddings And Content V2
|
501
|
+
|
502
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
503
|
+
|
504
|
+
```ruby
|
505
|
+
result = carbon.embeddings.list(
|
506
|
+
filters: {
|
507
|
+
"include_all_children" => false,
|
508
|
+
"non_synced_only" => false,
|
509
|
+
},
|
510
|
+
pagination: {
|
511
|
+
"limit" => 10,
|
512
|
+
"offset" => 0,
|
513
|
+
},
|
514
|
+
order_by: "created_at",
|
515
|
+
order_dir: "desc",
|
516
|
+
include_vectors: false,
|
517
|
+
)
|
518
|
+
p result
|
519
|
+
```
|
520
|
+
|
521
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
522
|
+
|
523
|
+
##### filters: [`OrganizationUserFilesToSyncFilters`](./lib/carbon_ruby_sdk/models/organization_user_files_to_sync_filters.rb)<a id="filters-organizationuserfilestosyncfilterslibcarbon_ruby_sdkmodelsorganization_user_files_to_sync_filtersrb"></a>
|
524
|
+
##### pagination: [`Pagination`](./lib/carbon_ruby_sdk/models/pagination.rb)<a id="pagination-paginationlibcarbon_ruby_sdkmodelspaginationrb"></a>
|
525
|
+
##### order_by: [`OrganizationUserFilesToSyncOrderByTypes`](./lib/carbon_ruby_sdk/models/organization_user_files_to_sync_order_by_types.rb)<a id="order_by-organizationuserfilestosyncorderbytypeslibcarbon_ruby_sdkmodelsorganization_user_files_to_sync_order_by_typesrb"></a>
|
526
|
+
##### order_dir: [`OrderDir`](./lib/carbon_ruby_sdk/models/order_dir.rb)<a id="order_dir-orderdirlibcarbon_ruby_sdkmodelsorder_dirrb"></a>
|
527
|
+
##### include_vectors: `Boolean`<a id="include_vectors-boolean"></a>
|
528
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
529
|
+
|
530
|
+
[EmbeddingsAndChunksResponse](./lib/carbon_ruby_sdk/models/embeddings_and_chunks_response.rb)
|
531
|
+
|
532
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
533
|
+
|
534
|
+
`/list_chunks_and_embeddings` `POST`
|
535
|
+
|
536
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
537
|
+
|
538
|
+
---
|
539
|
+
|
540
|
+
|
490
541
|
### `carbon.embeddings.upload_chunks_and_embeddings`<a id="carbonembeddingsupload_chunks_and_embeddings"></a>
|
491
542
|
|
492
543
|
Upload Chunks And Embeddings
|
@@ -1230,7 +1281,7 @@ result = carbon.integrations.connect_data_source(
|
|
1230
1281
|
"prepend_filename_to_chunks" => false,
|
1231
1282
|
"sync_files_on_connection" => true,
|
1232
1283
|
"set_page_as_boundary" => false,
|
1233
|
-
"request_id" => "
|
1284
|
+
"request_id" => "7b23cde6-ec28-417a-9bff-b10e9042394c",
|
1234
1285
|
"enable_file_picker" => true,
|
1235
1286
|
"sync_source_items" => true,
|
1236
1287
|
"incremental_sync" => false,
|
@@ -1450,7 +1501,7 @@ result = carbon.integrations.get_oauth_url(
|
|
1450
1501
|
set_page_as_boundary: false,
|
1451
1502
|
data_source_id: 1,
|
1452
1503
|
connecting_new_account: false,
|
1453
|
-
request_id: "
|
1504
|
+
request_id: "dbc54493-ce4f-4a1d-a78b-862f21f1e3d7",
|
1454
1505
|
use_ocr: false,
|
1455
1506
|
parse_pdf_tables_with_ocr: false,
|
1456
1507
|
enable_file_picker: true,
|
@@ -1511,7 +1562,7 @@ Enable OCR for files that support it. Supported formats: pdf
|
|
1511
1562
|
##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
|
1512
1563
|
##### enable_file_picker: `Boolean`<a id="enable_file_picker-boolean"></a>
|
1513
1564
|
Enable integration's file picker for sources that support it. Supported sources:
|
1514
|
-
|
1565
|
+
GOOGLE_DRIVE, SHAREPOINT, ONEDRIVE, BOX, DROPBOX
|
1515
1566
|
|
1516
1567
|
##### sync_source_items: `Boolean`<a id="sync_source_items-boolean"></a>
|
1517
1568
|
Enabling this flag will fetch all available content from the source to be listed
|
@@ -1810,7 +1861,7 @@ result = carbon.integrations.sync_confluence(
|
|
1810
1861
|
prepend_filename_to_chunks: false,
|
1811
1862
|
max_items_per_chunk: 1,
|
1812
1863
|
set_page_as_boundary: false,
|
1813
|
-
request_id: "
|
1864
|
+
request_id: "6e21ecc1-8385-46ac-abea-01ca0b2b268d",
|
1814
1865
|
use_ocr: false,
|
1815
1866
|
parse_pdf_tables_with_ocr: false,
|
1816
1867
|
incremental_sync: false,
|
@@ -1914,7 +1965,7 @@ result = carbon.integrations.sync_files(
|
|
1914
1965
|
prepend_filename_to_chunks: false,
|
1915
1966
|
max_items_per_chunk: 1,
|
1916
1967
|
set_page_as_boundary: false,
|
1917
|
-
request_id: "
|
1968
|
+
request_id: "6e21ecc1-8385-46ac-abea-01ca0b2b268d",
|
1918
1969
|
use_ocr: false,
|
1919
1970
|
parse_pdf_tables_with_ocr: false,
|
1920
1971
|
incremental_sync: false,
|
@@ -2607,6 +2658,47 @@ p result
|
|
2607
2658
|
---
|
2608
2659
|
|
2609
2660
|
|
2661
|
+
### `carbon.users.list`<a id="carbonuserslist"></a>
|
2662
|
+
|
2663
|
+
List users within an organization
|
2664
|
+
|
2665
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
2666
|
+
|
2667
|
+
```ruby
|
2668
|
+
result = carbon.users.list(
|
2669
|
+
pagination: {
|
2670
|
+
"limit" => 10,
|
2671
|
+
"offset" => 0,
|
2672
|
+
},
|
2673
|
+
filters: {
|
2674
|
+
},
|
2675
|
+
order_by: "created_at",
|
2676
|
+
order_dir: "asc",
|
2677
|
+
include_count: false,
|
2678
|
+
)
|
2679
|
+
p result
|
2680
|
+
```
|
2681
|
+
|
2682
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
2683
|
+
|
2684
|
+
##### pagination: [`Pagination`](./lib/carbon_ruby_sdk/models/pagination.rb)<a id="pagination-paginationlibcarbon_ruby_sdkmodelspaginationrb"></a>
|
2685
|
+
##### filters: [`ListUsersFilters`](./lib/carbon_ruby_sdk/models/list_users_filters.rb)<a id="filters-listusersfilterslibcarbon_ruby_sdkmodelslist_users_filtersrb"></a>
|
2686
|
+
##### order_by: [`ListUsersOrderByTypes`](./lib/carbon_ruby_sdk/models/list_users_order_by_types.rb)<a id="order_by-listusersorderbytypeslibcarbon_ruby_sdkmodelslist_users_order_by_typesrb"></a>
|
2687
|
+
##### order_dir: [`OrderDirV2`](./lib/carbon_ruby_sdk/models/order_dir_v2.rb)<a id="order_dir-orderdirv2libcarbon_ruby_sdkmodelsorder_dir_v2rb"></a>
|
2688
|
+
##### include_count: `Boolean`<a id="include_count-boolean"></a>
|
2689
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
2690
|
+
|
2691
|
+
[UserListResponse](./lib/carbon_ruby_sdk/models/user_list_response.rb)
|
2692
|
+
|
2693
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
2694
|
+
|
2695
|
+
`/list_users` `POST`
|
2696
|
+
|
2697
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
2698
|
+
|
2699
|
+
---
|
2700
|
+
|
2701
|
+
|
2610
2702
|
### `carbon.users.toggle_user_features`<a id="carbonuserstoggle_user_features"></a>
|
2611
2703
|
![Deprecated](https://img.shields.io/badge/deprecated-yellow)
|
2612
2704
|
|
@@ -128,9 +128,10 @@ module Carbon
|
|
128
128
|
# @param hybrid_search_tuning_parameters [HybridSearchTuningParamsNullable]
|
129
129
|
# @param media_type [FileContentTypesNullable]
|
130
130
|
# @param embedding_model [EmbeddingGeneratorsNullable]
|
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.
|
131
132
|
# @param body [GetEmbeddingDocumentsBody]
|
132
133
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
133
|
-
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', extra: {})
|
134
|
+
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, extra: {})
|
134
135
|
_body = {}
|
135
136
|
_body[:tags] = tags if tags != SENTINEL
|
136
137
|
_body[:query] = query if query != SENTINEL
|
@@ -147,6 +148,7 @@ module Carbon
|
|
147
148
|
_body[:hybrid_search_tuning_parameters] = hybrid_search_tuning_parameters if hybrid_search_tuning_parameters != SENTINEL
|
148
149
|
_body[:media_type] = media_type if media_type != SENTINEL
|
149
150
|
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
151
|
+
_body[:include_file_level_metadata] = include_file_level_metadata if include_file_level_metadata != SENTINEL
|
150
152
|
get_embedding_documents_body = _body
|
151
153
|
api_response = get_documents_with_http_info_impl(get_embedding_documents_body, extra)
|
152
154
|
api_response.data
|
@@ -264,9 +266,10 @@ module Carbon
|
|
264
266
|
# @param hybrid_search_tuning_parameters [HybridSearchTuningParamsNullable]
|
265
267
|
# @param media_type [FileContentTypesNullable]
|
266
268
|
# @param embedding_model [EmbeddingGeneratorsNullable]
|
269
|
+
# @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.
|
267
270
|
# @param body [GetEmbeddingDocumentsBody]
|
268
271
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
269
|
-
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', extra: {})
|
272
|
+
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, extra: {})
|
270
273
|
_body = {}
|
271
274
|
_body[:tags] = tags if tags != SENTINEL
|
272
275
|
_body[:query] = query if query != SENTINEL
|
@@ -283,6 +286,7 @@ module Carbon
|
|
283
286
|
_body[:hybrid_search_tuning_parameters] = hybrid_search_tuning_parameters if hybrid_search_tuning_parameters != SENTINEL
|
284
287
|
_body[:media_type] = media_type if media_type != SENTINEL
|
285
288
|
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
289
|
+
_body[:include_file_level_metadata] = include_file_level_metadata if include_file_level_metadata != SENTINEL
|
286
290
|
get_embedding_documents_body = _body
|
287
291
|
get_documents_with_http_info_impl(get_embedding_documents_body, extra)
|
288
292
|
end
|
@@ -464,6 +468,114 @@ module Carbon
|
|
464
468
|
end
|
465
469
|
|
466
470
|
|
471
|
+
# Retrieve Embeddings And Content V2
|
472
|
+
#
|
473
|
+
# @param filters [OrganizationUserFilesToSyncFilters]
|
474
|
+
# @param pagination [Pagination]
|
475
|
+
# @param order_by [OrganizationUserFilesToSyncOrderByTypes]
|
476
|
+
# @param order_dir [OrderDir]
|
477
|
+
# @param include_vectors [Boolean]
|
478
|
+
# @param body [EmbeddingsAndChunksQueryInputV2]
|
479
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
480
|
+
def list(filters:, pagination: SENTINEL, order_by: 'updated_at', order_dir: 'asc', include_vectors: false, extra: {})
|
481
|
+
_body = {}
|
482
|
+
_body[:pagination] = pagination if pagination != SENTINEL
|
483
|
+
_body[:order_by] = order_by if order_by != SENTINEL
|
484
|
+
_body[:order_dir] = order_dir if order_dir != SENTINEL
|
485
|
+
_body[:filters] = filters if filters != SENTINEL
|
486
|
+
_body[:include_vectors] = include_vectors if include_vectors != SENTINEL
|
487
|
+
embeddings_and_chunks_query_input_v2 = _body
|
488
|
+
api_response = list_with_http_info_impl(embeddings_and_chunks_query_input_v2, extra)
|
489
|
+
api_response.data
|
490
|
+
end
|
491
|
+
|
492
|
+
# Retrieve Embeddings And Content V2
|
493
|
+
#
|
494
|
+
# @param filters [OrganizationUserFilesToSyncFilters]
|
495
|
+
# @param pagination [Pagination]
|
496
|
+
# @param order_by [OrganizationUserFilesToSyncOrderByTypes]
|
497
|
+
# @param order_dir [OrderDir]
|
498
|
+
# @param include_vectors [Boolean]
|
499
|
+
# @param body [EmbeddingsAndChunksQueryInputV2]
|
500
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
501
|
+
def list_with_http_info(filters:, pagination: SENTINEL, order_by: 'updated_at', order_dir: 'asc', include_vectors: false, extra: {})
|
502
|
+
_body = {}
|
503
|
+
_body[:pagination] = pagination if pagination != SENTINEL
|
504
|
+
_body[:order_by] = order_by if order_by != SENTINEL
|
505
|
+
_body[:order_dir] = order_dir if order_dir != SENTINEL
|
506
|
+
_body[:filters] = filters if filters != SENTINEL
|
507
|
+
_body[:include_vectors] = include_vectors if include_vectors != SENTINEL
|
508
|
+
embeddings_and_chunks_query_input_v2 = _body
|
509
|
+
list_with_http_info_impl(embeddings_and_chunks_query_input_v2, extra)
|
510
|
+
end
|
511
|
+
|
512
|
+
# Retrieve Embeddings And Content V2
|
513
|
+
# @param embeddings_and_chunks_query_input_v2 [EmbeddingsAndChunksQueryInputV2]
|
514
|
+
# @param [Hash] opts the optional parameters
|
515
|
+
# @return [EmbeddingsAndChunksResponse]
|
516
|
+
private def list_impl(embeddings_and_chunks_query_input_v2, opts = {})
|
517
|
+
data, _status_code, _headers = list_with_http_info(embeddings_and_chunks_query_input_v2, opts)
|
518
|
+
data
|
519
|
+
end
|
520
|
+
|
521
|
+
# Retrieve Embeddings And Content V2
|
522
|
+
# @param embeddings_and_chunks_query_input_v2 [EmbeddingsAndChunksQueryInputV2]
|
523
|
+
# @param [Hash] opts the optional parameters
|
524
|
+
# @return [APIResponse] data is EmbeddingsAndChunksResponse, status code, headers and response
|
525
|
+
private def list_with_http_info_impl(embeddings_and_chunks_query_input_v2, opts = {})
|
526
|
+
if @api_client.config.debugging
|
527
|
+
@api_client.config.logger.debug 'Calling API: EmbeddingsApi.list ...'
|
528
|
+
end
|
529
|
+
# verify the required parameter 'embeddings_and_chunks_query_input_v2' is set
|
530
|
+
if @api_client.config.client_side_validation && embeddings_and_chunks_query_input_v2.nil?
|
531
|
+
fail ArgumentError, "Missing the required parameter 'embeddings_and_chunks_query_input_v2' when calling EmbeddingsApi.list"
|
532
|
+
end
|
533
|
+
# resource path
|
534
|
+
local_var_path = '/list_chunks_and_embeddings'
|
535
|
+
|
536
|
+
# query parameters
|
537
|
+
query_params = opts[:query_params] || {}
|
538
|
+
|
539
|
+
# header parameters
|
540
|
+
header_params = opts[:header_params] || {}
|
541
|
+
# HTTP header 'Accept' (if needed)
|
542
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
543
|
+
# HTTP header 'Content-Type'
|
544
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
545
|
+
if !content_type.nil?
|
546
|
+
header_params['Content-Type'] = content_type
|
547
|
+
end
|
548
|
+
|
549
|
+
# form parameters
|
550
|
+
form_params = opts[:form_params] || {}
|
551
|
+
|
552
|
+
# http body (model)
|
553
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(embeddings_and_chunks_query_input_v2)
|
554
|
+
|
555
|
+
# return_type
|
556
|
+
return_type = opts[:debug_return_type] || 'EmbeddingsAndChunksResponse'
|
557
|
+
|
558
|
+
# auth_names
|
559
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
560
|
+
|
561
|
+
new_options = opts.merge(
|
562
|
+
:operation => :"EmbeddingsApi.list",
|
563
|
+
:header_params => header_params,
|
564
|
+
:query_params => query_params,
|
565
|
+
:form_params => form_params,
|
566
|
+
:body => post_body,
|
567
|
+
:auth_names => auth_names,
|
568
|
+
:return_type => return_type
|
569
|
+
)
|
570
|
+
|
571
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
572
|
+
if @api_client.config.debugging
|
573
|
+
@api_client.config.logger.debug "API called: EmbeddingsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
574
|
+
end
|
575
|
+
APIResponse::new(data, status_code, headers, response)
|
576
|
+
end
|
577
|
+
|
578
|
+
|
467
579
|
# Upload Chunks And Embeddings
|
468
580
|
#
|
469
581
|
# @param embedding_model [EmbeddingGenerators]
|
@@ -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:
|
656
|
+
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: GOOGLE_DRIVE, SHAREPOINT, ONEDRIVE, BOX, 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. 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: 'dbc54493-ce4f-4a1d-a78b-862f21f1e3d7', 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:
|
724
|
+
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: GOOGLE_DRIVE, SHAREPOINT, ONEDRIVE, BOX, 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. 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: 'dbc54493-ce4f-4a1d-a78b-862f21f1e3d7', 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
|
@@ -1640,7 +1640,7 @@ module Carbon
|
|
1640
1640
|
# @param file_sync_config [FileSyncConfigNullable]
|
1641
1641
|
# @param body [SyncFilesRequest]
|
1642
1642
|
# @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: '
|
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: '6e21ecc1-8385-46ac-abea-01ca0b2b268d', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
1644
1644
|
_body = {}
|
1645
1645
|
_body[:tags] = tags if tags != SENTINEL
|
1646
1646
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1688,7 +1688,7 @@ module Carbon
|
|
1688
1688
|
# @param file_sync_config [FileSyncConfigNullable]
|
1689
1689
|
# @param body [SyncFilesRequest]
|
1690
1690
|
# @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: '
|
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: '6e21ecc1-8385-46ac-abea-01ca0b2b268d', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
1692
1692
|
_body = {}
|
1693
1693
|
_body[:tags] = tags if tags != SENTINEL
|
1694
1694
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1896,7 +1896,7 @@ module Carbon
|
|
1896
1896
|
# @param file_sync_config [FileSyncConfigNullable]
|
1897
1897
|
# @param body [SyncFilesRequest]
|
1898
1898
|
# @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: '
|
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: '6e21ecc1-8385-46ac-abea-01ca0b2b268d', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
1900
1900
|
_body = {}
|
1901
1901
|
_body[:tags] = tags if tags != SENTINEL
|
1902
1902
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1944,7 +1944,7 @@ module Carbon
|
|
1944
1944
|
# @param file_sync_config [FileSyncConfigNullable]
|
1945
1945
|
# @param body [SyncFilesRequest]
|
1946
1946
|
# @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: '
|
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: '6e21ecc1-8385-46ac-abea-01ca0b2b268d', use_ocr: false, parse_pdf_tables_with_ocr: false, incremental_sync: false, file_sync_config: SENTINEL, extra: {})
|
1948
1948
|
_body = {}
|
1949
1949
|
_body[:tags] = tags if tags != SENTINEL
|
1950
1950
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -200,6 +200,120 @@ module Carbon
|
|
200
200
|
end
|
201
201
|
|
202
202
|
|
203
|
+
# List Users Endpoint
|
204
|
+
#
|
205
|
+
# List users within an organization
|
206
|
+
#
|
207
|
+
# @param pagination [Pagination]
|
208
|
+
# @param filters [ListUsersFilters]
|
209
|
+
# @param order_by [ListUsersOrderByTypes]
|
210
|
+
# @param order_dir [OrderDirV2]
|
211
|
+
# @param include_count [Boolean]
|
212
|
+
# @param body [ListUsersRequest]
|
213
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
214
|
+
def list(pagination: SENTINEL, filters: SENTINEL, order_by: 'created_at', order_dir: 'desc', include_count: false, extra: {})
|
215
|
+
_body = {}
|
216
|
+
_body[:pagination] = pagination if pagination != SENTINEL
|
217
|
+
_body[:filters] = filters if filters != SENTINEL
|
218
|
+
_body[:order_by] = order_by if order_by != SENTINEL
|
219
|
+
_body[:order_dir] = order_dir if order_dir != SENTINEL
|
220
|
+
_body[:include_count] = include_count if include_count != SENTINEL
|
221
|
+
list_users_request = _body
|
222
|
+
api_response = list_with_http_info_impl(list_users_request, extra)
|
223
|
+
api_response.data
|
224
|
+
end
|
225
|
+
|
226
|
+
# List Users Endpoint
|
227
|
+
#
|
228
|
+
# List users within an organization
|
229
|
+
#
|
230
|
+
# @param pagination [Pagination]
|
231
|
+
# @param filters [ListUsersFilters]
|
232
|
+
# @param order_by [ListUsersOrderByTypes]
|
233
|
+
# @param order_dir [OrderDirV2]
|
234
|
+
# @param include_count [Boolean]
|
235
|
+
# @param body [ListUsersRequest]
|
236
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
237
|
+
def list_with_http_info(pagination: SENTINEL, filters: SENTINEL, order_by: 'created_at', order_dir: 'desc', include_count: false, extra: {})
|
238
|
+
_body = {}
|
239
|
+
_body[:pagination] = pagination if pagination != SENTINEL
|
240
|
+
_body[:filters] = filters if filters != SENTINEL
|
241
|
+
_body[:order_by] = order_by if order_by != SENTINEL
|
242
|
+
_body[:order_dir] = order_dir if order_dir != SENTINEL
|
243
|
+
_body[:include_count] = include_count if include_count != SENTINEL
|
244
|
+
list_users_request = _body
|
245
|
+
list_with_http_info_impl(list_users_request, extra)
|
246
|
+
end
|
247
|
+
|
248
|
+
# List Users Endpoint
|
249
|
+
# List users within an organization
|
250
|
+
# @param list_users_request [ListUsersRequest]
|
251
|
+
# @param [Hash] opts the optional parameters
|
252
|
+
# @return [UserListResponse]
|
253
|
+
private def list_impl(list_users_request, opts = {})
|
254
|
+
data, _status_code, _headers = list_with_http_info(list_users_request, opts)
|
255
|
+
data
|
256
|
+
end
|
257
|
+
|
258
|
+
# List Users Endpoint
|
259
|
+
# List users within an organization
|
260
|
+
# @param list_users_request [ListUsersRequest]
|
261
|
+
# @param [Hash] opts the optional parameters
|
262
|
+
# @return [APIResponse] data is UserListResponse, status code, headers and response
|
263
|
+
private def list_with_http_info_impl(list_users_request, opts = {})
|
264
|
+
if @api_client.config.debugging
|
265
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.list ...'
|
266
|
+
end
|
267
|
+
# verify the required parameter 'list_users_request' is set
|
268
|
+
if @api_client.config.client_side_validation && list_users_request.nil?
|
269
|
+
fail ArgumentError, "Missing the required parameter 'list_users_request' when calling UsersApi.list"
|
270
|
+
end
|
271
|
+
# resource path
|
272
|
+
local_var_path = '/list_users'
|
273
|
+
|
274
|
+
# query parameters
|
275
|
+
query_params = opts[:query_params] || {}
|
276
|
+
|
277
|
+
# header parameters
|
278
|
+
header_params = opts[:header_params] || {}
|
279
|
+
# HTTP header 'Accept' (if needed)
|
280
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
281
|
+
# HTTP header 'Content-Type'
|
282
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
283
|
+
if !content_type.nil?
|
284
|
+
header_params['Content-Type'] = content_type
|
285
|
+
end
|
286
|
+
|
287
|
+
# form parameters
|
288
|
+
form_params = opts[:form_params] || {}
|
289
|
+
|
290
|
+
# http body (model)
|
291
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(list_users_request)
|
292
|
+
|
293
|
+
# return_type
|
294
|
+
return_type = opts[:debug_return_type] || 'UserListResponse'
|
295
|
+
|
296
|
+
# auth_names
|
297
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
298
|
+
|
299
|
+
new_options = opts.merge(
|
300
|
+
:operation => :"UsersApi.list",
|
301
|
+
:header_params => header_params,
|
302
|
+
:query_params => query_params,
|
303
|
+
:form_params => form_params,
|
304
|
+
:body => post_body,
|
305
|
+
:auth_names => auth_names,
|
306
|
+
:return_type => return_type
|
307
|
+
)
|
308
|
+
|
309
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
310
|
+
if @api_client.config.debugging
|
311
|
+
@api_client.config.logger.debug "API called: UsersApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
312
|
+
end
|
313
|
+
APIResponse::new(data, status_code, headers, response)
|
314
|
+
end
|
315
|
+
|
316
|
+
|
203
317
|
# Toggle User Features
|
204
318
|
#
|
205
319
|
# @param configuration_key_name [String]
|