Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvokeRequestShallowValidator prevents LangGraph continuing execution after interrupt #702

Open
riyavsinha opened this issue Jul 3, 2024 · 0 comments

Comments

@riyavsinha
Copy link

After interrupting execution of a Runnable graph, Langgraph requires reinvoking stream with input=None:

for event in app.stream(None, config, stream_mode="values"):
    event["messages"][-1].pretty_print()

LangServe does not support this, though, because of the non-optional "input" in the InvokeRequestShallowValidator.

class InvokeRequestShallowValidator(BaseModel):
    """Shallow validator for Invoke Request.

    Validate basic shape of invoke request, downstream code
    is expected to do further validation.
    """

    input: Any = Field(..., description="The input to the runnable.")
    config: Optional[Dict[str, Any]] = Field(default_factory=dict)

Would it be ok to open a PR to modify this and make it optional? Or are there any other suggested workarounds?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant