carbon_ruby_sdk 0.1.1 → 0.1.3
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 +53 -3
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +42 -6
- data/lib/carbon_ruby_sdk/api/users_api.rb +92 -0
- data/lib/carbon_ruby_sdk/models/delete_users_input.rb +222 -0
- data/lib/carbon_ruby_sdk/models/file_formats.rb +1 -2
- data/lib/carbon_ruby_sdk/models/file_formats_nullable.rb +1 -2
- data/lib/carbon_ruby_sdk/models/fresh_desk_connect_request.rb +17 -5
- data/lib/carbon_ruby_sdk/models/gitbook_connect_request.rb +97 -4
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +1 -1
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +1 -0
- data/spec/api/users_api_spec.rb +11 -0
- data/spec/models/delete_users_input_spec.rb +28 -0
- data/spec/models/fresh_desk_connect_request_spec.rb +6 -0
- data/spec/models/gitbook_connect_request_spec.rb +48 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 208f842d56562784069b36ce636c7616cc35334d0328e9d7c3efa231daa22093
|
4
|
+
data.tar.gz: c147cb461965777d3858768ec576334730640545d7a5b4c86e9ec532bfc43df1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea914376a5de27deba807520f683534d72e400fff865d38920351b23b7010c2199c61e99b1b51af6fd004bf8036d45227481af7c0a272bf8fd4af390c3d2df0d
|
7
|
+
data.tar.gz: 91db65ec36d8609d8b222450246ed94389bb666d8d97a2066c6557d2b8bc1ee43725b6fcd0f2c0de793fd3eb2f8c8560ca43140efa7ac217ed38b69cb2b5ddb0
|
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.1.
|
9
|
+
[![npm](https://img.shields.io/badge/gem-v0.1.3-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.1.3)
|
10
10
|
|
11
11
|
</div>
|
12
12
|
|
@@ -57,6 +57,7 @@ Connect external data to LLMs, no matter the source.
|
|
57
57
|
* [`carbon.integrations.sync_rss_feed`](#carbonintegrationssync_rss_feed)
|
58
58
|
* [`carbon.integrations.sync_s3_files`](#carbonintegrationssync_s3_files)
|
59
59
|
* [`carbon.organizations.get`](#carbonorganizationsget)
|
60
|
+
* [`carbon.users.delete`](#carbonusersdelete)
|
60
61
|
* [`carbon.users.get`](#carbonusersget)
|
61
62
|
* [`carbon.users.toggle_user_features`](#carbonuserstoggle_user_features)
|
62
63
|
* [`carbon.utilities.fetch_urls`](#carbonutilitiesfetch_urls)
|
@@ -76,7 +77,7 @@ Connect external data to LLMs, no matter the source.
|
|
76
77
|
Add to Gemfile:
|
77
78
|
|
78
79
|
```ruby
|
79
|
-
gem 'carbon_ruby_sdk', '~> 0.1.
|
80
|
+
gem 'carbon_ruby_sdk', '~> 0.1.3'
|
80
81
|
```
|
81
82
|
|
82
83
|
## Getting Started<a id="getting-started"></a>
|
@@ -1131,6 +1132,7 @@ result = carbon.integrations.connect_freshdesk(
|
|
1131
1132
|
embedding_model: "OPENAI",
|
1132
1133
|
generate_sparse_vectors: false,
|
1133
1134
|
prepend_filename_to_chunks: false,
|
1135
|
+
sync_files_on_connection: true,
|
1134
1136
|
)
|
1135
1137
|
p result
|
1136
1138
|
```
|
@@ -1146,6 +1148,7 @@ p result
|
|
1146
1148
|
##### embedding_model: [`EmbeddingGeneratorsNullable`](./lib/carbon_ruby_sdk/models/embedding_generators_nullable.rb)<a id="embedding_model-embeddinggeneratorsnullablelibcarbon_ruby_sdkmodelsembedding_generators_nullablerb"></a>
|
1147
1149
|
##### generate_sparse_vectors: `Boolean`<a id="generate_sparse_vectors-boolean"></a>
|
1148
1150
|
##### prepend_filename_to_chunks: `Boolean`<a id="prepend_filename_to_chunks-boolean"></a>
|
1151
|
+
##### sync_files_on_connection: `Boolean`<a id="sync_files_on_connection-boolean"></a>
|
1149
1152
|
#### 🔄 Return<a id="🔄-return"></a>
|
1150
1153
|
|
1151
1154
|
[GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
|
@@ -1172,6 +1175,14 @@ need to specify the name of organization you will be syncing data from.
|
|
1172
1175
|
result = carbon.integrations.connect_gitbook(
|
1173
1176
|
organization: "string_example",
|
1174
1177
|
access_token: "string_example",
|
1178
|
+
tags: {},
|
1179
|
+
chunk_size: 1500,
|
1180
|
+
chunk_overlap: 20,
|
1181
|
+
skip_embedding_generation: false,
|
1182
|
+
embedding_model: "OPENAI",
|
1183
|
+
generate_sparse_vectors: false,
|
1184
|
+
prepend_filename_to_chunks: false,
|
1185
|
+
sync_files_on_connection: true,
|
1175
1186
|
)
|
1176
1187
|
p result
|
1177
1188
|
```
|
@@ -1180,6 +1191,14 @@ p result
|
|
1180
1191
|
|
1181
1192
|
##### organization: `String`<a id="organization-string"></a>
|
1182
1193
|
##### access_token: `String`<a id="access_token-string"></a>
|
1194
|
+
##### tags: `Object`<a id="tags-object"></a>
|
1195
|
+
##### chunk_size: `Integer`<a id="chunk_size-integer"></a>
|
1196
|
+
##### chunk_overlap: `Integer`<a id="chunk_overlap-integer"></a>
|
1197
|
+
##### skip_embedding_generation: `Boolean`<a id="skip_embedding_generation-boolean"></a>
|
1198
|
+
##### embedding_model: [`EmbeddingGenerators`](./lib/carbon_ruby_sdk/models/embedding_generators.rb)<a id="embedding_model-embeddinggeneratorslibcarbon_ruby_sdkmodelsembedding_generatorsrb"></a>
|
1199
|
+
##### generate_sparse_vectors: `Boolean`<a id="generate_sparse_vectors-boolean"></a>
|
1200
|
+
##### prepend_filename_to_chunks: `Boolean`<a id="prepend_filename_to_chunks-boolean"></a>
|
1201
|
+
##### sync_files_on_connection: `Boolean`<a id="sync_files_on_connection-boolean"></a>
|
1183
1202
|
#### 🔄 Return<a id="🔄-return"></a>
|
1184
1203
|
|
1185
1204
|
[GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
|
@@ -1253,7 +1272,7 @@ result = carbon.integrations.get_oauth_url(
|
|
1253
1272
|
prepend_filename_to_chunks: false,
|
1254
1273
|
max_items_per_chunk: 1,
|
1255
1274
|
salesforce_domain: "string_example",
|
1256
|
-
sync_files_on_connection:
|
1275
|
+
sync_files_on_connection: true,
|
1257
1276
|
set_page_as_boundary: false,
|
1258
1277
|
)
|
1259
1278
|
p result
|
@@ -1941,6 +1960,37 @@ p result
|
|
1941
1960
|
---
|
1942
1961
|
|
1943
1962
|
|
1963
|
+
### `carbon.users.delete`<a id="carbonusersdelete"></a>
|
1964
|
+
|
1965
|
+
Delete Users
|
1966
|
+
|
1967
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
1968
|
+
|
1969
|
+
```ruby
|
1970
|
+
result = carbon.users.delete(
|
1971
|
+
customer_ids: [
|
1972
|
+
"string_example"
|
1973
|
+
],
|
1974
|
+
)
|
1975
|
+
p result
|
1976
|
+
```
|
1977
|
+
|
1978
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
1979
|
+
|
1980
|
+
##### customer_ids: Array<`String`><a id="customer_ids-array"></a>
|
1981
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
1982
|
+
|
1983
|
+
[GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
|
1984
|
+
|
1985
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
1986
|
+
|
1987
|
+
`/delete_users` `POST`
|
1988
|
+
|
1989
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
1990
|
+
|
1991
|
+
---
|
1992
|
+
|
1993
|
+
|
1944
1994
|
### `carbon.users.get`<a id="carbonusersget"></a>
|
1945
1995
|
|
1946
1996
|
User Endpoint
|
@@ -33,9 +33,10 @@ module Carbon
|
|
33
33
|
# @param embedding_model [EmbeddingGeneratorsNullable]
|
34
34
|
# @param generate_sparse_vectors [Boolean]
|
35
35
|
# @param prepend_filename_to_chunks [Boolean]
|
36
|
+
# @param sync_files_on_connection [Boolean]
|
36
37
|
# @param body [FreshDeskConnectRequest]
|
37
38
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
38
|
-
def connect_freshdesk(domain:, api_key:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, extra: {})
|
39
|
+
def connect_freshdesk(domain:, api_key:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, sync_files_on_connection: true, extra: {})
|
39
40
|
_body = {}
|
40
41
|
_body[:tags] = tags if tags != SENTINEL
|
41
42
|
_body[:domain] = domain if domain != SENTINEL
|
@@ -46,6 +47,7 @@ module Carbon
|
|
46
47
|
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
47
48
|
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
48
49
|
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
50
|
+
_body[:sync_files_on_connection] = sync_files_on_connection if sync_files_on_connection != SENTINEL
|
49
51
|
fresh_desk_connect_request = _body
|
50
52
|
api_response = connect_freshdesk_with_http_info_impl(fresh_desk_connect_request, extra)
|
51
53
|
api_response.data
|
@@ -68,9 +70,10 @@ module Carbon
|
|
68
70
|
# @param embedding_model [EmbeddingGeneratorsNullable]
|
69
71
|
# @param generate_sparse_vectors [Boolean]
|
70
72
|
# @param prepend_filename_to_chunks [Boolean]
|
73
|
+
# @param sync_files_on_connection [Boolean]
|
71
74
|
# @param body [FreshDeskConnectRequest]
|
72
75
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
73
|
-
def connect_freshdesk_with_http_info(domain:, api_key:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, extra: {})
|
76
|
+
def connect_freshdesk_with_http_info(domain:, api_key:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, sync_files_on_connection: true, extra: {})
|
74
77
|
_body = {}
|
75
78
|
_body[:tags] = tags if tags != SENTINEL
|
76
79
|
_body[:domain] = domain if domain != SENTINEL
|
@@ -81,6 +84,7 @@ module Carbon
|
|
81
84
|
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
82
85
|
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
83
86
|
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
87
|
+
_body[:sync_files_on_connection] = sync_files_on_connection if sync_files_on_connection != SENTINEL
|
84
88
|
fresh_desk_connect_request = _body
|
85
89
|
connect_freshdesk_with_http_info_impl(fresh_desk_connect_request, extra)
|
86
90
|
end
|
@@ -163,12 +167,28 @@ module Carbon
|
|
163
167
|
#
|
164
168
|
# @param organization [String]
|
165
169
|
# @param access_token [String]
|
170
|
+
# @param tags [Object]
|
171
|
+
# @param chunk_size [Integer]
|
172
|
+
# @param chunk_overlap [Integer]
|
173
|
+
# @param skip_embedding_generation [Boolean]
|
174
|
+
# @param embedding_model [EmbeddingGenerators]
|
175
|
+
# @param generate_sparse_vectors [Boolean]
|
176
|
+
# @param prepend_filename_to_chunks [Boolean]
|
177
|
+
# @param sync_files_on_connection [Boolean]
|
166
178
|
# @param body [GitbookConnectRequest]
|
167
179
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
168
|
-
def connect_gitbook(organization:, access_token:, extra: {})
|
180
|
+
def connect_gitbook(organization:, access_token:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, sync_files_on_connection: true, extra: {})
|
169
181
|
_body = {}
|
182
|
+
_body[:tags] = tags if tags != SENTINEL
|
170
183
|
_body[:organization] = organization if organization != SENTINEL
|
171
184
|
_body[:access_token] = access_token if access_token != SENTINEL
|
185
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
186
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
187
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
188
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
189
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
190
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
191
|
+
_body[:sync_files_on_connection] = sync_files_on_connection if sync_files_on_connection != SENTINEL
|
172
192
|
gitbook_connect_request = _body
|
173
193
|
api_response = connect_gitbook_with_http_info_impl(gitbook_connect_request, extra)
|
174
194
|
api_response.data
|
@@ -183,12 +203,28 @@ module Carbon
|
|
183
203
|
#
|
184
204
|
# @param organization [String]
|
185
205
|
# @param access_token [String]
|
206
|
+
# @param tags [Object]
|
207
|
+
# @param chunk_size [Integer]
|
208
|
+
# @param chunk_overlap [Integer]
|
209
|
+
# @param skip_embedding_generation [Boolean]
|
210
|
+
# @param embedding_model [EmbeddingGenerators]
|
211
|
+
# @param generate_sparse_vectors [Boolean]
|
212
|
+
# @param prepend_filename_to_chunks [Boolean]
|
213
|
+
# @param sync_files_on_connection [Boolean]
|
186
214
|
# @param body [GitbookConnectRequest]
|
187
215
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
188
|
-
def connect_gitbook_with_http_info(organization:, access_token:, extra: {})
|
216
|
+
def connect_gitbook_with_http_info(organization:, access_token:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, sync_files_on_connection: true, extra: {})
|
189
217
|
_body = {}
|
218
|
+
_body[:tags] = tags if tags != SENTINEL
|
190
219
|
_body[:organization] = organization if organization != SENTINEL
|
191
220
|
_body[:access_token] = access_token if access_token != SENTINEL
|
221
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
222
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
223
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
224
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
225
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
226
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
227
|
+
_body[:sync_files_on_connection] = sync_files_on_connection if sync_files_on_connection != SENTINEL
|
192
228
|
gitbook_connect_request = _body
|
193
229
|
connect_gitbook_with_http_info_impl(gitbook_connect_request, extra)
|
194
230
|
end
|
@@ -397,7 +433,7 @@ module Carbon
|
|
397
433
|
# @param set_page_as_boundary [Boolean]
|
398
434
|
# @param body [OAuthURLRequest]
|
399
435
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
400
|
-
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:
|
436
|
+
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, extra: {})
|
401
437
|
_body = {}
|
402
438
|
_body[:tags] = tags if tags != SENTINEL
|
403
439
|
_body[:scope] = scope if scope != SENTINEL
|
@@ -442,7 +478,7 @@ module Carbon
|
|
442
478
|
# @param set_page_as_boundary [Boolean]
|
443
479
|
# @param body [OAuthURLRequest]
|
444
480
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
445
|
-
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:
|
481
|
+
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, extra: {})
|
446
482
|
_body = {}
|
447
483
|
_body[:tags] = tags if tags != SENTINEL
|
448
484
|
_body[:scope] = scope if scope != SENTINEL
|
@@ -16,6 +16,98 @@ module Carbon
|
|
16
16
|
@api_client = api_client
|
17
17
|
end
|
18
18
|
|
19
|
+
# Delete Users
|
20
|
+
#
|
21
|
+
# @param customer_ids [Array<String>]
|
22
|
+
# @param body [DeleteUsersInput]
|
23
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
24
|
+
def delete(customer_ids:, extra: {})
|
25
|
+
_body = {}
|
26
|
+
_body[:customer_ids] = customer_ids if customer_ids != SENTINEL
|
27
|
+
delete_users_input = _body
|
28
|
+
api_response = delete_with_http_info_impl(delete_users_input, extra)
|
29
|
+
api_response.data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Delete Users
|
33
|
+
#
|
34
|
+
# @param customer_ids [Array<String>]
|
35
|
+
# @param body [DeleteUsersInput]
|
36
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
37
|
+
def delete_with_http_info(customer_ids:, extra: {})
|
38
|
+
_body = {}
|
39
|
+
_body[:customer_ids] = customer_ids if customer_ids != SENTINEL
|
40
|
+
delete_users_input = _body
|
41
|
+
delete_with_http_info_impl(delete_users_input, extra)
|
42
|
+
end
|
43
|
+
|
44
|
+
# Delete Users
|
45
|
+
# @param delete_users_input [DeleteUsersInput]
|
46
|
+
# @param [Hash] opts the optional parameters
|
47
|
+
# @return [GenericSuccessResponse]
|
48
|
+
private def delete_impl(delete_users_input, opts = {})
|
49
|
+
data, _status_code, _headers = delete_with_http_info(delete_users_input, opts)
|
50
|
+
data
|
51
|
+
end
|
52
|
+
|
53
|
+
# Delete Users
|
54
|
+
# @param delete_users_input [DeleteUsersInput]
|
55
|
+
# @param [Hash] opts the optional parameters
|
56
|
+
# @return [APIResponse] data is GenericSuccessResponse, status code, headers and response
|
57
|
+
private def delete_with_http_info_impl(delete_users_input, opts = {})
|
58
|
+
if @api_client.config.debugging
|
59
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.delete ...'
|
60
|
+
end
|
61
|
+
# verify the required parameter 'delete_users_input' is set
|
62
|
+
if @api_client.config.client_side_validation && delete_users_input.nil?
|
63
|
+
fail ArgumentError, "Missing the required parameter 'delete_users_input' when calling UsersApi.delete"
|
64
|
+
end
|
65
|
+
# resource path
|
66
|
+
local_var_path = '/delete_users'
|
67
|
+
|
68
|
+
# query parameters
|
69
|
+
query_params = opts[:query_params] || {}
|
70
|
+
|
71
|
+
# header parameters
|
72
|
+
header_params = opts[:header_params] || {}
|
73
|
+
# HTTP header 'Accept' (if needed)
|
74
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
75
|
+
# HTTP header 'Content-Type'
|
76
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
77
|
+
if !content_type.nil?
|
78
|
+
header_params['Content-Type'] = content_type
|
79
|
+
end
|
80
|
+
|
81
|
+
# form parameters
|
82
|
+
form_params = opts[:form_params] || {}
|
83
|
+
|
84
|
+
# http body (model)
|
85
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(delete_users_input)
|
86
|
+
|
87
|
+
# return_type
|
88
|
+
return_type = opts[:debug_return_type] || 'GenericSuccessResponse'
|
89
|
+
|
90
|
+
# auth_names
|
91
|
+
auth_names = opts[:debug_auth_names] || ['accessToken']
|
92
|
+
|
93
|
+
new_options = opts.merge(
|
94
|
+
:operation => :"UsersApi.delete",
|
95
|
+
:header_params => header_params,
|
96
|
+
:query_params => query_params,
|
97
|
+
:form_params => form_params,
|
98
|
+
:body => post_body,
|
99
|
+
:auth_names => auth_names,
|
100
|
+
:return_type => return_type
|
101
|
+
)
|
102
|
+
|
103
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
104
|
+
if @api_client.config.debugging
|
105
|
+
@api_client.config.logger.debug "API called: UsersApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
106
|
+
end
|
107
|
+
APIResponse::new(data, status_code, headers, response)
|
108
|
+
end
|
109
|
+
|
110
|
+
|
19
111
|
# User Endpoint
|
20
112
|
#
|
21
113
|
# @param customer_id [String]
|
@@ -0,0 +1,222 @@
|
|
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 DeleteUsersInput
|
14
|
+
attr_accessor :customer_ids
|
15
|
+
|
16
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
17
|
+
def self.attribute_map
|
18
|
+
{
|
19
|
+
:'customer_ids' => :'customer_ids'
|
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
|
+
:'customer_ids' => :'Array<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::DeleteUsersInput` 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::DeleteUsersInput`. 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?(:'customer_ids')
|
57
|
+
if (value = attributes[:'customer_ids']).is_a?(Array)
|
58
|
+
self.customer_ids = value
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
64
|
+
# @return Array for valid properties with the reasons
|
65
|
+
def list_invalid_properties
|
66
|
+
invalid_properties = Array.new
|
67
|
+
if @customer_ids.nil?
|
68
|
+
invalid_properties.push('invalid value for "customer_ids", customer_ids cannot be nil.')
|
69
|
+
end
|
70
|
+
|
71
|
+
invalid_properties
|
72
|
+
end
|
73
|
+
|
74
|
+
# Check to see if the all the properties in the model are valid
|
75
|
+
# @return true if the model is valid
|
76
|
+
def valid?
|
77
|
+
return false if @customer_ids.nil?
|
78
|
+
true
|
79
|
+
end
|
80
|
+
|
81
|
+
# Checks equality by comparing each attribute.
|
82
|
+
# @param [Object] Object to be compared
|
83
|
+
def ==(o)
|
84
|
+
return true if self.equal?(o)
|
85
|
+
self.class == o.class &&
|
86
|
+
customer_ids == o.customer_ids
|
87
|
+
end
|
88
|
+
|
89
|
+
# @see the `==` method
|
90
|
+
# @param [Object] Object to be compared
|
91
|
+
def eql?(o)
|
92
|
+
self == o
|
93
|
+
end
|
94
|
+
|
95
|
+
# Calculates hash code according to all attributes.
|
96
|
+
# @return [Integer] Hash code
|
97
|
+
def hash
|
98
|
+
[customer_ids].hash
|
99
|
+
end
|
100
|
+
|
101
|
+
# Builds the object from hash
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
103
|
+
# @return [Object] Returns the model itself
|
104
|
+
def self.build_from_hash(attributes)
|
105
|
+
new.build_from_hash(attributes)
|
106
|
+
end
|
107
|
+
|
108
|
+
# Builds the object from hash
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
110
|
+
# @return [Object] Returns the model itself
|
111
|
+
def build_from_hash(attributes)
|
112
|
+
return nil unless attributes.is_a?(Hash)
|
113
|
+
attributes = attributes.transform_keys(&:to_sym)
|
114
|
+
self.class.openapi_types.each_pair do |key, type|
|
115
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
116
|
+
self.send("#{key}=", nil)
|
117
|
+
elsif type =~ /\AArray<(.*)>/i
|
118
|
+
# check to ensure the input is an array given that the attribute
|
119
|
+
# is documented as an array but the input is not
|
120
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
121
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
122
|
+
end
|
123
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
124
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
self
|
129
|
+
end
|
130
|
+
|
131
|
+
# Deserializes the data based on type
|
132
|
+
# @param string type Data type
|
133
|
+
# @param string value Value to be deserialized
|
134
|
+
# @return [Object] Deserialized data
|
135
|
+
def _deserialize(type, value)
|
136
|
+
case type.to_sym
|
137
|
+
when :Time
|
138
|
+
Time.parse(value)
|
139
|
+
when :Date
|
140
|
+
Date.parse(value)
|
141
|
+
when :String
|
142
|
+
value.to_s
|
143
|
+
when :Integer
|
144
|
+
value.to_i
|
145
|
+
when :Float
|
146
|
+
value.to_f
|
147
|
+
when :Boolean
|
148
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
149
|
+
true
|
150
|
+
else
|
151
|
+
false
|
152
|
+
end
|
153
|
+
when :Object
|
154
|
+
# generic object (usually a Hash), return directly
|
155
|
+
value
|
156
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
157
|
+
inner_type = Regexp.last_match[:inner_type]
|
158
|
+
value.map { |v| _deserialize(inner_type, v) }
|
159
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
160
|
+
k_type = Regexp.last_match[:k_type]
|
161
|
+
v_type = Regexp.last_match[:v_type]
|
162
|
+
{}.tap do |hash|
|
163
|
+
value.each do |k, v|
|
164
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
else # model
|
168
|
+
# models (e.g. Pet) or oneOf
|
169
|
+
klass = Carbon.const_get(type)
|
170
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
# Returns the string representation of the object
|
175
|
+
# @return [String] String presentation of the object
|
176
|
+
def to_s
|
177
|
+
to_hash.to_s
|
178
|
+
end
|
179
|
+
|
180
|
+
# to_body is an alias to to_hash (backward compatibility)
|
181
|
+
# @return [Hash] Returns the object in the form of hash
|
182
|
+
def to_body
|
183
|
+
to_hash
|
184
|
+
end
|
185
|
+
|
186
|
+
# Returns the object in the form of hash
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
188
|
+
def to_hash
|
189
|
+
hash = {}
|
190
|
+
self.class.attribute_map.each_pair do |attr, param|
|
191
|
+
value = self.send(attr)
|
192
|
+
if value.nil?
|
193
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
194
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
195
|
+
end
|
196
|
+
|
197
|
+
hash[param] = _to_hash(value)
|
198
|
+
end
|
199
|
+
hash
|
200
|
+
end
|
201
|
+
|
202
|
+
# Outputs non-array value in the form of hash
|
203
|
+
# For object, use to_hash. Otherwise, just return the value
|
204
|
+
# @param [Object] value Any valid value
|
205
|
+
# @return [Hash] Returns the value in the form of hash
|
206
|
+
def _to_hash(value)
|
207
|
+
if value.is_a?(Array)
|
208
|
+
value.compact.map { |v| _to_hash(v) }
|
209
|
+
elsif value.is_a?(Hash)
|
210
|
+
{}.tap do |hash|
|
211
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
212
|
+
end
|
213
|
+
elsif value.respond_to? :to_hash
|
214
|
+
value.to_hash
|
215
|
+
else
|
216
|
+
value
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
end
|
221
|
+
|
222
|
+
end
|
@@ -41,7 +41,6 @@ module Carbon
|
|
41
41
|
GITBOOK = "GITBOOK".freeze
|
42
42
|
SALESFORCE = "SALESFORCE".freeze
|
43
43
|
JPG = "JPG".freeze
|
44
|
-
JPG = "JPG".freeze
|
45
44
|
PNG = "PNG".freeze
|
46
45
|
MP3 = "MP3".freeze
|
47
46
|
MP4 = "MP4".freeze
|
@@ -56,7 +55,7 @@ module Carbon
|
|
56
55
|
WEBM = "WEBM".freeze
|
57
56
|
|
58
57
|
def self.all_vars
|
59
|
-
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, NOTION, GOOGLE_DRIVE, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, BOX, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, JPG,
|
58
|
+
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, NOTION, GOOGLE_DRIVE, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, BOX, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, JPG, PNG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
|
60
59
|
end
|
61
60
|
|
62
61
|
# Builds the enum from string
|
@@ -41,7 +41,6 @@ module Carbon
|
|
41
41
|
GITBOOK = "GITBOOK".freeze
|
42
42
|
SALESFORCE = "SALESFORCE".freeze
|
43
43
|
JPG = "JPG".freeze
|
44
|
-
JPG = "JPG".freeze
|
45
44
|
PNG = "PNG".freeze
|
46
45
|
MP3 = "MP3".freeze
|
47
46
|
MP4 = "MP4".freeze
|
@@ -56,7 +55,7 @@ module Carbon
|
|
56
55
|
WEBM = "WEBM".freeze
|
57
56
|
|
58
57
|
def self.all_vars
|
59
|
-
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, NOTION, GOOGLE_DRIVE, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, BOX, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, JPG,
|
58
|
+
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, NOTION, GOOGLE_DRIVE, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, BOX, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, JPG, PNG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
|
60
59
|
end
|
61
60
|
|
62
61
|
# Builds the enum from string
|
@@ -29,6 +29,8 @@ module Carbon
|
|
29
29
|
|
30
30
|
attr_accessor :prepend_filename_to_chunks
|
31
31
|
|
32
|
+
attr_accessor :sync_files_on_connection
|
33
|
+
|
32
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
35
|
def self.attribute_map
|
34
36
|
{
|
@@ -40,7 +42,8 @@ module Carbon
|
|
40
42
|
:'skip_embedding_generation' => :'skip_embedding_generation',
|
41
43
|
:'embedding_model' => :'embedding_model',
|
42
44
|
:'generate_sparse_vectors' => :'generate_sparse_vectors',
|
43
|
-
:'prepend_filename_to_chunks' => :'prepend_filename_to_chunks'
|
45
|
+
:'prepend_filename_to_chunks' => :'prepend_filename_to_chunks',
|
46
|
+
:'sync_files_on_connection' => :'sync_files_on_connection'
|
44
47
|
}
|
45
48
|
end
|
46
49
|
|
@@ -60,7 +63,8 @@ module Carbon
|
|
60
63
|
:'skip_embedding_generation' => :'Boolean',
|
61
64
|
:'embedding_model' => :'EmbeddingGeneratorsNullable',
|
62
65
|
:'generate_sparse_vectors' => :'Boolean',
|
63
|
-
:'prepend_filename_to_chunks' => :'Boolean'
|
66
|
+
:'prepend_filename_to_chunks' => :'Boolean',
|
67
|
+
:'sync_files_on_connection' => :'Boolean'
|
64
68
|
}
|
65
69
|
end
|
66
70
|
|
@@ -73,7 +77,8 @@ module Carbon
|
|
73
77
|
:'skip_embedding_generation',
|
74
78
|
:'embedding_model',
|
75
79
|
:'generate_sparse_vectors',
|
76
|
-
:'prepend_filename_to_chunks'
|
80
|
+
:'prepend_filename_to_chunks',
|
81
|
+
:'sync_files_on_connection'
|
77
82
|
])
|
78
83
|
end
|
79
84
|
|
@@ -139,6 +144,12 @@ module Carbon
|
|
139
144
|
else
|
140
145
|
self.prepend_filename_to_chunks = false
|
141
146
|
end
|
147
|
+
|
148
|
+
if attributes.key?(:'sync_files_on_connection')
|
149
|
+
self.sync_files_on_connection = attributes[:'sync_files_on_connection']
|
150
|
+
else
|
151
|
+
self.sync_files_on_connection = true
|
152
|
+
end
|
142
153
|
end
|
143
154
|
|
144
155
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -177,7 +188,8 @@ module Carbon
|
|
177
188
|
skip_embedding_generation == o.skip_embedding_generation &&
|
178
189
|
embedding_model == o.embedding_model &&
|
179
190
|
generate_sparse_vectors == o.generate_sparse_vectors &&
|
180
|
-
prepend_filename_to_chunks == o.prepend_filename_to_chunks
|
191
|
+
prepend_filename_to_chunks == o.prepend_filename_to_chunks &&
|
192
|
+
sync_files_on_connection == o.sync_files_on_connection
|
181
193
|
end
|
182
194
|
|
183
195
|
# @see the `==` method
|
@@ -189,7 +201,7 @@ module Carbon
|
|
189
201
|
# Calculates hash code according to all attributes.
|
190
202
|
# @return [Integer] Hash code
|
191
203
|
def hash
|
192
|
-
[tags, domain, api_key, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks].hash
|
204
|
+
[tags, domain, api_key, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, sync_files_on_connection].hash
|
193
205
|
end
|
194
206
|
|
195
207
|
# Builds the object from hash
|
@@ -11,15 +11,39 @@ require 'time'
|
|
11
11
|
|
12
12
|
module Carbon
|
13
13
|
class GitbookConnectRequest
|
14
|
+
attr_accessor :tags
|
15
|
+
|
14
16
|
attr_accessor :organization
|
15
17
|
|
16
18
|
attr_accessor :access_token
|
17
19
|
|
20
|
+
attr_accessor :chunk_size
|
21
|
+
|
22
|
+
attr_accessor :chunk_overlap
|
23
|
+
|
24
|
+
attr_accessor :skip_embedding_generation
|
25
|
+
|
26
|
+
attr_accessor :embedding_model
|
27
|
+
|
28
|
+
attr_accessor :generate_sparse_vectors
|
29
|
+
|
30
|
+
attr_accessor :prepend_filename_to_chunks
|
31
|
+
|
32
|
+
attr_accessor :sync_files_on_connection
|
33
|
+
|
18
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
19
35
|
def self.attribute_map
|
20
36
|
{
|
37
|
+
:'tags' => :'tags',
|
21
38
|
:'organization' => :'organization',
|
22
|
-
:'access_token' => :'access_token'
|
39
|
+
:'access_token' => :'access_token',
|
40
|
+
:'chunk_size' => :'chunk_size',
|
41
|
+
:'chunk_overlap' => :'chunk_overlap',
|
42
|
+
:'skip_embedding_generation' => :'skip_embedding_generation',
|
43
|
+
:'embedding_model' => :'embedding_model',
|
44
|
+
:'generate_sparse_vectors' => :'generate_sparse_vectors',
|
45
|
+
:'prepend_filename_to_chunks' => :'prepend_filename_to_chunks',
|
46
|
+
:'sync_files_on_connection' => :'sync_files_on_connection'
|
23
47
|
}
|
24
48
|
end
|
25
49
|
|
@@ -31,14 +55,29 @@ module Carbon
|
|
31
55
|
# Attribute type mapping.
|
32
56
|
def self.openapi_types
|
33
57
|
{
|
58
|
+
:'tags' => :'Object',
|
34
59
|
:'organization' => :'String',
|
35
|
-
:'access_token' => :'String'
|
60
|
+
:'access_token' => :'String',
|
61
|
+
:'chunk_size' => :'Integer',
|
62
|
+
:'chunk_overlap' => :'Integer',
|
63
|
+
:'skip_embedding_generation' => :'Boolean',
|
64
|
+
:'embedding_model' => :'EmbeddingGenerators',
|
65
|
+
:'generate_sparse_vectors' => :'Boolean',
|
66
|
+
:'prepend_filename_to_chunks' => :'Boolean',
|
67
|
+
:'sync_files_on_connection' => :'Boolean'
|
36
68
|
}
|
37
69
|
end
|
38
70
|
|
39
71
|
# List of attributes with nullable: true
|
40
72
|
def self.openapi_nullable
|
41
73
|
Set.new([
|
74
|
+
:'tags',
|
75
|
+
:'chunk_size',
|
76
|
+
:'chunk_overlap',
|
77
|
+
:'skip_embedding_generation',
|
78
|
+
:'generate_sparse_vectors',
|
79
|
+
:'prepend_filename_to_chunks',
|
80
|
+
:'sync_files_on_connection'
|
42
81
|
])
|
43
82
|
end
|
44
83
|
|
@@ -57,6 +96,10 @@ module Carbon
|
|
57
96
|
h[k.to_sym] = v
|
58
97
|
}
|
59
98
|
|
99
|
+
if attributes.key?(:'tags')
|
100
|
+
self.tags = attributes[:'tags']
|
101
|
+
end
|
102
|
+
|
60
103
|
if attributes.key?(:'organization')
|
61
104
|
self.organization = attributes[:'organization']
|
62
105
|
end
|
@@ -64,6 +107,48 @@ module Carbon
|
|
64
107
|
if attributes.key?(:'access_token')
|
65
108
|
self.access_token = attributes[:'access_token']
|
66
109
|
end
|
110
|
+
|
111
|
+
if attributes.key?(:'chunk_size')
|
112
|
+
self.chunk_size = attributes[:'chunk_size']
|
113
|
+
else
|
114
|
+
self.chunk_size = 1500
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'chunk_overlap')
|
118
|
+
self.chunk_overlap = attributes[:'chunk_overlap']
|
119
|
+
else
|
120
|
+
self.chunk_overlap = 20
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.key?(:'skip_embedding_generation')
|
124
|
+
self.skip_embedding_generation = attributes[:'skip_embedding_generation']
|
125
|
+
else
|
126
|
+
self.skip_embedding_generation = false
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.key?(:'embedding_model')
|
130
|
+
self.embedding_model = attributes[:'embedding_model']
|
131
|
+
else
|
132
|
+
self.embedding_model = 'OPENAI'
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.key?(:'generate_sparse_vectors')
|
136
|
+
self.generate_sparse_vectors = attributes[:'generate_sparse_vectors']
|
137
|
+
else
|
138
|
+
self.generate_sparse_vectors = false
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.key?(:'prepend_filename_to_chunks')
|
142
|
+
self.prepend_filename_to_chunks = attributes[:'prepend_filename_to_chunks']
|
143
|
+
else
|
144
|
+
self.prepend_filename_to_chunks = false
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.key?(:'sync_files_on_connection')
|
148
|
+
self.sync_files_on_connection = attributes[:'sync_files_on_connection']
|
149
|
+
else
|
150
|
+
self.sync_files_on_connection = true
|
151
|
+
end
|
67
152
|
end
|
68
153
|
|
69
154
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -94,8 +179,16 @@ module Carbon
|
|
94
179
|
def ==(o)
|
95
180
|
return true if self.equal?(o)
|
96
181
|
self.class == o.class &&
|
182
|
+
tags == o.tags &&
|
97
183
|
organization == o.organization &&
|
98
|
-
access_token == o.access_token
|
184
|
+
access_token == o.access_token &&
|
185
|
+
chunk_size == o.chunk_size &&
|
186
|
+
chunk_overlap == o.chunk_overlap &&
|
187
|
+
skip_embedding_generation == o.skip_embedding_generation &&
|
188
|
+
embedding_model == o.embedding_model &&
|
189
|
+
generate_sparse_vectors == o.generate_sparse_vectors &&
|
190
|
+
prepend_filename_to_chunks == o.prepend_filename_to_chunks &&
|
191
|
+
sync_files_on_connection == o.sync_files_on_connection
|
99
192
|
end
|
100
193
|
|
101
194
|
# @see the `==` method
|
@@ -107,7 +200,7 @@ module Carbon
|
|
107
200
|
# Calculates hash code according to all attributes.
|
108
201
|
# @return [Integer] Hash code
|
109
202
|
def hash
|
110
|
-
[organization, access_token].hash
|
203
|
+
[tags, organization, access_token, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, sync_files_on_connection].hash
|
111
204
|
end
|
112
205
|
|
113
206
|
# Builds the object from hash
|
@@ -207,7 +207,7 @@ module Carbon
|
|
207
207
|
if attributes.key?(:'sync_files_on_connection')
|
208
208
|
self.sync_files_on_connection = attributes[:'sync_files_on_connection']
|
209
209
|
else
|
210
|
-
self.sync_files_on_connection =
|
210
|
+
self.sync_files_on_connection = true
|
211
211
|
end
|
212
212
|
|
213
213
|
if attributes.key?(:'set_page_as_boundary')
|
data/lib/carbon_ruby_sdk.rb
CHANGED
@@ -26,6 +26,7 @@ require 'carbon_ruby_sdk/models/data_source_sync_statuses'
|
|
26
26
|
require 'carbon_ruby_sdk/models/data_source_type'
|
27
27
|
require 'carbon_ruby_sdk/models/data_source_type_nullable'
|
28
28
|
require 'carbon_ruby_sdk/models/delete_files_query_input'
|
29
|
+
require 'carbon_ruby_sdk/models/delete_users_input'
|
29
30
|
require 'carbon_ruby_sdk/models/directory_item'
|
30
31
|
require 'carbon_ruby_sdk/models/document_response'
|
31
32
|
require 'carbon_ruby_sdk/models/document_response_list'
|
data/spec/api/users_api_spec.rb
CHANGED
@@ -26,6 +26,17 @@ describe 'UsersApi' do
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
+
# unit tests for delete
|
30
|
+
# Delete Users
|
31
|
+
# @param delete_users_input
|
32
|
+
# @param [Hash] opts the optional parameters
|
33
|
+
# @return [GenericSuccessResponse]
|
34
|
+
describe 'delete test' do
|
35
|
+
it 'should work' do
|
36
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
29
40
|
# unit tests for get
|
30
41
|
# User Endpoint
|
31
42
|
# @param user_request_content
|
@@ -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::DeleteUsersInput
|
14
|
+
describe Carbon::DeleteUsersInput do
|
15
|
+
let(:instance) { Carbon::DeleteUsersInput.new }
|
16
|
+
|
17
|
+
describe 'test an instance of DeleteUsersInput' do
|
18
|
+
it 'should create an instance of DeleteUsersInput' do
|
19
|
+
expect(instance).to be_instance_of(Carbon::DeleteUsersInput)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
describe 'test attribute "customer_ids"' 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
|
@@ -73,4 +73,10 @@ describe Carbon::FreshDeskConnectRequest do
|
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
|
+
describe 'test attribute "sync_files_on_connection"' do
|
77
|
+
it 'should work' do
|
78
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
76
82
|
end
|
@@ -19,6 +19,12 @@ describe Carbon::GitbookConnectRequest do
|
|
19
19
|
expect(instance).to be_instance_of(Carbon::GitbookConnectRequest)
|
20
20
|
end
|
21
21
|
end
|
22
|
+
describe 'test attribute "tags"' 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
|
+
|
22
28
|
describe 'test attribute "organization"' do
|
23
29
|
it 'should work' do
|
24
30
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -31,4 +37,46 @@ describe Carbon::GitbookConnectRequest do
|
|
31
37
|
end
|
32
38
|
end
|
33
39
|
|
40
|
+
describe 'test attribute "chunk_size"' do
|
41
|
+
it 'should work' do
|
42
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe 'test attribute "chunk_overlap"' do
|
47
|
+
it 'should work' do
|
48
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
describe 'test attribute "skip_embedding_generation"' do
|
53
|
+
it 'should work' do
|
54
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
describe 'test attribute "embedding_model"' do
|
59
|
+
it 'should work' do
|
60
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
describe 'test attribute "generate_sparse_vectors"' do
|
65
|
+
it 'should work' do
|
66
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
describe 'test attribute "prepend_filename_to_chunks"' do
|
71
|
+
it 'should work' do
|
72
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
describe 'test attribute "sync_files_on_connection"' do
|
77
|
+
it 'should work' do
|
78
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
34
82
|
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.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konfig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -109,6 +109,7 @@ files:
|
|
109
109
|
- lib/carbon_ruby_sdk/models/data_source_type.rb
|
110
110
|
- lib/carbon_ruby_sdk/models/data_source_type_nullable.rb
|
111
111
|
- lib/carbon_ruby_sdk/models/delete_files_query_input.rb
|
112
|
+
- lib/carbon_ruby_sdk/models/delete_users_input.rb
|
112
113
|
- lib/carbon_ruby_sdk/models/directory_item.rb
|
113
114
|
- lib/carbon_ruby_sdk/models/document_response.rb
|
114
115
|
- lib/carbon_ruby_sdk/models/document_response_list.rb
|
@@ -218,6 +219,7 @@ files:
|
|
218
219
|
- spec/models/data_source_type_nullable_spec.rb
|
219
220
|
- spec/models/data_source_type_spec.rb
|
220
221
|
- spec/models/delete_files_query_input_spec.rb
|
222
|
+
- spec/models/delete_users_input_spec.rb
|
221
223
|
- spec/models/directory_item_spec.rb
|
222
224
|
- spec/models/document_response_list_spec.rb
|
223
225
|
- spec/models/document_response_spec.rb
|
@@ -429,6 +431,7 @@ test_files:
|
|
429
431
|
- spec/models/fresh_desk_connect_request_spec.rb
|
430
432
|
- spec/models/embeddings_and_chunks_filters_spec.rb
|
431
433
|
- spec/models/raw_transcript_property_inner_value_spec.rb
|
434
|
+
- spec/models/delete_users_input_spec.rb
|
432
435
|
- spec/models/webhook_no_key_spec.rb
|
433
436
|
- spec/models/s3_file_sync_input_spec.rb
|
434
437
|
- spec/models/sync_directory_request_spec.rb
|