Skip to content

Commit a1a6bb3

Browse files
author
cinjospeh
committed
optimize the content format for the agent's memory access
1 parent 56670f0 commit a1a6bb3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dbgpt/agent/core/role.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,13 @@ async def write_memories(
233233
raise ValueError("Action output is required to save to memory.")
234234

235235
mem_thoughts = action_output.thoughts or ai_message
236-
observation = action_output.observations
236+
observation = check_fail_reason or action_output.observations
237+
action = action_output.action
237238

238239
memory_map = {
239240
"question": question,
240241
"thought": mem_thoughts,
241-
"action": check_fail_reason,
242+
"action": action,
242243
"observation": observation,
243244
}
244245
write_memory_template = self.write_memory_template

0 commit comments

Comments
 (0)