Documentation
¶
Overview ¶
Package videogen implements the video-generation agent behind the generate_video tool. Jobs run asynchronously upstream (submit → poll → download); Generate blocks until the clip is ready, fails, or the configured timeout trips.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent drives the asynchronous video endpoint.
type Failure ¶
type Failure struct {
Kind FailureKind
Text string // provider reason for KindJobFailed
Cause error
}
Failure is the typed error Generate returns when no clip was produced.
type FailureKind ¶
type FailureKind int
FailureKind classifies why a video job produced no clip.
const ( KindUnknown FailureKind = iota // KindTimeout — the job did not finish within the configured timeout. KindTimeout // KindUpstreamError — network failure or provider API error. KindUpstreamError // KindSafetyBlock — the submit was rejected by a content policy. KindSafetyBlock // KindJobFailed — the job ran and ended failed/cancelled/expired; Text // carries the provider's reason when it gave one. KindJobFailed )
func (FailureKind) String ¶
func (k FailureKind) String() string
String returns the stable span/log identifier.
type Request ¶
type Request struct {
UserID storage.ScopeID
Prompt string
// AspectRatio and Duration fall back to the config defaults when empty/0.
AspectRatio string
Duration int
// Audio overrides the configured generate_audio default when non-nil.
Audio *bool
// FirstFrame / LastFrame are optional input images (data URLs).
FirstFrame *llm.FilePart
LastFrame *llm.FilePart
}
Request describes one clip.