33"""
44 Vectorize API (Beta)
55
6- API documentation for Vectorize services
6+ API for Vectorize services
77
88 The version of the OpenAPI document: 0.0.1
99 Generated by OpenAPI Generator (https://openapi-generator.tech)
1616from typing import Any , Dict , List , Optional , Tuple , Union
1717from typing_extensions import Annotated
1818
19- from pydantic import StrictBytes , StrictFloat , StrictInt , StrictStr , field_validator
20- from typing import Optional , Tuple , Union
19+ from pydantic import StrictStr
20+ from typing import Optional
2121from vectorize_client .models .extraction_result_response import ExtractionResultResponse
22+ from vectorize_client .models .start_extraction_request import StartExtractionRequest
2223from vectorize_client .models .start_extraction_response import StartExtractionResponse
2324
2425from vectorize_client .api_client import ApiClient , RequestSerialized
@@ -331,11 +332,7 @@ def _get_extraction_result_serialize(
331332 def start_extraction (
332333 self ,
333334 organization : StrictStr ,
334- file : Union [StrictBytes , StrictStr , Tuple [StrictStr , StrictBytes ]],
335- type : Optional [StrictStr ] = None ,
336- chunking_strategy : Optional [StrictStr ] = None ,
337- chunk_size : Optional [Union [StrictFloat , StrictInt ]] = None ,
338- chunk_overlap : Optional [Union [StrictFloat , StrictInt ]] = None ,
335+ start_extraction_request : Optional [StartExtractionRequest ] = None ,
339336 _request_timeout : Union [
340337 None ,
341338 Annotated [StrictFloat , Field (gt = 0 )],
@@ -354,16 +351,8 @@ def start_extraction(
354351
355352 :param organization: (required)
356353 :type organization: str
357- :param file: (required)
358- :type file: bytearray
359- :param type:
360- :type type: str
361- :param chunking_strategy:
362- :type chunking_strategy: str
363- :param chunk_size:
364- :type chunk_size: float
365- :param chunk_overlap:
366- :type chunk_overlap: float
354+ :param start_extraction_request:
355+ :type start_extraction_request: StartExtractionRequest
367356 :param _request_timeout: timeout setting for this request. If one
368357 number provided, it will be total request
369358 timeout. It can also be a pair (tuple) of
@@ -388,11 +377,7 @@ def start_extraction(
388377
389378 _param = self ._start_extraction_serialize (
390379 organization = organization ,
391- file = file ,
392- type = type ,
393- chunking_strategy = chunking_strategy ,
394- chunk_size = chunk_size ,
395- chunk_overlap = chunk_overlap ,
380+ start_extraction_request = start_extraction_request ,
396381 _request_auth = _request_auth ,
397382 _content_type = _content_type ,
398383 _headers = _headers ,
@@ -422,11 +407,7 @@ def start_extraction(
422407 def start_extraction_with_http_info (
423408 self ,
424409 organization : StrictStr ,
425- file : Union [StrictBytes , StrictStr , Tuple [StrictStr , StrictBytes ]],
426- type : Optional [StrictStr ] = None ,
427- chunking_strategy : Optional [StrictStr ] = None ,
428- chunk_size : Optional [Union [StrictFloat , StrictInt ]] = None ,
429- chunk_overlap : Optional [Union [StrictFloat , StrictInt ]] = None ,
410+ start_extraction_request : Optional [StartExtractionRequest ] = None ,
430411 _request_timeout : Union [
431412 None ,
432413 Annotated [StrictFloat , Field (gt = 0 )],
@@ -445,16 +426,8 @@ def start_extraction_with_http_info(
445426
446427 :param organization: (required)
447428 :type organization: str
448- :param file: (required)
449- :type file: bytearray
450- :param type:
451- :type type: str
452- :param chunking_strategy:
453- :type chunking_strategy: str
454- :param chunk_size:
455- :type chunk_size: float
456- :param chunk_overlap:
457- :type chunk_overlap: float
429+ :param start_extraction_request:
430+ :type start_extraction_request: StartExtractionRequest
458431 :param _request_timeout: timeout setting for this request. If one
459432 number provided, it will be total request
460433 timeout. It can also be a pair (tuple) of
@@ -479,11 +452,7 @@ def start_extraction_with_http_info(
479452
480453 _param = self ._start_extraction_serialize (
481454 organization = organization ,
482- file = file ,
483- type = type ,
484- chunking_strategy = chunking_strategy ,
485- chunk_size = chunk_size ,
486- chunk_overlap = chunk_overlap ,
455+ start_extraction_request = start_extraction_request ,
487456 _request_auth = _request_auth ,
488457 _content_type = _content_type ,
489458 _headers = _headers ,
@@ -513,11 +482,7 @@ def start_extraction_with_http_info(
513482 def start_extraction_without_preload_content (
514483 self ,
515484 organization : StrictStr ,
516- file : Union [StrictBytes , StrictStr , Tuple [StrictStr , StrictBytes ]],
517- type : Optional [StrictStr ] = None ,
518- chunking_strategy : Optional [StrictStr ] = None ,
519- chunk_size : Optional [Union [StrictFloat , StrictInt ]] = None ,
520- chunk_overlap : Optional [Union [StrictFloat , StrictInt ]] = None ,
485+ start_extraction_request : Optional [StartExtractionRequest ] = None ,
521486 _request_timeout : Union [
522487 None ,
523488 Annotated [StrictFloat , Field (gt = 0 )],
@@ -536,16 +501,8 @@ def start_extraction_without_preload_content(
536501
537502 :param organization: (required)
538503 :type organization: str
539- :param file: (required)
540- :type file: bytearray
541- :param type:
542- :type type: str
543- :param chunking_strategy:
544- :type chunking_strategy: str
545- :param chunk_size:
546- :type chunk_size: float
547- :param chunk_overlap:
548- :type chunk_overlap: float
504+ :param start_extraction_request:
505+ :type start_extraction_request: StartExtractionRequest
549506 :param _request_timeout: timeout setting for this request. If one
550507 number provided, it will be total request
551508 timeout. It can also be a pair (tuple) of
@@ -570,11 +527,7 @@ def start_extraction_without_preload_content(
570527
571528 _param = self ._start_extraction_serialize (
572529 organization = organization ,
573- file = file ,
574- type = type ,
575- chunking_strategy = chunking_strategy ,
576- chunk_size = chunk_size ,
577- chunk_overlap = chunk_overlap ,
530+ start_extraction_request = start_extraction_request ,
578531 _request_auth = _request_auth ,
579532 _content_type = _content_type ,
580533 _headers = _headers ,
@@ -599,11 +552,7 @@ def start_extraction_without_preload_content(
599552 def _start_extraction_serialize (
600553 self ,
601554 organization ,
602- file ,
603- type ,
604- chunking_strategy ,
605- chunk_size ,
606- chunk_overlap ,
555+ start_extraction_request ,
607556 _request_auth ,
608557 _content_type ,
609558 _headers ,
@@ -630,17 +579,9 @@ def _start_extraction_serialize(
630579 # process the query parameters
631580 # process the header parameters
632581 # process the form parameters
633- if file is not None :
634- _files ['file' ] = file
635- if type is not None :
636- _form_params .append (('type' , type ))
637- if chunking_strategy is not None :
638- _form_params .append (('chunkingStrategy' , chunking_strategy ))
639- if chunk_size is not None :
640- _form_params .append (('chunkSize' , chunk_size ))
641- if chunk_overlap is not None :
642- _form_params .append (('chunkOverlap' , chunk_overlap ))
643582 # process the body parameter
583+ if start_extraction_request is not None :
584+ _body_params = start_extraction_request
644585
645586
646587 # set the HTTP header `Accept`
@@ -658,7 +599,7 @@ def _start_extraction_serialize(
658599 _default_content_type = (
659600 self .api_client .select_header_content_type (
660601 [
661- 'multipart/form-data '
602+ 'application/json '
662603 ]
663604 )
664605 )
0 commit comments