Add embedded weather profile catalog
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"io/fs"
|
||||
)
|
||||
|
||||
//go:embed assets/prompts assets/schemas
|
||||
//go:embed assets/prompts assets/profiles assets/schemas
|
||||
var assets embed.FS
|
||||
|
||||
var schemaPaths = map[string]string{
|
||||
@@ -35,6 +35,15 @@ func SchemaFS() fs.FS {
|
||||
return fsys
|
||||
}
|
||||
|
||||
// ProfileFS returns the embedded Weatherreporter Promptkit profile definitions.
|
||||
func ProfileFS() fs.FS {
|
||||
fsys, err := fs.Sub(assets, "assets/profiles")
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("embedded profile assets: %v", err))
|
||||
}
|
||||
return fsys
|
||||
}
|
||||
|
||||
// Schema returns an independent copy of the canonical schema for id.
|
||||
func Schema(id string) ([]byte, error) {
|
||||
path, ok := schemaPaths[id]
|
||||
|
||||
Reference in New Issue
Block a user