§
    šŠtj³
  ã                   ó†   — 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dS )z1Quick and dirty representation for OpenAPI specs.é    )Ú	dataclass)ÚListÚTuple©Údereference_refsT)Úfrozenc                   ó\   — e Zd ZU dZee         ed<   eed<   eeeeef                  ed<   dS )Ú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   © ó    úm/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/langchain_community/agent_toolkits/openapi/spec.pyr
   r
   	   sV   € € € € € € ðð ð �$ŒZÐÐÑØÐÐÑØ�E˜#˜s D˜.Ô)Ô*Ð*Ð*Ñ*Ð*Ð*r   r
   ÚspecÚdereferenceÚreturnc                 ó  ‡ ‡— d„ ‰ d                               ¦   «         D ¦   «         }|rˆ fd„|D ¦   «         }dt          dt          fd„Šˆfd„|D ¦   «         }t          ‰ d         ‰ d	                              d
d¦  «        |¬¦  «        S )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.
    c                 ó®   — g | ]R\  }}|                      ¦   «         D ]8\  }}|d v ¯	|                     ¦   «         › d|› �|                     d¦  «        |f‘Œ9ŒSS ))ÚgetÚpostÚpatchÚputÚdeleteú r   )ÚitemsÚupperr   )Ú.0ÚrouteÚ	operationÚoperation_nameÚdocss        r   ú
<listcomp>z'reduce_openapi_spec.<locals>.<listcomp>*   s…   € ð ð ð áˆE�9Ø$-§O¢OÑ$5Ô$5ðð ñ !ˆN˜DØÐFÐFÐFð × Ò Ñ"Ô"Ð	,Ð	, UÐ	,Ð	,¨d¯hªh°}Ñ.EÔ.EÀtÐLð GÐFÐFÐFr   Úpathsc                 ó@   •— g | ]\  }}}||t          |‰¬ ¦  «        f‘ŒS ))Úfull_schemar   )r%   Únamer   r)   r   s       €r   r*   z'reduce_openapi_spec.<locals>.<listcomp>4   sD   ø€ ð 
ð 
ð 
á'��k 4ð �;Õ 0°À4Ð HÑ HÔ HÐIð
ð 
ð 
r   r)   r   c                 ód  — i }|                       d¦  «        r|                       d¦  «        |d<   |                       d¦  «        r#d„ |                       dg ¦  «        D ¦   «         |d<   d| d         v r| d         d         |d<   |                       d¦  «        r|                       d¦  «        |d<   |S )Nr   Ú
parametersc                 ó<   — g | ]}|                      d ¦  «        ¯|‘ŒS )Úrequired©r   )r%   Ú	parameters     r   r*   zEreduce_openapi_spec.<locals>.reduce_endpoint_docs.<locals>.<listcomp>?   s:   € ð !ð !ð !àØ—=’= Ñ,Ô,ð!Øð!ð !ð !r   Ú200Ú	responsesÚrequestBodyr3   )r)   Úouts     r   Úreduce_endpoint_docsz1reduce_openapi_spec.<locals>.reduce_endpoint_docs:   sË   € ØˆØ�8Š8�MÑ"Ô"ð 	9Ø!%§¢¨-Ñ!8Ô!8ˆC�ÑØ�8Š8�LÑ!Ô!ð 	ð!ð !à!%§¢¨,¸Ñ!;Ô!;ð!ñ !ô !ˆC�Ñð
 �D˜Ô%Ð%Ð%Ø# KÔ0°Ô7ˆC�ÑØ�8Š8�MÑ"Ô"ð 	9Ø!%§¢¨-Ñ!8Ô!8ˆC�ÑØˆ
r   c                 ó4   •— g | ]\  }}}|| ‰|¦  «        f‘ŒS r   r   )r%   r.   r   r)   r9   s       €r   r*   z'reduce_openapi_spec.<locals>.<listcomp>J   sB   ø€ ð ð ð á#ˆD�+˜tð 
ˆ{Ð0Ð0°Ñ6Ô6Ð7ðð ð r   r   Úinfor   Ú )r   r   r   )r#   r   r
   r   )r   r   r   r9   s   `  @r   Úreduce_openapi_specr=      sè   øø€ ð ð à $ W¤× 3Ò 3Ñ 5Ô 5ðñ ô €Ið ð 
ð
ð 
ð 
ð 
à+4ð
ñ 
ô 
ˆ	ð¥4ð ­Dð ð ð ð ð ð ð ð à'0ðñ ô €Iõ Ø�Y”Ø˜”L×$Ò$ ]°BÑ7Ô7Øðñ ô ð r   N)T)r   Údataclassesr   Útypingr   r   Ú langchain_core.utils.json_schemar   r
   r   Úboolr=   r   r   r   ú<module>rB      sÂ   ðØ 7Ð 7à !Ð !Ð !Ð !Ð !Ð !Ø Ð Ð Ð Ð Ð Ð Ð à =Ð =Ð =Ð =Ð =Ð =ð €�$ÐÑÔð+ð +ð +ð +ð +ñ +ô +ñ Ôð+ð 8ð 8˜dð 8°ð 8ÐASð 8ð 8ð 8ð 8ð 8ð 8r   