Skip to content

Commit

Permalink
System prompt in Markdown
Browse files Browse the repository at this point in the history
Also, a few TailwindCSS fixes.
  • Loading branch information
markuswustenberg committed Feb 21, 2025
1 parent 8b9c021 commit 9adba02
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion html/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func footer() Node {
container(true, false,
Div(Class("h-16 flex items-center justify-center space-x-8"),
A(Class("hover:text-amber-500"), Href("https://evaehler.dk"), Text("Sprogdesign af Eva Ehler")),
A(Class("hover:text-amber-500"), Href("https://www.maragu.dk"), Text("Software af maragu")),
A(Class("hover:text-amber-500"), Href("https://www.maragu.dev"), Text("Software af maragu")),
),
),
)
Expand Down
2 changes: 1 addition & 1 deletion html/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TextareaPartial(name, value string) Node {
Label(For(name+"-area"), Class("block text-sm/6 font-medium text-gray-900"), Text(name)),
Div(Class("mt-2"),
Textarea(Rows("10"), Cols("40"), Name(name), ID(name+"-area"), Placeholder(placeholder),
Class("block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-amber-600 sm:text-sm/6 font-sans"),
Class("block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-amber-600 sm:text-sm/6 font-sans"),
Text(value)),
),
),
Expand Down
4 changes: 4 additions & 0 deletions llm/prompts/system.txt → llm/prompts/system.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Du er en tolk der kan oversætte fra dansk til ildsk og fra ildsk til dansk. Ild

Følgende er regler for sproget ildsk.

## Ordbog

Dette dokument er en ordbog fra ildsk til dansk, med ":" som separator:

```
Expand Down Expand Up @@ -38,6 +40,8 @@ koraash qu Mira: beskyt min ven Mira
tiras ignia: styrkens ild
```

## Grammatik

For at gøre dragesproget mere autentisk kan vi tilføje nogle grammatiske regler:

Navneord og ejerskab: Hvis noget tilhører nogen, kan vi bruge "Qu" før navneordet. Fx: "Qu Nuran" betyder "Min stjerne."
Expand Down
2 changes: 1 addition & 1 deletion llm/translate.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"app/model"
)

//go:embed prompts/system.txt
//go:embed prompts/system.md
var system string

func (c *Client) Translate(ctx context.Context, to model.Language, text string) (string, error) {
Expand Down

0 comments on commit 9adba02

Please sign in to comment.