Record chunking metadata in process runs
This commit is contained in:
@@ -8,27 +8,40 @@ import (
|
||||
)
|
||||
|
||||
type ProcessReport struct {
|
||||
Phase string `json:"phase"`
|
||||
Status string `json:"status"`
|
||||
Operation string `json:"operation"`
|
||||
TranscriptPath string `json:"transcript_path"`
|
||||
GlossaryPath string `json:"glossary_path"`
|
||||
OutputPath string `json:"output_path,omitempty"`
|
||||
Modules []string `json:"modules"`
|
||||
StartedAt time.Time `json:"started_at"`
|
||||
CompletedAt *time.Time `json:"completed_at,omitempty"`
|
||||
ErrorMessage string `json:"error_message,omitempty"`
|
||||
ErrorPhase string `json:"error_phase,omitempty"`
|
||||
InputSegmentCount *int `json:"input_segment_count,omitempty"`
|
||||
NormalizedSegmentCount *int `json:"normalized_segment_count,omitempty"`
|
||||
NormalizationMerges *int `json:"normalization_merges,omitempty"`
|
||||
NormalizationIDReassignments *int `json:"normalization_id_reassignments,omitempty"`
|
||||
NormalizationSkipped struct {
|
||||
DifferentSpeakers *int `json:"different_speakers,omitempty"`
|
||||
GapTooLarge *int `json:"gap_too_large,omitempty"`
|
||||
DurationExceeded *int `json:"duration_exceeded,omitempty"`
|
||||
TokenLimitExceeded *int `json:"token_limit_exceeded,omitempty"`
|
||||
} `json:"normalization_skipped,omitempty"`
|
||||
Phase string `json:"phase"`
|
||||
Status string `json:"status"`
|
||||
Operation string `json:"operation"`
|
||||
TranscriptPath string `json:"transcript_path"`
|
||||
GlossaryPath string `json:"glossary_path"`
|
||||
OutputPath string `json:"output_path,omitempty"`
|
||||
Modules []string `json:"modules"`
|
||||
StartedAt time.Time `json:"started_at"`
|
||||
CompletedAt *time.Time `json:"completed_at,omitempty"`
|
||||
ErrorMessage string `json:"error_message,omitempty"`
|
||||
ErrorPhase string `json:"error_phase,omitempty"`
|
||||
InputSegmentCount *int `json:"input_segment_count,omitempty"`
|
||||
NormalizedSegmentCount *int `json:"normalized_segment_count,omitempty"`
|
||||
NormalizationMerges *int `json:"normalization_merges,omitempty"`
|
||||
NormalizationIDReassignments *int `json:"normalization_id_reassignments,omitempty"`
|
||||
NormalizationSkipped NormalizationSkipped `json:"normalization_skipped,omitempty"`
|
||||
Chunking *ChunkingSummary `json:"chunking,omitempty"`
|
||||
}
|
||||
|
||||
type NormalizationSkipped struct {
|
||||
DifferentSpeakers *int `json:"different_speakers,omitempty"`
|
||||
GapTooLarge *int `json:"gap_too_large,omitempty"`
|
||||
DurationExceeded *int `json:"duration_exceeded,omitempty"`
|
||||
TokenLimitExceeded *int `json:"token_limit_exceeded,omitempty"`
|
||||
}
|
||||
|
||||
type ChunkingSummary struct {
|
||||
ChunkCount int `json:"chunk_count"`
|
||||
MinEstimatedTokens int `json:"min_estimated_chunk_tokens"`
|
||||
MaxEstimatedTokens int `json:"max_estimated_chunk_tokens"`
|
||||
TotalEstimatedTokens int `json:"total_estimated_transcript_tokens"`
|
||||
TargetSections *int `json:"target_sections,omitempty"`
|
||||
MaxSectionTokens int `json:"max_section_tokens"`
|
||||
MinSectionTokens int `json:"min_section_tokens"`
|
||||
}
|
||||
|
||||
func WriteProcessReport(path string, report ProcessReport) error {
|
||||
|
||||
Reference in New Issue
Block a user