Class: RunApi::GeminiOmni::Resources::CreateCharacter

Inherits:
Object
  • Object
show all
Includes:
Core::ResourceHelpers
Defined in:
lib/runapi/gemini_omni/resources/create_character.rb

Overview

Builds a reusable character from a reference image and description. Attach audio IDs to give the character a specific voice. Synchronous -- only run is available (no create/get polling).

Constant Summary collapse

ENDPOINT =
"/api/v1/gemini_omni/create_character"
RESPONSE_CLASS =
Types::CreateCharacterResponse
MODEL =
"gemini-omni-character"
DESCRIPTIONS_MAX_LENGTH =
20_000
CHARACTER_NAME_MAX_LENGTH =
210

Instance Method Summary collapse

Constructor Details

#initialize(http) ⇒ CreateCharacter

Returns a new instance of CreateCharacter.



18
19
20
# File 'lib/runapi/gemini_omni/resources/create_character.rb', line 18

def initialize(http)
  @http = http
end

Instance Method Details

#run(options: nil, **params) ⇒ Object



22
23
24
25
26
# File 'lib/runapi/gemini_omni/resources/create_character.rb', line 22

def run(options: nil, **params)
  params = compact_params(params)
  validate_params!(params)
  request(:post, ENDPOINT, body: params, options: options)
end