Class: RunApi::GeminiOmni::Resources::TextToVideo
- Inherits:
-
Object
- Object
- RunApi::GeminiOmni::Resources::TextToVideo
- Includes:
- Core::ResourceHelpers
- Defined in:
- lib/runapi/gemini_omni/resources/text_to_video.rb
Constant Summary collapse
- ENDPOINT =
"/api/v1/gemini_omni/text_to_video"- RESPONSE_CLASS =
Types::TextToVideoResponse
- COMPLETED_RESPONSE_CLASS =
Types::CompletedTextToVideoResponse
- PROMPT_MAX_LENGTH =
20_000- IMAGE_URLS_MAX =
7- AUDIO_IDS_MAX =
3- VIDEO_LIST_MAX =
1- CHARACTER_IDS_MAX =
3- REFERENCE_UNITS_MAX =
7- VIDEO_REFERENCE_UNITS =
2- MAX_TRIM_SECONDS =
10
Instance Method Summary collapse
- #create(**params) ⇒ Object
- #get(id) ⇒ Object
-
#initialize(http) ⇒ TextToVideo
constructor
A new instance of TextToVideo.
- #run(**params) ⇒ Object
Constructor Details
#initialize(http) ⇒ TextToVideo
Returns a new instance of TextToVideo.
21 22 23 |
# File 'lib/runapi/gemini_omni/resources/text_to_video.rb', line 21 def initialize(http) @http = http end |
Instance Method Details
#create(**params) ⇒ Object
30 31 32 33 34 |
# File 'lib/runapi/gemini_omni/resources/text_to_video.rb', line 30 def create(**params) params = compact_params(params) validate_params!(params) request(:post, ENDPOINT, body: params) end |
#get(id) ⇒ Object
36 37 38 |
# File 'lib/runapi/gemini_omni/resources/text_to_video.rb', line 36 def get(id) request(:get, "#{ENDPOINT}/#{id}") end |
#run(**params) ⇒ Object
25 26 27 28 |
# File 'lib/runapi/gemini_omni/resources/text_to_video.rb', line 25 def run(**params) task = create(**params) poll_until_complete { get(task.id) } end |