langchain_experimental.autonomous_agents.autogpt.prompt_generator
.PromptGenerator¶
- class langchain_experimental.autonomous_agents.autogpt.prompt_generator.PromptGenerator[source]¶
自定义提示字符串的生成器。
根据约束、命令、资源和性能评估来实现这一功能。
初始化PromptGenerator对象。
从空的约束、命令、资源和性能评估列表开始。
Methods
__init__
()初始化PromptGenerator对象。
add_constraint
(constraint)将约束添加到约束列表中。
add_performance_evaluation
(evaluation)将性能评估项目添加到性能评估列表中。
add_resource
(resource)将资源添加到资源列表中。
add_tool
(tool)生成一个提示字符串。
- Return type
None
- add_constraint(constraint: str) None [source]¶
将约束添加到约束列表中。
- 参数:
constraint (str): 要添加的约束。
- Parameters
constraint (str) –
- Return type
None
- add_performance_evaluation(evaluation: str) None [source]¶
将性能评估项目添加到性能评估列表中。
- 参数:
evaluation (str): 要添加的评估项目。
- Parameters
evaluation (str) –
- Return type
None