Ë
    µŒj^  ã                   óN   — 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)é    )ÚIteratorÚOptional)ÚDocument)Ú
BaseLoader)ÚPubMedAPIWrapperc                   ó<   — e Zd ZdZ	 ddedee   fd„Zdee	   fd„Z
y)	ÚPubMedLoaderz¹Load from the `PubMed` biomedical library.

    Attributes:
        query: The query to be passed to the PubMed API.
        load_max_docs: The maximum number of documents to load.
    ÚqueryÚload_max_docsc                 óB   — || _         || _        t        |¬«      | _        y)zÒInitialize the PubMedLoader.

        Args:
            query: The query to be passed to the PubMed API.
            load_max_docs: The maximum number of documents to load.
              Defaults to 3.
        )Útop_k_resultsN)r
   r   r   Ú_client)Úselfr
   r   s      úu/var/www/html/Fitness-lenito-AI-main/venv/lib/python3.12/site-packages/langchain_community/document_loaders/pubmed.pyÚ__init__zPubMedLoader.__init__   s"   € ð ˆŒ
Ø*ˆÔÜ'Ø'ô
ˆ�ó    Úreturnc              #   óh   K  — | j                   j                  | j                  «      D ]  }|–— Œ y ­w)N)r   Úlazy_load_docsr
   )r   Údocs     r   Ú	lazy_loadzPubMedLoader.lazy_load#   s(   è ø€ Ø—<‘<×.Ñ.¨t¯z©zÖ:ˆCØ‹Iñ ;ùs   ‚02N)é   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ústrr   Úintr   r   r   r   © r   r   r	   r	   	   s8   „ ñð ()ñ
àð
ð   ‘}ó
ð$˜8 HÑ-ô r   r	   N)
Útypingr   r   Úlangchain_core.documentsr   Ú)langchain_community.document_loaders.baser   Ú$langchain_community.utilities.pubmedr   r	   r   r   r   Ú<module>r$      s   ðß %å -å @Ý Aô�:õ r   