langchain_experimental.autonomous_agents.autogpt.agent
.AutoGPT¶
- 类 langchain_experimental.autonomous_agents.autogpt.agent.AutoGPT(ai_name: str, memory: VectorStoreRetriever, chain: LLMChain, output_parser: BaseAutoGPTOutputParser, tools: List[BaseTool], feedback_tool: Optional[HumanInputRun] = None, chat_history_memory: Optional[BaseChatMessageHistory] = None)[源代码]¶
与AutoGPT交互的代理。
方法
__init__
(ai_name, memory, chain, ...[, ...])from_llm_and_tools
(ai_name, ai_role, memory, ...)run
(goals)- 参数
ai_name (str) –
memory (VectorStoreRetriever) –
chain (LLMChain) –
output_parser (BaseAutoGPTOutputParser) –
工具 (列表[BaseTool]) –
feedback_tool (可选[HumanInputRun]) –
chat_history_memory (可选[BaseChatMessageHistory]) –
- __init__(ai_name: str, memory: VectorStoreRetriever, chain: LLMChain, output_parser: BaseAutoGPTOutputParser, tools: List[BaseTool], feedback_tool: Optional[HumanInputRun] = None, chat_history_memory: Optional[BaseChatMessageHistory] = None)[source]¶
- 参数
ai_name (str) –
memory (VectorStoreRetriever) –
chain (LLMChain) –
output_parser (BaseAutoGPTOutputParser) –
工具 (列表[BaseTool]) –
feedback_tool (可选[HumanInputRun]) –
chat_history_memory (可选[BaseChatMessageHistory]) –
- classmethod from_llm_and_tools(ai_name: str, ai_role: str, memory: VectorStoreRetriever, tools: List[BaseTool], llm: BaseChatModel, human_in_the_loop: bool = False, output_parser: Optional[BaseAutoGPTOutputParser] = None, chat_history_memory: Optional[BaseChatMessageHistory] = None) AutoGPT
- 参数
ai_name (str) –
ai_role (字符串) –
memory (VectorStoreRetriever) –
工具 (列表[BaseTool]) –
llm (BaseChatModel) –
human_in_the_loop (布尔值) –
output_parser (可选[BaseAutoGPTOutputParser]) –
chat_history_memory (可选[BaseChatMessageHistory]) –
- 返回类型