mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-13 11:14:25 +01:00
* Add categories to command registry * Fix tests * Clean up prompt generation * Rename Performance Evaluations to Best Practices * Move specification of response format from system prompt to Agent.construct_base_prompt * Clean up PromptGenerator class * Add debug logging to AIConfig autogeneration * Clarify prompting and add support for multiple thought processes to Agent * WIP: PlanningAgent * Disable message history by default on BaseAgent * Add CommandOutput and ThoughtProcessOutput type aliases * Fix interrupts in main.py * Use custom exceptions and clean up exception/error handling * Remove duplicate agent_history.py * Update PlanningAgent from upstream * WIP: Support for dynamic in-prompt context * WIP: response formats for PlanningAgent three-stage cycle * Remove browsing overlay & separate browsing from extraction code * Fix human feedback * Fix tests * Include history in Agent prompt generation * Code improvements in agent.py * Add ask_user command and revise system prompt
29 lines
717 B
Python
29 lines
717 B
Python
"""Commands to interact with the user"""
|
|
|
|
from __future__ import annotations
|
|
|
|
COMMAND_CATEGORY = "user_interaction"
|
|
COMMAND_CATEGORY_TITLE = "User Interaction"
|
|
|
|
from autogpt.agents.agent import Agent
|
|
from autogpt.app.utils import clean_input
|
|
from autogpt.command_decorator import command
|
|
|
|
|
|
@command(
|
|
"ask_user",
|
|
(
|
|
"If you need more details or information regarding the given goals,"
|
|
" you can ask the user for input"
|
|
),
|
|
{
|
|
"question": {
|
|
"type": "string",
|
|
"description": "The question or prompt to the user",
|
|
"required": True,
|
|
}
|
|
},
|
|
)
|
|
def ask_user(question: str, agent: Agent) -> str:
|
|
return clean_input(agent.config, question)
|