
    dhc                        S r SSKJr  SSKrSSKrSSKrSSKrSSKJrJ	r	J
r
JrJrJrJrJr  SSKJr  SSKJr  SSKJr  SSKJr  \R0                  " \5      r " S	 S
\5      rSr " S S5      rg)z,Module providing Infinispan as a VectorStore    )annotationsN)AnyIterableListOptionalTupleTypeUnioncast)Response)Document)
Embeddings)VectorStorec                     \ rS rSrSr  S     SS jjrSS jrSS jrSS jrSS jr	S S	 jr
S!S"S
 jjrS S jrS S jrS#S jrS S jrS S jr  S         S$S jjr S%       S&S jjr S%       S'S jjr S%       S(S jjr S%     S)S jjr    S*S jrS+S jrS,S jr\    S-                 S.S jj5       rSrg)/InfinispanVS   at  `Infinispan` VectorStore interface.

    This class exposes the method to present Infinispan as a
    VectorStore. It relies on the Infinispan class (below) which takes care
    of the REST interface with the server.

Example:
    ... code-block:: python
        from langchain_community.vectorstores import InfinispanVS
        from mymodels import RGBEmbeddings
        ...
        vectorDb = InfinispanVS.from_documents(docs,
                        embedding=RGBEmbeddings(),
                        output_fields=["texture", "color"],
                        lambda_key=lambda text,meta: str(meta["_key"]),
                        lambda_content=lambda item: item["color"])

    or an empty InfinispanVS instance can be created if preliminary setup
    is required before populating the store

    ... code-block:: python
        from langchain_community.vectorstores import InfinispanVS
        from mymodels import RGBEmbeddings
        ...
        ispnVS = InfinispanVS()
        # configure Infinispan here
        # i.e. create cache and schema

        # then populate the store
        vectorDb = InfinispanVS.from_documents(docs,
                        embedding=RGBEmbeddings(),
                        output_fields: ["texture", "color"],
                        lambda_key: lambda text,meta: str(meta["_key"]),
                        lambda_content: lambda item: item["color"])
Nc                  ^  [        S0 UD6T l        UT l        [        T R                  R	                  SS5      5      T l        [        T R                  R	                  SS5      5      T l        UT l        T R                  R	                  SS5      T l        T R                  S:X  a"  T R                  R	                  SS5      T l        O[        R                  " S[        5        T R                  R	                  S	S5      T l        T R                  S:X  a"  T R                  R	                  S
S5      T l        O[        R                  " S[        5        T R                  R	                  SU 4S j5      T l        T R                  R	                  SU 4S j5      T l        T R                  R	                  S5      T l        UT l        g)a  
Parameters
----------
cache_name: str
    Embeddings cache name. Default "vector"
entity_name: str
    Protobuf entity name for the embeddings. Default "vector"
text_field: str
    Protobuf field name for text. Default "text"
vector_field: str
    Protobuf field name for vector. Default "vector"
lambda_content: lambda
    Lambda returning the content part of an item. Default returns text_field
lambda_metadata: lambda
    Lambda returning the metadata part of an item. Default returns items
    fields excepts text_field, vector_field, _type
output_fields: List[str]
    List of fields to be returned from item, if None return all fields.
    Default None
kwargs: Any
    Rest of arguments passed to Infinispan. See docs
cache_namevectorentity_name	textfield 
text_fieldtextz9`textfield` is deprecated. Please use `text_field` param.vectorfieldvector_fieldz=`vectorfield` is deprecated. Please use `vector_field` param.lambda_contentc                &   > TR                  U 5      $ N)_default_contentitemselfs    e/var/www/html/shao/venv/lib/python3.13/site-packages/langchain_community/vectorstores/infinispanvs.py<lambda>'InfinispanVS.__init__.<locals>.<lambda>i   s    4+@+@+F    lambda_metadatac                &   > TR                  U 5      $ r   )_default_metadatar!   s    r$   r%   r&   l   s    D,B,B4,Hr'   output_fieldsN )
Infinispanispn_configurationstrget_cache_name_entity_name
_embedding
_textfieldwarningswarnDeprecationWarning_vectorfield_to_content_to_metadata_output_fields_ids)r#   	embeddingidskwargss   `   r$   __init__InfinispanVS.__init__8   sq   6 ((	$t2266|XNO 3 3 7 7x PQ#--11+rB??b "1155lFKDOMMK" !//33M2F" $ 3 3 7 7 QDMMO"  ..22F
 !//33H
 #1155oF	r'   c                    [        U5      nUR                  U R                  S 5        UR                  U R                  S 5        UR                  SS 5        U$ N_type)dictpopr9   r5   )r#   r"   metas      r$   r*   InfinispanVS._default_metadataq   sD    Dz""D)$'$r'   c                8    UR                  U R                  5      $ r   )r1   r5   )r#   r"   s     r$   r    InfinispanVS._default_contentx   s    xx((r'   c                   SnUU R                   UU R                  4-  nSnUR                  5        GH	  u  pg[        U[        5      (       a  USU-   S-   [	        U5      -   S-   -  nO[        U[
        5      (       a  USU-   S-   [	        U5      -   S-   -  nO[        U[        5      (       a  USU-   S-   [	        U5      -   S-   -  nOn[        U[        5      (       a  USU-   S-   [	        U5      -   S-   -  nO>[        U[        5      (       a  US	U-   S-   [	        U5      -   S-   -  nO[        S
U-   5      eUS-  nGM     US-  nU$ )NzV
/**
* @Indexed
*/
message %s {
/**
* @Vector(dimension=%d)
*/
repeated float %s = 1;
   zoptional string z = z;
zoptional int64 zoptional double zoptional bytes zoptional bool zEUnable to build proto schema for metadata. Unhandled type for field:    z}
)
r3   r9   items
isinstancer0   intfloatbytesbool	Exception)r#   templ	dimensionmetadata_proto_tplmetadata_protoidxfvs           r$   schema_builderInfinispanVS.schema_builder{   sp   	 ,/
 

 KKMDA!S!!"4q"85"@3s8"Ke"SSAs##"3a"7%"?#c("JU"RRAu%%"4q"85"@3s8"Ke"SSAu%%"3a"7%"?#c("JU"RRAt$$"2Q"6">S"IE"QQ1345  1HC! "" 	%r'   c                T    U R                   R                  U R                  S-   U5      $ )zDeploy the schema for the vector db
Args:
    proto(str): protobuf schema
Returns:
    An http Response containing the result of the operation
.proto)r.   schema_postr3   )r#   protos     r$   schema_createInfinispanVS.schema_create   s&     yy$$T%6%6%A5IIr'   c                R    U R                   R                  U R                  S-   5      $ )ziDelete the schema for the vector db
Returns:
    An http Response containing the result of the operation
r`   )r.   schema_deleter3   r#   s    r$   rf   InfinispanVS.schema_delete   s$    
 yy&&t'8'88'CDDr'   c                ~    US:X  a  SU R                   -   S-   nU R                  R                  U R                  U5      $ )zCreate the cache for the vector db
Args:
    config(str): configuration of the cache.
Returns:
    An http Response containing the result of the operation
r   aZ  
            {
  "distributed-cache": {
    "owners": "2",
    "mode": "SYNC",
    "statistics": true,
    "encoding": {
      "media-type": "application/x-protostream"
    },
    "indexing": {
      "enabled": true,
      "storage": "filesystem",
      "startup-mode": "AUTO",
      "indexing-mode": "AUTO",
      "indexed-entities": [
        "z"
      ]
    }
  }
}
)r3   r.   
cache_postr2   )r#   configs     r$   cache_createInfinispanVS.cache_create   sN     R<  ##!$"# 2 yy##D$4$4f==r'   c                L    U R                   R                  U R                  5      $ )zhDelete the cache for the vector db
Returns:
    An http Response containing the result of the operation
)r.   cache_deleter2   rg   s    r$   ro   InfinispanVS.cache_delete       
 yy%%d&6&677r'   c                L    U R                   R                  U R                  5      $ )zgClear the cache for the vector db
Returns:
    An http Response containing the result of the operation
)r.   cache_clearr2   rg   s    r$   rs   InfinispanVS.cache_clear       
 yy$$T%5%566r'   c                L    U R                   R                  U R                  5      $ )z7Checks if the cache exists
Returns:
    true if exists
)r.   cache_existsr2   rg   s    r$   rw   InfinispanVS.cache_exists   rq   r'   c                L    U R                   R                  U R                  5      $ )zgClear the index for the vector db
Returns:
    An http Response containing the result of the operation
)r.   index_clearr2   rg   s    r$   cache_index_clearInfinispanVS.cache_index_clear   ru   r'   c                L    U R                   R                  U R                  5      $ )zcRebuild the for the vector db
Returns:
    An http Response containing the result of the operation
)r.   index_reindexr2   rg   s    r$   cache_index_reindex InfinispanVS.cache_index_reindex   s    
 yy&&t'7'788r'   c                   / n[        U5      nU(       a  UR                  5         U R                  R                  U5      nU(       a  UR	                  U5        U(       d  U Vs/ sH  n0 PM     nnU R
                  =(       d.    U Vs/ sH!  n[        [        R                  " 5       5      PM#     snn	[        [        X'U	5      5      n
U
 H~  u  pnSU R                  U R                  U0nUR                  U5        [        R                  " U5      nU R                  R!                  XU R"                  5        UR	                  U5        M     U$ s  snf s  snf rD   )listrG   r4   embed_documentsappendr=   r0   uuiduuid4zipr3   r9   updatejsondumpsr.   putr2   )r#   texts	metadataslast_vectorr@   resulttexts_lembeds_r?   
data_inputmetadataembedkeydatadata_strs                   r$   	add_textsInfinispanVS.add_texts   s    u+KKM009MM+&%*+UUI+ii=u=u!C

-u=#i56
$. HST..0A0A5IDKK!zz$'HIIMM#)9)9:MM# %/  ,=s   #E'Ec                X    U R                  XS9nU VVs/ sH  u  pVUPM	     snn$ s  snnf )z"Return docs most similar to query.)queryk)similarity_search_with_score)r#   r   r   r@   	documentsdocr   s          r$   similarity_searchInfinispanVS.similarity_search  s1     55E5G	"+,)),,,s   &c                Z    U R                   R                  U5      nU R                  XBS9nU$ )zPerform a search on a query string and return results with score.

Args:
    query (str): The text being searched.
    k (int, optional): The amount of results to return. Defaults to 4.

Returns:
    List[Tuple[Document, float]]
)r>   r   )r4   embed_query&similarity_search_with_score_by_vector)r#   r   r   r@   r   r   s         r$   r   )InfinispanVS.similarity_search_with_score  s1     ++E2??%?U	r'   c                \    U R                  X5      nU VVs/ sH  u  pVUPM	     snn$ s  snnf r   )r   )r#   r>   r   r@   resr   r   s          r$   similarity_search_by_vector(InfinispanVS.similarity_search_by_vector'  s.     99)G"%&##&&&s   (c                `   U R                   cI  SU R                  -   S-   U R                  -   S-   [        R                  " U5      -   S-   [        U5      -   nOSnU R                   SS  H  nUS-   U-   S	-   nM     US-   U R                   S   -   nUS
-   U R                  -   S-   U R                  -   S-   [        R                  " U5      -   S-   [        U5      -   nU R                  R                  X0R                  5      n[        R                  " UR                  5      nU R                  U5      $ )zReturn docs most similar to embedding vector.

Args:
    embedding: Embedding to look up documents similar to.
    k: Number of Documents to return. Defaults to 4.

Returns:
    List of pair (Documents, score) most similar to the query vector.
Nzselect v, score(v) from z v where v.z <-> ~zselect zv.,z, score(v) from )r<   r3   r9   r   r   r0   r.   	req_queryr2   loadsr   _query_result_to_docs)r#   r>   r   	query_str
query_projfield	query_resr   s           r$   r   3InfinispanVS.similarity_search_with_score_by_vector-  sk    &*##$  ##$ 	
 **Y'(  a&  #J,,Sb1'$.6<
 2#d*T-@-@-DDJ$%##$    ##	$
  **Y'(  a&  II''	3C3CD	INN+))&11r'   c                <   / nUS    H  nUS   =(       d    0 nU R                   c  US   nO*U R                    Vs0 sH  ofUR                  U5      _M     nn[        U R                  U5      U R	                  U5      S9nUR                  XtS   45        M     U$ s  snf )Nhitshit*)page_contentr   zscore())r<   r1   r   r:   r;   r   )r#   r   r   rowr   entityr   r   s           r$   r   "InfinispanVS._query_result_to_docsX  s     	&>Ce*"C""*S7;7J7JK7Jswws|+7JK!--f5**62C cy>23 "  Ls   Bc                   U R                  X5      nU R                  U5      nUR                  U R                  R                  R
                  :X  d   S5       e [        R                  " UR                  5      S   b   eU R                  5       (       dW  U R                  5       nUR                  U R                  R                  R
                  :X  d   S5       e U R                  5         g g )Nz)Unable to create schema. Already exists? errorz(Unable to create cache. Already exists? )r]   rc   status_coder.   CodesOKr   r   r   rw   rl   r{   )r#   r   rW   schemaoutputs        r$   	configureInfinispanVS.configurei  s    $$X9##F+!!TYY__%7%77 	
7	
7 	(zz&++&w/777  ""&&(F%%););; :; ,""$ #r'   c                D    U R                  5         U R                  5         g r   )rf   ro   rg   s    r$   config_clearInfinispanVS.config_clearz  s    r'   c                   U " SX$S.UD6nU(       a  [        U=(       d    / 5      S:  am  U(       a  UR                  5         UR                  U[        U5      S-
     5      n	[        [        [
           U5      nUR                  US   [        U	5      5        O7U(       a  UR                  5         UR                  U[        U5      S-
     5      n	U(       a  UR                  XU	S9  U$ )a`  Return VectorStore initialized from texts and embeddings.

In addition to parameters described by the super method, this
implementation provides other configuration params if different
configuration from default is needed.

Parameters
----------
ids : List[str]
    Additional list of keys associated to the embedding. If not
    provided UUIDs will be generated
clear_old : bool
    Whether old data must be deleted. Default True
auto_config: bool
    Whether to do a complete server setup (caches,
    protobuf definition...). Default True
kwargs: Any
    Rest of arguments passed to InfinispanVS. See docs)r>   r?   r   rN   )r   r,   )	lenr   r   r   r   rF   r   rs   r   )
clsr   r>   r   r?   	clear_oldauto_configr@   infinispanvsvecs
             r$   
from_textsInfinispanVS.from_texts~  s    : BYB6B3yB/!3))+''c%j1n(=>CT$Z3I""9Q<S:((*''c%j1n(=>C""5C"@r'   )r2   r/   r4   r3   r=   r<   r5   r:   r;   r9   r.   )NN)r>   zOptional[Embeddings]r?   Optional[List[str]]r@   r   )r"   rF   returnrF   )r"   dict[str, Any]r   r   )rV   rF   rW   rQ   r   r0   )rb   r0   r   r   )r   r   )r   )rk   r0   r   r   )r   rT   )
r   zIterable[str]r   Optional[List[dict]]r   zOptional[List[float]]r@   r   r   	List[str])   )r   r0   r   rQ   r@   r   r   List[Document])r   r0   r   rQ   r@   r   r   List[Tuple[Document, float]])r>   List[float]r   rQ   r@   r   r   r   )r>   r   r   rQ   r   r   )r   r   r   r   )r   rF   rW   rQ   r   None)r   r   )NNTT)r   zType[InfinispanVS]r   r   r>   r   r   r   r?   r   r   Optional[bool]r   r   r@   r   r   r   )__name__
__module____qualname____firstlineno____doc__rA   r*   r    r]   rc   rf   rl   ro   rs   rw   r{   r   r   r   r   r   r   r   r   r   classmethodr   __static_attributes__r,   r'   r$   r   r      s   "L +/#'7'7 !7 	7r)#JJE!>F87879 +/-1	 ( +	
  
6 $%-- -03-	- $% 03	%" 01'$'),'<?'	' 01)2$)2),)2	%)2V$	%"%" 
 +/#'$(&*))) ) (	)
 !) ") $) ) 
) )r'   r   
   c            	      "   \ rS rSrSrSSSS/SSSSS4	                   SS	 jjrSSS
 jjr S       SS jjr S       SS jjrSS jr	SS jr
S S jrS!S jrS"S jrS#S jrS#S jrS$S jrS%S jrS&S jrS$S jrS$S jrSrg)'r-   i  a&  Helper class for `Infinispan` REST interface.

This class exposes the Infinispan operations needed to
create and set up a vector db.

You need a running Infinispan (15+) server without authentication.
You can easily start one, see:
https://github.com/rigazilla/infinispan-vector#run-infinispan
httpr   z127.0.0.1:11222z/rest/v2/cachesz/rest/v2/schemasTc
                    SSK nUR                  U l        Xl        Xl        X l        X0l        US   U l        U R
                  S-   U R                  -   U l	        XPl
        X`l        Xpl        Xl        U R                  (       a  U R                  (       a~  U R
                  S:X  a%  UR                  U R                  U R                  S9nOU R                  U R                  4nUR                  U R                  U R                  (       + UU	S9U l        gUR                  U R                  U R                  (       + U	S9U l        g! [         a    [        S5      ef = f)	a  
Parameters
----------
schema: str
    Schema for HTTP request: "http" or "https". Default "http"
user, password: str
    User and password if auth is required. Default None
hosts: List[str]
    List of server addresses. Default ["127.0.0.1:11222"]
cache_url: str
    URL endpoint for cache API. Default "/rest/v2/caches"
schema_url: str
    URL endpoint for schema API. Default "/rest/v2/schemas"
use_post_for_query: bool
    Whether POST method should be used for query. Default True
http2: bool
    Whether HTTP/2 protocol should be used. `pip install "httpx[http2]"` is
    needed for HTTP/2. Default True
verify:  bool
    Whether TLS certificate must be verified. Default True
r   NzCould not import httpx python package. Please install it with `pip install httpx`or `pip install "httpx[http2]"` if you need HTTP/2.z://r   )usernamepassword)http2http1authverify)r   r   r   )httpxImportErrorcodesr   r/   _schema_user	_password_host_default_node
_cache_url_schema_url_use_post_for_query_http2
DigestAuthClient_h2c)r#   r   userr   hosts	cache_url
schema_urluse_post_for_queryr   r   r@   r   r   s                r$   rA   Infinispan.__init__  s4   F	 [[
$
!1X
!\\E1DJJ>#%#5 ::$..||v%AFAQAQ!ZZ$.. BR B 

DNN3kk++o	 % DI kk++o % DIC  	F 	s   E Ec                l    U R                   (       a  U R                  XU5      $ U R                  XU5      $ )zRequest a query
Args:
    query(str): query requested
    cache_name(str): name of the target cache
    local(boolean): whether the query is local to clustered
Returns:
    An http Response containing the result set or errors
)r   _query_post
_query_get)r#   r   r   locals       r$   r   Infinispan.req_query  s1     ####Eu==u%88r'   c                    U R                   U R                  -   S-   U-   S-   [        U5      -   nSU0n[        R                  " U5      nU R
                  R                  UUSS0[        S9nU$ )N/z?action=search&local=r   Content-Typeapplication/jsoncontentheaderstimeout)r   r   r0   r   r   r   postREST_TIMEOUT)r#   r   r   r  api_urlr   	data_jsonresponses           r$   r  Infinispan._query_post  s     oo  &	&
 %j 	 #JJt$	99>>#%78 	 " 
 r'   c                    U R                   U R                  -   S-   U-   S-   U-   S-   [        U5      -   nU R                  R	                  U[
        S9nU$ )Nr  z?action=search&query=z&local=r  )r   r   r0   r   r1   r  )r#   r   r   r  r  r  s         r$   r  Infinispan._query_get'  sy     oo  &	&
   %j 	 99==,=?r'   c                    U R                   U R                  -   S-   U-   S-   U-   nU R                  R                  UUSS0[        S9nU$ )zPost an entry
Args:
    key(str): key of the entry
    data(str): content of the entry in json format
    cache_name(str): target cache
Returns:
    An http Response containing the result of the operation
r  r  r  r  r   r   r   r  r  r#   r   r   r   r  r  s         r$   r  Infinispan.post7  s]     $$t6<zICORUU99>>#%78 	 " 
 r'   c                    U R                   U R                  -   S-   U-   S-   U-   nU R                  R                  UUSS0[        S9nU$ )zPut an entry
Args:
    key(str): key of the entry
    data(str): content of the entry in json format
    cache_name(str): target cache
Returns:
    An http Response containing the result of the operation
r  r  r  r  )r   r   r   r   r  r  s         r$   r   Infinispan.putI  s]     $$t6<zICORUU99==#%78 	 ! 
 r'   c                    U R                   U R                  -   S-   U-   S-   U-   nU R                  R                  USS0[        S9nU$ )zGet an entry
Args:
    key(str): key of the entry
    cache_name(str): target cache
Returns:
    An http Response containing the entry or errors
r  r  r  )r  r  )r   r   r   r1   r  )r#   r   r   r  r  s        r$   r1   Infinispan.get[  sX     $$t6<zICORUU99==n.@A< ! 
 r'   c                    U R                   U R                  -   S-   U-   nU R                  R                  X2[        S9nU$ )zDeploy a schema
Args:
    name(str): name of the schema. Will be used as a key
    proto(str): protobuf schema
Returns:
    An http Response containing the result of the operation
r  )r  r  )r   r   r   r  r  )r#   namerb   r  r  s        r$   ra   Infinispan.schema_posti  s?     $$t'7'77#=D99>>',>Or'   c                    U R                   U R                  -   S-   U-   nU R                  R                  UUSS0[        S9nU$ )zCreate a cache
Args:
    name(str): name of the cache.
    config(str): configuration of the cache.
Returns:
    An http Response containing the result of the operation
r  r  r  r  r  )r#   r$  rk   r  r  s        r$   rj   Infinispan.cache_postu  sR     $$t6<tC99>>#%78 	 " 
 r'   c                    U R                   U R                  -   S-   U-   nU R                  R                  U[        S9nU$ )z~Delete a schema
Args:
    name(str): name of the schema.
Returns:
    An http Response containing the result of the operation
r  r  )r   r   r   deleter  r#   r$  r  r  s       r$   rf   Infinispan.schema_delete  sB     $$t'7'77#=D99##G\#Br'   c                    U R                   U R                  -   S-   U-   nU R                  R                  U[        S9nU$ )z|Delete a cache
Args:
    name(str): name of the cache.
Returns:
    An http Response containing the result of the operation
r  r  )r   r   r   r)  r  r*  s       r$   ro   Infinispan.cache_delete  s@     $$t6<tC99##G\#Br'   c                    U R                   U R                  -   S-   U-   S-   nU R                  R                  U[        S9nU$ )zClear a cache
Args:
    cache_name(str): name of the cache.
Returns:
    An http Response containing the result of the operation
r  ?action=clearr  r  )r#   r   r  r  s       r$   rs   Infinispan.cache_clear  sG     036CoU 	 99>>'<>@r'   c                h    U R                   U R                  -   S-   U-   S-   nU R                  U5      $ )zhCheck if a cache exists
Args:
    cache_name(str): name of the cache.
Returns:
    True if cache exists
r  r/  )r   r   resource_existsr#   r   r  s      r$   rw   Infinispan.cache_exists  s=     036CoU 	 ##G,,r'   c                    U R                   R                  U[        S9nUR                  U R                  R
                  :H  $ )zmCheck if a resource exists
Args:
    api_url(str): url of the resource.
Returns:
    true if resource exists
r  )r   headr  r   r   r   )r#   r  r  s      r$   r2  Infinispan.resource_exists  s3     99>>'<>@##tzz}}44r'   c                    U R                   U R                  -   S-   U-   S-   nU R                  R                  U[        S9$ )zClear an index on a cache
Args:
    cache_name(str): name of the cache.
Returns:
    An http Response containing the result of the operation
r  z/search/indexes?action=clearr  r  r3  s      r$   rz   Infinispan.index_clear  sS     oo  -	- 	 yy~~g|~<<r'   c                    U R                   U R                  -   S-   U-   S-   nU R                  R                  U[        S9$ )zRebuild index on a cache
Args:
    cache_name(str): name of the cache.
Returns:
    An http Response containing the result of the operation
r  z/search/indexes?action=reindexr  r  r3  s      r$   r~   Infinispan.index_reindex  sS     oo  /	/ 	 yy~~g|~<<r'   )r   r   r/   r   r   r   r   r   r   r   r   r   N)r   r0   r   r0   r   r0   r   r   r  r0   r  r0   r  rT   r   rT   r   rT   r@   r   )F)r   r0   r   r0   r  rT   r   r   )r   r0   r   r0   r  rT   r   r   )r   r0   r   r0   r   r0   r   r   )r   r0   r   r0   r   r   )r$  r0   rb   r0   r   r   )r$  r0   rk   r0   r   r   )r$  r0   r   r   )r   r0   r   r   )r   r0   r   rT   )r  r0   r   rT   )r   r   r   r   r   rA   r   r  r  r  r   r1   ra   rj   rf   ro   rs   rw   r2  rz   r~   r   r,   r'   r$   r-   r-     s1    -.*,#'JJ J 	J
 J J J !J J J JX9 >C*-6:	, >C*-6:	 $$
"		
-5= =r'   r-   )r   
__future__r   r   loggingr   r6   typingr   r   r   r   r   r	   r
   r   r   r   langchain_core.documentsr   langchain_core.embeddingsr   langchain_core.vectorstoresr   	getLoggerr   loggerr   r  r-   r,   r'   r$   <module>rD     s^    2 "     J J J  - 0 3			8	$U; Up o= o=r'   