Skip to content

Commit d324bff

Browse files
committed
Windmill AI page + doc, endgame
1 parent 0cbac0e commit d324bff

File tree

18 files changed

+402
-264
lines changed

18 files changed

+402
-264
lines changed

docs/code_editor/ai_generation.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ canonical_url: /docs/core_concepts/ai_generation
44

55
import DocCard from '@site/src/components/DocCard';
66

7-
# AI Generation
7+
# Windmill AI
88

99
Windmill provides ways to have AI help you in your coding experience.
1010

@@ -16,11 +16,11 @@ Windmill provides ways to have AI help you in your coding experience.
1616

1717
<br/>
1818

19-
All details at:
19+
All details at [Windmill AI](../core_concepts/22_ai_generation/index.md):
2020

2121
<div class="grid grid-cols-2 gap-6 mb-4">
2222
<DocCard
23-
title="AI Generation"
23+
title="Windmill AI"
2424
description="Have AI complete code on Windmill."
2525
href="/docs/core_concepts/ai_generation"
2626
/>

docs/code_editor/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Windmill's code editor has the following specific-features:
5757
href="/docs/code_editor/assistants"
5858
/>
5959
<DocCard
60-
title="AI Generation"
60+
title="Windmill AI"
6161
description="Windmill provides ways to have AI help you in your coding experience."
6262
href="/docs/core_concepts/ai_generation"
6363
/>

docs/compared_to/prefect.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ We highlight below the main differences between the 2 on the following axis:
1414
- [Benchmark #1](#benchmark-1)
1515
- [Benchmark #2](#benchmark-2)
1616
- [Observability and Monitoring](#observability-and-monitoring)
17-
- [AI Generation](#ai-generation)
17+
- [Windmill AI](#ai-generation)
1818
- [Pricing](#pricing)
1919
- [Scripts and Apps](#scripts-and-apps)
2020

@@ -234,7 +234,7 @@ The main difference is that Prefect's application seems to be conceived as a rel
234234
/>
235235
</div>
236236

237-
## AI Generation
237+
## Windmill AI
238238

239239
Windmill provides ways to have AI help you in your coding experience. From prompts, generate scripts that interact with your integrations, or flows where the AI manages the data transmission between steps, or even automatic error resolution.
240240

@@ -248,7 +248,7 @@ Windmill provides ways to have AI help you in your coding experience. From promp
248248

249249
<div class="grid grid-cols-2 gap-6 mb-4">
250250
<DocCard
251-
title="AI Generation"
251+
title="Windmill AI"
252252
description="Have AI complete code on Windmill."
253253
href="/docs/core_concepts/ai_generation"
254254
/>
Loading
Lines changed: 29 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# AI Generation
1+
# Windmill AI
22

33
Windmill provides ways to have AI help you in your coding experience.
44

@@ -8,29 +8,31 @@ If you're interested leveraging OpenAI from your scripts, flows and apps, check
88

99
:::
1010

11-
## Code Generation
11+
## Windmill AI for Scripts
1212

1313
Generate Windmill-specific code from simple text.
1414

15-
<video
16-
className="border-2 rounded-xl object-cover w-full h-full dark:border-gray-800"
17-
controls
18-
src="/videos/ai_generation.mp4"
19-
/>
20-
21-
<br/>
22-
2315
On the workspace settings, go to the "OpenAI Credentials" tab and add an [OpenAI resource](../../integrations/openai.md).
2416

2517
![OpenAI Resource](../../assets/code_editor/openai_credentials.png "OpenAI Resource")
2618

2719
:::caution
2820

29-
Code generation on Windmill from OpenAI only works on GPT-4 so far.
21+
Code generation on Windmill from OpenAI only works on GPT-3.5-turbo and GPT-4 so far.
3022

3123
:::
3224

33-
Then from a [code editor](../../code_editor/index.mdx) (Script, Flow, Apps), click on `AI Gen` and write with a prompt what the script should do. The script will use Windmill's main requirements and features (exposing a main function, importing libraries, using resource types, declaring required parameters with types, leveraging database schema).
25+
### Code Generation
26+
27+
<video
28+
className="border-2 rounded-xl object-cover w-full h-full dark:border-gray-800"
29+
controls
30+
src="/videos/ai_generation.mp4"
31+
/>
32+
33+
<br/>
34+
35+
From a [code editor](../../code_editor/index.mdx) (Script, Flow, Apps), click on `AI Gen` and write with a prompt what the script should do. The script will use Windmill's main requirements and features (exposing a main function, importing libraries, using resource types, declaring required parameters with types, leveraging database schema).
3436

3537
![Prompt](../../assets/code_editor/ai_gen.png "Prompt")
3638

@@ -56,67 +58,50 @@ Upon error when executing code, you will be offered to "AI Fix" it. The assistan
5658
src="/videos/ai_fix.mp4"
5759
/>
5860

59-
## Flow Generation
61+
## Windmill AI for Flows
6062

6163
Generate flows from prompts.
6264

63-
### Sequence
65+
### Sequence Flows
66+
67+
Describe the sequence of actions you wish to execute, and the AI Flow builder will write all the steps, link them together, and allow you to trigger the flow manually.
6468

6569
<video
6670
className="border-2 rounded-xl object-cover w-full h-full dark:border-gray-800"
6771
controls
6872
src="/videos/flow_ai.mp4"
6973
/>
7074

71-
## Code Auto-Completion with Codium
75+
### Trigger Flows
7276

73-
[Codeium](https://codeium.com/) is a code acceleration toolkit built on AI technology. In particular, Codeium has a free [browser extension](https://codeium.com/download) that works as a code completion assistant.
77+
Build a flow with two scripts, one that regularly checks for changes in an external system and a second that is executed for each change using a [for-loop](../../flows/12_flow_loops.md).
7478

7579
<video
7680
className="border-2 rounded-xl object-cover w-full h-full dark:border-gray-800"
7781
controls
78-
src="https://github.com/videos/codeium_example.mp4"
82+
src="https://github.com/videos/flow_ai_trigger.mp4"
7983
/>
8084

8185
<br/>
8286

83-
Here is how to install the extension on Chrome (details [here](https://codeium.com/chrome_tutorial)):
84-
85-
1. Install the [extension](https://chrome.google.com/webstore/detail/codeium-ai-code-autocompl/hobjkcpmjhlegmobgonaagepfckjkceh).
86-
2. Sign in to Codeium using an e-mail or Google.
87-
3. If it works, you should see the Codeium extension turn green.
88-
4. To have it work on Windmill, add it to your Codeium allowlist:
89-
- Click on Codeium extension icon.
90-
- Select `Open Options Page`.
91-
- In the Allowlist, write `https:\/\/app\.windmill\.dev\/.*` (or your domain, if self-hosting).
92-
- `Save Allowlist`.
87+
For both steps, you can either choose a script from the [Hub](https://hub.windmill.dev/) or generate one from scratch using Windmill AI. The inputs of the for-loop action are automatically filled in with the ouputs of the trigger step. At the end of the process, flow inputs are inferred and you just need to fill them in.
9388

94-
Now you're good to have Codeium suggest code in Windmill's code editor (scripts, flows, apps).
89+
The flow is automatically set to run every 15 minutes when deployed. The [schedule](../1_scheduling/index.md) can then be customized (e.g. every 30 seconds etc.)
9590

96-
The code will auto-suggest, and if you like it, press on `tab` to accept.
97-
98-
You can help it by giving proper functions names:
99-
100-
<video
101-
className="border-2 rounded-xl object-cover w-full h-full dark:border-gray-800"
102-
controls
103-
src="/videos/codeium_function.mp4"
104-
/>
91+
This allows you to avoid relying on webhooks sent by external APIs, which can be tedious to configure.
10592

106-
<br/>
93+
## Windmill AI Code Completion
10794

108-
Or by writing comments:
95+
Windmill comes with its own code code-completion system.
10996

11097
<video
11198
className="border-2 rounded-xl object-cover w-full h-full dark:border-gray-800"
11299
controls
113-
src="https://github.com/videos/codeium_comments.mp4"
100+
src="https://github.com/videos/code_autopilot.mp4"
114101
/>
115102

116103
<br/>
117104

118-
:::caution
119-
120-
Please note that the code suggested by Codeidum is not specific to Windmill and therefore does not necessarily meet its requirements (exposing a main function and declaring dependencies in the same file).
105+
All you need to do is enter an [OpenAI resource](../../integrations/openai.md) with GPT 3.5 or GPT 4 key from the workspace settings and check "Enable code completion", and code suggestions will be provided in any [code editor](../../code_editor/index.mdx) for any language.
121106

122-
:::
107+
![Enable Windmill autopilot](./enable_autopilot.png "Enable Windmill autopilot")

docs/core_concepts/index.mdx

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ On top of its editors to build endpoints, flows and apps, Windmill comes with a
1212
description="Windmill creates auto-generated user interfaces for scripts and flows based on their parameters."
1313
href="/docs/core_concepts/auto_generated_uis"
1414
/>
15+
<DocCard
16+
title="Windmill AI"
17+
description="Have AI complete code on Windmill."
18+
href="/docs/core_concepts/ai_generation"
19+
/>
1520
<DocCard
1621
title="JSON Schema and Parsing"
1722
description="JSON Schemas are used for defining the input specification for scripts and flows, and specifying resource types."
@@ -31,11 +36,6 @@ On top of its editors to build endpoints, flows and apps, Windmill comes with a
3136
title="Persistent Storage"
3237
description="Ensure that your data is safely stored and easily accessible whenever required."
3338
href="/docs/core_concepts/persistent_storage"
34-
/>
35-
<DocCard
36-
title="AI Generation"
37-
description="Have AI complete code on Windmill."
38-
href="/docs/core_concepts/ai_generation"
3939
/>
4040
<DocCard
4141
title="Roles and Permissions"
@@ -174,6 +174,26 @@ On top of its editors to build endpoints, flows and apps, Windmill comes with a
174174
/>
175175
</div>
176176

177+
## Code Editor-Specific Features
178+
179+
<div class="grid grid-cols-2 gap-6 mb-4">
180+
<DocCard
181+
title="Parameter Inference"
182+
description="Windmill ensures that the parameters passed to scripts, flows, and resources match the expected format and type."
183+
href="/docs/code_editor/parameter_inference"
184+
/>
185+
<DocCard
186+
title="Add Resources and Variables to Code"
187+
description="You can add directly access Variables and Resources from the Code Editor."
188+
href="/docs/code_editor/add_variables_resources"
189+
/>
190+
<DocCard
191+
title="Code Assistants"
192+
description="Windmill integrates code assistants into its code editor to provide language-specific suggestions, linting, formatting, and more."
193+
href="/docs/code_editor/assistants"
194+
/>
195+
</div>
196+
177197

178198
## Script-Specific Features
179199

@@ -228,6 +248,12 @@ All details on Flows can be found in the [Flows section](../flows/1_flow_editor.
228248
description="Trigger flows on-demand, by schedule or on external events."
229249
href="/docs/getting_started/trigger_flows"
230250
/>
251+
<DocCard
252+
color="teal"
253+
title="AI-Generated Flows"
254+
description="Generate flows from prompts."
255+
href="/docs/flows/ai_flows"
256+
/>
231257
<DocCard
232258
color="teal"
233259
title="Branches"

docs/flows/17_ai_flows.mdx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
canonical_url: /docs/core_concepts/ai_generation
3+
---
4+
5+
import DocCard from '@site/src/components/DocCard';
6+
7+
# AI-Generated Flows
8+
9+
Generate flows from prompts.
10+
11+
<video
12+
className="border-2 rounded-xl object-cover w-full h-full dark:border-gray-800"
13+
controls
14+
src="/videos/flow_ai_trigger.mp4"
15+
/>
16+
17+
<br/>
18+
19+
All details at [Windmill AI](../core_concepts/22_ai_generation/index.md):
20+
21+
<div class="grid grid-cols-2 gap-6 mb-4">
22+
<DocCard
23+
title="Windmill AI"
24+
description="Have AI complete code on Windmill."
25+
href="/docs/core_concepts/ai_generation"
26+
/>
27+
</div>

docs/flows/1_flow_editor.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ The Flow Editor has the following features which are the subject of specific pag
5050
description="Trigger flows on-demand, by schedule or on external events."
5151
href="/docs/getting_started/trigger_flows"
5252
/>
53+
<DocCard
54+
color="teal"
55+
title="AI-Generated Flows"
56+
description="Generate flows from prompts."
57+
href="/docs/flows/ai_flows"
58+
/>
5359
<DocCard
5460
color="teal"
5561
title="Flow Editor Components"

docs/integrations/openai.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
:::info AI-based programming
1515

16-
If you're interested in AI-based programming check [AI Generation](../code_editor/ai_generation.mdx).
16+
If you're interested in AI-based programming check [Windmill AI](../code_editor/ai_generation.mdx).
1717

1818
:::
1919

docs/script_editor/index.mdx

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import DocCard from '@site/src/components/DocCard';
2+
import Tabs from '@theme/Tabs';
3+
import TabItem from '@theme/TabItem';
24

35
# Script Editor
46

@@ -21,44 +23,46 @@ use the exact same set of versioned dependencies. The code must always have a
2123
main function, which is its entrypoint when executed as an individual serverless
2224
endpoint or a [Flow](../flows/1_flow_editor.mdx) module:
2325

24-
TypeScript:
26+
<Tabs className="unique-tabs">
27+
<TabItem value="TypeScript" label="TypeScript" attributes={{className: "text-xs p-4 !mt-0 !ml-0"}}>
2528

2629
```typescript
2730
async function main(param1: string, param2: { nested: string }) {
2831
...
2932
}
3033
```
3134

32-
Python:
35+
</TabItem>
36+
<TabItem value="Python" label="Python" attributes={{className: "text-xs p-4 !mt-0 !ml-0"}}>
3337

3438
```python
3539
def main(param1: str, param2: dict, ...):
3640
...
3741
```
3842

39-
Go:
43+
</TabItem>
44+
<TabItem value="Go" label="Go" attributes={{className: "text-xs p-4 !mt-0 !ml-0"}}>
4045

41-
```go
46+
```go
4247
func main(x string, nested struct{ Foo string \`json:"foo"\` }) (interface{}, error) {
4348
...
4449
}
4550
```
4651

47-
Bash:
52+
</TabItem>
53+
<TabItem value="Bash" label="Bash" attributes={{className: "text-xs p-4 !mt-0 !ml-0"}}>
4854

4955
There is no main needed for Bash. The body is executed and the args are passed directly.
5056

57+
</TabItem>
58+
</Tabs>
59+
5160
<div class="grid grid-cols-2 gap-6 mb-4">
5261
<DocCard
5362
title="Scripts Quickstart"
5463
description="Start writing scripts in Python, TypeScript, Go, Bash and Sql."
5564
href="/docs/getting_started/scripts_quickstart"
5665
/>
57-
<DocCard
58-
title="Code Editor"
59-
description="The code editor is Windmill's integrated development environment."
60-
href="/docs/code_editor"
61-
/>
6266
<DocCard
6367
title="JSON Schema and Parsing"
6468
description="JSON Schemas are used for defining the input specification for scripts and flows, and specifying resource types."
@@ -129,4 +133,14 @@ The Script Editor is made of the following features:
129133
description="The Windmill VSCode extension allows you to run your scripts and preview the output within VSCode."
130134
href="/docs/script_editor/vs_code_scripts"
131135
/>
136+
</div>
137+
138+
For features specific to the [Code Editor](../code_editor/index.mdx), check:
139+
140+
<div class="grid grid-cols-2 gap-6 mb-4">
141+
<DocCard
142+
title="Code Editor"
143+
description="The code editor is Windmill's integrated development environment."
144+
href="/docs/code_editor"
145+
/>
132146
</div>

0 commit comments

Comments
 (0)