Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Planner Interface #3790

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions autogpt/core/planning/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
import abc


rihp marked this conversation as resolved.
Show resolved Hide resolved
class Planner(abc.ABC):
pass
"""Build prompts based on inputs, can potentially store and retrieve planning state from the workspace"""

def __init__(config, logger, plugin_manager, workspace, *arg, **kwargs):
collijk marked this conversation as resolved.
Show resolved Hide resolved
pass

def construct_goals_prompt(big_task: str) -> str:
collijk marked this conversation as resolved.
Show resolved Hide resolved
"""This method is called upon the creation of an agent to define in more detail its goals"""
pass

def construct_next_step_prompt(
context, # Like a dict of message history, prior commands, current time, etc.
memory, # Maybe an explicit handle for the memory backend
goals,
tasks_queue: dict = None,
collijk marked this conversation as resolved.
Show resolved Hide resolved
# Carefully consider if there are other dependencies
) -> str:
collijk marked this conversation as resolved.
Show resolved Hide resolved
"""This function makes the agent figure out what to do next based on its state"""

def check_tasks_notification_queue(n: int) -> dict:
collijk marked this conversation as resolved.
Show resolved Hide resolved
"""Returns a number of events in the queue that are closest to the current time.
This summarizes each task except the first one"""
pass

tasks_queue = check_tasks_notification_queue(5)

def get_important_messages(context: list[str]) -> list[str]:
"""takes in the context and seniority of the message senders to infer the most important action to take on"""
pass

pass

def update_plan(
collijk marked this conversation as resolved.
Show resolved Hide resolved
plan,
context, # Like a dict of message history, prior commands, etc.
) -> str:
"""This function reads the plan, updates the status of the tasks and returnts an updated plan"""
pass