§
    è˜ºh3  ã                   ór   — d Z ddlmZ ddlmZmZ ddlmZ g d¢Zdee         de	fd„Z
dee         de	fd	„Zd
S )zóDifferent methods for rendering Tools to be passed to LLMs.

Depending on the LLM you are using and the prompting strategy you are using,
you may want Tools to be rendered in a different way.
This module contains various ways to render tools.
é    )ÚList)Úformat_tool_to_openai_functionÚformat_tool_to_openai_tool)ÚBaseTool)Úrender_text_descriptionÚ render_text_description_and_argsr   r   ÚtoolsÚreturnc                 ó@   — d                      d„ | D ¦   «         ¦  «        S )zÙRender the tool name and description in plain text.

    Output will be in the format of:

    .. code-block:: markdown

        search: This tool is used for search
        calculator: This tool is used for math
    ú
c                 ó0   — g | ]}|j         › d |j        › �‘ŒS )ú: )ÚnameÚdescription)Ú.0Útools     ú^/var/www/html/services/rag-service/venv/lib/python3.11/site-packages/langchain/tools/render.pyú
<listcomp>z+render_text_description.<locals>.<listcomp>"   s+   € ÐKÐKÐK¸T˜œÐ8Ð8 dÔ&6Ð8Ð8ÐKÐKÐKó    )Újoin)r	   s    r   r   r      s%   € ð �9Š9ÐKÐKÀUÐKÑKÔKÑLÔLÐLr   c                 ó°   — g }| D ]=}t          |j        ¦  «        }|                     |j        › d|j        › d|› �¦  «         Œ>d                     |¦  «        S )a/  Render the tool name, description, and args in plain text.

    Output will be in the format of:

    .. code-block:: markdown

        search: This tool is used for search, args: {"query": {"type": "string"}}
        calculator: This tool is used for math, args: {"expression": {"type": "string"}}
    r   z, args: r   )ÚstrÚargsÚappendr   r   r   )r	   Útool_stringsr   Úargs_schemas       r   r   r   %   sk   € ð €LØð Uð UˆÝ˜$œ)‘n”nˆØ×Ò˜tœyÐSÐS¨DÔ,<ÐSÐSÀkÐSÐSÑTÔTÐTÐTØ�9Š9�\Ñ"Ô"Ð"r   N)Ú__doc__Útypingr   Ú+langchain_community.tools.convert_to_openair   r   Úlangchain_core.toolsr   Ú__all__r   r   r   © r   r   ú<module>r#      sÌ   ððð ð Ð Ð Ð Ð Ð ðð ð ð ð ð ð ð ð *Ð )Ð )Ð )Ð )Ð )ðð ð €ð
M 4¨¤>ð 
M°cð 
Mð 
Mð 
Mð 
Mð#¨D°¬Nð #¸sð #ð #ð #ð #ð #ð #r   