46 lines
1.1 KiB
Go
46 lines
1.1 KiB
Go
package sharedassets
|
|
|
|
import (
|
|
"embed"
|
|
|
|
"gitea.maximumdirect.net/eric/notarius/internal/framework/llm"
|
|
)
|
|
|
|
//go:embed assets/prompts/*.md
|
|
var embeddedAssets embed.FS
|
|
|
|
var commonDNDPromptFiles = []string{
|
|
"common-dnd-system.md",
|
|
"common-dnd-transcript.md",
|
|
"common-dnd-references.md",
|
|
}
|
|
|
|
func Register(registry *llm.AssetRegistry) error {
|
|
return registry.RegisterPromptFS(embeddedAssets, "assets/prompts")
|
|
}
|
|
|
|
func SharedPromptFiles() []SharedPromptFile {
|
|
files := make([]SharedPromptFile, 0, len(commonDNDPromptFiles))
|
|
for _, name := range commonDNDPromptFiles {
|
|
files = append(files, SharedPromptFile{
|
|
Name: name,
|
|
FS: embeddedAssets,
|
|
Path: "assets/prompts/" + name,
|
|
})
|
|
}
|
|
return files
|
|
}
|
|
|
|
func CommonHashParts() []llm.AssetHashPart {
|
|
return []llm.AssetHashPart{
|
|
{FS: embeddedAssets, Path: "assets/prompts/common-dnd-system.md"},
|
|
{FS: embeddedAssets, Path: "assets/prompts/common-dnd-transcript.md"},
|
|
}
|
|
}
|
|
|
|
func ReferenceHashParts() []llm.AssetHashPart {
|
|
return []llm.AssetHashPart{
|
|
{FS: embeddedAssets, Path: "assets/prompts/common-dnd-references.md"},
|
|
}
|
|
}
|