Skip to content

Commit 72b3472

Browse files
committed
codegen done
1 parent ab503e0 commit 72b3472

File tree

2 files changed

+20
-62
lines changed

2 files changed

+20
-62
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,30 @@
77
<a href="https://x.com/rfgarcia"><img src="https://img.shields.io/twitter/follow/rfgarcia" alt="Follow @rfgarcia"></a>
88
</p>
99

10-
1110
This is the documentation for the Kernel platform. It's connected to [docs.onkernel.com](https://docs.onkernel.com).
1211

12+
## Code Snippets
13+
14+
In order to sync our code snippets in our docs ( not playground ) with the OpenAPI spec, we use a GitHub Action. You can run it locally to see the changes that will be made.
15+
16+
```bash
17+
bun run .github/scripts/generate_code_samples.ts
18+
```
19+
20+
When deploying, we generate the changes in a github action and push that to a branch called `gh_action_generated_docs`. Mintlify will then deploy the docs from that branch.
21+
22+
## Local Development
23+
24+
To run the docs locally, you can use the following command:
25+
26+
```bash
27+
mintlify dev
28+
```
29+
1330
## Contributing
1431

1532
We welcome contributions to the documentation. Please feel free to submit a pull request with your changes. See [CONTRIBUTING.md](CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) for more details.
1633

1734
## License
1835

19-
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
36+
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.

apps/invoke.mdx

Lines changed: 1 addition & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -9,66 +9,7 @@ You can invoke your app by making a `POST` request to Kernel's API. **For automa
99
<Info>Synchronous invocations time out after 100 seconds.</Info>
1010

1111
<CodeGroup>
12-
13-
```typescript Typescript
14-
import Kernel from '@onkernel/sdk';
15-
16-
const client = new Kernel({
17-
apiKey: 'My API Key',
18-
});
19-
20-
const invocation = await client.invocations.create({
21-
action_name: 'analyze',
22-
app_name: 'my-app',
23-
version: '1.0.0',
24-
});
25-
26-
console.log(invocation.id);
27-
```
28-
29-
30-
```python Python
31-
from kernel import Kernel
32-
33-
client = Kernel(
34-
api_key="My API Key",
35-
)
36-
invocation = client.invocations.create(
37-
action_name="analyze",
38-
app_name="my-app",
39-
version="1.0.0",
40-
)
41-
print(invocation.id)
42-
```
43-
44-
45-
```go Go
46-
package main
47-
48-
import (
49-
"context"
50-
"fmt"
51-
52-
"github.com/onkernel/kernel-go-sdk"
53-
"github.com/onkernel/kernel-go-sdk/option"
54-
)
55-
56-
func main() {
57-
client := kernel.NewClient(
58-
option.WithAPIKey("My API Key"),
59-
)
60-
invocation, err := client.Invocations.New(context.TODO(), kernel.InvocationNewParams{
61-
ActionName: "analyze",
62-
AppName: "my-app",
63-
Version: "1.0.0",
64-
})
65-
if err != nil {
66-
panic(err.Error())
67-
}
68-
fmt.Printf("%+v\n", invocation.ID)
69-
}
70-
```
71-
12+
{{ post /invocations }}
7213
</CodeGroup>
7314

7415
### Asynchronous invocations

0 commit comments

Comments
 (0)