
    Fd                         d Z ddlmZ ddlmZ ddlZddlmZmZm	Z	 ddl
mZ ddlmZ ddlmZ dd	lmZ erdd
lmZ dZdZd"d!ZdS )#zConfigurator module.    )annotations)TYPE_CHECKINGN)BackForeStyle)utils)check_model)logger)get_supported_memory_backends)Configzgpt-4zgpt-3.5-turboconfigr   
continuousboolcontinuous_limitintai_settings_filestrprompt_settings_fileskip_repromptspeakdebuggpt3onlygpt4onlymemory_typebrowser_nameallow_downloads	skip_newsreturnNonec                	   |                      d           |                     d           |                     d           |r5t          j        dt
          j        d           |                      d           |rt          j        dt
          j        d           t          j        dt
          j        d           |                     d           |r6t          j        dt
          j        |            |                     |           |r|st          j
        d	          |r5t          j        d
t
          j        d           |                     d           |rUt          j        dt
          j        d           |                     t                     |                     t                     n|	rtt          t          d          t          k    rUt          j        dt
          j        d           |                     t                     |                     t                     nP|                     t          | j        d                     |                     t          | j        d                     |
rbt%                      }|
}||vrGt          j        dt
          j        |            t          j        dt
          j        | j                   n|| _        |r't          j        dt
          j        d           d| _        |r|}t-          j        |          \  }}|sBt          j        dt
          j        |           t          j                     t3          d           t          j        dt
          j        |           || _        d| _        |r|}t-          j        |          \  }}|sBt          j        dt
          j        |           t          j                     t3          d           t          j        dt
          j        |           || _        |r|| _        |rt          j        dt
          j        d           t          j        dt
          j        t:          j         dt:          j         ddz              t          j        dt
          j        t:          j        t@          j!        z    dt@          j"                    d| _#        |r	d| _$        dS dS )a  Updates the config object with the given arguments.

    Args:
        continuous (bool): Whether to run in continuous mode
        continuous_limit (int): The number of times to run in continuous mode
        ai_settings_file (str): The path to the ai_settings.yaml file
        prompt_settings_file (str): The path to the prompt_settings.yaml file
        skip_reprompt (bool): Whether to skip the re-prompting messages at the beginning of the script
        speak (bool): Whether to enable speak mode
        debug (bool): Whether to enable debug mode
        gpt3only (bool): Whether to enable GPT3.5 only mode
        gpt4only (bool): Whether to enable GPT4 only mode
        memory_type (str): The type of memory backend to use
        browser_name (str): The name of the browser to use when using selenium to scrape the web
        allow_downloads (bool): Whether to allow Auto-GPT to download files natively
        skips_news (bool): Whether to suppress the output of latest news on startup
    FzDebug Mode: ENABLEDTzContinuous Mode: z	WARNING: zContinuous mode is not recommended. It is potentially dangerous and may cause your AI to run forever or carry out actions you would not usually authorise. Use at your own risk.zContinuous Limit: z5--continuous-limit can only be used with --continuouszSpeak Mode: zGPT3.5 Only Mode: smart_llm_model)
model_typezGPT4 Only Mode: fast_llm_modelz2ONLY THE FOLLOWING MEMORY BACKENDS ARE SUPPORTED: zDefaulting to: zSkip Re-prompt: zFAILED FILE VALIDATION   zUsing AI Settings File:zUsing Prompt Settings File:zNative Downloading:zEAuto-GPT will now be able to download and save files to your machine. zDIt is recommended that you monitor any files it downloads carefully.z7ALWAYS REMEMBER TO NEVER OPEN FILES YOU AREN'T SURE OF!N)%set_debug_modeset_continuous_modeset_speak_moder
   typewriter_logr   GREENREDset_continuous_limitclick
UsageErrorset_fast_llm_modelGPT_3_MODELset_smart_llm_modelr	   GPT_4_MODELr$   r"   r   YELLOWmemory_backendr   r   validate_yaml_filedouble_checkexitr   r   selenium_web_browserr   LIGHTYELLOW_EXRESETr   BRIGHT	RESET_ALLr   r   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   supported_memorychosenfile	validatedmessages                      HC:\Users\Administrator\Downloads\Auto-GPT-master\autogpt\configurator.pycreate_configrD      s   B %   
u%%%
%    $ndj)DDDd### :148YGGGH0	
 	
 	
 	""4((( 	:!$dj5E2G   ''(8999  X
 XVWWW $ndj)DDDd###  
2DJ	JJJ!!+..."";//// 	
0ABBBkQQ0$*iHHH!!+..."";////!!+f.CEU"V"VWWW"".0ABB	
 	
 	
  +8::)))!D#%  
 !"3T[&BWXXXX$*F! $0$*iHHH# $  %7==G 	!":DHgNNN!!!GGG7TJJJ"&# +#  %7==G 	!":DHgNNN!!!GGG;TZNNN&*# 3&2# &3TZKKKK"vvimisvvvTU	
 	
 	
 	Kx%,&pp_d_npp	
 	
 	

 "&         )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )__doc__
__future__r   typingr   r.   coloramar   r   r   autogptr   autogpt.llm.utilsr	   autogpt.logsr
   autogpt.memory.vectorr   autogpt.configr   r3   r1   rD    rE   rC   <module>rP      s      " " " " " "              & & & & & & & & & &       ) ) ) ) ) )       ? ? ? ? ? ? &%%%%%%V  V  V  V  V  V rE   