Skip to content

Commit 22754bb

Browse files
committed
fix: Fix None error
1 parent 368e386 commit 22754bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ex_app/lib/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ async def call_model(
8686
if tool_enabled("find_details_of_current_user"):
8787
system_prompt_text += "Use the find_details_of_current_user tool to find the current user's location.\n"
8888

89-
if task['input']['memories']:
89+
if task['input'].get('memories', None) is not None:
9090
system_prompt_text += "You can remember things from other conversations with the user. If relevant, take into account the following memories:\n\n" + "\n".join(task['input']['memories']) + "\n\n"
9191
# this is similar to customizing the create_react_agent with state_modifier, but is a lot more flexible
9292
system_prompt = SystemMessage(

0 commit comments

Comments
 (0)