You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To generate websites and other multi-file applications, we will first prompt the LLM to split the code into multiple files and then make use of `h9.save()` to store multiple files.
8
+
9
+
## LLMs with Files
10
+
11
+
Most LLM generate code blocks by default, not files. We can change this behavior using a system prompt to request the LLM to generate code files, defined as code blocks with an additional file name.
12
+
13
+
````
14
+
Your replies can include markdown code blocks but they must include a
15
+
filename parameter after the language. For example,
16
+
17
+
```javascript filename=code.js
18
+
```
19
+
20
+
The main html file must ne named index.html. You can generate other web files
21
+
like javascript, css, svg that are referenced from index.html
22
+
````
23
+
24
+
## Storing Files
25
+
26
+
YOu can make use of `h9.extract()` to extract the file blocks generated by the LLM, followed by `h9.save()` with the dictionary of text file names to content to store.
0 commit comments