Skip to content

Commit 341bf45

Browse files
authored
fix: dont have optional argument for memory_replace (#3800)
1 parent 6975137 commit 341bf45

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

letta/services/tool_executor/core_tool_executor.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,7 @@ async def core_memory_replace(
230230
await AgentManager().update_memory_if_changed_async(agent_id=agent_state.id, new_memory=agent_state.memory, actor=actor)
231231
return None
232232

233-
async def memory_replace(
234-
self,
235-
agent_state: AgentState,
236-
actor: User,
237-
label: str,
238-
old_str: str,
239-
new_str: Optional[str] = None,
240-
) -> str:
233+
async def memory_replace(self, agent_state: AgentState, actor: User, label: str, old_str: str, new_str: str) -> str:
241234
"""
242235
The memory_replace command allows you to replace a specific string in a memory
243236
block with a new string. This is used for making precise edits.
@@ -246,8 +239,7 @@ async def memory_replace(
246239
label (str): Section of the memory to be edited, identified by its label.
247240
old_str (str): The text to replace (must match exactly, including whitespace
248241
and indentation). Do not include line number prefixes.
249-
new_str (Optional[str]): The new text to insert in place of the old text.
250-
Omit this argument to delete the old_str. Do not include line number prefixes.
242+
new_str (str): The new text to insert in place of the old text.
251243
252244
Returns:
253245
str: The success message

0 commit comments

Comments
 (0)