You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ChatDocument, ChatAgent now have auto-created ids, and id -> obj map is stored in ObjectRegistry
This registry enables a variety of lineage-related pointers to be kept:
In Task, we keep parent/child relations as pending_message evolves
An Agent's message_history, each message has a chat_document_id pointing to the corresponding ChatDocument
ChatDocument.metadata has:
agent_id to indicate which Agent it was created from, and
msg_idx indicates which message in agent's message_history it corresponds to
New tool, RewindTool can be used by an Agent to "rewind and redo" its Nth Assistant message
(all dependent messages in this and another agent are cleared out, thanks to the lineage links). This is intended to mimic how a human often uses a chat platform (like ChatGPT) -- in a long conversation that has become messy (with too many distracting details), based on the conversation so far, they often realize of a better way to ask an earlier question, and go back and "edit and re-submit" this past message, which often gets dramatically better responses.
When used appropriately by Agents, this can result in much cheaper, faster and more accurate results. Examples coming soon but see this test for a toy usage example
Task.add_sub_task now takes as args either tasks or tuples of [Task, TaskConfig] where TaskConfig dictates how the task should behave as a subtask. Currently the main param is the boolean TaskConfig.restart_as_subtask,
which determines whether or not this task resets Agent history on every run when invoked by a parent Task.
This new API enables more granular control on how subtasks behave.
Task constructor restart param semantics: When True this restarts all agents (including those of sub-tasks recursively) whenever the top level task is run