-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: enabling windows builds for the app
- Loading branch information
Showing
2 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import chat as ch | ||
import llm | ||
|
||
ID_PREFIX='webui_artifact' | ||
|
||
async def apply(chat: 'ch.Chat', llm: 'llm.LLM'): | ||
await llm.emit_message(""" | ||
```html | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Hi</title> | ||
</head> | ||
<body> | ||
<h1>My First Heading</h1> | ||
<p>My first paragraph.</p> | ||
</body> | ||
</html> | ||
``` | ||
""") | ||
|
||
await llm.emit_message(""" | ||
```html | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Hi</title> | ||
</head> | ||
<body> | ||
<h1>My second Heading</h1> | ||
<p>My second paragraph.</p> | ||
</body> | ||
</html> | ||
``` | ||
""") | ||
|
||
# await llm.emit_message(""" | ||
# ```css | ||
# body { | ||
# background-color: lightblue; | ||
# } | ||
|
||
# h1 { | ||
# color: white; | ||
# text-align: center; | ||
# } | ||
# ``` | ||
# """) | ||
|
||
# await llm.emit_message(""" | ||
# ```javascript | ||
# document.getElementById("demo").innerHTML = "Hello JavaScript!"; | ||
# ``` | ||
# """) | ||
|
||
await llm.stream_final_completion() |