Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Lin authored and Kevin Lin committed Oct 10, 2024
1 parent 8c900b7 commit 046f53c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
4 changes: 0 additions & 4 deletions letta/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1338,10 +1338,6 @@ def retry_message(self) -> List[Message]:

def save_agent(agent: Agent, ms: MetadataStore):
"""Save agent to metadata store"""
# from letta.o1_agent import O1Agent
# if isinstance(agent, O1Agent):
# assert isinstance(agent.agent.agent_state.memory, Memory), f"Memory object is not of type Memory: {type(letta_agent.agent_state.memory)}"

agent.update_state()
agent_state = agent.agent_state
agent_id = agent_state.id
Expand Down
16 changes: 0 additions & 16 deletions letta/o1_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ def __init__(
):
super().__init__(interface, agent_state, tools)
self.max_thinking_steps = max_thinking_steps
# self.interface = interface
# self.agent_state = agent_state
self.tools = tools
self.first_message_verify_mono = first_message_verify_mono

Expand All @@ -75,9 +73,6 @@ def step(
tools=self.tools,
first_message_verify_mono=self.first_message_verify_mono,
)
print("O1 AGENT", self.agent_state.system)
print("O1 AGENT", self.agent_state)

response = thinking_agent.step(
user_message,
first_message,
Expand All @@ -91,11 +86,7 @@ def step(
ms,
)

print("THINKING AGENT", thinking_agent.agent_state.system)
for _ in range(self.max_thinking_steps):
# assert isinstance(self.agent_state.memory, Memory), f"Memory object is not of type Memory: {type(self.agent.agent_state.memory)}"

# assert isinstance(thinking_agent.agent_state.memory, Memory), f"Memory object is not of type Memory"
response = thinking_agent.step(
None,
first_message,
Expand All @@ -112,10 +103,3 @@ def step(
if response.messages[-1].name == "send_final_message":
break
return response

# def rebuild_memory(self, force=False, update_timestamp=True, ms: Optional[MetadataStore] = None):
# self.agent.rebuild_memory(force, update_timestamp, ms)

# def update_state(self) -> AgentState:
# updated_state = self.agent.update_state()
# return updated_state

0 comments on commit 046f53c

Please sign in to comment.