a
    bg@                     @   sT   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
 G dd deZdS )	    )AnyList)BaseTool)BaseToolkit)model_validator)ConneryServicec                   @   sb   e Zd ZU dZee ed< ee dddZedde	e
edd	d
Ze	ed dddZdS )ConneryToolkitz
    Toolkit with a list of Connery Actions as tools.

    Parameters:
        tools (List[BaseTool]): The list of Connery Actions.
    tools)returnc                 C   s   | j S )z6
        Returns the list of Connery Actions.
        r	   )self r   /var/www/html/cobodadashboardai.evdpl.com/venv/lib/python3.9/site-packages/langchain_community/agent_toolkits/connery/toolkit.py	get_tools   s    zConneryToolkit.get_toolsbefore)mode)valuesr
   c                 C   s   | dstd|S )a  
        Validate the attributes of the ConneryToolkit class.

        Args:
            values (dict): The arguments to validate.
        Returns:
            dict: The validated arguments.

        Raises:
            ValueError: If the 'tools' attribute is not set
        r	   z"The attribute 'tools' must be set.)get
ValueError)clsr   r   r   r   validate_attributes   s    
z"ConneryToolkit.validate_attributes)connery_servicer
   c                 C   s   | |  d}|S )a  
        Creates a Connery Toolkit using a Connery Service.

        Parameters:
            connery_service (ConneryService): The Connery Service
                to get the list of Connery Actions.
        Returns:
            ConneryToolkit: The Connery Toolkit.
        r   )Zlist_actions)r   r   instancer   r   r   create_instance.   s    zConneryToolkit.create_instanceN)__name__
__module____qualname____doc__r   r   __annotations__r   r   classmethoddictr   r   r   r   r   r   r   r   r   
   s   
r   N)typingr   r   Zlangchain_core.toolsr   Zlangchain_core.tools.baser   Zpydanticr   Z!langchain_community.tools.conneryr   r   r   r   r   r   <module>   s
   