File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 11from __future__ import annotations
22
33from typing import Any , Dict , List
4+ import sys
45
56from together .abstract import api_requestor
67from together .together_response import TogetherResponse
1415 VideoResource ,
1516)
1617
18+ if sys .version_info >= (3 , 8 ):
19+ from typing import Literal
20+ else :
21+ from typing_extensions import Literal
22+
1723
1824class Videos :
1925 def __init__ (self , client : TogetherClient ) -> None :
Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ class CreateVideoBody(BaseModel):
2222 steps : int | None = None # Denoising steps, min 10 max 50, default 20
2323 seed : int | None = None
2424 guidance_scale : float | None = None # Default 8, recommended 6.0-10.0
25- output_format : Literal ["MP4" , "WEBM" ] | None = None # "MP4" or "WEBM", default "MP4"
25+ output_format : Literal ["MP4" , "WEBM" ] | None = (
26+ None # "MP4" or "WEBM", default "MP4"
27+ )
2628 output_quality : int | None = None # Compression quality, default 20
2729 negative_prompt : str | None = None
2830
@@ -37,12 +39,14 @@ class VideoOutputs(BaseModel):
3739 cost : float
3840 video_url : str
3941
42+
4043class VideoInfoError (BaseModel ):
4144 """Error about the video creation request"""
4245
4346 code : str
4447 message : str
4548
49+
4650class VideoInfo (BaseModel ):
4751 """Info about the video creation request"""
4852
You can’t perform that action at this time.
0 commit comments