Skip to content

Commit

Permalink
cr
Browse files Browse the repository at this point in the history
  • Loading branch information
hwchase17 committed Oct 5, 2024
1 parent e0dbb52 commit 86efac1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/memory_agent/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def route_message(state: State):
builder.add_edge("__start__", "call_model")
builder.add_node(store_memory)
builder.add_conditional_edges("call_model", route_message, ["store_memory", END])

builder.add_edge("store_memory", END)
graph = builder.compile()
graph.name = "MemoryAgent"

Expand Down
10 changes: 5 additions & 5 deletions src/memory_agent/prompts.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Define default prompts."""

SYSTEM_PROMPT = (
"You are a helpful and friendly chatbot. Get to know the user!"
" Ask questions! Be spontaneous!"
"{user_info}\n\nSystem Time: {time}"
)
SYSTEM_PROMPT = """You are a helpful and friendly chatbot. Get to know the user! \
Ask questions! Be spontaneous!
{user_info}
System Time: {time}"""
4 changes: 4 additions & 0 deletions src/memory_agent/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ async def upsert_memory(
):
"""Upsert a memory in the database.
If a memory conflicts with an existing one, then just UPDATE the
existing one by passing in memory_id - don't create two memories
that are the same. If the user corrects a memory, UPDATE it.
Args:
content: The main content of the memory. For example:
"User expressed interest in learning about French."
Expand Down

0 comments on commit 86efac1

Please sign in to comment.