Optional
memoryAdds a task to the task list.
The task to be added.
Promise resolving to void.
Executes a task based on the objective and the task description.
The objective of the task.
The task to be executed.
Optional
runManager: anyOptional CallbackManagerForChainRun instance.
Promise resolving to the result of the task execution as a string.
Generates the next tasks based on the result of the previous task, the task description, and the objective.
The result of the previous task.
The description of the task.
The objective of the task.
Optional
runManager: anyOptional CallbackManagerForChainRun instance.
Promise resolving to an array of tasks without taskID.
Prints the next task to the console.
The next task to be printed.
void
Prioritizes the tasks based on the current task ID and the objective.
The ID of the current task.
The objective of the task.
Optional
runManager: anyOptional CallbackManagerForChainRun instance.
Promise resolving to an array of prioritized tasks.
Return a json-like object representing this chain.
Static
deserializeLoad a chain from a json-like object describing it.
Static
fromLLMStatic method to create a new BabyAGI instance from a BaseLanguageModel.
A new instance of BabyAGI.
Class responsible for managing tasks, including their creation, prioritization, and execution. It uses three chains for these operations:
creationChain
,prioritizationChain
, andexecutionChain
.Example