File tree Expand file tree Collapse file tree 2 files changed +9
-11
lines changed
Expand file tree Collapse file tree 2 files changed +9
-11
lines changed Original file line number Diff line number Diff line change 22title : " Stopping"
33---
44
5- import StopInvocation from ' /snippets/openapi/patch-invocations-id.mdx' ;
6-
7- You can terminate an invocation that's running. You can use this to stop automations or agents stuck in an infinite loop.
5+ You can terminate an invocation that's running. This is useful for stopping automations or agents stuck in an infinite loop.
86
97<Info >
108Terminating an invocation also destroys any browsers associated with it.
119</Info >
1210
1311## Via API
14- You can also do this via the API:
15-
16- <StopInvocation />
12+ Stopping an invocation via the API is not available yet, but it's coming very soon.
1713
1814## Via CLI
1915Use ` ctrl-c ` in the terminal tab where you launched the invocation.
Original file line number Diff line number Diff line change @@ -6,9 +6,10 @@ const client = new Kernel({
66 apiKey: ' My API Key' ,
77});
88
9- const deployments = await client .deployments .list ();
10-
11- console .log (deployments );
9+ // Automatically fetches more pages as needed.
10+ for await (const deploymentListResponse of client .deployments .list ()) {
11+ console .log (deploymentListResponse .id );
12+ }
1213```
1314
1415
@@ -18,7 +19,8 @@ from kernel import Kernel
1819client = Kernel(
1920 api_key = " My API Key" ,
2021)
21- deployments = client.deployments.list()
22- print (deployments)
22+ page = client.deployments.list()
23+ page = page.items[0 ]
24+ print (page.id)
2325```
2426</CodeGroup >
You can’t perform that action at this time.
0 commit comments