
    >'h                       d dl Z d dlZd dlmZ ddlmZ ddlmZm	Z	 ddl
mZ ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl m!Z! ddl"m#Z# ddl$m%Z% ddl&m'Z' ddl(m)Z) ddl*m+Z+ ddl,m-Z- ddl.m/Z/ ddl0m1Z1 ddl2m3Z3 ddl4m5Z5 ddl6m7Z7 ddl8m9Z9 ddl:m;Z; ddl<m=Z= dd l>m?Z? dd!l@mAZA dd"lBmCZC dd#lDmEZE d$d%lFmGZG d$d&lHmIZI d$d'lJmKZK 	 d dlLZLeLj                  j                  d(      reOd dlPmQZL  e j                  e j                  d)      ZT G d* d+      ZU G d, d-      ZVy# eO$ r d dlLZLY =w xY w).    N)JSONDecodeError   )ApiError)AsyncClientWrapperSyncClientWrapper)jsonable_encoder)remove_none_from_dict)UnprocessableEntityError)ChatData)CloudDocument)CloudDocumentCreate)ConfiguredTransformationItem)DataSinkCreate)EvalExecutionParams)FileCountByStatusResponse)HttpValidationError)InputMessage)LlamaParseParameters)ManagedIngestionStatusResponse)MetadataFilters)#PaginatedListCloudDocumentsResponse)"PaginatedListPipelineFilesResponse)Pipeline)PipelineCreate)PipelineDataSource)PipelineDataSourceCreate)PipelineDeployment)PipelineFile)PipelineFileCreate)PipelineType)PlaygroundSession)PresetRetrievalParams)RetrievalMode)RetrieveResults)TextNode   )%PipelineFileUpdateCustomMetadataValue)PipelineUpdateEmbeddingConfig)PipelineUpdateTransformConfigz1..c                      e Zd ZdefdZddddddej                  e   dej                  e   dej                  e   dej                  e   d	ej                  e
   f
d
Zddddej                  e   dej                  e   ded	e
fdZddddej                  e   dej                  e   ded	e
fdZded	e
fdZeeeeeeeeeeeeddedej                  e   dej                  e   dej                  ej                  e      dej                  e   dej                  e   dej                  e   dej                  e   dej                  e   dej                  e   dej                  e   dej                  e   dej                  e   d	e
fdZded	dfd Zded	efd!Zded	e
fd"Zded	e
fd#Zded	e
fd$Zddd%ded&ej                  e   d'ej                  e   d	ej                  e    fd(Z!dedej                  e"   d	ej                  e    fd)Z#ddddd*ded&ej                  e   d'ej                  e   d+ej                  e$   d,ej                  e$   d	e%fd-Z&ddd%ded&ej                  e   d'ej                  e   d	e'fd.Z(d/eded	efd0Z)ed1d/eded2ej                  ejT                  eej                  e+   f      d	e fd3Z,d/eded	dfd4Z-ded5ej\                  d	ejT                  eef   fd6Z/ded	dfd7Z0ded	ej                  e1   fd8Z2dedej                  e3   d	ej                  e1   fd9Z4ed:d&eded;ej                  e5   d	e1fd<Z6d&eded	dfd=Z7d&eded	e
fd>Z8d&eded	efd?Z9eeeeeeeeeeed@dedAej                  e$   dBej                  e5   dCej                  e$   dDej                  e   dEej                  e$   dFej                  e5   dGej                  e:   dHej                  e$   dIej                  e;   dJej                  e   dKedLej                  e   d	e<fdMZ=ded	ej                  e>   fdNZ?dOeded	e>fdPZ@ded	eAfdQZBeeedRdedSej                  ej                  eC      dTej                  eD   dLej                  e   d	ej                  f
dUZFddddddVdedWej                  e$   d+ej                  e$   d/ej                  e   dXej                  e   dYej                  e   d	ej                  eG   fdZZHdedej                  eI   d	ej                  eG   fd[ZJdedej                  eI   d	ej                  eG   fd\ZKddddddVdedWej                  e$   d+ej                  e$   d/ej                  e   dXej                  e   dYej                  e   d	eLfd]ZMd^eded	eGfd_ZNd^eded	dfd`ZOd^eded	efdaZPd^eded	ej                  eQ   fdbZRy)cPipelinesClientclient_wrapperc                    || _         y N_client_wrapperselfr,   s     m/home/kushmeetdev/Regenta/Chatbot/venv/lib/python3.12/site-packages/llama_cloud/resources/pipelines/client.py__init__zPipelinesClient.__init__8   
    -    N
project_idproject_namepipeline_namepipeline_typer8   r9   r:   r;   returnc                   | j                   j                  j                  dt        j                  j                  | j                   j                          dd      t        ||||d      | j                   j                         d      }d|j                  cxk  rdk  r<n n9t        j                  t        j                  t           |j                               S |j                  d	k(  r1t!        t        j                  t"        |j                                     	 |j                         }t'        |j                  |
      # t$        $ r" t'        |j                  |j(                  
      w xY w)aA  
        Search for pipelines by various parameters.

        Parameters:
            - project_id: typing.Optional[str].

            - project_name: typing.Optional[str].

            - pipeline_name: typing.Optional[str].

            - pipeline_type: typing.Optional[PipelineType].
        ---
        from llama_cloud import PipelineType
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.search_pipelines(
            pipeline_type=PipelineType.PLAYGROUND,
        )
        GET/api/v1/pipelinesr7   <   paramsheaderstimeout   ,    status_codebodyr0   httpx_clientrequesturllibparseurljoinget_base_urlr	   get_headersrJ   pydanticparse_obj_astypingListr   jsonr
   r   r   r   textr2   r8   r9   r:   r;   	_response_response_jsons          r3   search_pipelinesz PipelinesClient.search_pipelines;   s>   < ((55==LL  D$8$8$E$E$G#H!JL^_(",$0%2%2	 ((446 > 
	 )''-#-((X)>	@PQQ  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   E +E.r8   organization_idr_   rN   c          	         | j                   j                  j                  dt        j                  j                  | j                   j                          dd      t        ||d      t        |      | j                   j                         d      }d|j                  cxk  rdk  r+n n(t        j                  t        |j                               S |j                  d	k(  r1t        t        j                  t         |j                                     	 |j                         }t%        |j                  |
      # t"        $ r" t%        |j                  |j&                  
      w xY w)
        Create a new pipeline for a project.

        Parameters:
            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].

            - request: PipelineCreate.
        POSTr?   r@   r^   rA   rC   rX   rD   rE   rF   rG   rH   rI   r0   rM   rN   rO   rP   rQ   rR   r	   r   rS   rJ   rT   rU   r   rX   r
   r   r   r   rY   r2   r8   r_   rN   r[   r\   s         r3   create_pipelinezPipelinesClient.create_pipelineq   s0   " ((55==LL  D$8$8$E$E$G#H!JL^_(
Wf)gh!'*((446 > 
	 )''-#-((9>>3CDD  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	S   D: :+E%c          	         | j                   j                  j                  dt        j                  j                  | j                   j                          dd      t        ||d      t        |      | j                   j                         d      }d|j                  cxk  rdk  r+n n(t        j                  t        |j                               S |j                  d	k(  r1t        t        j                  t         |j                                     	 |j                         }t%        |j                  |
      # t"        $ r" t%        |j                  |j&                  
      w xY w)H  
        Upsert a pipeline for a project.
        Updates if a pipeline with the same name and project_id already exists. Otherwise, creates a new pipeline.

        Parameters:
            - project_id: typing.Optional[str].

            - organization_id: typing.Optional[str].

            - request: PipelineCreate.
        PUTr?   r@   r^   rA   rc   rF   rG   rH   rI   rd   re   s         r3   upsert_pipelinezPipelinesClient.upsert_pipeline   s0   $ ((55==LL  D$8$8$E$E$G#H!JL^_(
Wf)gh!'*((446 > 
	 )''-#-((9>>3CDD  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Srg   pipeline_idc                    | j                   j                  j                  dt        j                  j                  | j                   j                          dd|       | j                   j                         d      }d|j                  cxk  rdk  r+n n(t        j                  t        |j                               S |j                  dk(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |	      # t        $ r" t!        |j                  |j"                  	      w xY w)
p
        Get a pipeline by ID for a given project.

        Parameters:
            - pipeline_id: str.
        r>   r?   api/v1/pipelines/rA   rD   rE   rF   rG   rH   rI   r0   rM   rN   rO   rP   rQ   rR   rS   rJ   rT   rU   r   rX   r
   r   r   r   rY   r2   rl   r[   r\   s       r3   get_pipelinezPipelinesClient.get_pipeline   s#    ((55==LL  D$8$8$E$E$G#H!JN_`k_lLmn((446	 > 
	 )''-#-((9>>3CDD  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   ?D& &+Eembedding_configtransform_configconfigured_transformationsdata_sink_idembedding_model_config_id	data_sinkpreset_retrieval_parameterseval_parametersllama_parse_parametersstatusnamemanaged_pipeline_idru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   c                   i }|t         ur||d<   |t         ur||d<   |t         ur||d<   |t         ur||d<   |t         ur||d<   |t         ur||d<   |t         ur||d<   |	t         ur|	|d<   |
t         ur|
|d	<   |t         ur||d
<   |t         ur||d<   |t         ur||d<   | j                  j                  j                  dt        j
                  j                  | j                  j                          dd|       t        |      | j                  j                         d      }d|j                  cxk  rdk  r+n n(t        j                  t        |j                               S |j                  dk(  r1t        t        j                  t         |j                                     	 |j                         }t%        |j                  |      # t"        $ r" t%        |j                  |j&                        w xY w)  
        Update an existing pipeline for a project.

        Parameters:
            - pipeline_id: str.

            - embedding_config: typing.Optional[PipelineUpdateEmbeddingConfig].

            - transform_config: typing.Optional[PipelineUpdateTransformConfig]. Configuration for the transformation.

            - configured_transformations: typing.Optional[typing.List[ConfiguredTransformationItem]].

            - data_sink_id: typing.Optional[str].

            - embedding_model_config_id: typing.Optional[str].

            - data_sink: typing.Optional[DataSinkCreate].

            - preset_retrieval_parameters: typing.Optional[PresetRetrievalParams].

            - eval_parameters: typing.Optional[EvalExecutionParams].

            - llama_parse_parameters: typing.Optional[LlamaParseParameters].

            - status: typing.Optional[str].

            - name: typing.Optional[str].

            - managed_pipeline_id: typing.Optional[str].
        ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   rj   r?   ro   rA   rX   rD   rE   rF   rG   rH   rI   OMITr0   rM   rN   rO   rP   rQ   rR   r   rS   rJ   rT   rU   r   rX   r
   r   r   r   rY   r2   rl   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   _requestr[   r\   s                    r3   update_existing_pipelinez(PipelinesClient.update_existing_pipeline   s   ^ 244'+;H'(4'+;H'(%T15OH12t#'3H^$$D04MH01D $-H[!&d26QH23$&*9H&'!-1GH-.!'HXt#HVd*.AH*+((55==LL  D$8$8$E$E$G#H!JN_`k_lLmn!(+((446 > 
	 )''-#-((9>>3CDD  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   'G +G9c                 V   | j                   j                  j                  dt        j                  j                  | j                   j                          dd|       | j                   j                         d      }d|j                  cxk  rdk  ry |j                  d	k(  r1t        t        j                  t        |j                                     	 |j                         }t        |j                  |
      # t        $ r" t        |j                  |j                   
      w xY w)a;  
        Delete a pipeline by ID.

        Parameters:
            - pipeline_id: str.
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.delete_pipeline(
            pipeline_id="string",
        )
        DELETEr?   ro   rA   rp   rF   rG   NrH   rI   r0   rM   rN   rO   rP   rQ   rR   rS   rJ   r
   rT   rU   r   rX   r   r   rY   rr   s       r3   delete_pipelinezPipelinesClient.delete_pipeline(  s     ((55==LL  D$8$8$E$E$G#H!JN_`k_lLmn((446	 > 
	 )''-#- .  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   C= =+D(c           	         | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      | j                   j                         d      }d|j                  cxk  rdk  r+n n(t        j                  t        |j                               S |j                  d	k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |
      # t        $ r" t!        |j                  |j"                  
      w xY w)aJ  
        Get the status of a pipeline by ID.

        Parameters:
            - pipeline_id: str.
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.get_pipeline_status(
            pipeline_id="string",
        )
        r>   r?   ro   /statusrA   rp   rF   rG   rH   rI   r0   rM   rN   rO   rP   rQ   rR   rS   rJ   rT   rU   r   rX   r
   r   r   r   rY   rr   s       r3   get_pipeline_statusz#PipelinesClient.get_pipeline_statusH  s'     ((55==LL  D$8$8$E$E$G#H!JN_`k_llsLtu((446	 > 
	 )''-#-(()GIYZZ  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	S    D' '+Ec           	         | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      | j                   j                         d      }d|j                  cxk  rdk  r+n n(t        j                  t        |j                               S |j                  d	k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |
      # t        $ r" t!        |j                  |j"                  
      w xY w)
        Run ingestion for the pipeline by incrementally updating the data-sink with upstream changes from data-sources & files.

        Parameters:
            - pipeline_id: str.
        rb   r?   ro   /syncrA   rp   rF   rG   rH   rI   rq   rr   s       r3   sync_pipelinezPipelinesClient.sync_pipelineh  &    ((55==LL  D$8$8$E$E$G#H!JN_`k_llqLrs((446	 > 
	 )''-#-((9>>3CDD  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Sr   c           	         | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      | j                   j                         d      }d|j                  cxk  rdk  r+n n(t        j                  t        |j                               S |j                  d	k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |
      # t        $ r" t!        |j                  |j"                  
      w xY w)=
        Parameters:
            - pipeline_id: str.
        rb   r?   ro   /sync/cancelrA   rp   rF   rG   rH   rI   rq   rr   s       r3   cancel_pipeline_syncz$PipelinesClient.cancel_pipeline_sync  s)   
 ((55==LL  ''4467q9=N{m[g;h ((446 > 
	 )''-#-((9>>3CDD  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Sr   c           	         | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      | j                   j                         d      }d|j                  cxk  rdk  r+n n(t        j                  t        |j                               S |j                  d	k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |
      # t        $ r" t!        |j                  |j"                  
      w xY w)]
        Copy a pipeline by ID.

        Parameters:
            - pipeline_id: str.
        rb   r?   ro   /copyrA   rp   rF   rG   rH   rI   rq   rr   s       r3   copy_pipelinezPipelinesClient.copy_pipeline  r   r   data_source_idonly_manually_uploadedr   r   c          	         | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        ||d      | j                   j                         d      }d|j                  cxk  rd	k  r<n n9t        j                  t        j                  t           |j                               S |j                  d
k(  r1t!        t        j                  t"        |j                                     	 |j                         }t'        |j                  |      # t$        $ r" t'        |j                  |j(                        w xY w)a  
        Get files for a pipeline.

        Parameters:
            - pipeline_id: str.

            - data_source_id: typing.Optional[str].

            - only_manually_uploaded: typing.Optional[bool].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.list_pipeline_files(
            pipeline_id="string",
        )
        r>   r?   ro   /filesr   rA   rB   rF   rG   rH   rI   r0   rM   rN   rO   rP   rQ   rR   r	   rS   rJ   rT   rU   rV   rW   r   rX   r
   r   r   r   rY   r2   rl   r   r   r[   r\   s         r3   list_pipeline_filesz#PipelinesClient.list_pipeline_files  sB   4 ((55==LL  D$8$8$E$E$G#H!JN_`k_llrLst(#1Mcd ((446 > 
	 )''-#-((\)BINNDTUU  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   E +E0c          	         | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        |      | j                   j                         d      }d|j                  cxk  rdk  r<n n9t        j                  t        j                  t           |j                               S |j                  d	k(  r1t!        t        j                  t"        |j                                     	 |j                         }t'        |j                  |
      # t$        $ r" t'        |j                  |j(                  
      w xY w)a  
        Add files to a pipeline.

        Parameters:
            - pipeline_id: str.

            - request: typing.List[PipelineFileCreate].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.add_files_to_pipeline_api(
            pipeline_id="string",
            request=[],
        )
        rj   r?   ro   r   rA   r   rF   rG   rH   rI   r0   rM   rN   rO   rP   rQ   rR   r   rS   rJ   rT   rU   rV   rW   r   rX   r
   r   r   r   rY   r2   rl   rN   r[   r\   s        r3   add_files_to_pipeline_apiz)PipelinesClient.add_files_to_pipeline_api  s7   * ((55==LL  D$8$8$E$E$G#H!JN_`k_llrLst!'*((446 > 
	 )''-#-((\)BINNDTUU  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	S   E +E-r   r   limitoffsetr   r   c                   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        ||||d      | j                   j                         d      }d|j                  cxk  rd	k  r+n n(t        j                  t        |j                               S |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t#        |j                  |      # t         $ r" t#        |j                  |j$                        w xY w)a  
        Get files for a pipeline.

        Parameters:
            - pipeline_id: str.

            - data_source_id: typing.Optional[str].

            - only_manually_uploaded: typing.Optional[bool].

            - limit: typing.Optional[int].

            - offset: typing.Optional[int].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.list_pipeline_files_2(
            pipeline_id="string",
        )
        r>   r?   ro   /files2r   rA   rB   rF   rG   rH   rI   r0   rM   rN   rO   rP   rQ   rR   r	   rS   rJ   rT   rU   r   rX   r
   r   r   r   rY   r2   rl   r   r   r   r   r[   r\   s           r3   list_pipeline_files_2z%PipelinesClient.list_pipeline_files_2   sC   @ ((55==LL  D$8$8$E$E$G#H!JN_`k_llsLtu(&4.D"$	 ((446 > 
	 )''-#-(()KY^^M]^^  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   D6 6+E!c          	         | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        ||d      | j                   j                         d      }d|j                  cxk  rd	k  r+n n(t        j                  t        |j                               S |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t#        |j                  |      # t         $ r" t#        |j                  |j$                        w xY w)a  
        Get files for a pipeline.

        Parameters:
            - pipeline_id: str.

            - data_source_id: typing.Optional[str].

            - only_manually_uploaded: typing.Optional[bool].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.get_pipeline_file_status_counts(
            pipeline_id="string",
        )
        r>   r?   ro   /files/status-countsr   rA   rB   rF   rG   rH   rI   r0   rM   rN   rO   rP   rQ   rR   r	   rS   rJ   rT   rU   r   rX   r
   r   r   r   rY   r   s         r3   get_pipeline_file_status_countsz/PipelinesClient.get_pipeline_file_status_counts8  s=   4 ((55==LL  ''4467q9=N{m[o;p )#1Mcd ((446 > 

	 )''-#-(()BINNDTUU  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   D4 4+Efile_idc                    | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d| d      | j                   j                         d      }d|j                  cxk  rd	k  r+n n(t        j                  t        |j                               S |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |      # t        $ r" t!        |j                  |j"                        w xY w)a  
        Get status of a file for a pipeline.

        Parameters:
            - file_id: str.

            - pipeline_id: str.
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.get_pipeline_file_status(
            file_id="string",
            pipeline_id="string",
        )
        r>   r?   ro   /files/r   rA   rp   rF   rG   rH   rI   r   r2   r   rl   r[   r\   s        r3   get_pipeline_file_statusz(PipelinesClient.get_pipeline_file_statusg  s3   & ((55==LL  ''4467q9=N{m[bcjbkkr;s ((446 > 
	 )''-#-(()GIYZZ  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	S   D* *+Ecustom_metadatar   c          
         i }|t         ur||d<   | j                  j                  j                  dt        j
                  j                  | j                  j                          dd| d|       t        |      | j                  j                         d      }d|j                  cxk  rd	k  r+n n(t        j                  t        |j                               S |j                  d
k(  r1t        t        j                  t         |j                                     	 |j                         }t%        |j                  |      # t"        $ r" t%        |j                  |j&                        w xY w)a  
        Update a file for a pipeline.

        Parameters:
            - file_id: str.

            - pipeline_id: str.

            - custom_metadata: typing.Optional[typing.Dict[str, typing.Optional[PipelineFileUpdateCustomMetadataValue]]].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.update_pipeline_file(
            file_id="string",
            pipeline_id="string",
        )
        r   rj   r?   ro   r   rA   r   rF   rG   rH   rI   r   r0   rM   rN   rO   rP   rQ   rR   r   rS   rJ   rT   rU   r   rX   r
   r   r   r   rY   r2   r   rl   r   r   r[   r\   s          r3   update_pipeline_filez$PipelinesClient.update_pipeline_file  sO   : 24$&*9H&'((55==LL  ''4467q9=N{m[bcjbk;l "(+((446 > 
	 )''-#-((y~~7GHH  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Sr   c           
      \   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d|       | j                   j                         d      }d|j                  cxk  rdk  ry	 |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t        |j                  |      # t        $ r" t        |j                  |j                         w xY w)a  
        Delete a file from a pipeline.

        Parameters:
            - file_id: str.

            - pipeline_id: str.
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.delete_pipeline_file(
            file_id="string",
            pipeline_id="string",
        )
        r   r?   ro   r   rA   rp   rF   rG   NrH   rI   r   r   s        r3   delete_pipeline_filez$PipelinesClient.delete_pipeline_file  s   & ((55==LL  ''4467q9=N{m[bcjbk;l ((446 > 
	 )''-#- .  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	S   D   +D+upload_filec          	         | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        i       d|i| j                   j                         d      }d|j                  cxk  rd	k  rBn n?t        j                  t        j                  t        t        f   |j                               S |j                  d
k(  r1t!        t        j                  t"        |j                                     	 |j                         }t'        |j                  |      # t$        $ r" t'        |j                  |j(                        w xY w)
        Import metadata for a pipeline.

        Parameters:
            - pipeline_id: str.

            - upload_file: typing.IO.
        rj   r?   ro   	/metadatar   rA   datafilesrD   rE   rF   rG   rH   rI   r0   rM   rN   rO   rP   rQ   rR   r   rS   rJ   rT   rU   rV   DictstrrX   r
   r   r   r   rY   r2   rl   r   r[   r\   s        r3   import_pipeline_metadataz(PipelinesClient.import_pipeline_metadata  sC    ((55==LL  D$8$8$E$E$G#H!JN_`k_lluLvw!"% +.((446 > 
	 )''-#-((S#X)>	@PQQ  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   $E +E6c           	      X   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      | j                   j                         d      }d|j                  cxk  rdk  ry	 |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t        |j                  |      # t        $ r" t        |j                  |j                         w xY w)a^  
        Delete metadata for all files in a pipeline.

        Parameters:
            - pipeline_id: str.
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.delete_pipeline_files_metadata(
            pipeline_id="string",
        )
        r   r?   ro   r   rA   rp   rF   rG   NrH   rI   r   rr   s       r3   delete_pipeline_files_metadataz.PipelinesClient.delete_pipeline_files_metadata  s     ((55==LL  D$8$8$E$E$G#H!JN_`k_lluLvw((446	 > 
	 )''-#- .  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   C> >+D)c           	         | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      | j                   j                         d      }d|j                  cxk  rdk  r<n n9t        j                  t        j                  t           |j                               S |j                  d	k(  r1t        t        j                  t         |j                                     	 |j                         }t%        |j                  |
      # t"        $ r" t%        |j                  |j&                  
      w xY w)aN  
        Get data sources for a pipeline.

        Parameters:
            - pipeline_id: str.
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.list_pipeline_data_sources(
            pipeline_id="string",
        )
        r>   r?   ro   /data-sourcesrA   rp   rF   rG   rH   rI   r0   rM   rN   rO   rP   rQ   rR   rS   rJ   rT   rU   rV   rW   r   rX   r
   r   r   r   rY   rr   s       r3   list_pipeline_data_sourcesz*PipelinesClient.list_pipeline_data_sources  s3     ((55==LL  ''4467q9=N{m[h;i ((446 > 
	 )''-#-((5G)H)..JZ[[  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	S   D8 8+E#c          	         | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        |      | j                   j                         d      }d|j                  cxk  rdk  r<n n9t        j                  t        j                  t           |j                               S |j                  d	k(  r1t!        t        j                  t"        |j                                     	 |j                         }t'        |j                  |
      # t$        $ r" t'        |j                  |j(                  
      w xY w)a  
        Add data sources to a pipeline.

        Parameters:
            - pipeline_id: str.

            - request: typing.List[PipelineDataSourceCreate].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.add_data_sources_to_pipeline(
            pipeline_id="string",
            request=[],
        )
        rj   r?   ro   r   rA   r   rF   rG   rH   rI   r0   rM   rN   rO   rP   rQ   rR   r   rS   rJ   rT   rU   rV   rW   r   rX   r
   r   r   r   rY   r   s        r3   add_data_sources_to_pipelinez,PipelinesClient.add_data_sources_to_pipelineA  s;   * ((55==LL  ''4467q9=N{m[h;i "'*((446 > 
	 )''-#-((5G)H)..JZ[[  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Sr   sync_intervalr   c          
         i }|t         ur||d<   | j                  j                  j                  dt        j
                  j                  | j                  j                          dd| d|       t        |      | j                  j                         d      }d|j                  cxk  rd	k  r+n n(t        j                  t        |j                               S |j                  d
k(  r1t        t        j                  t         |j                                     	 |j                         }t%        |j                  |      # t"        $ r" t%        |j                  |j&                        w xY w)a  
        Update the configuration of a data source in a pipeline.

        Parameters:
            - data_source_id: str.

            - pipeline_id: str.

            - sync_interval: typing.Optional[float].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.update_pipeline_data_source(
            data_source_id="string",
            pipeline_id="string",
        )
        r   rj   r?   ro   /data-sources/rA   r   rF   rG   rH   rI   r   r0   rM   rN   rO   rP   rQ   rR   r   rS   rJ   rT   rU   r   rX   r
   r   r   r   rY   r2   r   rl   r   r   r[   r\   s          r3   update_pipeline_data_sourcez+PipelinesClient.update_pipeline_data_sourcei  sM   . 24$(5H_%((55==LL  ''4467q9#K=~>NO "(+((446 > 	
	 )''-#-(();Y^^=MNN  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Sr   c           
      \   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d|       | j                   j                         d      }d|j                  cxk  rdk  ry	 |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t        |j                  |      # t        $ r" t        |j                  |j                         w xY w)a  
        Delete a data source from a pipeline.

        Parameters:
            - data_source_id: str.

            - pipeline_id: str.
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.delete_pipeline_data_source(
            data_source_id="string",
            pipeline_id="string",
        )
        r   r?   ro   r   rA   rp   rF   rG   NrH   rI   r   r2   r   rl   r[   r\   s        r3   delete_pipeline_data_sourcez+PipelinesClient.delete_pipeline_data_source  s   & ((55==LL  ''4467q9#K=~>NO ((446 > 
	 )''-#- .  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Sr   c                    | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d| d      | j                   j                         d      }d|j                  cxk  rd	k  r+n n(t        j                  t        |j                               S |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |      # t        $ r" t!        |j                  |j"                        w xY w)
        Run ingestion for the pipeline data source by incrementally updating the data-sink with upstream changes from data-source.

        Parameters:
            - data_source_id: str.

            - pipeline_id: str.
        rb   r?   ro   r   r   rA   rp   rF   rG   rH   rI   rq   r   s        r3   sync_pipeline_data_sourcez)PipelinesClient.sync_pipeline_data_source  s/    ((55==LL  ''4467q9#K=~>NeT ((446 > 
	 )''-#-((9>>3CDD  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Sr   c                    | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d| d      | j                   j                         d      }d|j                  cxk  rd	k  r+n n(t        j                  t        |j                               S |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |      # t        $ r" t!        |j                  |j"                        w xY w)a  
        Get the status of a data source for a pipeline.

        Parameters:
            - data_source_id: str.

            - pipeline_id: str.
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.get_pipeline_data_source_status(
            data_source_id="string",
            pipeline_id="string",
        )
        r>   r?   ro   r   r   rA   rp   rF   rG   rH   rI   r   r   s        r3   get_pipeline_data_source_statusz/PipelinesClient.get_pipeline_data_source_status  s0   & ((55==LL  ''4467q9#K=~>NgV ((446 > 
	 )''-#-(()GIYZZ  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Sr   dense_similarity_top_kdense_similarity_cutoffsparse_similarity_top_kenable_rerankingrerank_top_nalphasearch_filtersfiles_top_kretrieval_moderetrieve_image_nodes
class_namer   r   r   r   r   r   r   r   r   r   queryr   c          	         d|i}|t         ur||d<   |t         ur||d<   |t         ur||d<   |t         ur||d<   |t         ur||d<   |t         ur||d<   |t         ur||d<   |	t         ur|	|d	<   |
t         ur|
|d
<   |t         ur||d<   |t         ur||d<   | j                  j                  j                  dt        j
                  j                  | j                  j                          dd| d      t        |      | j                  j                         d      }d|j                  cxk  rdk  r+n n(t        j                  t        |j                               S |j                  dk(  r1t        t        j                  t         |j                                     	 |j                         }t%        |j                  |      # t"        $ r" t%        |j                  |j&                        w xY w)ai  
        Get retrieval results for a managed pipeline and a query

        Parameters:
            - pipeline_id: str.

            - dense_similarity_top_k: typing.Optional[int].

            - dense_similarity_cutoff: typing.Optional[float].

            - sparse_similarity_top_k: typing.Optional[int].

            - enable_reranking: typing.Optional[bool].

            - rerank_top_n: typing.Optional[int].

            - alpha: typing.Optional[float].

            - search_filters: typing.Optional[MetadataFilters].

            - files_top_k: typing.Optional[int].

            - retrieval_mode: typing.Optional[RetrievalMode]. The retrieval mode for the query.

            - retrieve_image_nodes: typing.Optional[bool]. Whether to retrieve image nodes.

            - query: str. The query to retrieve against.

            - class_name: typing.Optional[str].
        ---
        from llama_cloud import FilterCondition, MetadataFilters, RetrievalMode
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.run_search(
            pipeline_id="string",
            search_filters=MetadataFilters(
                filters=[],
                condition=FilterCondition.AND,
            ),
            retrieval_mode=RetrievalMode.CHUNKS,
            query="string",
        )
        r   r   r   r   r   r   r   r   r   r   r   r   rb   r?   ro   	/retrieverA   r   rF   rG   rH   rI   r   r0   rM   rN   rO   rP   rQ   rR   r   rS   rJ   rT   rU   r$   rX   r
   r   r   r   rY   r2   rl   r   r   r   r   r   r   r   r   r   r   r   r   r   r[   r\   s                    r3   
run_searchzPipelinesClient.run_search  s   ~ 3:51A!-1GH-."$.2IH./"$.2IH./4'+;H'(t#'3H^$ %HW%)7H%&d"&1H]#%)7H%&t+/CH+,T!%/H\"((55==LL  D$8$8$E$E$G#H!JN_`k_lluLvw!(+((446 > 
	 )''-#-(()..:JKK  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   G +G/c           	         | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      | j                   j                         d      }d|j                  cxk  rdk  r<n n9t        j                  t        j                  t           |j                               S |j                  d	k(  r1t        t        j                  t         |j                                     	 |j                         }t%        |j                  |
      # t"        $ r" t%        |j                  |j&                  
      w xY w)a>  
        Get jobs for a pipeline.

        Parameters:
            - pipeline_id: str.
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.list_pipeline_jobs(
            pipeline_id="string",
        )
        r>   r?   ro   /jobsrA   rp   rF   rG   rH   rI   r0   rM   rN   rO   rP   rQ   rR   rS   rJ   rT   rU   rV   rW   r   rX   r
   r   r   r   rY   rr   s       r3   list_pipeline_jobsz"PipelinesClient.list_pipeline_jobsf  s0     ((55==LL  D$8$8$E$E$G#H!JN_`k_llqLrs((446	 > 
	 )''-#-((5G)H)..JZ[[  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Sr   job_idc           
         | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d|       | j                   j                         d      }d|j                  cxk  rdk  r+n n(t        j                  t        |j                               S |j                  d	k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |
      # t        $ r" t!        |j                  |j"                  
      w xY w)av  
        Get a job for a pipeline.

        Parameters:
            - job_id: str.

            - pipeline_id: str.
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.get_pipeline_job(
            job_id="string",
            pipeline_id="string",
        )
        r>   r?   ro   /jobs/rA   rp   rF   rG   rH   rI   r0   rM   rN   rO   rP   rQ   rR   rS   rJ   rT   rU   r   rX   r
   r   r   r   rY   r2   r  rl   r[   r\   s        r3   get_pipeline_jobz PipelinesClient.get_pipeline_job  s0   & ((55==LL  ''4467q9=N{m[abhai;j ((446 > 
	 )''-#-(();Y^^=MNN  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	S   D) )+Ec           	         | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      | j                   j                         d      }d|j                  cxk  rdk  r+n n(t        j                  t        |j                               S |j                  d	k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |
      # t        $ r" t!        |j                  |j"                  
      w xY w)a[  
        Get a playground session for a user and pipeline.

        Parameters:
            - pipeline_id: str.
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.get_playground_session(
            pipeline_id="string",
        )
        r>   r?   ro   /playground-sessionrA   rp   rF   rG   rH   rI   r0   rM   rN   rO   rP   rQ   rR   rS   rJ   rT   rU   r!   rX   r
   r   r   r   rY   rr   s       r3   get_playground_sessionz&PipelinesClient.get_playground_session  s*     ((55==LL  ''4467q9=N{m[n;o ((446 > 
	 )''-#-(():INN<LMM  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Sr   messagesr   r   r  r   c          	      $   i }|t         ur||d<   |t         ur||d<   |t         ur||d<   | j                  j                  j                  dt        j
                  j                  | j                  j                          dd| d      t        |      | j                  j                         d	      }d
|j                  cxk  rdk  r5n n2t        j                  t        j                  |j                               S |j                  dk(  r1t!        t        j                  t"        |j                                     	 |j                         }t'        |j                  |      # t$        $ r" t'        |j                  |j(                        w xY w)a  
        Make a retrieval query + chat completion for a managed pipeline.

        Parameters:
            - pipeline_id: str.

            - messages: typing.Optional[typing.List[InputMessage]].

            - data: typing.Optional[ChatData].

            - class_name: typing.Optional[str].
        ---
        from llama_cloud import (
            ChatData,
            FilterCondition,
            LlmParameters,
            MetadataFilters,
            PresetRetrievalParams,
            RetrievalMode,
            SupportedLlmModelNames,
        )
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.chat(
            pipeline_id="string",
            data=ChatData(
                retrieval_parameters=PresetRetrievalParams(
                    search_filters=MetadataFilters(
                        filters=[],
                        condition=FilterCondition.AND,
                    ),
                    retrieval_mode=RetrievalMode.CHUNKS,
                ),
                llm_parameters=LlmParameters(
                    model_name=SupportedLlmModelNames.GPT_4_O,
                ),
            ),
        )
        r  r   r   rb   r?   ro   /chatrA   r   rF   rG   rH   rI   r   r0   rM   rN   rO   rP   rQ   rR   r   rS   rJ   rT   rU   rV   AnyrX   r
   r   r   r   rY   r2   rl   r  r   r   r   r[   r\   s           r3   chatzPipelinesClient.chat  sn   d 244#+HZ t#HVT!%/H\"((55==LL  D$8$8$E$E$G#H!JN_`k_llqLrs!(+((446 > 
	 )''-#-((Y^^5EFF  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   =E$ $+Fskipr   r   only_direct_uploadonly_api_data_source_documentsr  r  r  c                   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        |||||d      | j                   j                         d      }d|j                  cxk  rd	k  r<n n9t        j                  t        j                  t           |j                               S |j                  d
k(  r1t!        t        j                  t"        |j                                     	 |j                         }t'        |j                  |      # t$        $ r" t'        |j                  |j(                        w xY w)aZ  
        Return a list of documents for a pipeline.

        Parameters:
            - pipeline_id: str.

            - skip: typing.Optional[int].

            - limit: typing.Optional[int].

            - file_id: typing.Optional[str].

            - only_direct_upload: typing.Optional[bool].

            - only_api_data_source_documents: typing.Optional[bool].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.list_pipeline_documents(
            pipeline_id="string",
        )
        r>   r?   ro   
/documentsr  rA   rB   rF   rG   rH   rI   r0   rM   rN   rO   rP   rQ   rR   r	   rS   rJ   rT   rU   rV   rW   r   rX   r
   r   r   r   rY   	r2   rl   r  r   r   r  r  r[   r\   s	            r3   list_pipeline_documentsz'PipelinesClient.list_pipeline_documents  sQ   F ((55==LL  ''4467q9=N{m[e;f ) "&*<6T ((446 > 
	" )''-#-((])CY^^EUVV  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   !E +E3c          	         | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        |      | j                   j                         d      }d|j                  cxk  rdk  r<n n9t        j                  t        j                  t           |j                               S |j                  d	k(  r1t!        t        j                  t"        |j                                     	 |j                         }t'        |j                  |
      # t$        $ r" t'        |j                  |j(                  
      w xY w)a  
        Batch create documents for a pipeline.

        Parameters:
            - pipeline_id: str.

            - request: typing.List[CloudDocumentCreate].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.create_batch_pipeline_documents(
            pipeline_id="string",
            request=[],
        )
        rb   r?   ro   r  rA   r   rF   rG   rH   rI   r0   rM   rN   rO   rP   rQ   rR   r   rS   rJ   rT   rU   rV   rW   r   rX   r
   r   r   r   rY   r   s        r3   create_batch_pipeline_documentsz/PipelinesClient.create_batch_pipeline_documentsU  s:   * ((55==LL  ''4467q9=N{m[e;f "'*((446 > 
	 )''-#-((])CY^^EUVV  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Sr   c          	         | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        |      | j                   j                         d      }d|j                  cxk  rdk  r<n n9t        j                  t        j                  t           |j                               S |j                  d	k(  r1t!        t        j                  t"        |j                                     	 |j                         }t'        |j                  |
      # t$        $ r" t'        |j                  |j(                  
      w xY w)a  
        Batch create or update a document for a pipeline.

        Parameters:
            - pipeline_id: str.

            - request: typing.List[CloudDocumentCreate].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.upsert_batch_pipeline_documents(
            pipeline_id="string",
            request=[],
        )
        rj   r?   ro   r  rA   r   rF   rG   rH   rI   r  r   s        r3   upsert_batch_pipeline_documentsz/PipelinesClient.upsert_batch_pipeline_documents}  s:   * ((55==LL  ''4467q9=N{m[e;f "'*((446 > 
	 )''-#-((])CY^^EUVV  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Sr   c                   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        |||||d      | j                   j                         d      }d|j                  cxk  rd	k  r+n n(t        j                  t        |j                               S |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t#        |j                  |      # t         $ r" t#        |j                  |j$                        w xY w)ad  
        Return a list of documents for a pipeline.

        Parameters:
            - pipeline_id: str.

            - skip: typing.Optional[int].

            - limit: typing.Optional[int].

            - file_id: typing.Optional[str].

            - only_direct_upload: typing.Optional[bool].

            - only_api_data_source_documents: typing.Optional[bool].
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.paginated_list_pipeline_documents(
            pipeline_id="string",
        )
        r>   r?   ro   /documents/paginatedr  rA   rB   rF   rG   rH   rI   r0   rM   rN   rO   rP   rQ   rR   r	   rS   rJ   rT   rU   r   rX   r
   r   r   r   rY   r  s	            r3   !paginated_list_pipeline_documentsz1PipelinesClient.paginated_list_pipeline_documents  sI   F ((55==LL  ''4467q9=N{m[o;p ) "&*<6T ((446 > 
	" )''-#-(()LinnN^__  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   D7 7+E"document_idc           
         | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d|       | j                   j                         d      }d|j                  cxk  rdk  r+n n(t        j                  t        |j                               S |j                  d	k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |
      # t        $ r" t!        |j                  |j"                  
      w xY w)a  
        Return a single document for a pipeline.

        Parameters:
            - document_id: str.

            - pipeline_id: str.
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.get_pipeline_document(
            document_id="string",
            pipeline_id="string",
        )
        r>   r?   ro   /documents/rA   rp   rF   rG   rH   rI   r0   rM   rN   rO   rP   rQ   rR   rS   rJ   rT   rU   r   rX   r
   r   r   r   rY   r2   r'  rl   r[   r\   s        r3   get_pipeline_documentz%PipelinesClient.get_pipeline_document  s/   & ((55==LL  ''4467q9=N{m[fgrfs;t ((446 > 
	 )''-#-((	8HII  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Sr  c           
      \   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d|       | j                   j                         d      }d|j                  cxk  rdk  ry	 |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t        |j                  |      # t        $ r" t        |j                  |j                         w xY w)a?  
        Delete a document from a pipeline.
        Initiates an async job that will:

        1. Delete vectors from the vector store
        2. Delete the document from MongoDB after vectors are successfully deleted

        Parameters:
            - document_id: str.

            - pipeline_id: str.
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.delete_pipeline_document(
            document_id="string",
            pipeline_id="string",
        )
        r   r?   ro   r)  rA   rp   rF   rG   NrH   rI   r   r+  s        r3   delete_pipeline_documentz(PipelinesClient.delete_pipeline_document  s   . ((55==LL  ''4467q9=N{m[fgrfs;t ((446 > 
	 )''-#- .  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Sr   c                    | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d| d      | j                   j                         d      }d|j                  cxk  rd	k  r+n n(t        j                  t        |j                               S |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |      # t        $ r" t!        |j                  |j"                        w xY w)a  
        Return a single document for a pipeline.

        Parameters:
            - document_id: str.

            - pipeline_id: str.
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.get_pipeline_document_status(
            document_id="string",
            pipeline_id="string",
        )
        r>   r?   ro   r)  r   rA   rp   rF   rG   rH   rI   r   r+  s        r3   get_pipeline_document_statusz,PipelinesClient.get_pipeline_document_status1  s/   & ((55==LL  ''4467q9#K=K=P ((446 > 
	 )''-#-(()GIYZZ  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Sr   c                    | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d| d      | j                   j                         d      }d|j                  cxk  rd	k  r<n n9t        j                  t        j                  t           |j                               S |j                  d
k(  r1t        t        j                  t         |j                                     	 |j                         }t%        |j                  |      # t"        $ r" t%        |j                  |j&                        w xY w)a  
        Return a list of chunks for a pipeline document.

        Parameters:
            - document_id: str.

            - pipeline_id: str.
        ---
        from llama_cloud.client import LlamaCloud

        client = LlamaCloud(
            token="YOUR_TOKEN",
        )
        client.pipelines.list_pipeline_document_chunks(
            document_id="string",
            pipeline_id="string",
        )
        r>   r?   ro   r)  /chunksrA   rp   rF   rG   rH   rI   r0   rM   rN   rO   rP   rQ   rR   rS   rJ   rT   rU   rV   rW   r%   rX   r
   r   r   r   rY   r+  s        r3   list_pipeline_document_chunksz-PipelinesClient.list_pipeline_document_chunksW  s7   & ((55==LL  ''4467q9#K=K=P ((446 > 
	 )''-#-((X)>	@PQQ  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   D; ;+E&)S__name__
__module____qualname__r   r4   rV   Optionalr   r    rW   r   r]   r   rf   rk   rs   r   r(   r)   r   r   r"   r   r   r   r   r   r   r   r   r   boolr   r   r   r   intr   r   r   r   r   r   r'   r   r   IOr   r   r   r   r   r   floatr   r   r   r   r   r#   r$   r   r   r  r  r!   r  r   r   r  r  r   r  r   r   r"  r   r&  r,  r.  r0  r%   r4   r6   r3   r+   r+   7   s?
   .*; . ,0-1.27;4O OOC(4O ooc*	4O
 s+4O |44O 
X	4Or ,004	!O OOC(!O  -	!O
  !O 
!OL ,004	"O OOC("O  -	"O
  "O 
"OHO O O6 LPKOae-1:>59NR@DHL'+%)48WOWO !//*GH	WO
 !//*GHWO %+OOFKK@\4]$^WO ooc*WO $*??3#7WO ??>2WO &,__5J%KWO  )<=WO !'0D EWO $WO ooc"WO $__S1WO  
!WOrO3 O4 O@Os O7U O@O O O.O O O.O O O6 048<+O+O ,	+O
 !' 5+O 
\	"+OZ$O$O,2KK8J,K$O	\	"$OT 048<&*'+6O6O ,	6O
 !' 56O s#6O $6O 
,6Ox 048<-O-O ,	-O
 !' 5-O 
#-O^#O #O# #OJh #OX 1O1O 1O
  KKV__-RSST
1O 
1Of#OC #Oc #Od #OJOC O OW]WbWbcfhkckWl O6O# O$ O@ Oc  OfkkJ\>]  OD&O&O,2KK8P,Q&O	'	(&OR ae,O!,O03,OGMW\G],O	,O\$O# $OC $OTX $OLO O# ORZ O8$Oc $OPS $OXv $OT 8<:>8<26-1(,;?,09=6:+/eOeO !' 4	eO
 "(!7eO "(!5eO !//$/eO ooc*eO u%eO 8eO __S)eO 6eO %ood3eO eO OOC(eO  
!eONOc OfkkBT6U O@#Os #O #OAS #OJ O#  O:K  OL @D*.+/HOHO //&++l";<	HO
 ooh'HO OOC(HO 
HO\ &*&*(,48@D<O<O ooc"	<O
 s#<O %<O #OOD1<O )/(=<O 
]	#<O|&O&O,2KK8K,L&O	]	#&OP&O&O,2KK8K,L&O	]	#&OX &*&*(,48@D<O<O ooc"	<O
 s#<O %<O #OOD1<O )/(=<O 
-<O|#O #O3 #O= #OJ'OC 'Oc 'Od 'OR$O $O# $ORp $OL$O $O3 $OSYS^S^_gSh $Or6   r+   c                      e Zd ZdefdZddddddej                  e   dej                  e   dej                  e   dej                  e   d	ej                  e
   f
d
Zddddej                  e   dej                  e   ded	e
fdZddddej                  e   dej                  e   ded	e
fdZded	e
fdZeeeeeeeeeeeeddedej                  e   dej                  e   dej                  ej                  e      dej                  e   dej                  e   dej                  e   dej                  e   dej                  e   dej                  e   dej                  e   dej                  e   dej                  e   d	e
fdZded	dfd Zded	efd!Zded	e
fd"Zded	e
fd#Zded	e
fd$Zddd%ded&ej                  e   d'ej                  e   d	ej                  e    fd(Z!dedej                  e"   d	ej                  e    fd)Z#ddddd*ded&ej                  e   d'ej                  e   d+ej                  e$   d,ej                  e$   d	e%fd-Z&ddd%ded&ej                  e   d'ej                  e   d	e'fd.Z(d/eded	efd0Z)ed1d/eded2ej                  ejT                  eej                  e+   f      d	e fd3Z,d/eded	dfd4Z-ded5ej\                  d	ejT                  eef   fd6Z/ded	dfd7Z0ded	ej                  e1   fd8Z2dedej                  e3   d	ej                  e1   fd9Z4ed:d&eded;ej                  e5   d	e1fd<Z6d&eded	dfd=Z7d&eded	e
fd>Z8d&eded	efd?Z9eeeeeeeeeeed@dedAej                  e$   dBej                  e5   dCej                  e$   dDej                  e   dEej                  e$   dFej                  e5   dGej                  e:   dHej                  e$   dIej                  e;   dJej                  e   dKedLej                  e   d	e<fdMZ=ded	ej                  e>   fdNZ?dOeded	e>fdPZ@ded	eAfdQZBeeedRdedSej                  ej                  eC      dTej                  eD   dLej                  e   d	ej                  f
dUZFddddddVdedWej                  e$   d+ej                  e$   d/ej                  e   dXej                  e   dYej                  e   d	ej                  eG   fdZZHdedej                  eI   d	ej                  eG   fd[ZJdedej                  eI   d	ej                  eG   fd\ZKddddddVdedWej                  e$   d+ej                  e$   d/ej                  e   dXej                  e   dYej                  e   d	eLfd]ZMd^eded	eGfd_ZNd^eded	dfd`ZOd^eded	efdaZPd^eded	ej                  eQ   fdbZRy)cAsyncPipelinesClientr,   c                    || _         y r.   r/   r1   s     r3   r4   zAsyncPipelinesClient.__init__  r5   r6   Nr7   r8   r9   r:   r;   r<   c                  K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd      t        ||||d      | j                   j                         d       d{   }d|j                  cxk  rd	k  r<n n9t        j                  t        j                  t           |j                               S |j                  d
k(  r1t!        t        j                  t"        |j                                     	 |j                         }t'        |j                  |      7 # t$        $ r" t'        |j                  |j(                        w xY ww)aQ  
        Search for pipelines by various parameters.

        Parameters:
            - project_id: typing.Optional[str].

            - project_name: typing.Optional[str].

            - pipeline_name: typing.Optional[str].

            - pipeline_type: typing.Optional[PipelineType].
        ---
        from llama_cloud import PipelineType
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.search_pipelines(
            pipeline_type=PipelineType.PLAYGROUND,
        )
        r>   r?   r@   r7   rA   rB   NrF   rG   rH   rI   rL   rZ   s          r3   r]   z%AsyncPipelinesClient.search_pipelines  sL    < ..;;CCLL  D$8$8$E$E$G#H!JL^_(",$0%2%2	 ((446 D 
 
	 )''-#-((X)>	@PQQ  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN-
(  	Sy'<'<9>>RR	Ss+   BE=EBE=&E 6E=+E::E=r^   r_   rN   c          	        K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd      t        ||d      t        |      | j                   j                         d       d{   }d|j                  cxk  rd	k  r+n n(t        j                  t        |j                               S |j                  d
k(  r1t        t        j                  t         |j                                     	 |j                         }t%        |j                  |      7 # t"        $ r" t%        |j                  |j&                        w xY ww)ra   rb   r?   r@   r^   rA   rc   NrF   rG   rH   rI   rd   re   s         r3   rf   z$AsyncPipelinesClient.create_pipeline  s>    " ..;;CCLL  D$8$8$E$E$G#H!JL^_(
Wf)gh!'*((446 D 
 
	 )''-#-((9>>3CDD  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN!
  	Sy'<'<9>>RR	S+   BE4EBE4E -E4+E11E4c          	        K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd      t        ||d      t        |      | j                   j                         d       d{   }d|j                  cxk  rd	k  r+n n(t        j                  t        |j                               S |j                  d
k(  r1t        t        j                  t         |j                                     	 |j                         }t%        |j                  |      7 # t"        $ r" t%        |j                  |j&                        w xY ww)ri   rj   r?   r@   r^   rA   rc   NrF   rG   rH   rI   rd   re   s         r3   rk   z$AsyncPipelinesClient.upsert_pipeline  s>    $ ..;;CCLL  D$8$8$E$E$G#H!JL^_(
Wf)gh!'*((446 D 
 
	 )''-#-((9>>3CDD  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN!
  	Sy'<'<9>>RR	SrC  rl   c                   K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd|       | j                   j                         d       d{   }d|j                  cxk  rdk  r+n n(t        j                  t        |j                               S |j                  d	k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |
      7 # t        $ r" t!        |j                  |j"                  
      w xY ww)rn   r>   r?   ro   rA   rp   NrF   rG   rH   rI   rq   rr   s       r3   rs   z!AsyncPipelinesClient.get_pipeline  s1     ..;;CCLL  D$8$8$E$E$G#H!JN_`k_lLmn((446	 D 
 
	 )''-#-((9>>3CDD  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN
  	Sy'<'<9>>RR	Ss+   BE D0BE 	D2 E 2+EE rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   c                  K   i }|t         ur||d<   |t         ur||d<   |t         ur||d<   |t         ur||d<   |t         ur||d<   |t         ur||d<   |t         ur||d<   |	t         ur|	|d<   |
t         ur|
|d	<   |t         ur||d
<   |t         ur||d<   |t         ur||d<   | j                  j                  j                  dt        j
                  j                  | j                  j                          dd|       t        |      | j                  j                         d       d{   }d|j                  cxk  rdk  r+n n(t        j                  t        |j                               S |j                  dk(  r1t        t        j                  t         |j                                     	 |j                         }t%        |j                  |      7 # t"        $ r" t%        |j                  |j&                        w xY ww)r   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   rj   r?   ro   rA   r   NrF   rG   rH   rI   r   r   s                    r3   r   z-AsyncPipelinesClient.update_existing_pipeline  s    ^ 244'+;H'(4'+;H'(%T15OH12t#'3H^$$D04MH01D $-H[!&d26QH23$&*9H&'!-1GH-.!'HXt#HVd*.AH*+..;;CCLL  D$8$8$E$E$G#H!JN_`k_lLmn!(+((446 D 
 
	 )''-#-((9>>3CDD  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN
  	Sy'<'<9>>RR	Ss+   D)H+G,BH1G H+HHc                 r  K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd|       | j                   j                         d       d{   }d|j                  cxk  rdk  ry |j                  d	k(  r1t        t        j                  t        |j                                     	 |j                         }t        |j                  |
      7 # t        $ r" t        |j                  |j                   
      w xY ww)aK  
        Delete a pipeline by ID.

        Parameters:
            - pipeline_id: str.
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.delete_pipeline(
            pipeline_id="string",
        )
        r   r?   ro   rA   rp   NrF   rG   rH   rI   r   rr   s       r3   r   z$AsyncPipelinesClient.delete_pipelineo  s      ..;;CCLL  D$8$8$E$E$G#H!JN_`k_lLmn((446	 D 
 
	 )''-#- .  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN
  	Sy'<'<9>>RR	Ss+   BD7DAD7 D	 0D7	+D44D7c           	        K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      | j                   j                         d       d{   }d|j                  cxk  rd	k  r+n n(t        j                  t        |j                               S |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |      7 # t        $ r" t!        |j                  |j"                        w xY ww)aZ  
        Get the status of a pipeline by ID.

        Parameters:
            - pipeline_id: str.
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.get_pipeline_status(
            pipeline_id="string",
        )
        r>   r?   ro   r   rA   rp   NrF   rG   rH   rI   r   rr   s       r3   r   z(AsyncPipelinesClient.get_pipeline_status  s5      ..;;CCLL  D$8$8$E$E$G#H!JN_`k_llsLtu((446	 D 
 
	 )''-#-(()GIYZZ  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN
  	Sy'<'<9>>RR	S+   BE!D1BE!
D3 E!3+EE!c           	        K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      | j                   j                         d       d{   }d|j                  cxk  rd	k  r+n n(t        j                  t        |j                               S |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |      7 # t        $ r" t!        |j                  |j"                        w xY ww)r   rb   r?   ro   r   rA   rp   NrF   rG   rH   rI   rq   rr   s       r3   r   z"AsyncPipelinesClient.sync_pipeline  4     ..;;CCLL  D$8$8$E$E$G#H!JN_`k_llqLrs((446	 D 
 
	 )''-#-((9>>3CDD  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN
  	Sy'<'<9>>RR	SrI  c           	        K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      | j                   j                         d       d{   }d|j                  cxk  rd	k  r+n n(t        j                  t        |j                               S |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |      7 # t        $ r" t!        |j                  |j"                        w xY ww)r   rb   r?   ro   r   rA   rp   NrF   rG   rH   rI   rq   rr   s       r3   r   z)AsyncPipelinesClient.cancel_pipeline_sync  s7    
 ..;;CCLL  ''4467q9=N{m[g;h ((446 D 
 
	 )''-#-((9>>3CDD  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN!
  	Sy'<'<9>>RR	SrI  c           	        K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      | j                   j                         d       d{   }d|j                  cxk  rd	k  r+n n(t        j                  t        |j                               S |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |      7 # t        $ r" t!        |j                  |j"                        w xY ww)r   rb   r?   ro   r   rA   rp   NrF   rG   rH   rI   rq   rr   s       r3   r   z"AsyncPipelinesClient.copy_pipeline  rK  rI  r   r   r   c          	        K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        ||d      | j                   j                         d       d{   }d	|j                  cxk  rd
k  r<n n9t        j                  t        j                  t           |j                               S |j                  dk(  r1t!        t        j                  t"        |j                                     	 |j                         }t'        |j                  |      7 # t$        $ r" t'        |j                  |j(                        w xY ww)a  
        Get files for a pipeline.

        Parameters:
            - pipeline_id: str.

            - data_source_id: typing.Optional[str].

            - only_manually_uploaded: typing.Optional[bool].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.list_pipeline_files(
            pipeline_id="string",
        )
        r>   r?   ro   r   r   rA   rB   NrF   rG   rH   rI   r   r   s         r3   r   z(AsyncPipelinesClient.list_pipeline_files  sP    4 ..;;CCLL  D$8$8$E$E$G#H!JN_`k_llrLst(#1Mcd ((446 D 
 
	 )''-#-((\)BINNDTUU  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN#
  	Sy'<'<9>>RR	Ss+   BE?EBE?(E 8E?+E<<E?c          	        K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        |      | j                   j                         d       d{   }d|j                  cxk  rd	k  r<n n9t        j                  t        j                  t           |j                               S |j                  d
k(  r1t!        t        j                  t"        |j                                     	 |j                         }t'        |j                  |      7 # t$        $ r" t'        |j                  |j(                        w xY ww)a  
        Add files to a pipeline.

        Parameters:
            - pipeline_id: str.

            - request: typing.List[PipelineFileCreate].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.add_files_to_pipeline_api(
            pipeline_id="string",
            request=[],
        )
        rj   r?   ro   r   rA   r   NrF   rG   rH   rI   r   r   s        r3   r   z.AsyncPipelinesClient.add_files_to_pipeline_api!  sE    * ..;;CCLL  D$8$8$E$E$G#H!JN_`k_llrLst!'*((446 D 
 
	 )''-#-((\)BINNDTUU  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN
  	Sy'<'<9>>RR	S+   BE<EBE<%E 5E<+E99E<r   r   r   c                  K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        ||||d      | j                   j                         d       d{   }d	|j                  cxk  rd
k  r+n n(t        j                  t        |j                               S |j                  dk(  r1t        t        j                  t        |j                                     	 |j                         }t#        |j                  |      7 # t         $ r" t#        |j                  |j$                        w xY ww)a  
        Get files for a pipeline.

        Parameters:
            - pipeline_id: str.

            - data_source_id: typing.Optional[str].

            - only_manually_uploaded: typing.Optional[bool].

            - limit: typing.Optional[int].

            - offset: typing.Optional[int].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.list_pipeline_files_2(
            pipeline_id="string",
        )
        r>   r?   ro   r   r   rA   rB   NrF   rG   rH   rI   r   r   s           r3   r   z*AsyncPipelinesClient.list_pipeline_files_2G  sQ    @ ..;;CCLL  D$8$8$E$E$G#H!JN_`k_llsLtu(&4.D"$	 ((446 D 
 
	 )''-#-(()KY^^M]^^  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN-
(  	Sy'<'<9>>RR	Ss+   BE0E BE0E )E0+E--E0c          	        K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        ||d      | j                   j                         d       d{   }d	|j                  cxk  rd
k  r+n n(t        j                  t        |j                               S |j                  dk(  r1t        t        j                  t        |j                                     	 |j                         }t#        |j                  |      7 # t         $ r" t#        |j                  |j$                        w xY ww)a  
        Get files for a pipeline.

        Parameters:
            - pipeline_id: str.

            - data_source_id: typing.Optional[str].

            - only_manually_uploaded: typing.Optional[bool].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.get_pipeline_file_status_counts(
            pipeline_id="string",
        )
        r>   r?   ro   r   r   rA   rB   NrF   rG   rH   rI   r   r   s         r3   r   z4AsyncPipelinesClient.get_pipeline_file_status_counts  sK    4 ..;;CCLL  ''4467q9=N{m[o;p )#1Mcd ((446 D 

 

	 )''-#-(()BINNDTUU  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN'

"  	Sy'<'<9>>RR	Ss+   BE.D>BE.E  'E. +E++E.r   c                   K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d| d      | j                   j                         d       d{   }d	|j                  cxk  rd
k  r+n n(t        j                  t        |j                               S |j                  dk(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |      7 # t        $ r" t!        |j                  |j"                        w xY ww)a  
        Get status of a file for a pipeline.

        Parameters:
            - file_id: str.

            - pipeline_id: str.
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.get_pipeline_file_status(
            file_id="string",
            pipeline_id="string",
        )
        r>   r?   ro   r   r   rA   rp   NrF   rG   rH   rI   r   r   s        r3   r   z-AsyncPipelinesClient.get_pipeline_file_status  sA    & ..;;CCLL  ''4467q9=N{m[bcjbkkr;s ((446 D 
 
	 )''-#-(()GIYZZ  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN!
  	Sy'<'<9>>RR	S+   BE$D4BE$D6 E$6+E!!E$r   r   c          
        K   i }|t         ur||d<   | j                  j                  j                  dt        j
                  j                  | j                  j                          dd| d|       t        |      | j                  j                         d       d{   }d	|j                  cxk  rd
k  r+n n(t        j                  t        |j                               S |j                  dk(  r1t        t        j                  t         |j                                     	 |j                         }t%        |j                  |      7 # t"        $ r" t%        |j                  |j&                        w xY ww)a  
        Update a file for a pipeline.

        Parameters:
            - file_id: str.

            - pipeline_id: str.

            - custom_metadata: typing.Optional[typing.Dict[str, typing.Optional[PipelineFileUpdateCustomMetadataValue]]].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.update_pipeline_file(
            file_id="string",
            pipeline_id="string",
        )
        r   rj   r?   ro   r   rA   r   NrF   rG   rH   rI   r   r   s          r3   r   z)AsyncPipelinesClient.update_pipeline_file  s]    : 24$&*9H&'..;;CCLL  ''4467q9=N{m[bcjbk;l "(+((446 D 
 
	 )''-#-((y~~7GHH  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN#
  	Sy'<'<9>>RR	S+   BE<E BE<%E 5E<+E99E<c           
      x  K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d|       | j                   j                         d       d{   }d|j                  cxk  rd	k  ry |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t        |j                  |      7 # t        $ r" t        |j                  |j                         w xY ww)a  
        Delete a file from a pipeline.

        Parameters:
            - file_id: str.

            - pipeline_id: str.
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.delete_pipeline_file(
            file_id="string",
            pipeline_id="string",
        )
        r   r?   ro   r   rA   rp   NrF   rG   rH   rI   r   r   s        r3   r   z)AsyncPipelinesClient.delete_pipeline_file	  s+    & ..;;CCLL  ''4467q9=N{m[bcjbk;l ((446 D 
 
	 )''-#- .  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN!
  	Sy'<'<9>>RR	S+   BD:D
AD:#D 3D:+D77D:r   c          	        K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        i       d|i| j                   j                         d       d{   }d	|j                  cxk  rd
k  rBn n?t        j                  t        j                  t        t        f   |j                               S |j                  dk(  r1t!        t        j                  t"        |j                                     	 |j                         }t'        |j                  |      7 # t$        $ r" t'        |j                  |j(                        w xY ww)r   rj   r?   ro   r   r   rA   r   NrF   rG   rH   rI   r   r   s        r3   r   z-AsyncPipelinesClient.import_pipeline_metadata+	  sQ     ..;;CCLL  D$8$8$E$E$G#H!JN_`k_lluLvw!"% +.((446 D 
 
	 )''-#-((S#X)>	@PQQ  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN!
  	Sy'<'<9>>RR	Ss+   BFEBF.E >F+FFc           	      t  K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      | j                   j                         d       d{   }d|j                  cxk  rd	k  ry |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t        |j                  |      7 # t        $ r" t        |j                  |j                         w xY ww)an  
        Delete metadata for all files in a pipeline.

        Parameters:
            - pipeline_id: str.
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.delete_pipeline_files_metadata(
            pipeline_id="string",
        )
        r   r?   ro   r   rA   rp   NrF   rG   rH   rI   r   rr   s       r3   r   z3AsyncPipelinesClient.delete_pipeline_files_metadataF	  s"      ..;;CCLL  D$8$8$E$E$G#H!JN_`k_lluLvw((446	 D 
 
	 )''-#- .  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN
  	Sy'<'<9>>RR	Ss+   BD8DAD8!D
 1D8
+D55D8c           	        K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      | j                   j                         d       d{   }d|j                  cxk  rd	k  r<n n9t        j                  t        j                  t           |j                               S |j                  d
k(  r1t        t        j                  t         |j                                     	 |j                         }t%        |j                  |      7 # t"        $ r" t%        |j                  |j&                        w xY ww)a^  
        Get data sources for a pipeline.

        Parameters:
            - pipeline_id: str.
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.list_pipeline_data_sources(
            pipeline_id="string",
        )
        r>   r?   ro   r   rA   rp   NrF   rG   rH   rI   r   rr   s       r3   r   z/AsyncPipelinesClient.list_pipeline_data_sourcesf	  sA      ..;;CCLL  ''4467q9=N{m[h;i ((446 D 
 
	 )''-#-((5G)H)..JZ[[  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN!
  	Sy'<'<9>>RR	S+   BE2EBE2E +E2+E//E2c          	        K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        |      | j                   j                         d       d{   }d|j                  cxk  rd	k  r<n n9t        j                  t        j                  t           |j                               S |j                  d
k(  r1t!        t        j                  t"        |j                                     	 |j                         }t'        |j                  |      7 # t$        $ r" t'        |j                  |j(                        w xY ww)a  
        Add data sources to a pipeline.

        Parameters:
            - pipeline_id: str.

            - request: typing.List[PipelineDataSourceCreate].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.add_data_sources_to_pipeline(
            pipeline_id="string",
            request=[],
        )
        rj   r?   ro   r   rA   r   NrF   rG   rH   rI   r   r   s        r3   r   z1AsyncPipelinesClient.add_data_sources_to_pipeline	  sI    * ..;;CCLL  ''4467q9=N{m[h;i "'*((446 D 
 
	 )''-#-((5G)H)..JZ[[  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN#
  	Sy'<'<9>>RR	SrP  r   r   c          
        K   i }|t         ur||d<   | j                  j                  j                  dt        j
                  j                  | j                  j                          dd| d|       t        |      | j                  j                         d       d{   }d	|j                  cxk  rd
k  r+n n(t        j                  t        |j                               S |j                  dk(  r1t        t        j                  t         |j                                     	 |j                         }t%        |j                  |      7 # t"        $ r" t%        |j                  |j&                        w xY ww)a  
        Update the configuration of a data source in a pipeline.

        Parameters:
            - data_source_id: str.

            - pipeline_id: str.

            - sync_interval: typing.Optional[float].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.update_pipeline_data_source(
            data_source_id="string",
            pipeline_id="string",
        )
        r   rj   r?   ro   r   rA   r   NrF   rG   rH   rI   r   r   s          r3   r   z0AsyncPipelinesClient.update_pipeline_data_source	  s[    . 24$(5H_%..;;CCLL  ''4467q9#K=~>NO "(+((446 D 	
 	
	 )''-#-(();Y^^=MNN  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN%	
   	Sy'<'<9>>RR	SrV  c           
      x  K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d|       | j                   j                         d       d{   }d|j                  cxk  rd	k  ry |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t        |j                  |      7 # t        $ r" t        |j                  |j                         w xY ww)a  
        Delete a data source from a pipeline.

        Parameters:
            - data_source_id: str.

            - pipeline_id: str.
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.delete_pipeline_data_source(
            data_source_id="string",
            pipeline_id="string",
        )
        r   r?   ro   r   rA   rp   NrF   rG   rH   rI   r   r   s        r3   r   z0AsyncPipelinesClient.delete_pipeline_data_source	  s)    & ..;;CCLL  ''4467q9#K=~>NO ((446 D 
 
	 )''-#- .  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN#
  	Sy'<'<9>>RR	SrX  c                   K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d| d      | j                   j                         d       d{   }d	|j                  cxk  rd
k  r+n n(t        j                  t        |j                               S |j                  dk(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |      7 # t        $ r" t!        |j                  |j"                        w xY ww)r   rb   r?   ro   r   r   rA   rp   NrF   rG   rH   rI   rq   r   s        r3   r   z.AsyncPipelinesClient.sync_pipeline_data_source
  s=     ..;;CCLL  ''4467q9#K=~>NeT ((446 D 
 
	 )''-#-((9>>3CDD  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN#
  	Sy'<'<9>>RR	SrT  c                   K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d| d      | j                   j                         d       d{   }d	|j                  cxk  rd
k  r+n n(t        j                  t        |j                               S |j                  dk(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |      7 # t        $ r" t!        |j                  |j"                        w xY ww)a  
        Get the status of a data source for a pipeline.

        Parameters:
            - data_source_id: str.

            - pipeline_id: str.
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.get_pipeline_data_source_status(
            data_source_id="string",
            pipeline_id="string",
        )
        r>   r?   ro   r   r   rA   rp   NrF   rG   rH   rI   r   r   s        r3   r   z4AsyncPipelinesClient.get_pipeline_data_source_status 
  s>    * ..;;CCLL  ''4467q9#K=~>NgV ((446 D 
 
	 )''-#-(()GIYZZ  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN#
  	Sy'<'<9>>RR	SrT  r   r   r   r   r   r   r   r   r   r   r   r   r   c          	         K   d|i}|t         ur||d<   |t         ur||d<   |t         ur||d<   |t         ur||d<   |t         ur||d<   |t         ur||d<   |t         ur||d<   |	t         ur|	|d	<   |
t         ur|
|d
<   |t         ur||d<   |t         ur||d<   | j                  j                  j                  dt        j
                  j                  | j                  j                          dd| d      t        |      | j                  j                         d       d{   }d|j                  cxk  rdk  r+n n(t        j                  t        |j                               S |j                  dk(  r1t        t        j                  t         |j                                     	 |j                         }t%        |j                  |      7 # t"        $ r" t%        |j                  |j&                        w xY ww)ay  
        Get retrieval results for a managed pipeline and a query

        Parameters:
            - pipeline_id: str.

            - dense_similarity_top_k: typing.Optional[int].

            - dense_similarity_cutoff: typing.Optional[float].

            - sparse_similarity_top_k: typing.Optional[int].

            - enable_reranking: typing.Optional[bool].

            - rerank_top_n: typing.Optional[int].

            - alpha: typing.Optional[float].

            - search_filters: typing.Optional[MetadataFilters].

            - files_top_k: typing.Optional[int].

            - retrieval_mode: typing.Optional[RetrievalMode]. The retrieval mode for the query.

            - retrieve_image_nodes: typing.Optional[bool]. Whether to retrieve image nodes.

            - query: str. The query to retrieve against.

            - class_name: typing.Optional[str].
        ---
        from llama_cloud import FilterCondition, MetadataFilters, RetrievalMode
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.run_search(
            pipeline_id="string",
            search_filters=MetadataFilters(
                filters=[],
                condition=FilterCondition.AND,
            ),
            retrieval_mode=RetrievalMode.CHUNKS,
            query="string",
        )
        r   r   r   r   r   r   r   r   r   r   r   r   rb   r?   ro   r   rA   r   NrF   rG   rH   rI   r   r   s                    r3   r   zAsyncPipelinesClient.run_searchH
  s    ~ 3:51A!-1GH-."$.2IH./"$.2IH./4'+;H'(t#'3H^$ %HW%)7H%&d"&1H]#%)7H%&t+/CH+,T!%/H\"..;;CCLL  D$8$8$E$E$G#H!JN_`k_lluLvw!(+((446 D 
 
	 )''-#-(()..:JKK  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN
  	Sy'<'<9>>RR	Ss+   DG>!G"BG>'G 7G>+G;;G>c           	        K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      | j                   j                         d       d{   }d|j                  cxk  rd	k  r<n n9t        j                  t        j                  t           |j                               S |j                  d
k(  r1t        t        j                  t         |j                                     	 |j                         }t%        |j                  |      7 # t"        $ r" t%        |j                  |j&                        w xY ww)aN  
        Get jobs for a pipeline.

        Parameters:
            - pipeline_id: str.
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.list_pipeline_jobs(
            pipeline_id="string",
        )
        r>   r?   ro   r   rA   rp   NrF   rG   rH   rI   r   rr   s       r3   r  z'AsyncPipelinesClient.list_pipeline_jobs
  s>      ..;;CCLL  D$8$8$E$E$G#H!JN_`k_llqLrs((446	 D 
 
	 )''-#-((5G)H)..JZ[[  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN
  	Sy'<'<9>>RR	Sr\  r  c           
        K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d|       | j                   j                         d       d{   }d|j                  cxk  rd	k  r+n n(t        j                  t        |j                               S |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |      7 # t        $ r" t!        |j                  |j"                        w xY ww)a  
        Get a job for a pipeline.

        Parameters:
            - job_id: str.

            - pipeline_id: str.
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.get_pipeline_job(
            job_id="string",
            pipeline_id="string",
        )
        r>   r?   ro   r  rA   rp   NrF   rG   rH   rI   r  r  s        r3   r  z%AsyncPipelinesClient.get_pipeline_job
  s>    & ..;;CCLL  ''4467q9=N{m[abhai;j ((446 D 
 
	 )''-#-(();Y^^=MNN  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN!
  	Sy'<'<9>>RR	S+   BE#D3BE#D5 E#5+E  E#c           	        K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      | j                   j                         d       d{   }d|j                  cxk  rd	k  r+n n(t        j                  t        |j                               S |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |      7 # t        $ r" t!        |j                  |j"                        w xY ww)ak  
        Get a playground session for a user and pipeline.

        Parameters:
            - pipeline_id: str.
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.get_playground_session(
            pipeline_id="string",
        )
        r>   r?   ro   r
  rA   rp   NrF   rG   rH   rI   r  rr   s       r3   r  z+AsyncPipelinesClient.get_playground_session
  s8      ..;;CCLL  ''4467q9=N{m[n;o ((446 D 
 
	 )''-#-(():INN<LMM  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN!
  	Sy'<'<9>>RR	SrI  r  r  r   c          	      @  K   i }|t         ur||d<   |t         ur||d<   |t         ur||d<   | j                  j                  j                  dt        j
                  j                  | j                  j                          dd| d      t        |      | j                  j                         d	       d
{   }d|j                  cxk  rdk  r5n n2t        j                  t        j                  |j                               S |j                  dk(  r1t!        t        j                  t"        |j                                     	 |j                         }t'        |j                  |      7 # t$        $ r" t'        |j                  |j(                        w xY ww)a  
        Make a retrieval query + chat completion for a managed pipeline.

        Parameters:
            - pipeline_id: str.

            - messages: typing.Optional[typing.List[InputMessage]].

            - data: typing.Optional[ChatData].

            - class_name: typing.Optional[str].
        ---
        from llama_cloud import (
            ChatData,
            FilterCondition,
            LlmParameters,
            MetadataFilters,
            PresetRetrievalParams,
            RetrievalMode,
            SupportedLlmModelNames,
        )
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.chat(
            pipeline_id="string",
            data=ChatData(
                retrieval_parameters=PresetRetrievalParams(
                    search_filters=MetadataFilters(
                        filters=[],
                        condition=FilterCondition.AND,
                    ),
                    retrieval_mode=RetrievalMode.CHUNKS,
                ),
                llm_parameters=LlmParameters(
                    model_name=SupportedLlmModelNames.GPT_4_O,
                ),
            ),
        )
        r  r   r   rb   r?   ro   r  rA   r   NrF   rG   rH   rI   r  r  s           r3   r  zAsyncPipelinesClient.chat  s|    d 244#+HZ t#HVT!%/H\"..;;CCLL  D$8$8$E$E$G#H!JN_`k_llqLrs!(+((446 D 
 
	 )''-#-((Y^^5EFF  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN
  	Sy'<'<9>>RR	Ss+   B5F7E.8BFE0 F0+FFr  r  r  r  c                  K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        |||||d      | j                   j                         d       d{   }d	|j                  cxk  rd
k  r<n n9t        j                  t        j                  t           |j                               S |j                  dk(  r1t!        t        j                  t"        |j                                     	 |j                         }t'        |j                  |      7 # t$        $ r" t'        |j                  |j(                        w xY ww)aj  
        Return a list of documents for a pipeline.

        Parameters:
            - pipeline_id: str.

            - skip: typing.Optional[int].

            - limit: typing.Optional[int].

            - file_id: typing.Optional[str].

            - only_direct_upload: typing.Optional[bool].

            - only_api_data_source_documents: typing.Optional[bool].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.list_pipeline_documents(
            pipeline_id="string",
        )
        r>   r?   ro   r  r  rA   rB   NrF   rG   rH   rI   r  r  s	            r3   r  z,AsyncPipelinesClient.list_pipeline_documents`  s_    F ..;;CCLL  ''4467q9=N{m[e;f ) "&*<6T ((446 D 
 
	" )''-#-((])CY^^EUVV  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN3
.  	Sy'<'<9>>RR	Ss+   BFEBF+E ;F+E??Fc          	        K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        |      | j                   j                         d       d{   }d|j                  cxk  rd	k  r<n n9t        j                  t        j                  t           |j                               S |j                  d
k(  r1t!        t        j                  t"        |j                                     	 |j                         }t'        |j                  |      7 # t$        $ r" t'        |j                  |j(                        w xY ww)a  
        Batch create documents for a pipeline.

        Parameters:
            - pipeline_id: str.

            - request: typing.List[CloudDocumentCreate].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.create_batch_pipeline_documents(
            pipeline_id="string",
            request=[],
        )
        rb   r?   ro   r  rA   r   NrF   rG   rH   rI   r  r   s        r3   r   z4AsyncPipelinesClient.create_batch_pipeline_documents  sH    * ..;;CCLL  ''4467q9=N{m[e;f "'*((446 D 
 
	 )''-#-((])CY^^EUVV  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN#
  	Sy'<'<9>>RR	SrP  c          	        K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        |      | j                   j                         d       d{   }d|j                  cxk  rd	k  r<n n9t        j                  t        j                  t           |j                               S |j                  d
k(  r1t!        t        j                  t"        |j                                     	 |j                         }t'        |j                  |      7 # t$        $ r" t'        |j                  |j(                        w xY ww)a  
        Batch create or update a document for a pipeline.

        Parameters:
            - pipeline_id: str.

            - request: typing.List[CloudDocumentCreate].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.upsert_batch_pipeline_documents(
            pipeline_id="string",
            request=[],
        )
        rj   r?   ro   r  rA   r   NrF   rG   rH   rI   r  r   s        r3   r"  z4AsyncPipelinesClient.upsert_batch_pipeline_documents  sH    * ..;;CCLL  ''4467q9=N{m[e;f "'*((446 D 
 
	 )''-#-((])CY^^EUVV  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN#
  	Sy'<'<9>>RR	SrP  c                  K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d      t        |||||d      | j                   j                         d       d{   }d	|j                  cxk  rd
k  r+n n(t        j                  t        |j                               S |j                  dk(  r1t        t        j                  t        |j                                     	 |j                         }t#        |j                  |      7 # t         $ r" t#        |j                  |j$                        w xY ww)at  
        Return a list of documents for a pipeline.

        Parameters:
            - pipeline_id: str.

            - skip: typing.Optional[int].

            - limit: typing.Optional[int].

            - file_id: typing.Optional[str].

            - only_direct_upload: typing.Optional[bool].

            - only_api_data_source_documents: typing.Optional[bool].
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.paginated_list_pipeline_documents(
            pipeline_id="string",
        )
        r>   r?   ro   r$  r  rA   rB   NrF   rG   rH   rI   r%  r  s	            r3   r&  z6AsyncPipelinesClient.paginated_list_pipeline_documents  sW    F ..;;CCLL  ''4467q9=N{m[o;p ) "&*<6T ((446 D 
 
	" )''-#-(()LinnN^__  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN3
.  	Sy'<'<9>>RR	Ss+   BE1EBE1E *E1+E..E1r'  c           
        K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d|       | j                   j                         d       d{   }d|j                  cxk  rd	k  r+n n(t        j                  t        |j                               S |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |      7 # t        $ r" t!        |j                  |j"                        w xY ww)a  
        Return a single document for a pipeline.

        Parameters:
            - document_id: str.

            - pipeline_id: str.
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.get_pipeline_document(
            document_id="string",
            pipeline_id="string",
        )
        r>   r?   ro   r)  rA   rp   NrF   rG   rH   rI   r*  r+  s        r3   r,  z*AsyncPipelinesClient.get_pipeline_document,  s=    & ..;;CCLL  ''4467q9=N{m[fgrfs;t ((446 D 
 
	 )''-#-((	8HII  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN!
  	Sy'<'<9>>RR	Sre  c           
      x  K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d|       | j                   j                         d       d{   }d|j                  cxk  rd	k  ry |j                  d
k(  r1t        t        j                  t        |j                                     	 |j                         }t        |j                  |      7 # t        $ r" t        |j                  |j                         w xY ww)aO  
        Delete a document from a pipeline.
        Initiates an async job that will:

        1. Delete vectors from the vector store
        2. Delete the document from MongoDB after vectors are successfully deleted

        Parameters:
            - document_id: str.

            - pipeline_id: str.
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.delete_pipeline_document(
            document_id="string",
            pipeline_id="string",
        )
        r   r?   ro   r)  rA   rp   NrF   rG   rH   rI   r   r+  s        r3   r.  z-AsyncPipelinesClient.delete_pipeline_documentQ  s+    . ..;;CCLL  ''4467q9=N{m[fgrfs;t ((446 D 
 
	 )''-#- .  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN!
  	Sy'<'<9>>RR	SrX  c                   K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d| d      | j                   j                         d       d{   }d	|j                  cxk  rd
k  r+n n(t        j                  t        |j                               S |j                  dk(  r1t        t        j                  t        |j                                     	 |j                         }t!        |j                  |      7 # t        $ r" t!        |j                  |j"                        w xY ww)a  
        Return a single document for a pipeline.

        Parameters:
            - document_id: str.

            - pipeline_id: str.
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.get_pipeline_document_status(
            document_id="string",
            pipeline_id="string",
        )
        r>   r?   ro   r)  r   rA   rp   NrF   rG   rH   rI   r   r+  s        r3   r0  z1AsyncPipelinesClient.get_pipeline_document_statusz  s=    & ..;;CCLL  ''4467q9#K=K=P ((446 D 
 
	 )''-#-(()GIYZZ  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN#
  	Sy'<'<9>>RR	SrT  c                   K   | j                   j                  j                  dt        j                  j                  | j                   j                          dd| d| d      | j                   j                         d       d{   }d	|j                  cxk  rd
k  r<n n9t        j                  t        j                  t           |j                               S |j                  dk(  r1t        t        j                  t         |j                                     	 |j                         }t%        |j                  |      7 # t"        $ r" t%        |j                  |j&                        w xY ww)a  
        Return a list of chunks for a pipeline document.

        Parameters:
            - document_id: str.

            - pipeline_id: str.
        ---
        from llama_cloud.client import AsyncLlamaCloud

        client = AsyncLlamaCloud(
            token="YOUR_TOKEN",
        )
        await client.pipelines.list_pipeline_document_chunks(
            document_id="string",
            pipeline_id="string",
        )
        r>   r?   ro   r)  r2  rA   rp   NrF   rG   rH   rI   r3  r+  s        r3   r4  z2AsyncPipelinesClient.list_pipeline_document_chunks  sE    & ..;;CCLL  ''4467q9#K=K=P ((446 D 
 
	 )''-#-((X)>	@PQQ  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN#
  	Sy'<'<9>>RR	Ss+   BE5EBE5E .E5+E22E5)Sr5  r6  r7  r   r4   rV   r8  r   r    rW   r   r]   r   rf   rk   rs   r   r(   r)   r   r   r"   r   r   r   r   r   r   r   r   r   r9  r   r   r   r   r:  r   r   r   r   r   r   r'   r   r   r;  r   r   r   r   r   r   r<  r   r   r   r   r   r#   r$   r   r   r  r  r!   r  r   r   r  r  r   r  r   r   r"  r   r&  r,  r.  r0  r%   r4  r=  r6   r3   r?  r?  ~  sF
   .*< . ,0-1.27;4O OOC(4O ooc*	4O
 s+4O |44O 
X	4Or ,004	!O OOC(!O  -	!O
  !O 
!OL ,004	"O OOC("O  -	"O
  "O 
"OHOc Oh O6 LPKOae-1:>59NR@DHL'+%)48WOWO !//*GH	WO
 !//*GHWO %+OOFKK@\4]$^WO ooc*WO $*??3#7WO ??>2WO &,__5J%KWO  )<=WO !'0D EWO $WO ooc"WO $__S1WO  
!WOrO O O@OS O=[ O@Os Ox O.Oc Oh O.Os Ox O6 048<+O+O ,	+O
 !' 5+O 
\	"+OZ$O$O,2KK8J,K$O	\	"$OT 048<&*'+6O6O ,	6O
 !' 56O s#6O $6O 
,6Ox 048<-O-O ,	-O
 !' 5-O 
#-O^#Oc #O #OPn #OX 1O1O 1O
  KKV__-RSST
1O 
1Of#O# #OC #OD #OJO# Ovyy O]c]h]hilnqiq]r O6O O O@ OC  OFKKPbDc  OD&O&O,2KK8P,Q&O	'	(&OR ae,O!,O03,OGMW\G],O	,O\$O $ORU $OZ^ $OLOc OPS OX` O8&O!&O03&O	'&OX 8<:>8<26-1(,;?,09=6:+/eOeO !' 4	eO
 "(!7eO "(!5eO !//$/eO ooc*eO u%eO 8eO __S)eO 6eO %ood3eO eO OOC(eO  
!eONOC OFKKHZ<[ O@#OS #Os #OGY #OJ O  O@Q  OL @D*.+/HOHO //&++l";<	HO
 ooh'HO OOC(HO 
HO\ &*&*(,48@D<O<O ooc"	<O
 s#<O %<O #OOD1<O )/(=<O 
]	#<O|&O&O,2KK8K,L&O	]	#&OP&O&O,2KK8K,L&O	]	#&OX &*&*(,48@D<O<O ooc"	<O
 s#<O %<O #OOD1<O )/(=<O 
-<O|#Os #O #OQ^ #OJ'O# 'OC 'OTX 'OR$Oc $OPS $OXv $OL$Os $OQT $OY_YdYdemYn $Or6   r?  )WrV   urllib.parserO   json.decoderr   core.api_errorr   core.client_wrapperr   r   core.jsonable_encoderr   core.remove_none_from_dictr	   !errors.unprocessable_entity_errorr
   types.chat_datar   types.cloud_documentr   types.cloud_document_creater   $types.configured_transformation_itemr   types.data_sink_creater   types.eval_execution_paramsr   #types.file_count_by_status_responser   types.http_validation_errorr   types.input_messager   types.llama_parse_parametersr   'types.managed_ingestion_status_responser   types.metadata_filtersr   -types.paginated_list_cloud_documents_responser   ,types.paginated_list_pipeline_files_responser   types.pipeliner   types.pipeline_creater   types.pipeline_data_sourcer   !types.pipeline_data_source_creater   types.pipeline_deploymentr   types.pipeline_filer   types.pipeline_file_creater   types.pipeline_typer    types.playground_sessionr!   types.preset_retrieval_paramsr"   types.retrieval_moder#   types.retrieve_resultsr$   types.text_noder%   0types.pipeline_file_update_custom_metadata_valuer'   &types.pipeline_update_embedding_configr(   &types.pipeline_update_transform_configr)   rT   __version__
startswithImportErrorpydantic.v1v1castr  r   r+   r?  r=  r6   r3   <module>r     s      ( & H 5 ? I ' 1 > P 4 > L > / @ U 5 ` ^ & 3 < I ; / < / 9 B 1 5 ' c Q Q&&t,"
 v{{6::s#DO DON2FO FO]2  s   $'D= =	E	E	