
    g3fi                    ^    d Z ddlmZ ddlmZ ddlmZ ddlmZ ee	e   ge
f   Zd	dZd	dZy)
zUtilities to render tools.    )annotations)Callable)	signature)BaseToolc                $   g }| D ]y  }t        |d      r?|j                  r3t        |j                        }|j                   | d|j                   }n|j                   d|j                   }|j                  |       { dj                  |      S )a  Render the tool name and description in plain text.

    Args:
        tools: The tools to render.

    Returns:
        The rendered text.

    Output will be in the format of:

    ```txt
    search: This tool is used for search
    calculator: This tool is used for math
    ```
    func - 
)hasattrr   r   namedescriptionappendjoin)toolsdescriptionstoolsigr   s        Y/var/www/auto_recruiter/arenv/lib/python3.12/site-packages/langchain_core/tools/render.pyrender_text_descriptionr      s      L )4 TYYDII&C!YYKuC0@0@/ABK!YYKs4+;+;*<=KK() 99\""    c                X   g }| D ]  }t        |j                        }t        |d      r?|j                  r3t	        |j                        }|j
                   | d|j                   }n|j
                   d|j                   }|j                  | d|         dj                  |      S )ax  Render the tool name, description, and args in plain text.

    Args:
        tools: The tools to render.

    Returns:
        The rendered text.

    Output will be in the format of:

    ```txt
    search: This tool is used for search, args: {"query": {"type": "string"}}
    calculator: This tool is used for math,     args: {"expression": {"type": "string"}}
    ```
    r   r	   z, args: r
   )	strargsr   r   r   r   r   r   r   )r   tool_stringsr   args_schemar   r   s         r    render_text_description_and_argsr   )   s    " L C$))n4 TYYDII&C!YYKuC0@0@/ABK!YYKs4+;+;*<=K{m8K=ABC 99\""r   N)r   zlist[BaseTool]returnr   )__doc__
__future__r   collections.abcr   inspectr   langchain_core.tools.baser   listr   ToolsRendererr   r    r   r   <module>r&      s4      " $  .$x.)3./#8#r   