package locations import ( "fmt" "sync" "gitea.maximumdirect.net/eric/notarius/internal/framework/llm" "gitea.maximumdirect.net/eric/notarius/internal/framework/promptfs" "gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/shared" ) const promptAssetRoot = "assets/prompts" var promptAssetManifest = shared.PromptAssetManifest{ ModuleDir: PromptID, ModuleFiles: []promptfs.ModulePromptFile{ {Name: "dnd.locations.normalize.yaml", Path: "assets/prompts/dnd.locations.normalize.yaml"}, {Name: "task.md", Path: "assets/prompts/task.md"}, {Name: "candidates.md", Path: "assets/prompts/candidates.md"}, }, SharedFiles: []string{"common-dnd-system.md", "common-dnd-entity-reconciliation.md", "common-dnd-transcript.md"}, } func RegisterPromptAssets(registry *llm.AssetRegistry) error { promptFS, err := promptAssetManifest.PromptFS(embeddedAssets) if err != nil { return fmt.Errorf("prepare location normalization prompt assets: %w", err) } return registry.RegisterPromptFS(promptFS, promptAssetRoot) } func promptAssetMetadata() (string, error) { promptAssetHashOnce.Do(func() { promptAssetHash, promptAssetHashErr = promptAssetManifest.Hash(embeddedAssets) }) return promptAssetHash, promptAssetHashErr } var ( promptAssetHashOnce sync.Once promptAssetHash string promptAssetHashErr error )