2026-09-24 02:03:08 +00:00
|
|
|
package proposal_generation
|
2026-05-12 11:20:02 +00:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"fmt"
|
|
|
|
|
|
2026-10-11 01:40:38 +00:00
|
|
|
"gitea.maximumdirect.net/eric/audita/v3/internal/core/schema"
|
|
|
|
|
"gitea.maximumdirect.net/eric/audita/v3/internal/framework/promptcontext"
|
2026-05-12 11:20:02 +00:00
|
|
|
)
|
|
|
|
|
|
2026-11-10 20:42:28 +00:00
|
|
|
func buildProposalVariables(transcript *schema.Transcript, glossary promptcontext.GlossaryVariables, sectionIndex int, transcriptDescription string) (map[string]string, error) {
|
2026-05-23 17:56:07 +00:00
|
|
|
sectionJSON, err := promptcontext.MarshalTranscriptSectionJSON(transcript, sectionIndex)
|
2026-05-12 11:20:02 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, fmt.Errorf("marshal transcript prompt context: %w", err)
|
|
|
|
|
}
|
2026-09-24 02:03:08 +00:00
|
|
|
return map[string]string{
|
2026-05-13 18:49:06 +00:00
|
|
|
"TranscriptDescriptionBlock": promptcontext.TranscriptDescriptionBlock(transcriptDescription),
|
2026-11-10 20:42:28 +00:00
|
|
|
"GlossaryJSON": glossary.ContextJSON,
|
|
|
|
|
"ProtectedTermsJSON": glossary.ProtectionJSON,
|
2026-05-13 18:49:06 +00:00
|
|
|
"SectionJSON": string(sectionJSON),
|
2026-05-12 11:20:02 +00:00
|
|
|
}, nil
|
|
|
|
|
}
|