rewrite
¶
Rewrite payload builder.
The UI's "rewrite seed prompts" flow asks the enhancer to produce a
batch of alternative prompts given one seed. This module packages the
seed + options into the payload the enhancer expects and unpacks the
response back into a typed :class:RewriteResult.
Separating this from :mod:enhancer keeps the enhancer provider-
agnostic; anything UI-specific (how many alternatives to request, how
to split the response, temperature) lives here.
Classes¶
fastvideo.entrypoints.streaming.prompt.rewrite.RewriteOptions
dataclass
¶
Functions¶
fastvideo.entrypoints.streaming.prompt.rewrite.build_rewrite
async
¶
build_rewrite(enhancer: PromptEnhancer, seed_prompt: str, *, options: RewriteOptions | None = None) -> RewriteResult
Run a rewrite op through the enhancer and return a typed result.