
    dh^                     N    S SK JrJr  S SKJr  S SKJr  S SKJr   " S S\5      r	g)    )IteratorOptional)Document)
BaseLoader)PubMedAPIWrapperc                   J    \ rS rSrSr S
S\S\\   4S jjrS\	\
   4S jrSrg	)PubMedLoader	   zLoad 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                 8    Xl         X l        [        US9U l        g)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      c/var/www/html/shao/venv/lib/python3.13/site-packages/langchain_community/document_loaders/pubmed.py__init__PubMedLoader.__init__   s     
*''
    returnc              #   l   #    U R                   R                  U R                  5       H  nUv   M	     g 7f)N)r   lazy_load_docsr   )r   docs     r   	lazy_loadPubMedLoader.lazy_load#   s'     <<..tzz:CI ;s   24)r   r   r   N)   )__name__
__module____qualname____firstlineno____doc__strr   intr   r   r   r   __static_attributes__ r   r   r	   r	   	   s8     ()

  }
$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: r   