Documentation
¶
Overview ¶
Package panel provides JSON IR types for panel discussion scheduling and output.
Index ¶
- Constants
- type BackgroundStyle
- type ModeratorSchedule
- type Output
- func (o *Output) AddEntry(speaker, role, text string, segType SegmentType, roundNumber int)
- func (o *Output) CurrentRound() int
- func (o *Output) EndSegment(speakingOrder []string)
- func (o *Output) Finalize()
- func (o *Output) JSON() ([]byte, error)
- func (o *Output) Save(path string) error
- func (o *Output) SetParticipants(moderator OutputParticipant, panelists []OutputParticipant)
- func (o *Output) SetScheduleFile(path string)
- func (o *Output) StartSegment(segType SegmentType, roundNumber int, question string)
- type OutputEntry
- type OutputMetadata
- type OutputParticipant
- type OutputParticipants
- type OutputSegment
- type PanelistSchedule
- type RecordingSettings
- type ResponseOrder
- type Schedule
- type ScheduleSettings
- type Segment
- type SegmentType
- type Slide
Constants ¶
const OutputVersion = "1.0"
OutputVersion is the current output format version.
const ScheduleVersion = "1.0"
ScheduleVersion is the current schedule format version.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackgroundStyle ¶
type BackgroundStyle string
BackgroundStyle specifies how panelist introductions are delivered.
const ( // StyleBrief is a 1-sentence introduction. StyleBrief BackgroundStyle = "brief" // StyleDetailed is a 2-3 sentence introduction with background. StyleDetailed BackgroundStyle = "detailed" // StyleFull is a comprehensive introduction. StyleFull BackgroundStyle = "full" )
type ModeratorSchedule ¶
type ModeratorSchedule struct {
// Name is the moderator's display name.
Name string `json:"name"`
// Personality describes the moderator's style.
Personality string `json:"personality"`
// Voice is the TTS voice ID.
Voice string `json:"voice"`
// AvatarID is the HeyGen avatar ID (optional).
AvatarID string `json:"avatar_id,omitempty"`
// Background is the moderator's professional background.
Background string `json:"background,omitempty"`
}
ModeratorSchedule configures the panel moderator.
type Output ¶
type Output struct {
// Version is the schema version (e.g., "1.0").
Version string `json:"version"`
// SessionID uniquely identifies this panel session.
SessionID string `json:"session_id"`
// ScheduleFile is the path to the schedule that was used (if any).
ScheduleFile string `json:"schedule_file,omitempty"`
// Metadata contains session information.
Metadata OutputMetadata `json:"metadata"`
// Participants lists all panel participants.
Participants OutputParticipants `json:"participants"`
// Segments contains the structured discussion flow.
Segments []OutputSegment `json:"segments"`
// Transcript contains all entries in chronological order.
Transcript []OutputEntry `json:"transcript"`
// contains filtered or unexported fields
}
Output captures the full panel discussion for analysis and replay.
func (*Output) AddEntry ¶
func (o *Output) AddEntry(speaker, role, text string, segType SegmentType, roundNumber int)
AddEntry adds a transcript entry to the current segment and full transcript.
func (*Output) CurrentRound ¶
CurrentRound returns the current round number based on segments.
func (*Output) EndSegment ¶
EndSegment closes the current segment.
func (*Output) Finalize ¶
func (o *Output) Finalize()
Finalize completes the output with final statistics.
func (*Output) SetParticipants ¶
func (o *Output) SetParticipants(moderator OutputParticipant, panelists []OutputParticipant)
SetParticipants sets the participant information.
func (*Output) SetScheduleFile ¶
SetScheduleFile sets the schedule file path.
func (*Output) StartSegment ¶
func (o *Output) StartSegment(segType SegmentType, roundNumber int, question string)
StartSegment begins a new segment.
type OutputEntry ¶
type OutputEntry struct {
// Speaker is the participant name.
Speaker string `json:"speaker"`
// Role is "moderator" or "panelist".
Role string `json:"role"`
// Text is what was said.
Text string `json:"text"`
// Timestamp is when it was said.
Timestamp time.Time `json:"timestamp"`
// DurationSeconds is how long it took to speak.
DurationSeconds float64 `json:"duration_seconds,omitempty"`
// WordCount is the number of words.
WordCount int `json:"word_count"`
// Segment is the segment type this entry belongs to.
Segment SegmentType `json:"segment"`
// RoundNumber is the round number (for discussion entries).
RoundNumber int `json:"round_number,omitempty"`
}
OutputEntry is a single transcript entry.
type OutputMetadata ¶
type OutputMetadata struct {
// Topic is the discussion topic.
Topic string `json:"topic"`
// StartedAt is when the panel began.
StartedAt time.Time `json:"started_at"`
// EndedAt is when the panel ended.
EndedAt *time.Time `json:"ended_at,omitempty"`
// DurationSeconds is the total duration.
DurationSeconds float64 `json:"duration_seconds,omitempty"`
// RoomName is the LiveKit room name.
RoomName string `json:"room_name,omitempty"`
// RecordingURL is the URL to the recording (if available).
RecordingURL string `json:"recording_url,omitempty"`
// TotalRounds is the number of discussion rounds completed.
TotalRounds int `json:"total_rounds"`
// TotalEntries is the number of transcript entries.
TotalEntries int `json:"total_entries"`
}
OutputMetadata contains session-level information.
type OutputParticipant ¶
type OutputParticipant struct {
// Name is the participant's display name.
Name string `json:"name"`
// Role is "moderator" or "panelist".
Role string `json:"role"`
// AvatarID is the HeyGen avatar ID (if used).
AvatarID string `json:"avatar_id,omitempty"`
// Voice is the TTS voice ID.
Voice string `json:"voice,omitempty"`
// Background is the participant's background.
Background string `json:"background,omitempty"`
// EntryCount is how many times they spoke.
EntryCount int `json:"entry_count"`
// TotalWords is the total word count.
TotalWords int `json:"total_words"`
}
OutputParticipant describes a participant.
type OutputParticipants ¶
type OutputParticipants struct {
// Moderator is the panel moderator.
Moderator OutputParticipant `json:"moderator"`
// Panelists are the panel participants.
Panelists []OutputParticipant `json:"panelists"`
}
OutputParticipants lists all panel participants.
type OutputSegment ¶
type OutputSegment struct {
// Type is the segment type.
Type SegmentType `json:"type"`
// RoundNumber is the round number (for discussion_round).
RoundNumber int `json:"round_number,omitempty"`
// Question is the moderator's question (for discussion_round).
Question string `json:"question,omitempty"`
// StartedAt is when the segment began.
StartedAt time.Time `json:"started_at"`
// EndedAt is when the segment ended.
EndedAt *time.Time `json:"ended_at,omitempty"`
// DurationSeconds is the segment duration.
DurationSeconds float64 `json:"duration_seconds,omitempty"`
// SpeakingOrder lists panelists in order they spoke.
SpeakingOrder []string `json:"speaking_order,omitempty"`
// Entries are the transcript entries in this segment.
Entries []OutputEntry `json:"entries"`
}
OutputSegment captures a structured portion of the discussion.
type PanelistSchedule ¶
type PanelistSchedule struct {
// Name is the panelist's display name.
Name string `json:"name"`
// Personality describes the panelist's perspective and style.
Personality string `json:"personality"`
// Voice is the TTS voice ID.
Voice string `json:"voice"`
// AvatarID is the HeyGen avatar ID (optional).
AvatarID string `json:"avatar_id,omitempty"`
// Background is the panelist's professional background for introductions.
Background string `json:"background,omitempty"`
// Expertise lists areas of expertise for relevance-based ordering.
Expertise []string `json:"expertise,omitempty"`
// Slides contains slides this panelist can share (optional).
Slides []Slide `json:"slides,omitempty"`
}
PanelistSchedule configures a panel participant.
type RecordingSettings ¶
type RecordingSettings struct {
// Enabled turns recording on/off.
Enabled bool `json:"enabled"`
// Format is the output format ("mp4" or "webm").
Format string `json:"format,omitempty"`
// Layout is the recording layout ("grid", "speaker", "single-speaker").
Layout string `json:"layout,omitempty"`
// FilePath is the local file path for the recording.
FilePath string `json:"file_path,omitempty"`
// S3Bucket is the S3 bucket for upload (optional).
S3Bucket string `json:"s3_bucket,omitempty"`
// S3Region is the S3 region.
S3Region string `json:"s3_region,omitempty"`
}
RecordingSettings configures panel recording.
type ResponseOrder ¶
type ResponseOrder string
ResponseOrder specifies how panelist speaking order is determined.
const ( // OrderRelevance orders panelists by relevance to the question. OrderRelevance ResponseOrder = "relevance" // OrderRotation rotates through panelists. OrderRotation ResponseOrder = "rotation" // OrderRandom randomizes the order. OrderRandom ResponseOrder = "random" // OrderFixed uses the order specified in FixedOrder. OrderFixed ResponseOrder = "fixed" )
type Schedule ¶
type Schedule struct {
// Version is the schema version (e.g., "1.0").
Version string `json:"version"`
// Topic is the main discussion topic.
Topic string `json:"topic"`
// DurationMinutes is the target duration (advisory, not enforced).
DurationMinutes int `json:"duration_minutes,omitempty"`
// Moderator configures the AI moderator.
Moderator ModeratorSchedule `json:"moderator"`
// Panelists configures the AI panelists.
Panelists []PanelistSchedule `json:"panelists"`
// Segments defines the discussion flow.
Segments []Segment `json:"segments"`
// Settings contains optional configuration.
Settings *ScheduleSettings `json:"settings,omitempty"`
}
Schedule defines the structure of a panel discussion.
func DefaultSchedule ¶
DefaultSchedule creates a default schedule for a topic.
func LoadSchedule ¶
LoadSchedule reads a schedule from a JSON file.
func (*Schedule) PanelistNames ¶
PanelistNames returns all panelist names.
func (*Schedule) SpeakerPause ¶
SpeakerPause returns the configured speaker pause duration.
type ScheduleSettings ¶
type ScheduleSettings struct {
// SpeakerPauseMs is the pause between speakers in milliseconds.
SpeakerPauseMs int `json:"speaker_pause_ms,omitempty"`
// MaxResponseWords limits panelist response length.
MaxResponseWords int `json:"max_response_words,omitempty"`
// OutputFile specifies where to write the output JSON.
OutputFile string `json:"output_file,omitempty"`
// Recording configures video recording.
Recording *RecordingSettings `json:"recording,omitempty"`
}
ScheduleSettings contains optional schedule configuration.
type Segment ¶
type Segment struct {
// Type identifies what kind of segment this is.
Type SegmentType `json:"type"`
// DurationSeconds is the target duration (advisory).
DurationSeconds int `json:"duration_seconds,omitempty"`
// Question is the moderator's question (for discussion_round).
// If nil/empty with GenerateFromContext=true, question is generated.
Question string `json:"question,omitempty"`
// GenerateFromContext generates the question from transcript context.
GenerateFromContext bool `json:"generate_from_context,omitempty"`
// ResponseOrder specifies how panelists are ordered.
ResponseOrder ResponseOrder `json:"response_order,omitempty"`
// FixedOrder specifies panelist names in order (for OrderFixed).
FixedOrder []string `json:"fixed_order,omitempty"`
// Style specifies the introduction style (for panelist_backgrounds).
Style BackgroundStyle `json:"style,omitempty"`
// Prompt is a custom prompt for the segment (optional).
Prompt string `json:"prompt,omitempty"`
}
Segment defines a portion of the panel discussion.
type SegmentType ¶
type SegmentType string
SegmentType identifies the type of discussion segment.
const ( // SegmentModeratorIntro is the moderator's opening statement. SegmentModeratorIntro SegmentType = "moderator_intro" // SegmentPanelistBackgrounds has panelists introduce themselves. SegmentPanelistBackgrounds SegmentType = "panelist_backgrounds" // SegmentDiscussionRound is a question-and-answer round. SegmentDiscussionRound SegmentType = "discussion_round" // SegmentOpenDiscussion allows free-form discussion. SegmentOpenDiscussion SegmentType = "open_discussion" // SegmentClosing is the moderator's closing statement. SegmentClosing SegmentType = "closing" )
type Slide ¶
type Slide struct {
// ID is a unique identifier for the slide.
ID string `json:"id"`
// Title is the slide title (for reference).
Title string `json:"title"`
// ImagePath is the local path to the slide image.
ImagePath string `json:"image_path,omitempty"`
// ImageURL is a URL to fetch the slide image.
ImageURL string `json:"image_url,omitempty"`
// Keywords trigger automatic slide sharing when mentioned.
Keywords []string `json:"keywords,omitempty"`
// ShowDuring specifies segment types when this slide can be shown.
ShowDuring []SegmentType `json:"show_during,omitempty"`
}
Slide represents a visual asset a panelist can share.