-
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
629ce52
first draft
isahers1 e6b6c8d
minor fix
isahers1 bc41152
second draft
isahers1 91e517f
reformat
isahers1 388112f
rename
isahers1 608331f
remove f-string
isahers1 4fcabeb
Merge branch 'main' into isaac/cronlist
isahers1 bcd0c02
fmt
isahers1 a477f08
Merge https://github.com/langchain-ai/langgraph into isaac/cronlist
isahers1 43cb838
Merge branch 'main' into isaac/cronlist
isahers1 dba5e4b
Merge branch 'isaac/cronlist' of https://github.com/isahers1/langgrap…
isahers1 1c28acb
fmt
isahers1 60d7ea6
fmt
isahers1 11e5c0e
fmt
isahers1 86412d6
fmt
isahers1 cdf3302
typing
isahers1 50658fa
Merge branch 'main' into isaac/cronlist
isahers1 83184aa
fmt
isahers1 2d447d3
Merge branch 'isaac/cronlist' of https://github.com/isahers1/langgrap…
isahers1 a043e6f
fmt
isahers1 778ed17
fmt
isahers1 95e5ae4
pagination
isahers1 f302670
fmt
isahers1 49d13df
fmt
isahers1 d5f1526
Merge branch 'main' of https://github.com/langchain-ai/langgraph into…
isahers1 d93f7bc
schema
isahers1 7a532f1
fmt
isahers1 30759de
fmt
isahers1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -687,6 +687,17 @@ | |
async def delete(self, cron_id: str) -> None: | ||
"""Delete a cron.""" | ||
await self.http.delete(f"/runs/crons/{cron_id}") | ||
|
||
async def list( | ||
self, assistant_id: Optional[str], thread_id: Optional[str] = None | ||
) -> ThreadState: | ||
"""Get a list of all the cron jobs.""" | ||
if thread_id: | ||
return await self.http.get(f"/threads/{thread_id}/runs/crons") | ||
elif assistant_id: | ||
return await self.http.get(f"/assistants/{assistant_id}/runs/crons") | ||
else: | ||
return await self.http.get(f"runs/crons") | ||
Check failure on line 700 in libs/sdk-py/langgraph_sdk/client.py GitHub Actions / cd libs/sdk-py / lint #3.9Ruff (F541)
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. assistant_id should be required for cron also (similar to run) |
||
|
||
|
||
def _get_api_key(api_key: Optional[str] = None) -> Optional[str]: | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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