langchain_experimental.autonomous_agents.autogpt.prompt_generator
.PromptGenerator¶
- class langchain_experimental.autonomous_agents.autogpt.prompt_generator.PromptGenerator[source]¶
A class for generating custom prompt strings.
Does this based on constraints, commands, resources, and performance evaluations.
Initialize the PromptGenerator object.
Starts with empty lists of constraints, commands, resources, and performance evaluations.
Methods
__init__
()Initialize the PromptGenerator object.
add_constraint
(constraint)Add a constraint to the constraints list.
add_performance_evaluation
(evaluation)Add a performance evaluation item to the performance_evaluation list.
add_resource
(resource)Add a resource to the resources list.
add_tool
(tool)Generate a prompt string.
- __init__() None [source]¶
Initialize the PromptGenerator object.
Starts with empty lists of constraints, commands, resources, and performance evaluations.
- add_constraint(constraint: str) None [source]¶
Add a constraint to the constraints list.
- Parameters
constraint (str) – The constraint to be added.
- add_performance_evaluation(evaluation: str) None [source]¶
Add a performance evaluation item to the performance_evaluation list.
- Parameters
evaluation (str) – The evaluation item to be added.