-
Notifications
You must be signed in to change notification settings - Fork 908
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
sdk-py: added Cron search functionality #804
Conversation
libs/sdk-py/langgraph_sdk/client.py
Outdated
elif assistant_id: | ||
return await self.http.get(f"/assistants/{assistant_id}/runs/crons") | ||
else: | ||
return await self.http.get(f"runs/crons") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assistant_id should be required for cron also (similar to run)
libs/sdk-py/langgraph_sdk/client.py
Outdated
@@ -687,6 +687,20 @@ async def create( | |||
async def delete(self, cron_id: str) -> None: | |||
"""Delete a cron.""" | |||
await self.http.delete(f"/runs/crons/{cron_id}") | |||
|
|||
async def list( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you call this search
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
libs/sdk-py/langgraph_sdk/client.py
Outdated
"thread_id": thread_id, | ||
} | ||
payload = {k: v for k, v in payload.items() if v is not None} | ||
return await self.http.post(f"/runs/crons/search", json=payload) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't need f"" since there's no replacements
…into isaac/cronlist
libs/sdk-py/langgraph_sdk/client.py
Outdated
@@ -412,8 +412,7 @@ def stream( | |||
interrupt_after: Optional[list[str]] = None, | |||
feedback_keys: Optional[list[str]] = None, | |||
multitask_strategy: Optional[MultitaskStrategy] = None, | |||
) -> AsyncIterator[StreamPart]: | |||
... | |||
) -> AsyncIterator[StreamPart]: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is causing the lint error. The ellipse (...
) should be on a new line. Undo this change and all of the other instances and you should be good to go!
) -> AsyncIterator[StreamPart]:
...
No description provided.