
    dh<	                     8    S SK r S SKrS SKJrJr   " S S5      rg)    N)DictOptionalc                       \ rS rSr% SrSr\\S'   \         SS\S\	\   S\	\   S	\	\   S
\	\   S\	\   S\	\
   S\	\   S\	\   S\	\
   S\\\4   4S jj5       rSrg)Portkey   zPortkey configuration.

Attributes:
    base: The base URL for the Portkey API.
      Default: "https://api.portkey.ai/v1/proxy"
zhttps://api.portkey.ai/v1/proxybaseNapi_keytrace_idenvironmentuserorganisationpromptretry_countcachecache_force_refresh	cache_agereturnc
                    Ub  U[        SS5      ;   d   S5       eUb  US;   d   S5       eUb"  [        U[        5      (       a  US;   d   S5       eU	b  [        U	[        5      (       d   S5       e[        R
                  [        R                  S	'   U S
S.n
U(       a  XS'   U(       a  [        U5      U
S'   U(       a  XzS'   U(       a  XS'   U	(       a  S[        U	5       3U
S'   0 nU(       a  X+S'   U(       a  X;S'   U(       a  XKS'   U(       a  X[S'   U(       a'  U
R                  S[        R                  " U5      05        U
$ )N   r   z;retry_count must be an integer and in range [1, 2, 3, 4, 5])simplesemanticz$cache must be 'simple' or 'semantic')TrueFalsez-cache_force_refresh must be 'True' or 'False'zcache_age must be an integerOPENAI_API_BASEzproxy openai)zx-portkey-api-keyzx-portkey-modezx-portkey-trace-idzx-portkey-retry-countzx-portkey-cachezx-portkey-cache-force-refreshzmax-age:zCache-Control_environment_user_organisation_promptzx-portkey-metadata)range
isinstancestrintr   r   osenvironupdatejsondumps)r	   r
   r   r   r   r   r   r   r   r   headersmetadatas               ]/var/www/html/shao/venv/lib/python3.13/site-packages/langchain_community/utilities/portkey.pyConfigPortkey.Config   so    "kU1a[&@ 	
I	
@ } *
 !
 	2 2	2 
 #**C00#'88	; ;	; 
  Jy#$>$> 	
*	
> )0

$% "),

 ,4()/2;/?G+,).%&7J34)1#i.1A'BGO$'2^$ $W(4_%"(YNN0$**X2FGH     )	NNNNNNNNN)__name__
__module____qualname____firstlineno____doc__r   r!   __annotations__staticmethodr   r"   r   r+   __static_attributes__r.   r-   r*   r   r      s     2D#1 #'%)"&* $%)#-1#'::3-: c]: sm	:
 sm: : c]: }: &c]: C=: 
c3h: :r-   r   )r&   r#   typingr   r   r   r.   r-   r*   <module>r8      s     	 !E Er-   