a
    dŠÝg‚  ã                   @   sf   d dl mZmZ d dlmZmZmZmZmZ d dl	m
Z
 d dlmZ d dlmZ G dd„ de
eƒZdS )	é    )ÚABCÚabstractmethod)ÚAnyÚDictÚListÚOptionalÚTuple)ÚChain)ÚCallbackManagerForChainRun)ÚThoughtValidityc                   @   s’   e Zd ZU dZdZeed< eee dœdd„ƒZ	eee dœdd„ƒZ
edeeed
f edœdd„ƒZdeeef ee eeef dœdd„ZdS )Ú
ToTCheckerzâ
    Tree of Thought (ToT) checker.

    This is an abstract ToT checker that must be implemented by the user. You
    can implement a simple rule-based checker or a more sophisticated
    neural network based classifier.
    ZvalidityÚ
output_key)Úreturnc                 C   s   ddgS )z8The checker input keys.

        :meta private:
        Úproblem_descriptionÚthoughts© ©Úselfr   r   úp/var/www/html/cobodadashboardai.evdpl.com/venv/lib/python3.9/site-packages/langchain_experimental/tot/checker.pyÚ
input_keys   s    zToTChecker.input_keysc                 C   s   | j gS )z9The checker output keys.

        :meta private:
        )r   r   r   r   r   Úoutput_keys   s    zToTChecker.output_keysr   .)r   r   r   c                 C   s   dS )z`
        Evaluate the response to the problem description and return the solution type.
        Nr   )r   r   r   r   r   r   Úevaluate%   s    zToTChecker.evaluateN)ÚinputsÚrun_managerr   c                 C   s   | j | jf i |¤ŽiS )N)r   r   )r   r   r   r   r   r   Ú_call/   s    zToTChecker._call)r   )N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚstrÚ__annotations__Úpropertyr   r   r   r   r   r   r   r   r   r   r
   r   r   r   r   r   r   
   s&   
 ý
ü ý

ür   N)Úabcr   r   Útypingr   r   r   r   r   Zlangchain.chains.baser	   Z langchain_core.callbacks.managerr
   Z"langchain_experimental.tot.thoughtr   r   r   r   r   r   Ú<module>   s
   