From c4b69f645cbd9b6cb50e929d6822419c43a1e5bf Mon Sep 17 00:00:00 2001 From: Ivan <75654991+ibarraz5@users.noreply.github.com> Date: Mon, 17 Nov 2025 00:12:33 -0700 Subject: [PATCH 1/2] Fix typo in 'development' in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 26f4c352..6b65cda2 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Langfun is *simple and elegant*: * An intuitive programming model, graspable in 5 minutes; * Plug-and-play into any Python codebase, making an immediate difference; * Comprehensive LLMs under a unified API: Gemini, GPT, Claude, Llama3, and more. -* Designed for agile developement: offering intellisense, easy debugging, with minimal overhead; +* Designed for agile development: offering intellisense, easy debugging, with minimal overhead; ## Hello, Langfun From f9c0ad71aa822624a3a6c403ec9db1a673e3fdad Mon Sep 17 00:00:00 2001 From: Ivan <75654991+ibarraz5@users.noreply.github.com> Date: Mon, 17 Nov 2025 00:14:50 -0700 Subject: [PATCH 2/2] fix: handle missing items correctly in ExecutionTrace.remove --- langfun/core/agentic/action.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/langfun/core/agentic/action.py b/langfun/core/agentic/action.py index 80419275..0b52b076 100644 --- a/langfun/core/agentic/action.py +++ b/langfun/core/agentic/action.py @@ -780,10 +780,11 @@ def append(self, item: TracedItem) -> None: def remove(self, item: TracedItem) -> None: """Removes an item from the sequence.""" - index = self.items.index(item) - if index == -1: - raise ValueError(f'Item not found in execution trace: {item!r}') - + try: + index = self.items.index(item) + except ValueError as exc: + raise ValueError(f'Item not found in execution trace: {item!r}') from exc + with pg.notify_on_change(False): self.items.pop(index)