
    Ng^                     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)PubMedAPIWrapperc                   J    e Zd ZdZ	 d	dedee         fdZdee	         fdZ
dS )
PubMedLoaderzLoad 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                 L    || _         || _        t          |          | _        dS )zInitialize 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      g/var/www/html/ai-engine/env/lib/python3.11/site-packages/langchain_community/document_loaders/pubmed.py__init__zPubMedLoader.__init__   s0     
*''
 
 
    returnc              #   V   K   | j                             | j                  D ]}|V  d S )N)r   lazy_load_docsr   )r   docs     r   	lazy_loadzPubMedLoader.lazy_load#   s<      <..tz:: 	 	CIIII	 	r   N)r
   )__name__
__module____qualname____doc__strr   intr   r   r   r    r   r   r	   r	   	   sr          ()
 

  }
 
 
 
$8H-      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 A A A A A    :     r   