Merge pull request #2115 from langchain-ai/nc/15oct/update-is-last-step

Return IsLastStep to previous definition
This commit is contained in:
Nuno Campos
2024-10-15 08:41:30 -07:00
committed by GitHub
@@ -5,7 +5,7 @@ from langgraph.managed.base import ManagedValue
class IsLastStepManager(ManagedValue[bool]):
def __call__(self) -> bool:
return self.loop.step == self.loop.stop
return self.loop.step == self.loop.stop - 1
IsLastStep = Annotated[bool, IsLastStepManager]