model

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMediaSummarySchema

func NewMediaSummarySchema() *genai.Schema

func NewSegmentExtractorSchema

func NewSegmentExtractorSchema() *genai.Schema

Types

type Actor

type Actor struct {
	Id           string    `json:"id" bigquery:"id"`
	CreateDate   time.Time `json:"create_date" bigquery:"create_date"`
	Name         string    `json:"name" bigquery:"name"`
	DateOfBirth  time.Time `json:"dob" bigquery:"dob"` // Or time.Time if you need more precise handling
	DateOfDeath  time.Time `json:"dod" bigquery:"dod"`
	PlaceOfBirth string    `json:"pob" bigquery:"pob"`
	Biography    string    `json:"bio" bigquery:"bio"`
	Aliases      []string  `json:"aliases" bigquery:"aliases"`
	Awards       []string  `json:"awards" bigquery:"awards"`
	Nominations  []string  `json:"nominations" bigquery:"nominations"`
	ImageURL     string    `json:"ima_url" bigquery:"img_url"`
}

Actor is used to represent the public details of an actor or actress.

type CastDialog

type CastDialog struct {
	CharacterName string `json:"character_name" bigquery:"character_name"`
	Dialog        string `json:"dialog" bigquery:"dialog"`
}

CastDialog is a mapping from a character to the spoken word in a segment

type CastMember

type CastMember struct {
	CharacterName string `json:"character_name" bigquery:"character_name"`
	ActorName     string `json:"actor_name" bigquery:"actor_name"`
}

CastMember is a mapping object from a character to an actor

type Media

type Media struct {
	Id              string        `json:"id" bigquery:"id"`
	CreateDate      time.Time     `json:"create_date" bigquery:"create_date"`
	Title           string        `json:"title" bigquery:"title"`
	Category        string        `json:"category" bigquery:"category"`
	Summary         string        `json:"summary" bigquery:"summary"`
	LengthInSeconds int           `json:"length_in_seconds" bigquery:"length_in_seconds"`
	MediaUrl        string        `json:"media_url" bigquery:"media_url"`
	Director        string        `json:"director,omitempty" bigquery:"director"`
	ReleaseYear     int           `json:"release_year,omitempty" bigquery:"release_year"`
	Genre           string        `json:"genre,omitempty" bigquery:"genre"`
	Rating          string        `json:"rating,omitempty" bigquery:"rating"`
	Cast            []*CastMember `json:"cast,omitempty" bigquery:"cast"`
	Segments        []*Segment    `json:"segments,omitempty" bigquery:"segments"`
}

Media capture the highest level of metadata about a media file.

func NewMedia

func NewMedia(fileName string) *Media

type MediaFormatFilter

type MediaFormatFilter struct {
	Format string
	Width  string
}

MediaFormatFilter is a simple video format object expressing the intended output and the destination width

type MediaSummary

type MediaSummary struct {
	Title             string        `json:"title"`
	Category          string        `json:"category"`
	Summary           string        `json:"summary"`
	LengthInSeconds   int           `json:"length_in_seconds"`
	MediaUrl          string        `json:"media_url,omitempty"`
	Director          string        `json:"director,omitempty"`
	ReleaseYear       int           `json:"release_year,omitempty"`
	Genre             string        `json:"genre,omitempty"`
	Rating            string        `json:"rating,omitempty"`
	Cast              []*CastMember `json:"cast,omitempty"`
	SegmentTimeStamps []*TimeSpan   `json:"segment_time_stamps,omitempty"`
}

func GetExampleSummary

func GetExampleSummary() *MediaSummary

type Segment

type Segment struct {
	SequenceNumber   int    `json:"sequence" bigquery:"sequence"`
	TokensToGenerate int    `json:"tokens_to_generate" bigquery:"tokens_to_generate"`
	TokensGenerated  int    `json:"tokens_generated" bigquery:"tokens_generated"`
	Start            string `json:"start" bigquery:"start"`
	End              string `json:"end" bigquery:"end"`
	Script           string `json:"script" bigquery:"script"`
}

Segment is a representation of a time span and it's sequence in a media object giving granular detail for the agent objects to interrogate

func GetExampleSegment

func GetExampleSegment() *Segment

GetExampleSegment is used to provide an example to the generative contexts.

type SegmentEmbedding

type SegmentEmbedding struct {
	Id             string    `json:"id" bigquery:"media_id"`
	SequenceNumber int       `json:"sequence_number" bigquery:"sequence_number"`
	ModelName      string    `json:"model_name" bigquery:"model_name"`
	Embeddings     []float64 `json:"embeddings" bigquery:"embeddings"`
}

SegmentEmbedding captures the summary embedding of a media file, good for general searches.

func NewSegmentEmbedding

func NewSegmentEmbedding(
	mediaId string,
	sequenceNumber int,
	modelName string) *SegmentEmbedding

type SegmentMatchResult

type SegmentMatchResult struct {
	MediaId        string `json:"media_id" bigquery:"media_id"`
	SequenceNumber int    `json:"sequence_number" bigquery:"sequence_number"`
}

type TimeSpan

type TimeSpan struct {
	Start string `json:"start"`
	End   string `json:"end"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL