Added chunking logic to modules and added corresponding regression tests
This commit is contained in:
@@ -24,14 +24,14 @@ type promptTranscriptSection struct {
|
||||
|
||||
// BuildProposalMessages mirrors the Python grammar-module prompt intent:
|
||||
// punctuation/capitalization/spacing cleanup only, with strict meaning guards.
|
||||
func BuildProposalMessages(transcript *schema.Transcript, glossary *schema.Glossary) ([]contracts.LLMMessage, error) {
|
||||
func BuildProposalMessages(transcript *schema.Transcript, glossary *schema.Glossary, sectionIndex int) ([]contracts.LLMMessage, error) {
|
||||
glossaryJSON, err := json.MarshalIndent(glossary, "", " ")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("marshal glossary prompt context: %w", err)
|
||||
}
|
||||
|
||||
sectionPayload := promptTranscriptSection{
|
||||
SectionIndex: 0,
|
||||
SectionIndex: sectionIndex,
|
||||
Segments: make([]promptSegment, 0),
|
||||
}
|
||||
if transcript != nil {
|
||||
|
||||
Reference in New Issue
Block a user