o
    .if                     @   sV   d dl mZmZ d dlmZ d dlmZ G dd deZdededed	efd
dZ	dS )    )	BaseModelField)BaseRetriever)Toolc                   @   s$   e Zd ZU dZeddZeed< dS )RetrieverInputzInput to the retriever.zquery to look up in retriever)descriptionqueryN)__name__
__module____qualname____doc__r   r   str__annotations__ r   r   R/var/www/html/corbot_env/lib/python3.10/site-packages/langchain/tools/retriever.pyr      s   
 r   	retrievernamer   returnc                 C   s   t ||| j| jtdS )a  Create a tool to do retrieval of documents.

    Args:
        retriever: The retriever to use for the retrieval
        name: The name for the tool. This will be passed to the language model,
            so should be unique and somewhat descriptive.
        description: The description for the tool. This will be passed to the language
            model, so should be descriptive.

    Returns:
        Tool class to pass to an agent
    )r   r   func	coroutineargs_schema)r   get_relevant_documentsaget_relevant_documentsr   )r   r   r   r   r   r   create_retriever_tool   s   r   N)
langchain_core.pydantic_v1r   r   langchain_core.retrieversr   langchain.toolsr   r   r   r   r   r   r   r   <module>   s    