
    mϞi3                     (   d dl mZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlm	Z	 d dlm
Z
 d d	lmZ d d
lmZ 	 d dlZ	 d dlZ eded       G d de             Z eded       G d de             Zy# e$ r dZY Aw xY w# e$ r dZY Iw xY w)    )Any)FastAPIDeprecationWarning)FileResponse)HTMLResponse)JSONResponse)PlainTextResponse)RedirectResponse)Response)StreamingResponse)
deprecatedNal  UJSONResponse is deprecated, FastAPI now serializes data directly to JSON bytes via Pydantic when a return type or response model is set, which is faster and doesn't need a custom response class. Read more in the FastAPI docs: https://fastapi.tiangolo.com/advanced/custom-response/#orjson-or-response-model and https://fastapi.tiangolo.com/tutorial/response-model/   )category
stacklevelc                        e Zd ZdZdedefdZy)UJSONResponsea  JSON response using the ujson library to serialize data to JSON.

    **Deprecated**: `UJSONResponse` is deprecated. FastAPI now serializes data
    directly to JSON bytes via Pydantic when a return type or response model is
    set, which is faster and doesn't need a custom response class.

    Read more in the
    [FastAPI docs for Custom Response](https://fastapi.tiangolo.com/advanced/custom-response/#orjson-or-response-model)
    and the
    [FastAPI docs for Response Model](https://fastapi.tiangolo.com/tutorial/response-model/).

    **Note**: `ujson` is not included with FastAPI and must be installed
    separately, e.g. `pip install ujson`.
    contentreturnc                 h    t         J d       t        j                  |d      j                  d      S )Nz,ujson must be installed to use UJSONResponseF)ensure_asciizutf-8)ujsondumpsencodeselfr   s     S/var/www/html/jploft-chatbot/venv/lib/python3.12/site-packages/fastapi/responses.pyrenderzUJSONResponse.render2   s0     P"PP {{77>>wGG    N__name__
__module____qualname____doc__r   bytesr    r   r   r   r      s    Hc He Hr   r   am  ORJSONResponse is deprecated, FastAPI now serializes data directly to JSON bytes via Pydantic when a return type or response model is set, which is faster and doesn't need a custom response class. Read more in the FastAPI docs: https://fastapi.tiangolo.com/advanced/custom-response/#orjson-or-response-model and https://fastapi.tiangolo.com/tutorial/response-model/c                        e Zd ZdZdedefdZy)ORJSONResponsea  JSON response using the orjson library to serialize data to JSON.

    **Deprecated**: `ORJSONResponse` is deprecated. FastAPI now serializes data
    directly to JSON bytes via Pydantic when a return type or response model is
    set, which is faster and doesn't need a custom response class.

    Read more in the
    [FastAPI docs for Custom Response](https://fastapi.tiangolo.com/advanced/custom-response/#orjson-or-response-model)
    and the
    [FastAPI docs for Response Model](https://fastapi.tiangolo.com/tutorial/response-model/).

    **Note**: `orjson` is not included with FastAPI and must be installed
    separately, e.g. `pip install orjson`.
    r   r   c                     t         J d       t        j                  |t         j                  t         j                  z        S )Nz.orjson must be installed to use ORJSONResponse)option)orjsonr   OPT_NON_STR_KEYSOPT_SERIALIZE_NUMPYr   s     r   r   zORJSONResponse.renderP   s;    !S#SS!||F33f6P6PP
 	
r   Nr   r$   r   r   r&   r&   7   s    
c 
e 
r   r&   )typingr   fastapi.exceptionsr   starlette.responsesr   r   r   r   r	   r
   r   typing_extensionsr   r   ImportErrorr)   r   r&   r$   r   r   <module>r1      s     8 < < < F D 4 F (

 @
 'HL HH* @
 '
\ 

c  E  Fs#   A: B :BBBB