
    Fd                         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
ZdedefdZdedefdZdS )    )Fore)AIConfig)Config)PromptConfig)
ApiManager)logger)PromptGenerator)prompt_user)clean_inputz]Determine exactly one command to use, and respond using the JSON schema specified previously:configreturnc                    t                      }t          | j                  }|j        D ]}|                    |           |j        D ]}|                    |           |j        D ]}|                    |           |S )z
    This function generates a prompt string that includes various constraints,
        commands, resources, and performance evaluations.

    Returns:
        str: The generated prompt string.
    )	r	   r   prompt_settings_fileconstraintsadd_constraint	resourcesadd_resourceperformance_evaluationsadd_performance_evaluation)r   prompt_generatorprompt_config
constraintresourceperformance_evaluations         JC:\Users\Administrator\Downloads\Auto-GPT-master\autogpt\prompts\prompt.pybuild_default_prompt_generatorr      s     '(( !!<==M $/ 4 4
''
3333 "+ 0 0%%h//// #0"G L L334JKKKK    c                    t          j        | j                  }| j        r|j        rt          j        dt          j        |j                   t          j        dt          j        |j	                   t          j        dt          j        |j
                    t          j        dt          j        |j        dk    rdn	d|j                    n|j        rt          j        dt          j        d	|j         d
d           t          | d|j         d|j	         d|j
         d|j        dk    rdn	d|j          d| j         d| j         d          }|                                | j        k    rt                      }|j        s)t!          |           }|                    | j                   | j        r&t          j        dt          j        | j                    t+                      }|                    |j                   t          j        |j        t          j        dd           t          j        dt          j        |j        d           t          j        dt          j        |j	        d           t          j        dt          j        dd           |j
        D ]$}t          j        dt          j        |d           %|S )z_Construct the prompt for the AI to respond to

    Returns:
        str: The prompt string
    zName :zRole :zGoals:zAPI Budget:r   infinite$zWelcome back! z%Would you like me to return to being ?T)
speak_textz(Continue with the last settings?
Name:  z
Role:  z
Goals: z
API Budget: z
Continue (/z): zVNOTE:All files/directories created by this agent can be found inside its workspace at:z,has been created with the following details:zName:FzRole: -)r   loadai_settings_fileskip_repromptai_namer   typewriter_logr   GREENai_roleai_goals
api_budgetr   authorise_keyexit_keylowerr
   saverestrict_to_workspaceYELLOWworkspace_pathr   set_total_budgetLIGHTBLUE_EX)r   	ai_configshould_continueapi_managergoals        r   construct_main_ai_configr<   -   s    f566I #	 1 #h
I4EFFFh
I4EFFFh
y7I4KLLLJ#.!33JJ9SY=Q9S9S	
 	
 	
 	

 
	 #JHI4EHHH		
 	
 	
 	
 &99 99 9 	9 9 %/144ZZ:Ti>R:T:T	9 9
 9 9
 #)/9 9 9
 
   ""fo55 

I 0''	v.///# 
dK$&	
 	
 	
 ,,K  !5666 6	    '4:y/@USSSS
'4:y/@USSSS
(DJuEEEE" G Gc4:tFFFFFr   N)coloramar   autogpt.config.ai_configr   autogpt.config.configr   autogpt.config.prompt_configr   autogpt.llm.api_managerr   autogpt.logsr   autogpt.prompts.generatorr	   autogpt.setupr
   autogpt.utilsr   DEFAULT_TRIGGERING_PROMPTr   r<    r   r   <module>rH      s         - - - - - - ( ( ( ( ( ( 5 5 5 5 5 5 . . . . . .       5 5 5 5 5 5 % % % % % % % % % % % %{ 6 o    <CV C C C C C C Cr   