diff --git a/src/openagi/agent.py b/src/openagi/agent.py index 05971f1..98180ed 100644 --- a/src/openagi/agent.py +++ b/src/openagi/agent.py @@ -33,6 +33,8 @@ class OutputFormat(str, Enum): session = None +session = None + class Admin(BaseModel): planner: Optional[BasePlanner] = Field( description="Type of planner to use for task decomposition.", @@ -496,6 +498,9 @@ def run(self, query: str, description: str,planned_tasks: Optional[List[Dict]] = # Human feedback part if self.memory.long_term: if bad_feedback: + bad_session.plan = str(planned_tasks) + bad_session.answer = result + self.save_ltm("update", bad_session) else: session = SessionDict( diff --git a/src/openagi/llms/mistral.py b/src/openagi/llms/mistral.py index 6038ff8..305083c 100644 --- a/src/openagi/llms/mistral.py +++ b/src/openagi/llms/mistral.py @@ -1,3 +1,5 @@ + + from openagi.exception import OpenAGIException from openagi.llms.base import LLMBaseModel, LLMConfigModel from openagi.utils.yamlParse import read_from_env