
    g                     T    d dl Z d dlmZ ddlmZmZ  G d de      Z G d de      Zy)	    N)	Tokenizer   )	AwsClientAwsClientV2c                       e Zd Zd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	d	dd
dZy)BedrockClientNaws_access_keyaws_secret_keyaws_session_token
aws_regiontimeoutr
   r   r   r   r   c          	      <    t        j                  | d|||||       y Nbedrock)servicer
   r   r   r   r   )r   __init__selfr
   r   r   r   r   s         J/var/www/openai/venv/lib/python3.12/site-packages/cohere/bedrock_client.pyr   zBedrockClient.__init__	   s'     	))/!	
    .)modeltop_nrank_fieldsreturn_documentsmax_chunks_per_docrequest_optionsc                    t        d      )Nz{Please use cohere.BedrockClientV2 instead: Rerank API on Bedrock is not supported with cohere.BedrockClient for this model.)NotImplementedError)	r   query	documentsr   r   r   r   r   r   s	            r   rerankzBedrockClient.rerank   s    !  #`  a  	ar   )	__name__
__module____qualname__typingOptionalstrfloatr   r"    r   r   r   r      s     48376:/3.2
 #OOC0
 #OOC0	

  &s3
 ,
 __U+
& 36sRUjm  EH  \` ar   r   c                       e Zd Zd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y)	BedrockClientV2Nr	   r
   r   r   r   r   c          	      <    t        j                  | d|||||       y r   )r   r   r   s         r   r   zBedrockClientV2.__init__    s'     	))/!	
r   )r#   r$   r%   r&   r'   r(   r)   r   r*   r   r   r,   r,      sw     48376:/3.2
 #OOC0
 #OOC0	

  &s3
 ,
 __U+
r   r,   )r&   
tokenizersr   
aws_clientr   r   r   r,   r*   r   r   <module>r0      s(       .aI a.
k 
r   