PromptGenerator#

class langchain_experimental.autonomous_agents.autogpt.prompt_generator.PromptGenerator[source]#

Generator of 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_prompt_string()

Generate a prompt string.

__init__() None[source]#

Initialize the PromptGenerator object.

Starts with empty lists of constraints, commands, resources, and performance evaluations.

Return type:

None

add_constraint(constraint: str) None[source]#

Add a constraint to the constraints list.

Parameters:

constraint (str) – The constraint to be added.

Return type:

None

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.

Return type:

None

add_resource(resource: str) None[source]#

Add a resource to the resources list.

Parameters:

resource (str) – The resource to be added.

Return type:

None

add_tool(tool: BaseTool) None[source]#
Parameters:

tool (BaseTool) –

Return type:

None

generate_prompt_string() str[source]#

Generate a prompt string.

Returns:

The generated prompt string.

Return type:

str