§
    šŠtj¾  ã                   óV   — 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	dS )é    )ÚIteratorÚOptional)ÚDocument)Ú
BaseLoader)ÚWikipediaAPIWrapperc                   ót   — e Zd ZdZ	 	 	 	 ddededee         d	ee         d
ee         f
d„Zde	e
         fd„ZdS )ÚWikipediaLoaderz‡Load from `Wikipedia`.

    The hard limit on the length of the query is 300 for now.

    Each wiki page represents one Document.
    Úené   Fé   ÚqueryÚlangÚload_max_docsÚload_all_available_metaÚdoc_content_chars_maxc                 óL   — || _         || _        || _        || _        || _        dS )a·  
        Initializes a new instance of the WikipediaLoader class.

        Args:
            query (str): The query string to search on Wikipedia.
            lang (str, optional): The language code for the Wikipedia language edition.
                Defaults to "en".
            load_max_docs (int, optional): The maximum number of documents to load.
                Defaults to 100.
            load_all_available_meta (bool, optional): Indicates whether to load all
                available metadata for each document. Defaults to False.
            doc_content_chars_max (int, optional): The maximum number of characters
                for the document content. Defaults to 4000.
        N)r   r   r   r   r   )Úselfr   r   r   r   r   s         úl/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/langchain_community/document_loaders/wikipedia.pyÚ__init__zWikipediaLoader.__init__   s0   € ð, ˆŒ
ØˆŒ	Ø*ˆÔØ'>ˆÔ$Ø%:ˆÔ"Ð"Ð"ó    Úreturnc              #   ó˜   K  — t          | j        | j        | j        | j        ¬¦  «        }|                     | j        ¦  «        E d{V —† dS )zÎ
        Loads the query result from Wikipedia into a list of `Document` objects.

        Returns:
            A list of `Document` objects representing the loaded
                Wikipedia pages.
        )r   Útop_k_resultsr   r   N)r   r   r   r   r   Úloadr   )r   Úclients     r   Ú	lazy_loadzWikipediaLoader.lazy_load-   sa   è è € õ %Ø”ØÔ,Ø$(Ô$@Ø"&Ô"<ð	
ñ 
ô 
ˆð —;’;˜tœzÑ*Ô*Ð*Ð*Ð*Ð*Ð*Ð*Ð*Ð*Ð*r   N)r
   r   Fr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ústrr   ÚintÚboolr   r   r   r   © r   r   r	   r	   	   s¡   € € € € € ðð ð Ø')Ø27Ø/3ð;ð ;àð;ð ð;ð   ”}ð	;ð
 "*¨$¤ð;ð  (¨œ}ð;ð ;ð ;ð ;ð8+˜8 HÔ-ð +ð +ð +ð +ð +ð +r   r	   N)
Útypingr   r   Úlangchain_core.documentsr   Ú)langchain_community.document_loaders.baser   Ú'langchain_community.utilities.wikipediar   r	   r$   r   r   ú<module>r)      s‡   ðØ %Ð %Ð %Ð %Ð %Ð %Ð %Ð %à -Ð -Ð -Ð -Ð -Ð -à @Ð @Ð @Ð @Ð @Ð @Ø GÐ GÐ GÐ GÐ GÐ Gð2+ð 2+ð 2+ð 2+ð 2+�jñ 2+ô 2+ð 2+ð 2+ð 2+r   