Skip to content

Commit 615d665

Browse files
docs(stop): Update stopping instructions and API note (#44)
* docs(stop): Update stopping instructions and API note * docs: update code samples from OpenAPI --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 6561597 commit 615d665

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

apps/stop.mdx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,14 @@
22
title: "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>
108
Terminating 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
1915
Use `ctrl-c` in the terminal tab where you launched the invocation.

snippets/openapi/get-deployments.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff 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
1819
client = 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>

0 commit comments

Comments
 (0)