Simplify references and output instructions in LLM prompts

This commit is contained in:
2026-09-25 12:38:23 +00:00
parent 325c4ea7d3
commit 011b021d47
31 changed files with 248 additions and 129 deletions

View File

@@ -21,7 +21,8 @@ type transcriptSectionPayload struct {
}
// MarshalTranscriptSectionJSON builds the standardized transcript-section JSON
// payload consumed by proposal prompt templates.
// payload consumed by proposal prompt templates. IDs are one-based positions in
// this request; the transcript and its actual IDs are unchanged.
func MarshalTranscriptSectionJSON(transcript *schema.Transcript, sectionIndex int) ([]byte, error) {
payload := transcriptSectionPayload{
SectionIndex: sectionIndex,
@@ -29,9 +30,9 @@ func MarshalTranscriptSectionJSON(transcript *schema.Transcript, sectionIndex in
}
if transcript != nil {
for _, s := range transcript.Segments {
for i, s := range transcript.Segments {
payload.Segments = append(payload.Segments, transcriptSectionSegment{
ID: s.ID,
ID: i + 1,
Speaker: s.Speaker,
Start: s.Start,
End: s.End,