HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/langchain/embeddings/__pycache__/__init__.cpython-310.pyc
o

���g� �@s�dZddlZddlmZmZddlmZddlmZddl	m
Z
er�ddlmZm
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@e�AeB�ZCGdd	�d	�ZDid
d�dd�d
d�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�d d�d!d�d"d�d#d�d$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d��id-d�d.d�d/d�d0d�d1d�d2d�d3d�d4d�d5d�d6d�d7d�d8d�d9d�d:d�d;d�d<d�d=d��ddd>��ZEeeFeEd?�ZGd@eHdAefdBdC�ZIgdD�ZJdS)Ea**Embedding models**  are wrappers around embedding models
from different APIs and services.

**Embedding models** can be LLMs or not.

**Class hierarchy:**

.. code-block::

    Embeddings --> <name>Embeddings  # Examples: OpenAIEmbeddings, HuggingFaceEmbeddings
�N)�
TYPE_CHECKING�Any)�create_importer)�init_embeddings)�CacheBackedEmbeddings)5�%AlephAlphaAsymmetricSemanticEmbedding�$AlephAlphaSymmetricSemanticEmbedding�
AwaEmbeddings�AzureOpenAIEmbeddings�BedrockEmbeddings�BookendEmbeddings�ClarifaiEmbeddings�CohereEmbeddings�DashScopeEmbeddings�DatabricksEmbeddings�DeepInfraEmbeddings�DeterministicFakeEmbedding�EdenAiEmbeddings�ElasticsearchEmbeddings�EmbaasEmbeddings�ErnieEmbeddings�FakeEmbeddings�FastEmbedEmbeddings�GooglePalmEmbeddings�GPT4AllEmbeddings�GradientEmbeddings�HuggingFaceBgeEmbeddings�HuggingFaceEmbeddings�HuggingFaceHubEmbeddings�!HuggingFaceInferenceAPIEmbeddings�HuggingFaceInstructEmbeddings�InfinityEmbeddings�JavelinAIGatewayEmbeddings�JinaEmbeddings�JohnSnowLabsEmbeddings�LlamaCppEmbeddings�LocalAIEmbeddings�MiniMaxEmbeddings�MlflowAIGatewayEmbeddings�MlflowEmbeddings�ModelScopeEmbeddings�MosaicMLInstructorEmbeddings�NLPCloudEmbeddings�OctoAIEmbeddings�OllamaEmbeddings�OpenAIEmbeddings�OpenVINOEmbeddings�QianfanEmbeddingsEndpoint�SagemakerEndpointEmbeddings�SelfHostedEmbeddings�SelfHostedHuggingFaceEmbeddings�'SelfHostedHuggingFaceInstructEmbeddings�SentenceTransformerEmbeddings�SpacyEmbeddings�TensorflowHubEmbeddings�VertexAIEmbeddings�VoyageEmbeddings�XinferenceEmbeddingsc@s8eZdZdedefdd�Zedededefdd��ZdS)	�HypotheticalDocumentEmbedder�args�kwargscOs$t�d�ddlm}||i|��S�NzhUsing a deprecated class. Please use `from langchain.chains import HypotheticalDocumentEmbedder` insteadr)r<)�logger�warning�langchain.chains.hyde.baser<)�selfr=r>�H�rE�H/usr/local/lib/python3.10/dist-packages/langchain/embeddings/__init__.py�__init__Ss
�z%HypotheticalDocumentEmbedder.__init__�returncOs&t�d�ddlm}|j|i|��Sr?)r@rArBr<�from_llm)�clsr=r>rDrErErFrI\s
�z%HypotheticalDocumentEmbedder.from_llmN)�__name__�
__module__�__qualname__rrG�classmethodrIrErErErFr<Rs	r<rzlangchain_community.embeddingsrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9)r:r;)�deprecated_lookups�namerHcCst|�S)zLook up attributes dynamically.)�_import_attribute)rPrErErF�__getattr__�srR)7rrr	r
rrrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r)K�__doc__�logging�typingrr�langchain._apir�langchain.embeddings.baser�langchain.embeddings.cacher�langchain_community.embeddingsrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;�	getLoggerrKr@r<�DEPRECATED_LOOKUP�__package__rQ�strrR�__all__rErErErF�<module>s��
9��������	�
���
������������������� �!�"�#�$�%�&�'�(�)�*�+�,�-�.�/�0�1�2�3�4�8