
    hc                        d Z ddlmZ ddlZddlZddlZddlZddlmZm	Z	m
Z
mZmZmZmZmZ ddlmZ ddlmZ ddlmZ ddlmZ  ej0                  e      Z G d	 d
e      ZdZ G d d      Zy)z,Module providing Infinispan as a VectorStore    )annotationsN)AnyIterableListOptionalTupleTypeUnioncast)Response)Document)
Embeddings)VectorStorec                  d   e Zd ZdZ	 	 d	 	 	 	 	 ddZddZddZddZddZddZ	dd d	Z
dd
ZddZd!dZddZddZ	 	 d	 	 	 	 	 	 	 	 	 d"dZ	 d#	 	 	 	 	 	 	 d$dZ	 d#	 	 	 	 	 	 	 d%dZ	 d#	 	 	 	 	 	 	 d&dZ	 d#	 	 	 	 	 d'dZ	 	 	 	 d(dZd)dZd*dZe	 	 	 	 d+	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d,d       Zy)-InfinispanVSa  `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                x    t        di | _        | _        t         j                  j	                  dd             _        t         j                  j	                  dd             _        | _         j                  j	                  dd       _         j                  dk(  r" j                  j	                  dd       _        nt        j                  dt                j                  j	                  d	d       _         j                  dk(  r" j                  j	                  d
d       _        nt        j                  dt                j                  j	                  d fd       _         j                  j	                  d fd       _         j                  j	                  d       _        | _        y)at  
        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                &    j                  |       S N)_default_contentitemselfs    k/var/www/html/eduruby.in/venv/lib/python3.12/site-packages/langchain_community/vectorstores/infinispanvs.py<lambda>z'InfinispanVS.__init__.<locals>.<lambda>i   s    4+@+@+F     lambda_metadatac                &    j                  |       S r   )_default_metadatar    s    r#   r$   z'InfinispanVS.__init__.<locals>.<lambda>l   s    D,B,B4,H r%   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__z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                    t        |      }|j                  | j                  d        |j                  | j                  d        |j                  dd        |S N_type)dictpopr7   r3   )r"   r!   metas      r#   r(   zInfinispanVS._default_metadataq   sD    Dz""D)$'$r%   c                8    |j                  | j                        S r   )r/   r3   )r"   r!   s     r#   r   zInfinispanVS._default_contentx   s    xx((r%   c                T   d}|| j                   || j                  fz  }d}|j                         D ]  \  }}t        |t              r|d|z   dz   t	        |      z   dz   z  }nt        |t
              r|d|z   dz   t	        |      z   dz   z  }nt        |t              r|d|z   dz   t	        |      z   dz   z  }ndt        |t              r|d|z   dz   t	        |      z   dz   z  }n9t        |t              r|d	|z   dz   t	        |      z   dz   z  }nt        d
|z         |dz  } |dz  }|S )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}
)
r1   r7   items
isinstancer.   intfloatbytesbool	Exception)r"   templ	dimensionmetadata_proto_tplmetadata_protoidxfvs           r#   schema_builderzInfinispanVS.schema_builder{   sh   	 ,/
 

 KKM 	DAq!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    | j                   j                  | j                  dz   |      S )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_postr1   )r"   protos     r#   schema_createzInfinispanVS.schema_create   s&     yy$$T%6%6%A5IIr%   c                R    | j                   j                  | j                  dz         S )zDelete the schema for the vector db
        Returns:
            An http Response containing the result of the operation
        rZ   )r,   schema_deleter1   r"   s    r#   r_   zInfinispanVS.schema_delete   s$    
 yy&&t'8'88'CDDr%   c                |    |dk(  rd| j                   z   dz   }| j                  j                  | j                  |      S )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"
      ]
    }
  }
}
)r1   r,   
cache_postr0   )r"   configs     r#   cache_createzInfinispanVS.cache_create   sN     R<  ##!$"# 2 yy##D$4$4f==r%   c                L    | j                   j                  | j                        S )zDelete the cache for the vector db
        Returns:
            An http Response containing the result of the operation
        )r,   cache_deleter0   r`   s    r#   rf   zInfinispanVS.cache_delete       
 yy%%d&6&677r%   c                L    | j                   j                  | j                        S )zClear the cache for the vector db
        Returns:
            An http Response containing the result of the operation
        )r,   cache_clearr0   r`   s    r#   ri   zInfinispanVS.cache_clear       
 yy$$T%5%566r%   c                L    | j                   j                  | j                        S )zOChecks if the cache exists
        Returns:
            true if exists
        )r,   cache_existsr0   r`   s    r#   rl   zInfinispanVS.cache_exists   rg   r%   c                L    | j                   j                  | j                        S )zClear the index for the vector db
        Returns:
            An http Response containing the result of the operation
        )r,   index_clearr0   r`   s    r#   cache_index_clearzInfinispanVS.cache_index_clear   rj   r%   c                L    | j                   j                  | j                        S )z{Rebuild the for the vector db
        Returns:
            An http Response containing the result of the operation
        )r,   index_reindexr0   r`   s    r#   cache_index_reindexz InfinispanVS.cache_index_reindex   s    
 yy&&t'7'788r%   c                z   g }t        |      }|r|j                          | j                  j                  |      }|r|j	                  |       |s|D cg c]  }i  }}| j
                  xs+ |D cg c]  }t        t        j                               ! c}}	t        t        |||	            }
|
D ]~  \  }}}d| j                  | j                  |i}|j                  |       t        j                  |      }| j                  j!                  ||| j"                         |j	                  |        |S c c}w c c}w rA   )listrD   r2   embed_documentsappendr;   r.   uuiduuid4zipr1   r7   updatejsondumpsr,   putr0   )r"   texts	metadataslast_vectorr>   resulttexts_lembeds_r=   
data_inputmetadataembedkeydatadata_strs                   r#   	add_textszInfinispanVS.add_texts   s    u+KKM009MM+&%*++I+ii=u=!C

-=#i56
$. 	 HeST..0A0A5IDKK!zz$'HIIMM#x)9)9:MM#	  ,=s   	D31$D8c                ^    | j                  ||      }|D cg c]  \  }}|	 c}}S c c}}w )z"Return docs most similar to query.)queryk)similarity_search_with_score)r"   r   r   r>   	documentsdocr   s          r#   similarity_searchzInfinispanVS.similarity_search  s1     55EQ5G	"+,Q,,,s   )c                b    | j                   j                  |      }| j                  ||      }|S )a  Perform 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   )r2   embed_query&similarity_search_with_score_by_vector)r"   r   r   r>   r   r   s         r#   r   z)InfinispanVS.similarity_search_with_score  s4     ++E2??%ST?U	r%   c                \    | j                  ||      }|D cg c]  \  }}|	 c}}S c c}}w r   )r   )r"   r<   r   r>   resr   r   s          r#   similarity_search_by_vectorz(InfinispanVS.similarity_search_by_vector'  s.     99)QG"%&Q&&&s   (c                V   | j                   Hd| j                  z   dz   | j                  z   dz   t        j                  |      z   dz   t        |      z   }nd}| j                   dd D ]  }|dz   |z   d	z   } |dz   | j                   d   z   }|d
z   | j                  z   dz   | j                  z   dz   t        j                  |      z   dz   t        |      z   }| j                  j                  || j                        }t        j                  |j                        }| j                  |      S )a$  Return 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:   r1   r7   r{   r|   r.   r,   	req_queryr0   loadsr   _query_result_to_docs)r"   r<   r   	query_str
query_projfield	query_resr   s           r#   r   z3InfinispanVS.similarity_search_with_score_by_vector-  sr    &*##$  ##$ 	
 **Y'(  a&  #J,,Sb1 ='$.6<
=#d*T-@-@-DDJ$%##$    ##	$
  **Y'(  a&  II''	43C3CD	INN+))&11r%   c                2   g }|d   D ]  }|d   xs i }| j                   |d   }n)| j                   D ci c]  }||j                  |       }}t        | j                  |      | j	                  |            }|j                  ||d   f        |S c c}w )Nhitshit*)page_contentr   zscore())r:   r/   r   r8   r9   rv   )r"   r   r   rowr   entityr   r   s           r#   r   z"InfinispanVS._query_result_to_docsX  s     	&> 
	4Ce*"C""*S7;7J7JK#swws|+KK!--f5**62C c3y>23
	4  Ls   Bc                   | j                  ||      }| j                  |      }|j                  | j                  j                  j
                  k(  sJ d       	 t        j                  |j                        d   J | j                         sV| j                         }|j                  | j                  j                  j
                  k(  sJ d       	 | j                          y y )Nz)Unable to create schema. Already exists? errorz(Unable to create cache. Already exists? )rX   r]   status_coder,   CodesOKr{   r   r   rl   rd   ro   )r"   r   rR   schemaoutputs        r#   	configurezInfinispanVS.configurei  s    $$Xy9##F+!!TYY__%7%77 	
7	
7 	(zz&++&w/777  "&&(F%%););; :; ,""$ #r%   c                D    | j                          | j                          y r   )r_   rf   r`   s    r#   config_clearzInfinispanVS.config_clearz  s    r%   c                    | d||d|}|rzt        |xs g       dkD  rh|r|j                          |j                  |t        |      dz
           }	t        t        t
           |      }|j                  |d   t        |	             n2|r|j                          |j                  |t        |      dz
           }	|r|j                  |||	       |S )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   rI   )r   r*   )	lenr   r   r   r   rC   r   ri   r   )
clsr~   r<   r   r=   	clear_oldauto_configr>   infinispanvsvecs
             r#   
from_textszInfinispanVS.from_texts~  s    : BYCB6B3yB/!3))+''c%j1n(=>CT$Z3I""9Q<S:((*''c%j1n(=>C""5)C"@r%   )NN)r<   zOptional[Embeddings]r=   Optional[List[str]]r>   r   )r!   rC   returnrC   )r!   dict[str, Any]r   r   )rQ   rC   rR   rL   r   r.   )r\   r.   r   r   )r   r   )r   )rc   r.   r   r   )r   rO   )
r~   zIterable[str]r   Optional[List[dict]]r   zOptional[List[float]]r>   r   r   	List[str])   )r   r.   r   rL   r>   r   r   List[Document])r   r.   r   rL   r>   r   r   List[Tuple[Document, float]])r<   List[float]r   rL   r>   r   r   r   )r<   r   r   rL   r   r   )r   r   r   r   )r   rC   rR   rL   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____doc__r?   r(   r   rX   r]   r_   rd   rf   ri   rl   ro   rr   r   r   r   r   r   r   r   r   classmethodr   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            	          e Zd ZdZddddgdddddf		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZddd	Z	 d	 	 	 	 	 	 	 dd
Z	 d	 	 	 	 	 	 	 ddZddZddZ	ddZ
ddZd dZd!dZd!dZd"dZd#dZd$dZd"dZd"dZy)%r+   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
                   	 ddl }|j                  | _        |
| _        || _        || _        || _        |d   | _        | j
                  dz   | j                  z   | _	        || _
        || _        || _        || _        | j                  r| j                  r| j
                  dk(  r(|j                  | j                  | j                        }n| j                  | j                  f}|j                  | j                  | j                   ||	      | _        y|j                  | j                  | j                   |	      | _        y# t        $ r t        d      w xY w)	aK  
        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#   r?   zInfinispan.__init__  sD   F	 [[
$
!1X
!\\E1DJJ>#%#5 ::$..||v%AFAQAQ!ZZ$.. BR B 

DNN3kk++o	 % DI kk++o % DIC  	F 	s   E   Ec                f    | j                   r| j                  |||      S | j                  |||      S )a  Request 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   zInfinispan.req_query  s5     ####E:u==uj%88r%   c                    | j                   | j                  z   dz   |z   dz   t        |      z   }d|i}t        j                  |      }| j
                  j                  ||ddit              }|S )N/z?action=search&local=r   Content-Typeapplication/jsoncontentheaderstimeout)r   r   r.   r{   r|   r   postREST_TIMEOUT)r"   r   r   r   api_urlr   	data_jsonresponses           r#   r   zInfinispan._query_post  s     oo  &	&
 %j 	 #JJt$	99>>#%78 	 " 
 r%   c                    | j                   | j                  z   dz   |z   dz   |z   dz   t        |      z   }| j                  j	                  |t
              }|S )Nr   z?action=search&query=z&local=r   )r   r   r.   r   r/   r   )r"   r   r   r   r   r   s         r#   r   zInfinispan._query_get'  sy     oo  &	&
   %j 	 99==,=?r%   c                    | j                   | j                  z   dz   |z   dz   |z   }| j                  j                  ||ddit              }|S )a  Post 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   zInfinispan.post7  s]     $$t6<zICORUU99>>#%78 	 " 
 r%   c                    | j                   | j                  z   dz   |z   dz   |z   }| j                  j                  ||ddit              }|S )a  Put 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}   zInfinispan.putI  s]     $$t6<zICORUU99==#%78 	 ! 
 r%   c                    | j                   | j                  z   dz   |z   dz   |z   }| j                  j                  |ddit              }|S )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   r/   r   )r"   r   r   r   r   s        r#   r/   zInfinispan.get[  sX     $$t6<zICORUU99==n.@A< ! 
 r%   c                    | j                   | j                  z   dz   |z   }| j                  j                  ||t              }|S )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"   namer\   r   r   s        r#   r[   zInfinispan.schema_posti  sA     $$t'7'77#=D99>>'5,>Or%   c                    | j                   | j                  z   dz   |z   }| j                  j                  ||ddit              }|S )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  rc   r   r   s        r#   rb   zInfinispan.cache_postu  sR     $$t6<tC99>>#%78 	 " 
 r%   c                    | j                   | j                  z   dz   |z   }| j                  j                  |t              }|S )zDelete 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#   r_   zInfinispan.schema_delete  sB     $$t'7'77#=D99##G\#Br%   c                    | j                   | j                  z   dz   |z   }| j                  j                  |t              }|S )zDelete 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#   rf   zInfinispan.cache_delete  s@     $$t6<tC99##G\#Br%   c                    | j                   | j                  z   dz   |z   dz   }| j                  j                  |t              }|S )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#   ri   zInfinispan.cache_clear  sG     036CoU 	 99>>'<>@r%   c                h    | j                   | j                  z   dz   |z   dz   }| j                  |      S )zCheck 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#   rl   zInfinispan.cache_exists  s=     036CoU 	 ##G,,r%   c                    | j                   j                  |t              }|j                  | j                  j
                  k(  S )zCheck 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#   r  zInfinispan.resource_exists  s3     99>>'<>@##tzz}}44r%   c                    | j                   | j                  z   dz   |z   dz   }| j                  j                  |t              S )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   r  s      r#   rn   zInfinispan.index_clear  sS     oo  -	- 	 yy~~g|~<<r%   c                    | j                   | j                  z   dz   |z   dz   }| j                  j                  |t              S )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   r  s      r#   rq   zInfinispan.index_reindex  sS     oo  /	/ 	 yy~~g|~<<r%   N)r   r.   r   r.   r   r.   r   r   r   r.   r   r.   r   rO   r   rO   r   rO   r>   r   )F)r   r.   r   r.   r   rO   r   r   )r   r.   r   r.   r   rO   r   r   )r   r.   r   r.   r   r.   r   r   )r   r.   r   r.   r   r   )r  r.   r\   r.   r   r   )r  r.   rc   r.   r   r   )r  r.   r   r   )r   r.   r   r   )r   r.   r   rO   )r   r.   r   rO   )r   r   r   r   r?   r   r   r   r   r}   r/   r[   rb   r_   rf   ri   rl   r  rn   rq   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{   loggingrw   r4   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>r     s`    2 "     J J J  - 0 3			8	$U; Up o= o=r%   