
    i                         d dl mZmZ  G d de      Z G d de      Z G d de      Z G d d	ee      Z G d
 de      Z	 G d dee      Z
 G d dee      Zy)   )REQUIRED_VECTOR_FIELDSOPTIONAL_VECTOR_FIELDSc                         e Zd Zd fdZ xZS ) VectorDictionaryMissingKeysErrorc                 |    dt        t        t        |j                               z
         }t        |   |       y )Nz.Vector dictionary is missing required fields: )listr   setkeyssuper__init__selfitemmessage	__class__s      i/var/www/catia.catastroantioquia-mas.com/valormas/lib/python3.12/site-packages/pinecone/db_data/errors.pyr   z)VectorDictionaryMissingKeysError.__init__   s8    B4H^adeienenepaqHqCrBst!    returnN__name__
__module____qualname__r   __classcell__r   s   @r   r   r          " "r   r   c                         e Zd Zd fdZ xZS )VectorDictionaryExcessKeysErrorc                     t        t        |j                               t        t        z  z
        }d| dt        t        t        z         }t
        |   |       y )Nz,Found excess keys in the vector dictionary: z. The allowed keys are: )r   r	   r
   r   r   r   r   )r   r   invalid_keysr   r   s       r   r   z(VectorDictionaryExcessKeysError.__init__   si    C		,0FI_0_`a@Nfgk  mC  F\  m\  h]  g^  _!r   r   r   r   s   @r   r   r   
   s    " "r   r   c                         e Zd Zd fdZ xZS )VectorTupleLengthErrorc                 B    dt        |       d}t        | 	  |       y )NzFound a tuple of length z which is not supported. Vectors can be represented as tuples either the form (id, values, metadata) or (id, values). To pass sparse values please use either dicts or Vector objects as inputs.)lenr   r   r   s      r   r   zVectorTupleLengthError.__init__   s)    ,SYK  8x  y!r   r   r   r   s   @r   r"   r"      r   r   r"   c                         e Zd Zd fdZ xZS )SparseValuesTypeErrorc                 (    d}t         |   |       y )NzFound unexpected data in column `sparse_values`. Expected format is `'sparse_values': {'indices': List[int], 'values': List[float]}`.)r   r   )r   r   r   s     r   r   zSparseValuesTypeError.__init__   s     Z!r   r   r   r   s   @r   r&   r&      r   r   r&   c                         e Zd Zd fdZ xZS )SparseValuesMissingKeysErrorc                 \    dt        |j                                }t        |   |       y )NzMissing required keys in data in column `sparse_values`. Expected format is `'sparse_values': {'indices': List[int], 'values': List[float]}`. Found keys )r   r
   r   r   r   sparse_values_dictr   r   s      r   r   z%SparseValuesMissingKeysError.__init__   sO     p  qu  vH  vM  vM  vO  qP  pQ  R!r   r   r   r   s   @r   r)   r)      r   r   r)   c                         e Zd Zd fdZ xZS )#SparseValuesDictionaryExpectedErrorc                 @    dt        |       }t        | 	  |       y )Nz=Column `sparse_values` is expected to be a dictionary, found typer   r   r+   s      r   r   z,SparseValuesDictionaryExpectedError.__init__$   s$    QRVWiRjQkl!r   r   r   r   s   @r   r.   r.   #   r   r   r.   c                         e Zd Zd fdZ xZS )MetadataDictionaryExpectedErrorc                 F    dt        |d          }t        | 	  |       y )Nz8Column `metadata` is expected to be a dictionary, found metadatar0   r   s      r   r   z(MetadataDictionaryExpectedError.__init__*   s-    FtDQ[L\G]F^_ 	 	!r   r   r   r   s   @r   r3   r3   )   s    " "r   r3   N)utils.constantsr   r   
ValueErrorr   r   r"   	TypeErrorr&   r)   r.   r3    r   r   <module>r:      sb    L"z ""j ""Z ""J	 "": ""*i ""j) "r   