
    iiE                     l   S SK r S SKrS SKJr  SSKJr  SSKJrJ	r	  SSK
Jr  SSKJr  SSKJr  SS	KJr  SS
KJr  SSKJr  SSKJr   S SKr\R2                  R5                  S5      (       a  \eS SKJr  \ R<                  " \ R>                  S5      r  " S S5      r! " S S5      r"g! \ a    S SKr N>f = f)    N)JSONDecodeError   )ApiError)AsyncClientWrapperSyncClientWrapper)jsonable_encoder)remove_none_from_dict)UnprocessableEntityError)EmbeddingModelConfig)EmbeddingModelConfigUpdate)HttpValidationError   ))EmbeddingModelConfigCreateEmbeddingConfigz1..c                      \ rS rSrS\4S jrSSS.S\R                  \   S\R                  \   S\R                  \
   4S	 jjrSSS.S\R                  \   S\R                  \   S
\S\S\
4
S jjrSSS.S\R                  \   S\R                  \   S\S\
4S jjrSSS.S\S\R                  \   S\R                  \   S\S\
4
S jjrSSS.S\S\R                  \   S\R                  \   SS4S jjrSrg)EmbeddingModelConfigsClient   client_wrapperc                    Xl         g N_client_wrapperselfr   s     n/home/james-whalen/.local/lib/python3.13/site-packages/llama_cloud/resources/embedding_model_configs/client.py__init__$EmbeddingModelConfigsClient.__init__       -    N
project_idorganization_idr    r!   returnc          	         U R                   R                  R                  S[        R                  R                  U R                   R                  5        S3S5      [        XS.5      U R                   R                  5       SS9nSUR                  s=::  a  S:  a=  O  O:[        R                  " [        R                  [           UR                  5       5      $ UR                  S	:X  a2  [!        [        R                  " ["        UR                  5       5      5      e UR                  5       n['        UR                  US
9e! [$         a    ['        UR                  UR(                  S
9ef = f)z
Parameters:
    - project_id: typing.Optional[str].

    - organization_id: typing.Optional[str].
---
from llama_cloud.client import LlamaCloud

client = LlamaCloud(
    token="YOUR_TOKEN",
)
client.embedding_model_configs.list_embedding_model_configs()
GET/api/v1/embedding-model-configsr   <   paramsheaderstimeout   ,    status_codebodyr   httpx_clientrequesturllibparseurljoinget_base_urlr	   get_headersr0   pydanticparse_obj_astypingListr   jsonr
   r   r   r   textr   r    r!   	_response_response_jsons        r   list_embedding_model_configs8EmbeddingModelConfigsClient.list_embedding_model_configs!   s/     ((55==LL  D$8$8$E$E$G#H!JLlm(
)gh((446 > 
	 )''-#-((5I)JINNL\]]  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   D? ?)E(nameembedding_configc          
         U R                   R                  R                  S[        R                  R                  U R                   R                  5        S3S5      [        XS.5      [        X4S.5      U R                   R                  5       SS9nSUR                  s=::  a  S	:  a,  O  O)[        R                  " [        UR                  5       5      $ UR                  S
:X  a2  [        [        R                  " [         UR                  5       5      5      e UR                  5       n[%        UR                  US9e! ["         a    [%        UR                  UR&                  S9ef = f)e  
Create a new embedding model configuration within a specified project.

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

    - organization_id: typing.Optional[str].

    - name: str. The name of the embedding model config.

    - embedding_config: EmbeddingModelConfigCreateEmbeddingConfig. The embedding configuration for the embedding model config.
POSTr%   r&   r   rE   rF   r'   r)   r>   r*   r+   r,   r-   r.   r/   r   r3   r4   r5   r6   r7   r8   r	   r   r9   r0   r:   r;   r   r>   r
   r   r   r   r?   r   r    r!   rE   rF   rA   rB   s          r   create_embedding_model_config9EmbeddingModelConfigsClient.create_embedding_model_configB   s1   ( ((55==LL  D$8$8$E$E$G#H!JLlm(
)gh!4"VW((446 > 
	 )''-#-(()=y~~?OPP  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   D: :)E#r4   c          	         U R                   R                  R                  S[        R                  R                  U R                   R                  5        S3S5      [        XS.5      [        U5      U R                   R                  5       SS9nSUR                  s=::  a  S:  a,  O  O)[        R                  " [        UR                  5       5      $ UR                  S	:X  a2  [        [        R                  " [         UR                  5       5      5      e UR                  5       n[%        UR                  US
9e! ["         a    [%        UR                  UR&                  S
9ef = f);  
Upserts an embedding model config.
Updates if an embedding model config with the same name and project_id already exists. Otherwise, creates a new embedding model config.

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

    - organization_id: typing.Optional[str].

    - request: EmbeddingModelConfigUpdate.
PUTr%   r&   r   r'   rK   r,   r-   r.   r/   rL   r   r    r!   r4   rA   rB   s         r   upsert_embedding_model_config9EmbeddingModelConfigsClient.upsert_embedding_model_configh   s.   $ ((55==LL  D$8$8$E$E$G#H!JLlm(
)gh!'*((446 > 
	 )''-#-(()=y~~?OPP  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   D8 8)E!embedding_model_config_idc          	         U R                   R                  R                  S[        R                  R                  U R                   R                  5        S3SU 35      [        X#S.5      [        U5      U R                   R                  5       SS9nSUR                  s=::  a  S:  a,  O  O)[        R                  " [        UR                  5       5      $ UR                  S	:X  a2  [        [        R                  " [         UR                  5       5      5      e UR                  5       n[%        UR                  US
9e! ["         a    [%        UR                  UR&                  S
9ef = f)
Update an embedding model config by ID.

Parameters:
    - embedding_model_config_id: str.

    - project_id: typing.Optional[str].

    - organization_id: typing.Optional[str].

    - request: EmbeddingModelConfigUpdate.
rR   r%   api/v1/embedding-model-configs/r   r'   rK   r,   r-   r.   r/   rL   r   rV   r    r!   r4   rA   rB   s          r   update_embedding_model_config9EmbeddingModelConfigsClient.update_embedding_model_config   s<   ( ((55==LL  ''4467q9=\]v\w;x )
)gh!'*((446 > 	
	 )''-#-(()=y~~?OPP  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   D; ;)E$c          	      h   U R                   R                  R                  S[        R                  R                  U R                   R                  5        S3SU 35      [        X#S.5      U R                   R                  5       SS9nSUR                  s=::  a  S:  a   g	  UR                  S
:X  a2  [        [        R                  " [        UR                  5       5      5      e UR                  5       n[!        UR                  US9e! [         a    [!        UR                  UR"                  S9ef = f)ay  
Delete an embedding model config by ID.

Parameters:
    - embedding_model_config_id: str.

    - project_id: typing.Optional[str].

    - organization_id: typing.Optional[str].
---
from llama_cloud.client import LlamaCloud

client = LlamaCloud(
    token="YOUR_TOKEN",
)
client.embedding_model_configs.delete_embedding_model_config(
    embedding_model_config_id="string",
)
DELETEr%   rY   r   r'   r(   r,   r-   Nr.   r/   r   r3   r4   r5   r6   r7   r8   r	   r9   r0   r
   r:   r;   r   r>   r   r   r?   r   rV   r    r!   rA   rB   s         r   delete_embedding_model_config9EmbeddingModelConfigsClient.delete_embedding_model_config   s!   4 ((55==LL  ''4467q9=\]v\w;x )
)gh((446 > 
	 )''-#- .  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   $D )D1r   )__name__
__module____qualname____firstlineno__r   r   r<   Optionalstrr=   r   rC   r   rN   r   rT   r[   ra   __static_attributes__ r   r   r   r      s   .*; . 59bfO#__S1OKQ??[^K_O	)	*OH ,004	$O OOC($O  -	$O
 $O D$O 
$OR ,004	"O OOC("O  -	"O
 ,"O 
"OP ,004&O#&&O OOC(	&O
  -&O ,&O 
&OX ,004+O#&+O OOC(	+O
  -+O 
+O +Or   r   c                      \ rS rSrS\4S jrSSS.S\R                  \   S\R                  \   S\R                  \
   4S	 jjrSSS.S\R                  \   S\R                  \   S
\S\S\
4
S jjrSSS.S\R                  \   S\R                  \   S\S\
4S jjrSSS.S\S\R                  \   S\R                  \   S\S\
4
S jjrSSS.S\S\R                  \   S\R                  \   SS4S jjrSrg) AsyncEmbeddingModelConfigsClient   r   c                    Xl         g r   r   r   s     r   r   )AsyncEmbeddingModelConfigsClient.__init__   r   r   Nr   r    r!   r"   c          	        #    U R                   R                  R                  S[        R                  R                  U R                   R                  5        S3S5      [        XS.5      U R                   R                  5       SS9I Sh  vN nSUR                  s=::  a  S	:  a=  O  O:[        R                  " [        R                  [           UR                  5       5      $ UR                  S
:X  a2  [!        [        R                  " ["        UR                  5       5      5      e UR                  5       n['        UR                  US9e N! [$         a    ['        UR                  UR(                  S9ef = f7f)a  
Parameters:
    - project_id: typing.Optional[str].

    - organization_id: typing.Optional[str].
---
from llama_cloud.client import AsyncLlamaCloud

client = AsyncLlamaCloud(
    token="YOUR_TOKEN",
)
await client.embedding_model_configs.list_embedding_model_configs()
r$   r%   r&   r   r'   r(   Nr,   r-   r.   r/   r2   r@   s        r   rC   =AsyncEmbeddingModelConfigsClient.list_embedding_model_configs   s<      ..;;CCLL  D$8$8$E$E$G#H!JLlm(
)gh((446 D 
 
	 )''-#-((5I)JINNL\]]  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN
  	Sy'<'<9>>RR	Ss+   BE7	E	
BE7%E 5E7)E44E7rE   rF   c          
        #    U R                   R                  R                  S[        R                  R                  U R                   R                  5        S3S5      [        XS.5      [        X4S.5      U R                   R                  5       SS9I Sh  vN nS	UR                  s=::  a  S
:  a,  O  O)[        R                  " [        UR                  5       5      $ UR                  S:X  a2  [        [        R                  " [         UR                  5       5      5      e UR                  5       n[%        UR                  US9e N! ["         a    [%        UR                  UR&                  S9ef = f7f)rH   rI   r%   r&   r   rJ   r'   rK   Nr,   r-   r.   r/   rL   rM   s          r   rN   >AsyncEmbeddingModelConfigsClient.create_embedding_model_config  s>    ( ..;;CCLL  D$8$8$E$E$G#H!JLlm(
)gh!4"VW((446 D 
 
	 )''-#-(()=y~~?OPP  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN!
  	Sy'<'<9>>RR	Ss+   BE2EB	E2 E 0E2)E//E2r4   c          	        #    U R                   R                  R                  S[        R                  R                  U R                   R                  5        S3S5      [        XS.5      [        U5      U R                   R                  5       SS9I Sh  vN nSUR                  s=::  a  S	:  a,  O  O)[        R                  " [        UR                  5       5      $ UR                  S
:X  a2  [        [        R                  " [         UR                  5       5      5      e UR                  5       n[%        UR                  US9e N! ["         a    [%        UR                  UR&                  S9ef = f7f)rQ   rR   r%   r&   r   r'   rK   Nr,   r-   r.   r/   rL   rS   s         r   rT   >AsyncEmbeddingModelConfigsClient.upsert_embedding_model_config-  s;    $ ..;;CCLL  D$8$8$E$E$G#H!JLlm(
)gh!'*((446 D 
 
	 )''-#-(()=y~~?OPP  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rV   c          	        #    U R                   R                  R                  S[        R                  R                  U R                   R                  5        S3SU 35      [        X#S.5      [        U5      U R                   R                  5       SS9I Sh  vN nSUR                  s=::  a  S	:  a,  O  O)[        R                  " [        UR                  5       5      $ UR                  S
:X  a2  [        [        R                  " [         UR                  5       5      5      e UR                  5       n[%        UR                  US9e N! ["         a    [%        UR                  UR&                  S9ef = f7f)rX   rR   r%   rY   r   r'   rK   Nr,   r-   r.   r/   rL   rZ   s          r   r[   >AsyncEmbeddingModelConfigsClient.update_embedding_model_configQ  sI    ( ..;;CCLL  ''4467q9=\]v\w;x )
)gh!'*((446 D 	
 	
	 )''-#-(()=y~~?OPP  C'*8+@+@ATV_VdVdVf+ghh	S&^^-N 9#8#8~NN%	
   	Sy'<'<9>>RR	Ss+   BE3EB	E3!E 1E3)E00E3c          	        #    U R                   R                  R                  S[        R                  R                  U R                   R                  5        S3SU 35      [        X#S.5      U R                   R                  5       SS9I Sh  vN nSUR                  s=::  a  S	:  a   g  UR                  S
:X  a2  [        [        R                  " [        UR                  5       5      5      e UR                  5       n[!        UR                  US9e N! [         a    [!        UR                  UR"                  S9ef = f7f)a  
Delete an embedding model config by ID.

Parameters:
    - embedding_model_config_id: str.

    - project_id: typing.Optional[str].

    - organization_id: typing.Optional[str].
---
from llama_cloud.client import AsyncLlamaCloud

client = AsyncLlamaCloud(
    token="YOUR_TOKEN",
)
await client.embedding_model_configs.delete_embedding_model_config(
    embedding_model_config_id="string",
)
r^   r%   rY   r   r'   r(   Nr,   r-   r.   r/   r_   r`   s         r   ra   >AsyncEmbeddingModelConfigsClient.delete_embedding_model_configy  s.    4 ..;;CCLL  ''4467q9=\]v\w;x )
)gh((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
E DA E .D >E )D==E r   )rc   rd   re   rf   r   r   r<   rg   rh   r=   r   rC   r   rN   r   rT   r[   ra   ri   rj   r   r   rl   rl      s   .*< . 59bfO#__S1OKQ??[^K_O	)	*OH ,004	$O OOC($O  -	$O
 $O D$O 
$OR ,004	"O OOC("O  -	"O
 ,"O 
"OP ,004&O#&&O OOC(	&O
  -&O ,&O 
&OX ,004+O#&+O OOC(	+O
  -+O 
+O +Or   rl   )#r<   urllib.parser5   json.decoderr   core.api_errorr   core.client_wrapperr   r   core.jsonable_encoderr   core.remove_none_from_dictr	   !errors.unprocessable_entity_errorr
   types.embedding_model_configr   #types.embedding_model_config_updater   types.http_validation_errorr   4types.embedding_model_config_create_embedding_configr   r:   __version__
startswithImportErrorpydantic.v1v1castAnyOMITr   rl   rj   r   r   <module>r      s      ( & H 5 ? I @ M > k&&t,,"
 {{6::s#BO BOJBO BOY  s   ,B& &
B32B3