o
    Zh                     @  s   d dl mZ d dlmZmZ d dlmZ d dlmZ d dl	m
Z
mZ d dlmZ d dlmZ d dlmZ d d	lmZ d d
lmZ d dlmZ erOd dlmZ nzd dlmZ W n	 ey`   Y nw dgZG dd deZdS )    )annotations)TYPE_CHECKINGList)BaseToolkit)BaseTool)
ConfigDictField)GmailCreateDraft)GmailGetMessage)GmailGetThread)GmailSearch)GmailSendMessage)build_resource_service)Resourcezhttps://mail.google.com/c                   @  s8   e Zd ZU dZeedZded< eddZ	dd	d
Z
dS )GmailToolkita  Toolkit for interacting with Gmail.

    *Security Note*: This toolkit contains tools that can read and modify
        the state of a service; e.g., by reading, creating, updating, deleting
        data associated with this service.

        For example, this toolkit can be used to send emails on behalf of the
        associated account.

        See https://python.langchain.com/docs/security for more information.
    )default_factoryr   api_resourceT)Zarbitrary_types_allowedreturnList[BaseTool]c                 C  s6   t | jdt| jdt| jdt| jdt| jdgS )zGet the tools in the toolkit.)r   )r	   r   r   r   r
   r   )self r   _/var/www/html/lang_env/lib/python3.10/site-packages/langchain_google_community/gmail/toolkit.py	get_tools1   s   




zGmailToolkit.get_toolsN)r   r   )__name__
__module____qualname____doc__r   r   r   __annotations__r   Zmodel_configr   r   r   r   r   r      s   
 r   N)
__future__r   typingr   r   Z'langchain_community.agent_toolkits.baser   Zlangchain_core.toolsr   Zpydanticr   r   Z-langchain_google_community.gmail.create_draftr	   Z,langchain_google_community.gmail.get_messager
   Z+langchain_google_community.gmail.get_threadr   Z'langchain_google_community.gmail.searchr   Z-langchain_google_community.gmail.send_messager   Z&langchain_google_community.gmail.utilsr   Zgoogleapiclient.discoveryr   ImportErrorZSCOPESr   r   r   r   r   <module>   s(    