Ë
    µŒj³
  ã                   ór   — d Z ddlmZ ddlmZmZ ddlmZ  ed¬«       G d„ d«      «       Zdd	e	d
e
defd„Zy)z1Quick and dirty representation for OpenAPI specs.é    )Ú	dataclass)ÚListÚTuple)Údereference_refsT)Úfrozenc                   óH   — e Zd ZU dZee   ed<   eed<   eeeeef      ed<   y)ÚReducedOpenAPISpeczøA reduced OpenAPI spec.

    This is a quick and dirty representation for OpenAPI specs.

    Parameters:
        servers: The servers in the spec.
        description: The description of the spec.
        endpoints: The endpoints in the spec.
    ÚserversÚdescriptionÚ	endpointsN)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚdictÚ__annotations__Ústrr   © ó    úy/var/www/html/Fitness-lenito-AI-main/venv/lib/python3.12/site-packages/langchain_community/agent_toolkits/openapi/spec.pyr	   r	   	   s/   … ñð �$‰ZÓØÓØ�E˜#˜s D˜.Ñ)Ñ*Ô*r   r	   ÚspecÚdereferenceÚreturnc                 óø  — | d   j                  «       D ����cg c]H  \  }}|j                  «       D ]0  \  }}|dv r'|j                  «       › d|› �|j                  d«      |f‘Œ2 ŒJ }}}}}|r%|D ���cg c]  \  }}}||t        || ¬«      f‘Œ }}}}dt        dt        fd„}	|D ���cg c]  \  }}}|| |	|«      f‘Œ }}}}t        | d	   | d
   j                  dd«      |¬«      S c c}}}}w c c}}}w c c}}}w )a¹  Simplify/distill/minify a spec somehow.

    I want a smaller target for retrieval and (more importantly)
    I want smaller results from retrieval.
    I was hoping https://openapi.tools/ would have some useful bits
    to this end, but doesn't seem so.

    Args:
        spec: The OpenAPI spec.
        dereference: Whether to dereference the spec. Default is True.

    Returns:
        ReducedOpenAPISpec: The reduced OpenAPI spec.
    Úpaths)ÚgetÚpostÚpatchÚputÚdeleteÚ r   )Úfull_schemaÚdocsr   c                 óV  — i }| j                  d«      r| j                  d«      |d<   | j                  d«      r4| j                  dg «      D �cg c]  }|j                  d«      r|‘Œ c}|d<   d| d   v r| d   d   |d<   | j                  d«      r| j                  d«      |d<   |S c c}w )Nr   Ú
parametersÚrequiredÚ200Ú	responsesÚrequestBody)r   )r#   ÚoutÚ	parameters      r   Úreduce_endpoint_docsz1reduce_openapi_spec.<locals>.reduce_endpoint_docs:   s¹   € ØˆØ�8‰8�MÔ"Ø!%§¡¨-Ó!8ˆC�ÑØ�8‰8�LÔ!ð "&§¡¨,¸Ô!;ó!á!;�IØ—=‘= Ô,ò Ø!;ñ!ˆC�Ñð
 �D˜Ñ%Ñ%Ø# KÑ0°Ñ7ˆC�ÑØ�8‰8�MÔ"Ø!%§¡¨-Ó!8ˆC�ÑØˆ
ùò!s   ÁB&r
   ÚinfoÚ )r
   r   r   )ÚitemsÚupperr   r   r   r	   )
r   r   ÚrouteÚ	operationÚoperation_namer#   r   Únamer   r,   s
             r   Úreduce_openapi_specr5      sA  € ð$ !% W¡× 3Ñ 3Ô 5öá 5ÑˆE�9Ø$-§O¡OÖ$5Ñ ˆN˜DØÐFÑFð × Ñ Ó"Ð# 1 U GÐ	,¨d¯h©h°}Ó.EÀtÒLà$5ð 	MØ 5ð ó ñ ñ ,5õ
á+4Ñ'��k 4ð �;Ô 0°À4Ô HÒIØ+4ð 	ò 
ð¤4ð ¬Dó ñ$ (1õá'0Ñ#ˆD�+˜tð 
ˆ{Ñ0°Ó6Ò7Ø'0ð ò ô Ø�Y‘Ø˜‘L×$Ñ$ ]°BÓ7Øôð ùõIùô
ùô,s   ™AC&
Á3C.Â(C5N)T)r   Údataclassesr   Útypingr   r   Ú langchain_core.utils.json_schemar   r	   r   Úboolr5   r   r   r   Ú<module>r:      sJ   ðÙ 7å !ß å =ñ �$Ô÷+ð +ó ð+ñ 8˜dð 8°ð 8ÐASô 8r   