carbon_ruby_sdk 0.1.2 → 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 +21 -3
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +42 -6
- 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/spec/models/fresh_desk_connect_request_spec.rb +6 -0
- data/spec/models/gitbook_connect_request_spec.rb +48 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 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
|
|
@@ -77,7 +77,7 @@ Connect external data to LLMs, no matter the source.
|
|
77
77
|
Add to Gemfile:
|
78
78
|
|
79
79
|
```ruby
|
80
|
-
gem 'carbon_ruby_sdk', '~> 0.1.
|
80
|
+
gem 'carbon_ruby_sdk', '~> 0.1.3'
|
81
81
|
```
|
82
82
|
|
83
83
|
## Getting Started<a id="getting-started"></a>
|
@@ -1132,6 +1132,7 @@ result = carbon.integrations.connect_freshdesk(
|
|
1132
1132
|
embedding_model: "OPENAI",
|
1133
1133
|
generate_sparse_vectors: false,
|
1134
1134
|
prepend_filename_to_chunks: false,
|
1135
|
+
sync_files_on_connection: true,
|
1135
1136
|
)
|
1136
1137
|
p result
|
1137
1138
|
```
|
@@ -1147,6 +1148,7 @@ p result
|
|
1147
1148
|
##### embedding_model: [`EmbeddingGeneratorsNullable`](./lib/carbon_ruby_sdk/models/embedding_generators_nullable.rb)<a id="embedding_model-embeddinggeneratorsnullablelibcarbon_ruby_sdkmodelsembedding_generators_nullablerb"></a>
|
1148
1149
|
##### generate_sparse_vectors: `Boolean`<a id="generate_sparse_vectors-boolean"></a>
|
1149
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>
|
1150
1152
|
#### 🔄 Return<a id="🔄-return"></a>
|
1151
1153
|
|
1152
1154
|
[GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
|
@@ -1173,6 +1175,14 @@ need to specify the name of organization you will be syncing data from.
|
|
1173
1175
|
result = carbon.integrations.connect_gitbook(
|
1174
1176
|
organization: "string_example",
|
1175
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,
|
1176
1186
|
)
|
1177
1187
|
p result
|
1178
1188
|
```
|
@@ -1181,6 +1191,14 @@ p result
|
|
1181
1191
|
|
1182
1192
|
##### organization: `String`<a id="organization-string"></a>
|
1183
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>
|
1184
1202
|
#### 🔄 Return<a id="🔄-return"></a>
|
1185
1203
|
|
1186
1204
|
[GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
|
@@ -1254,7 +1272,7 @@ result = carbon.integrations.get_oauth_url(
|
|
1254
1272
|
prepend_filename_to_chunks: false,
|
1255
1273
|
max_items_per_chunk: 1,
|
1256
1274
|
salesforce_domain: "string_example",
|
1257
|
-
sync_files_on_connection:
|
1275
|
+
sync_files_on_connection: true,
|
1258
1276
|
set_page_as_boundary: false,
|
1259
1277
|
)
|
1260
1278
|
p result
|
@@ -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
|
@@ -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')
|
@@ -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
|