OptionalmemoryRun the core logic of this chain and return the output
OptionalrunManager: anyReturn the string type key uniquely identifying this class of chain.
Protected_Adds 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.
OptionalrunManager: 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.
OptionalrunManager: anyOptional CallbackManagerForChainRun instance.
Promise resolving to an array of tasks without taskID.
Retrieves the top tasks that are most similar to the given query.
The query to search for.
The number of top tasks to retrieve.
Promise resolving to an array of top tasks.
Invoke the chain with the provided input and returns the output.
Input values for the chain run.
Optionaloptions: anyPromise that resolves with the output of the chain run.
Prints the next task to the console.
The next task to be printed.
void
Prints the current task list to the console.
void
Prints the result of a task to the console.
The result of the task.
void
Prioritizes the tasks based on the current task ID and the objective.
The ID of the current task.
The objective of the task.
OptionalrunManager: anyOptional CallbackManagerForChainRun instance.
Promise resolving to an array of prioritized tasks.
Return a json-like object representing this chain.
StaticdeserializeLoad a chain from a json-like object describing it.
StaticfromStatic method to create a new BabyAGI instance from a BaseLanguageModel.
A new instance of BabyAGI.
Staticlc_
Class responsible for managing tasks, including their creation, prioritization, and execution. It uses three chains for these operations:
creationChain,prioritizationChain, andexecutionChain.Example