Class: RunApi::GeminiOmni::Resources::CreateCharacter
- Inherits:
-
Object
- Object
- RunApi::GeminiOmni::Resources::CreateCharacter
- 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
- DESCRIPTIONS_MAX_LENGTH =
20_000- CHARACTER_NAME_MAX_LENGTH =
210
Instance Method Summary collapse
-
#initialize(http) ⇒ CreateCharacter
constructor
A new instance of CreateCharacter.
- #run(**params) ⇒ Object
Constructor Details
#initialize(http) ⇒ CreateCharacter
Returns a new instance of CreateCharacter.
17 18 19 |
# File 'lib/runapi/gemini_omni/resources/create_character.rb', line 17 def initialize(http) @http = http end |
Instance Method Details
#run(**params) ⇒ Object
21 22 23 24 25 |
# File 'lib/runapi/gemini_omni/resources/create_character.rb', line 21 def run(**params) params = compact_params(params) validate_params!(params) request(:post, ENDPOINT, body: params) end |