carbon_ruby_sdk 0.1.12 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +6 -6
  3. data/README.md +43 -2
  4. data/lib/carbon_ruby_sdk/api/integrations_api.rb +92 -20
  5. data/lib/carbon_ruby_sdk/models/document_response.rb +15 -5
  6. data/lib/carbon_ruby_sdk/models/embedding_and_chunk.rb +15 -5
  7. data/lib/carbon_ruby_sdk/models/fresh_desk_connect_request.rb +15 -5
  8. data/lib/carbon_ruby_sdk/models/gitbook_connect_request.rb +15 -5
  9. data/lib/carbon_ruby_sdk/models/gitbook_sync_request.rb +15 -5
  10. data/lib/carbon_ruby_sdk/models/gmail_sync_input.rb +15 -5
  11. data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +41 -5
  12. data/lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb +11 -1
  13. data/lib/carbon_ruby_sdk/models/organization_user_files_to_sync_filters.rb +32 -4
  14. data/lib/carbon_ruby_sdk/models/outlook_sync_input.rb +15 -5
  15. data/lib/carbon_ruby_sdk/models/rss_feed_input.rb +15 -5
  16. data/lib/carbon_ruby_sdk/models/s3_file_sync_input.rb +39 -5
  17. data/lib/carbon_ruby_sdk/models/sync_files_request.rb +38 -4
  18. data/lib/carbon_ruby_sdk/models/user_file.rb +11 -1
  19. data/lib/carbon_ruby_sdk/version.rb +1 -1
  20. data/spec/models/document_response_spec.rb +6 -0
  21. data/spec/models/embedding_and_chunk_spec.rb +6 -0
  22. data/spec/models/fresh_desk_connect_request_spec.rb +6 -0
  23. data/spec/models/gitbook_connect_request_spec.rb +6 -0
  24. data/spec/models/gitbook_sync_request_spec.rb +6 -0
  25. data/spec/models/gmail_sync_input_spec.rb +6 -0
  26. data/spec/models/o_auth_url_request_spec.rb +18 -0
  27. data/spec/models/organization_user_data_source_api_spec.rb +6 -0
  28. data/spec/models/organization_user_files_to_sync_filters_spec.rb +6 -0
  29. data/spec/models/outlook_sync_input_spec.rb +6 -0
  30. data/spec/models/rss_feed_input_spec.rb +6 -0
  31. data/spec/models/s3_file_sync_input_spec.rb +18 -0
  32. data/spec/models/sync_files_request_spec.rb +18 -0
  33. data/spec/models/user_file_spec.rb +6 -0
  34. metadata +3 -3
@@ -130,9 +130,10 @@ module Carbon
130
130
  # @param generate_sparse_vectors [Boolean]
131
131
  # @param prepend_filename_to_chunks [Boolean]
132
132
  # @param sync_files_on_connection [Boolean]
133
+ # @param request_id [String]
133
134
  # @param body [FreshDeskConnectRequest]
134
135
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
135
- 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: {})
136
+ 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, request_id: SENTINEL, extra: {})
136
137
  _body = {}
137
138
  _body[:tags] = tags if tags != SENTINEL
138
139
  _body[:domain] = domain if domain != SENTINEL
@@ -144,6 +145,7 @@ module Carbon
144
145
  _body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
145
146
  _body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
146
147
  _body[:sync_files_on_connection] = sync_files_on_connection if sync_files_on_connection != SENTINEL
148
+ _body[:request_id] = request_id if request_id != SENTINEL
147
149
  fresh_desk_connect_request = _body
148
150
  api_response = connect_freshdesk_with_http_info_impl(fresh_desk_connect_request, extra)
149
151
  api_response.data
@@ -167,9 +169,10 @@ module Carbon
167
169
  # @param generate_sparse_vectors [Boolean]
168
170
  # @param prepend_filename_to_chunks [Boolean]
169
171
  # @param sync_files_on_connection [Boolean]
172
+ # @param request_id [String]
170
173
  # @param body [FreshDeskConnectRequest]
171
174
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
172
- 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: {})
175
+ 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, request_id: SENTINEL, extra: {})
173
176
  _body = {}
174
177
  _body[:tags] = tags if tags != SENTINEL
175
178
  _body[:domain] = domain if domain != SENTINEL
@@ -181,6 +184,7 @@ module Carbon
181
184
  _body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
182
185
  _body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
183
186
  _body[:sync_files_on_connection] = sync_files_on_connection if sync_files_on_connection != SENTINEL
187
+ _body[:request_id] = request_id if request_id != SENTINEL
184
188
  fresh_desk_connect_request = _body
185
189
  connect_freshdesk_with_http_info_impl(fresh_desk_connect_request, extra)
186
190
  end
@@ -271,9 +275,10 @@ module Carbon
271
275
  # @param generate_sparse_vectors [Boolean]
272
276
  # @param prepend_filename_to_chunks [Boolean]
273
277
  # @param sync_files_on_connection [Boolean]
278
+ # @param request_id [String]
274
279
  # @param body [GitbookConnectRequest]
275
280
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
276
- 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: {})
281
+ 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, request_id: SENTINEL, extra: {})
277
282
  _body = {}
278
283
  _body[:tags] = tags if tags != SENTINEL
279
284
  _body[:organization] = organization if organization != SENTINEL
@@ -285,6 +290,7 @@ module Carbon
285
290
  _body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
286
291
  _body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
287
292
  _body[:sync_files_on_connection] = sync_files_on_connection if sync_files_on_connection != SENTINEL
293
+ _body[:request_id] = request_id if request_id != SENTINEL
288
294
  gitbook_connect_request = _body
289
295
  api_response = connect_gitbook_with_http_info_impl(gitbook_connect_request, extra)
290
296
  api_response.data
@@ -307,9 +313,10 @@ module Carbon
307
313
  # @param generate_sparse_vectors [Boolean]
308
314
  # @param prepend_filename_to_chunks [Boolean]
309
315
  # @param sync_files_on_connection [Boolean]
316
+ # @param request_id [String]
310
317
  # @param body [GitbookConnectRequest]
311
318
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
312
- 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: {})
319
+ 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, request_id: SENTINEL, extra: {})
313
320
  _body = {}
314
321
  _body[:tags] = tags if tags != SENTINEL
315
322
  _body[:organization] = organization if organization != SENTINEL
@@ -321,6 +328,7 @@ module Carbon
321
328
  _body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
322
329
  _body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
323
330
  _body[:sync_files_on_connection] = sync_files_on_connection if sync_files_on_connection != SENTINEL
331
+ _body[:request_id] = request_id if request_id != SENTINEL
324
332
  gitbook_connect_request = _body
325
333
  connect_gitbook_with_http_info_impl(gitbook_connect_request, extra)
326
334
  end
@@ -534,9 +542,12 @@ module Carbon
534
542
  # @param set_page_as_boundary [Boolean]
535
543
  # @param data_source_id [Integer] Used to specify a data source to sync from if you have multiple connected. It can be skipped if you only have one data source of that type connected or are connecting a new account.
536
544
  # @param connecting_new_account [Boolean] Used to connect a new data source. If not specified, we will attempt to create a sync URL for an existing data source based on type and ID.
545
+ # @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
546
+ # @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
547
+ # @param parse_pdf_tables_with_ocr [Boolean]
537
548
  # @param body [OAuthURLRequest]
538
549
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
539
- 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, extra: {})
550
+ 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: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
540
551
  _body = {}
541
552
  _body[:tags] = tags if tags != SENTINEL
542
553
  _body[:scope] = scope if scope != SENTINEL
@@ -557,6 +568,9 @@ module Carbon
557
568
  _body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
558
569
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
559
570
  _body[:connecting_new_account] = connecting_new_account if connecting_new_account != SENTINEL
571
+ _body[:request_id] = request_id if request_id != SENTINEL
572
+ _body[:use_ocr] = use_ocr if use_ocr != SENTINEL
573
+ _body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
560
574
  o_auth_url_request = _body
561
575
  api_response = get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
562
576
  api_response.data
@@ -588,9 +602,12 @@ module Carbon
588
602
  # @param set_page_as_boundary [Boolean]
589
603
  # @param data_source_id [Integer] Used to specify a data source to sync from if you have multiple connected. It can be skipped if you only have one data source of that type connected or are connecting a new account.
590
604
  # @param connecting_new_account [Boolean] Used to connect a new data source. If not specified, we will attempt to create a sync URL for an existing data source based on type and ID.
605
+ # @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
606
+ # @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
607
+ # @param parse_pdf_tables_with_ocr [Boolean]
591
608
  # @param body [OAuthURLRequest]
592
609
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
593
- 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, extra: {})
610
+ 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: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
594
611
  _body = {}
595
612
  _body[:tags] = tags if tags != SENTINEL
596
613
  _body[:scope] = scope if scope != SENTINEL
@@ -611,6 +628,9 @@ module Carbon
611
628
  _body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
612
629
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
613
630
  _body[:connecting_new_account] = connecting_new_account if connecting_new_account != SENTINEL
631
+ _body[:request_id] = request_id if request_id != SENTINEL
632
+ _body[:use_ocr] = use_ocr if use_ocr != SENTINEL
633
+ _body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
614
634
  o_auth_url_request = _body
615
635
  get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
616
636
  end
@@ -1264,9 +1284,12 @@ module Carbon
1264
1284
  # @param prepend_filename_to_chunks [Boolean]
1265
1285
  # @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
1266
1286
  # @param set_page_as_boundary [Boolean]
1287
+ # @param request_id [String]
1288
+ # @param use_ocr [Boolean]
1289
+ # @param parse_pdf_tables_with_ocr [Boolean]
1267
1290
  # @param body [SyncFilesRequest]
1268
1291
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1269
- 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, extra: {})
1292
+ 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: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
1270
1293
  _body = {}
1271
1294
  _body[:tags] = tags if tags != SENTINEL
1272
1295
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
@@ -1279,6 +1302,9 @@ module Carbon
1279
1302
  _body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
1280
1303
  _body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
1281
1304
  _body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
1305
+ _body[:request_id] = request_id if request_id != SENTINEL
1306
+ _body[:use_ocr] = use_ocr if use_ocr != SENTINEL
1307
+ _body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
1282
1308
  sync_files_request = _body
1283
1309
  api_response = sync_confluence_with_http_info_impl(sync_files_request, extra)
1284
1310
  api_response.data
@@ -1302,9 +1328,12 @@ module Carbon
1302
1328
  # @param prepend_filename_to_chunks [Boolean]
1303
1329
  # @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
1304
1330
  # @param set_page_as_boundary [Boolean]
1331
+ # @param request_id [String]
1332
+ # @param use_ocr [Boolean]
1333
+ # @param parse_pdf_tables_with_ocr [Boolean]
1305
1334
  # @param body [SyncFilesRequest]
1306
1335
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1307
- 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, extra: {})
1336
+ 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: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
1308
1337
  _body = {}
1309
1338
  _body[:tags] = tags if tags != SENTINEL
1310
1339
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
@@ -1317,6 +1346,9 @@ module Carbon
1317
1346
  _body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
1318
1347
  _body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
1319
1348
  _body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
1349
+ _body[:request_id] = request_id if request_id != SENTINEL
1350
+ _body[:use_ocr] = use_ocr if use_ocr != SENTINEL
1351
+ _body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
1320
1352
  sync_files_request = _body
1321
1353
  sync_confluence_with_http_info_impl(sync_files_request, extra)
1322
1354
  end
@@ -1500,9 +1532,12 @@ module Carbon
1500
1532
  # @param prepend_filename_to_chunks [Boolean]
1501
1533
  # @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
1502
1534
  # @param set_page_as_boundary [Boolean]
1535
+ # @param request_id [String]
1536
+ # @param use_ocr [Boolean]
1537
+ # @param parse_pdf_tables_with_ocr [Boolean]
1503
1538
  # @param body [SyncFilesRequest]
1504
1539
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1505
- 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, extra: {})
1540
+ 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: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
1506
1541
  _body = {}
1507
1542
  _body[:tags] = tags if tags != SENTINEL
1508
1543
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
@@ -1515,6 +1550,9 @@ module Carbon
1515
1550
  _body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
1516
1551
  _body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
1517
1552
  _body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
1553
+ _body[:request_id] = request_id if request_id != SENTINEL
1554
+ _body[:use_ocr] = use_ocr if use_ocr != SENTINEL
1555
+ _body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
1518
1556
  sync_files_request = _body
1519
1557
  api_response = sync_files_with_http_info_impl(sync_files_request, extra)
1520
1558
  api_response.data
@@ -1538,9 +1576,12 @@ module Carbon
1538
1576
  # @param prepend_filename_to_chunks [Boolean]
1539
1577
  # @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
1540
1578
  # @param set_page_as_boundary [Boolean]
1579
+ # @param request_id [String]
1580
+ # @param use_ocr [Boolean]
1581
+ # @param parse_pdf_tables_with_ocr [Boolean]
1541
1582
  # @param body [SyncFilesRequest]
1542
1583
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1543
- 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, extra: {})
1584
+ 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: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
1544
1585
  _body = {}
1545
1586
  _body[:tags] = tags if tags != SENTINEL
1546
1587
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
@@ -1553,6 +1594,9 @@ module Carbon
1553
1594
  _body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
1554
1595
  _body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
1555
1596
  _body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
1597
+ _body[:request_id] = request_id if request_id != SENTINEL
1598
+ _body[:use_ocr] = use_ocr if use_ocr != SENTINEL
1599
+ _body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
1556
1600
  sync_files_request = _body
1557
1601
  sync_files_with_http_info_impl(sync_files_request, extra)
1558
1602
  end
@@ -1640,9 +1684,10 @@ module Carbon
1640
1684
  # @param embedding_model [EmbeddingGenerators]
1641
1685
  # @param generate_sparse_vectors [Boolean]
1642
1686
  # @param prepend_filename_to_chunks [Boolean]
1687
+ # @param request_id [String]
1643
1688
  # @param body [GitbookSyncRequest]
1644
1689
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1645
- def sync_gitbook(space_ids:, data_source_id:, 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: {})
1690
+ def sync_gitbook(space_ids:, data_source_id:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, request_id: SENTINEL, extra: {})
1646
1691
  _body = {}
1647
1692
  _body[:tags] = tags if tags != SENTINEL
1648
1693
  _body[:space_ids] = space_ids if space_ids != SENTINEL
@@ -1653,6 +1698,7 @@ module Carbon
1653
1698
  _body[:embedding_model] = embedding_model if embedding_model != SENTINEL
1654
1699
  _body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
1655
1700
  _body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
1701
+ _body[:request_id] = request_id if request_id != SENTINEL
1656
1702
  gitbook_sync_request = _body
1657
1703
  api_response = sync_gitbook_with_http_info_impl(gitbook_sync_request, extra)
1658
1704
  api_response.data
@@ -1672,9 +1718,10 @@ module Carbon
1672
1718
  # @param embedding_model [EmbeddingGenerators]
1673
1719
  # @param generate_sparse_vectors [Boolean]
1674
1720
  # @param prepend_filename_to_chunks [Boolean]
1721
+ # @param request_id [String]
1675
1722
  # @param body [GitbookSyncRequest]
1676
1723
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1677
- def sync_gitbook_with_http_info(space_ids:, data_source_id:, 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: {})
1724
+ def sync_gitbook_with_http_info(space_ids:, data_source_id:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, request_id: SENTINEL, extra: {})
1678
1725
  _body = {}
1679
1726
  _body[:tags] = tags if tags != SENTINEL
1680
1727
  _body[:space_ids] = space_ids if space_ids != SENTINEL
@@ -1685,6 +1732,7 @@ module Carbon
1685
1732
  _body[:embedding_model] = embedding_model if embedding_model != SENTINEL
1686
1733
  _body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
1687
1734
  _body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
1735
+ _body[:request_id] = request_id if request_id != SENTINEL
1688
1736
  gitbook_sync_request = _body
1689
1737
  sync_gitbook_with_http_info_impl(gitbook_sync_request, extra)
1690
1738
  end
@@ -1820,9 +1868,10 @@ module Carbon
1820
1868
  # @param generate_sparse_vectors [Boolean]
1821
1869
  # @param prepend_filename_to_chunks [Boolean]
1822
1870
  # @param data_source_id [Integer]
1871
+ # @param request_id [String]
1823
1872
  # @param body [GmailSyncInput]
1824
1873
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1825
- def sync_gmail(filters:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, data_source_id: SENTINEL, extra: {})
1874
+ def sync_gmail(filters:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, data_source_id: SENTINEL, request_id: SENTINEL, extra: {})
1826
1875
  _body = {}
1827
1876
  _body[:tags] = tags if tags != SENTINEL
1828
1877
  _body[:filters] = filters if filters != SENTINEL
@@ -1833,6 +1882,7 @@ module Carbon
1833
1882
  _body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
1834
1883
  _body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
1835
1884
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
1885
+ _body[:request_id] = request_id if request_id != SENTINEL
1836
1886
  gmail_sync_input = _body
1837
1887
  api_response = sync_gmail_with_http_info_impl(gmail_sync_input, extra)
1838
1888
  api_response.data
@@ -1900,9 +1950,10 @@ module Carbon
1900
1950
  # @param generate_sparse_vectors [Boolean]
1901
1951
  # @param prepend_filename_to_chunks [Boolean]
1902
1952
  # @param data_source_id [Integer]
1953
+ # @param request_id [String]
1903
1954
  # @param body [GmailSyncInput]
1904
1955
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
1905
- def sync_gmail_with_http_info(filters:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, data_source_id: SENTINEL, extra: {})
1956
+ def sync_gmail_with_http_info(filters:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, data_source_id: SENTINEL, request_id: SENTINEL, extra: {})
1906
1957
  _body = {}
1907
1958
  _body[:tags] = tags if tags != SENTINEL
1908
1959
  _body[:filters] = filters if filters != SENTINEL
@@ -1913,6 +1964,7 @@ module Carbon
1913
1964
  _body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
1914
1965
  _body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
1915
1966
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
1967
+ _body[:request_id] = request_id if request_id != SENTINEL
1916
1968
  gmail_sync_input = _body
1917
1969
  sync_gmail_with_http_info_impl(gmail_sync_input, extra)
1918
1970
  end
@@ -2059,9 +2111,10 @@ module Carbon
2059
2111
  # @param generate_sparse_vectors [Boolean]
2060
2112
  # @param prepend_filename_to_chunks [Boolean]
2061
2113
  # @param data_source_id [Integer]
2114
+ # @param request_id [String]
2062
2115
  # @param body [OutlookSyncInput]
2063
2116
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
2064
- def sync_outlook(filters:, tags: SENTINEL, folder: 'Inbox', chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, data_source_id: SENTINEL, extra: {})
2117
+ def sync_outlook(filters:, tags: SENTINEL, folder: 'Inbox', chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, data_source_id: SENTINEL, request_id: SENTINEL, extra: {})
2065
2118
  _body = {}
2066
2119
  _body[:tags] = tags if tags != SENTINEL
2067
2120
  _body[:folder] = folder if folder != SENTINEL
@@ -2073,6 +2126,7 @@ module Carbon
2073
2126
  _body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
2074
2127
  _body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
2075
2128
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
2129
+ _body[:request_id] = request_id if request_id != SENTINEL
2076
2130
  outlook_sync_input = _body
2077
2131
  api_response = sync_outlook_with_http_info_impl(outlook_sync_input, extra)
2078
2132
  api_response.data
@@ -2151,9 +2205,10 @@ module Carbon
2151
2205
  # @param generate_sparse_vectors [Boolean]
2152
2206
  # @param prepend_filename_to_chunks [Boolean]
2153
2207
  # @param data_source_id [Integer]
2208
+ # @param request_id [String]
2154
2209
  # @param body [OutlookSyncInput]
2155
2210
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
2156
- def sync_outlook_with_http_info(filters:, tags: SENTINEL, folder: 'Inbox', chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, data_source_id: SENTINEL, extra: {})
2211
+ def sync_outlook_with_http_info(filters:, tags: SENTINEL, folder: 'Inbox', chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, data_source_id: SENTINEL, request_id: SENTINEL, extra: {})
2157
2212
  _body = {}
2158
2213
  _body[:tags] = tags if tags != SENTINEL
2159
2214
  _body[:folder] = folder if folder != SENTINEL
@@ -2165,6 +2220,7 @@ module Carbon
2165
2220
  _body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
2166
2221
  _body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
2167
2222
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
2223
+ _body[:request_id] = request_id if request_id != SENTINEL
2168
2224
  outlook_sync_input = _body
2169
2225
  sync_outlook_with_http_info_impl(outlook_sync_input, extra)
2170
2226
  end
@@ -2248,9 +2304,10 @@ module Carbon
2248
2304
  # @param embedding_model [EmbeddingGenerators]
2249
2305
  # @param generate_sparse_vectors [Boolean]
2250
2306
  # @param prepend_filename_to_chunks [Boolean]
2307
+ # @param request_id [String]
2251
2308
  # @param body [RSSFeedInput]
2252
2309
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
2253
- def sync_rss_feed(url:, 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: {})
2310
+ def sync_rss_feed(url:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, request_id: SENTINEL, extra: {})
2254
2311
  _body = {}
2255
2312
  _body[:tags] = tags if tags != SENTINEL
2256
2313
  _body[:url] = url if url != SENTINEL
@@ -2260,6 +2317,7 @@ module Carbon
2260
2317
  _body[:embedding_model] = embedding_model if embedding_model != SENTINEL
2261
2318
  _body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
2262
2319
  _body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
2320
+ _body[:request_id] = request_id if request_id != SENTINEL
2263
2321
  rss_feed_input = _body
2264
2322
  api_response = sync_rss_feed_with_http_info_impl(rss_feed_input, extra)
2265
2323
  api_response.data
@@ -2275,9 +2333,10 @@ module Carbon
2275
2333
  # @param embedding_model [EmbeddingGenerators]
2276
2334
  # @param generate_sparse_vectors [Boolean]
2277
2335
  # @param prepend_filename_to_chunks [Boolean]
2336
+ # @param request_id [String]
2278
2337
  # @param body [RSSFeedInput]
2279
2338
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
2280
- def sync_rss_feed_with_http_info(url:, 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: {})
2339
+ def sync_rss_feed_with_http_info(url:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, request_id: SENTINEL, extra: {})
2281
2340
  _body = {}
2282
2341
  _body[:tags] = tags if tags != SENTINEL
2283
2342
  _body[:url] = url if url != SENTINEL
@@ -2287,6 +2346,7 @@ module Carbon
2287
2346
  _body[:embedding_model] = embedding_model if embedding_model != SENTINEL
2288
2347
  _body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
2289
2348
  _body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
2349
+ _body[:request_id] = request_id if request_id != SENTINEL
2290
2350
  rss_feed_input = _body
2291
2351
  sync_rss_feed_with_http_info_impl(rss_feed_input, extra)
2292
2352
  end
@@ -2375,9 +2435,12 @@ module Carbon
2375
2435
  # @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
2376
2436
  # @param set_page_as_boundary [Boolean]
2377
2437
  # @param data_source_id [Integer]
2438
+ # @param request_id [String]
2439
+ # @param use_ocr [Boolean]
2440
+ # @param parse_pdf_tables_with_ocr [Boolean]
2378
2441
  # @param body [S3FileSyncInput]
2379
2442
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
2380
- def sync_s3_files(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, data_source_id: SENTINEL, extra: {})
2443
+ def sync_s3_files(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, data_source_id: SENTINEL, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
2381
2444
  _body = {}
2382
2445
  _body[:tags] = tags if tags != SENTINEL
2383
2446
  _body[:ids] = ids if ids != SENTINEL
@@ -2390,6 +2453,9 @@ module Carbon
2390
2453
  _body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
2391
2454
  _body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
2392
2455
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
2456
+ _body[:request_id] = request_id if request_id != SENTINEL
2457
+ _body[:use_ocr] = use_ocr if use_ocr != SENTINEL
2458
+ _body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
2393
2459
  s3_file_sync_input = _body
2394
2460
  api_response = sync_s3_files_with_http_info_impl(s3_file_sync_input, extra)
2395
2461
  api_response.data
@@ -2412,9 +2478,12 @@ module Carbon
2412
2478
  # @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
2413
2479
  # @param set_page_as_boundary [Boolean]
2414
2480
  # @param data_source_id [Integer]
2481
+ # @param request_id [String]
2482
+ # @param use_ocr [Boolean]
2483
+ # @param parse_pdf_tables_with_ocr [Boolean]
2415
2484
  # @param body [S3FileSyncInput]
2416
2485
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
2417
- def sync_s3_files_with_http_info(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, data_source_id: SENTINEL, extra: {})
2486
+ def sync_s3_files_with_http_info(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, data_source_id: SENTINEL, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
2418
2487
  _body = {}
2419
2488
  _body[:tags] = tags if tags != SENTINEL
2420
2489
  _body[:ids] = ids if ids != SENTINEL
@@ -2427,6 +2496,9 @@ module Carbon
2427
2496
  _body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
2428
2497
  _body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
2429
2498
  _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
2499
+ _body[:request_id] = request_id if request_id != SENTINEL
2500
+ _body[:use_ocr] = use_ocr if use_ocr != SENTINEL
2501
+ _body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
2430
2502
  s3_file_sync_input = _body
2431
2503
  sync_s3_files_with_http_info_impl(s3_file_sync_input, extra)
2432
2504
  end
@@ -33,6 +33,8 @@ module Carbon
33
33
 
34
34
  attr_accessor :content_metadata
35
35
 
36
+ attr_accessor :chunk_index
37
+
36
38
  # Attribute mapping from ruby-style variable name to JSON key.
37
39
  def self.attribute_map
38
40
  {
@@ -46,7 +48,8 @@ module Carbon
46
48
  :'vector' => :'vector',
47
49
  :'score' => :'score',
48
50
  :'rank' => :'rank',
49
- :'content_metadata' => :'content_metadata'
51
+ :'content_metadata' => :'content_metadata',
52
+ :'chunk_index' => :'chunk_index'
50
53
  }
51
54
  end
52
55
 
@@ -68,7 +71,8 @@ module Carbon
68
71
  :'vector' => :'Array<Float>',
69
72
  :'score' => :'Float',
70
73
  :'rank' => :'RankProperty',
71
- :'content_metadata' => :'Object'
74
+ :'content_metadata' => :'Object',
75
+ :'chunk_index' => :'Integer'
72
76
  }
73
77
  end
74
78
 
@@ -83,7 +87,8 @@ module Carbon
83
87
  :'vector',
84
88
  :'score',
85
89
  :'rank',
86
- :'content_metadata'
90
+ :'content_metadata',
91
+ :'chunk_index'
87
92
  ])
88
93
  end
89
94
 
@@ -149,6 +154,10 @@ module Carbon
149
154
  if attributes.key?(:'content_metadata')
150
155
  self.content_metadata = attributes[:'content_metadata']
151
156
  end
157
+
158
+ if attributes.key?(:'chunk_index')
159
+ self.chunk_index = attributes[:'chunk_index']
160
+ end
152
161
  end
153
162
 
154
163
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -189,7 +198,8 @@ module Carbon
189
198
  vector == o.vector &&
190
199
  score == o.score &&
191
200
  rank == o.rank &&
192
- content_metadata == o.content_metadata
201
+ content_metadata == o.content_metadata &&
202
+ chunk_index == o.chunk_index
193
203
  end
194
204
 
195
205
  # @see the `==` method
@@ -201,7 +211,7 @@ module Carbon
201
211
  # Calculates hash code according to all attributes.
202
212
  # @return [Integer] Hash code
203
213
  def hash
204
- [tags, content, file_id, source, source_url, source_type, presigned_url, vector, score, rank, content_metadata].hash
214
+ [tags, content, file_id, source, source_url, source_type, presigned_url, vector, score, rank, content_metadata, chunk_index].hash
205
215
  end
206
216
 
207
217
  # Builds the object from hash
@@ -19,13 +19,16 @@ module Carbon
19
19
 
20
20
  attr_accessor :embedding
21
21
 
22
+ attr_accessor :content_metadata
23
+
22
24
  # Attribute mapping from ruby-style variable name to JSON key.
23
25
  def self.attribute_map
24
26
  {
25
27
  :'user_file_id' => :'user_file_id',
26
28
  :'chunk_index' => :'chunk_index',
27
29
  :'source_content' => :'source_content',
28
- :'embedding' => :'embedding'
30
+ :'embedding' => :'embedding',
31
+ :'content_metadata' => :'content_metadata'
29
32
  }
30
33
  end
31
34
 
@@ -40,7 +43,8 @@ module Carbon
40
43
  :'user_file_id' => :'Integer',
41
44
  :'chunk_index' => :'Integer',
42
45
  :'source_content' => :'String',
43
- :'embedding' => :'Array<Float>'
46
+ :'embedding' => :'Array<Float>',
47
+ :'content_metadata' => :'Object'
44
48
  }
45
49
  end
46
50
 
@@ -48,7 +52,8 @@ module Carbon
48
52
  def self.openapi_nullable
49
53
  Set.new([
50
54
  :'chunk_index',
51
- :'embedding'
55
+ :'embedding',
56
+ :'content_metadata'
52
57
  ])
53
58
  end
54
59
 
@@ -84,6 +89,10 @@ module Carbon
84
89
  self.embedding = value
85
90
  end
86
91
  end
92
+
93
+ if attributes.key?(:'content_metadata')
94
+ self.content_metadata = attributes[:'content_metadata']
95
+ end
87
96
  end
88
97
 
89
98
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -117,7 +126,8 @@ module Carbon
117
126
  user_file_id == o.user_file_id &&
118
127
  chunk_index == o.chunk_index &&
119
128
  source_content == o.source_content &&
120
- embedding == o.embedding
129
+ embedding == o.embedding &&
130
+ content_metadata == o.content_metadata
121
131
  end
122
132
 
123
133
  # @see the `==` method
@@ -129,7 +139,7 @@ module Carbon
129
139
  # Calculates hash code according to all attributes.
130
140
  # @return [Integer] Hash code
131
141
  def hash
132
- [user_file_id, chunk_index, source_content, embedding].hash
142
+ [user_file_id, chunk_index, source_content, embedding, content_metadata].hash
133
143
  end
134
144
 
135
145
  # Builds the object from hash
@@ -31,6 +31,8 @@ module Carbon
31
31
 
32
32
  attr_accessor :sync_files_on_connection
33
33
 
34
+ attr_accessor :request_id
35
+
34
36
  # Attribute mapping from ruby-style variable name to JSON key.
35
37
  def self.attribute_map
36
38
  {
@@ -43,7 +45,8 @@ module Carbon
43
45
  :'embedding_model' => :'embedding_model',
44
46
  :'generate_sparse_vectors' => :'generate_sparse_vectors',
45
47
  :'prepend_filename_to_chunks' => :'prepend_filename_to_chunks',
46
- :'sync_files_on_connection' => :'sync_files_on_connection'
48
+ :'sync_files_on_connection' => :'sync_files_on_connection',
49
+ :'request_id' => :'request_id'
47
50
  }
48
51
  end
49
52
 
@@ -64,7 +67,8 @@ module Carbon
64
67
  :'embedding_model' => :'EmbeddingGeneratorsNullable',
65
68
  :'generate_sparse_vectors' => :'Boolean',
66
69
  :'prepend_filename_to_chunks' => :'Boolean',
67
- :'sync_files_on_connection' => :'Boolean'
70
+ :'sync_files_on_connection' => :'Boolean',
71
+ :'request_id' => :'String'
68
72
  }
69
73
  end
70
74
 
@@ -78,7 +82,8 @@ module Carbon
78
82
  :'embedding_model',
79
83
  :'generate_sparse_vectors',
80
84
  :'prepend_filename_to_chunks',
81
- :'sync_files_on_connection'
85
+ :'sync_files_on_connection',
86
+ :'request_id'
82
87
  ])
83
88
  end
84
89
 
@@ -150,6 +155,10 @@ module Carbon
150
155
  else
151
156
  self.sync_files_on_connection = true
152
157
  end
158
+
159
+ if attributes.key?(:'request_id')
160
+ self.request_id = attributes[:'request_id']
161
+ end
153
162
  end
154
163
 
155
164
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -189,7 +198,8 @@ module Carbon
189
198
  embedding_model == o.embedding_model &&
190
199
  generate_sparse_vectors == o.generate_sparse_vectors &&
191
200
  prepend_filename_to_chunks == o.prepend_filename_to_chunks &&
192
- sync_files_on_connection == o.sync_files_on_connection
201
+ sync_files_on_connection == o.sync_files_on_connection &&
202
+ request_id == o.request_id
193
203
  end
194
204
 
195
205
  # @see the `==` method
@@ -201,7 +211,7 @@ module Carbon
201
211
  # Calculates hash code according to all attributes.
202
212
  # @return [Integer] Hash code
203
213
  def 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
214
+ [tags, domain, api_key, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, sync_files_on_connection, request_id].hash
205
215
  end
206
216
 
207
217
  # Builds the object from hash