
    ha                     b    d dl Z d dlmZ d dlmZmZ d dlmZ d dlm	Z	 d dl
mZ  G d de      Zy)	    N)Path)ListUnion)Document)stringify_dict)
BaseLoaderc                   8    e Zd ZdZdeeef   fdZdee	   fdZ
y)AirbyteJSONLoaderz Load local `Airbyte` json files.	file_pathc                     || _         y)zJInitialize with a file path. This should start with '/tmp/airbyte_local/'.N)r   )selfr   s     o/var/www/html/eduruby.in/venv/lib/python3.12/site-packages/langchain_community/document_loaders/airbyte_json.py__init__zAirbyteJSONLoader.__init__   s    ">    returnc                     d}t        | j                  d      D ](  }t        j                  |      d   }|t	        |      z  }* dt        | j                        i}t        ||      gS )N r_airbyte_datasource)page_contentmetadata)openr   jsonloadsr   strr   )r   textlinedatar   s        r   loadzAirbyteJSONLoader.load   sh    - 	)D::d#O4DN4((D	) c$..12dX>??r   N)__name__
__module____qualname____doc__r   r   r   r   r   r   r     r   r   r
   r
      s,    *?%T	"2 ?
@d8n @r   r
   )r   pathlibr   typingr   r   langchain_core.documentsr   langchain_core.utilsr   )langchain_community.document_loaders.baser   r
   r%   r   r   <module>r+      s%       - / @@
 @r   