Merge pull request #2112 from langchain-ai/vb/fix-type

langgraph: fix type for RemainingSteps
This commit is contained in:
Nuno Campos
2024-10-15 08:34:50 -07:00
committed by GitHub
@@ -11,9 +11,9 @@ class IsLastStepManager(ManagedValue[bool]):
IsLastStep = Annotated[bool, IsLastStepManager]
class RemainingStepsManager(ManagedValue[bool]):
def __call__(self) -> bool:
class RemainingStepsManager(ManagedValue[int]):
def __call__(self) -> int:
return self.loop.stop - self.loop.step
RemainingSteps = Annotated[bool, RemainingStepsManager]
RemainingSteps = Annotated[int, RemainingStepsManager]