
    	is                     z    d dl mZmZ d dlmZ d dlZ e       ZdZej                  dg d      de	d	efd
       Z
y)    )FastAPIRequest)ResponseNzhttps://www.chatgpt.comz/{path:path})GETPOSTPUTDELETE)methodspathrequestc                   K   t          d|  }|j                          d {   }t        |j                        }|j	                  dd        t        j                  d      4 d {   }|j                  |j                  ||||j                         d {   }d d d       d {    t        j                  |j                  t        |j                              S 7 7 }7 M7 ?# 1 d {  7  sw Y   OxY ww)N/hostT)follow_redirects)headerscontentparams)r   status_coder   )TARGET_BASEbodydictr   pophttpxAsyncClientr   methodquery_paramsr   r   r   )r   r   
target_urlr   r   clientresps          %/home/ubuntu/services/chatgpt/main.pyproxyr!   	   s       =$(J D 7??#GKK  $7 
 
6^^NN'' $ 
 

 
 $$T\\"   


 
 
 
sj   D C#AD 'C%(D +.C+C'C+D )C)*:D %D 'C+)D +C=1C42C=9D )fastapir   r   fastapi.responsesr   r   appr   	api_routestrr!        r    <module>r)      sI    $ & i'~'GHc G  Ir(   