Derive independent glossary context and protection
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package validators
|
||||
|
||||
import (
|
||||
"gitea.maximumdirect.net/eric/audita/v3/internal/core/schema"
|
||||
"gitea.maximumdirect.net/eric/audita/v3/internal/core/glossary"
|
||||
"gitea.maximumdirect.net/eric/audita/v3/internal/framework/structuredoutput"
|
||||
)
|
||||
|
||||
@@ -20,15 +20,15 @@ type StructuredLLMClient = structuredoutput.Client
|
||||
// LLMValidationItem retains the internal proposal index until prompt encoding.
|
||||
// BuildValidationVariables substitutes a one-based reference for each batch.
|
||||
type LLMValidationItem struct {
|
||||
CorrectionIndex int `json:"correction_index"`
|
||||
SegmentID int `json:"-"`
|
||||
OriginalText string `json:"original_text"`
|
||||
CorrectedText string `json:"corrected_text"`
|
||||
OriginalSegmentText string `json:"original_segment_text"`
|
||||
CorrectedSegmentText string `json:"corrected_segment_text"`
|
||||
Categories []string `json:"categories,omitempty"`
|
||||
NeighboringSegments []NeighboringSegment `json:"neighboring_segments,omitempty"`
|
||||
GlossaryEntries []schema.GlossaryEntry `json:"glossary_entries,omitempty"`
|
||||
CorrectionIndex int `json:"correction_index"`
|
||||
SegmentID int `json:"-"`
|
||||
OriginalText string `json:"original_text"`
|
||||
CorrectedText string `json:"corrected_text"`
|
||||
OriginalSegmentText string `json:"original_segment_text"`
|
||||
CorrectedSegmentText string `json:"corrected_segment_text"`
|
||||
Categories []string `json:"categories,omitempty"`
|
||||
NeighboringSegments []NeighboringSegment `json:"neighboring_segments,omitempty"`
|
||||
GlossaryEntries []glossary.Entry `json:"glossary_entries,omitempty"`
|
||||
}
|
||||
|
||||
// LLMValidationRequest is the canonical request model for LLM-backed validators.
|
||||
@@ -38,7 +38,6 @@ type LLMValidationRequest struct {
|
||||
ModuleKey string `json:"module_key"`
|
||||
ModuleInstance string `json:"module_instance"`
|
||||
ReplacementPolicy string `json:"replacement_policy"`
|
||||
Glossary *schema.Glossary `json:"-"`
|
||||
Items []LLMValidationItem `json:"corrections"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user