Class: RunApi::Qwen2::Client
- Inherits:
-
Object
- Object
- RunApi::Qwen2::Client
- Defined in:
- lib/runapi/qwen_2/client.rb
Overview
Qwen2 text-to-image, image-to-image, and edit-image API client.
Instance Attribute Summary collapse
-
#edit_image ⇒ Resources::TextToImage, ...
readonly
Image operations.
-
#image_to_image ⇒ Resources::TextToImage, ...
readonly
Image operations.
-
#text_to_image ⇒ Resources::TextToImage, ...
readonly
Image operations.
Instance Method Summary collapse
-
#initialize(api_key: nil, **options) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(api_key: nil, **options) ⇒ Client
Returns a new instance of Client.
18 19 20 21 22 23 24 25 26 |
# File 'lib/runapi/qwen_2/client.rb', line 18 def initialize(api_key: nil, **) @api_key = Core::Auth.resolve_api_key(api_key) = Core::ClientOptions.new(api_key: @api_key, **) http = .http_client || Core::HttpClient.new() @text_to_image = Resources::TextToImage.new(http) @image_to_image = Resources::ImageToImage.new(http) @edit_image = Resources::EditImage.new(http) end |
Instance Attribute Details
#edit_image ⇒ Resources::TextToImage, ... (readonly)
Returns Image operations.
16 17 18 |
# File 'lib/runapi/qwen_2/client.rb', line 16 def edit_image @edit_image end |
#image_to_image ⇒ Resources::TextToImage, ... (readonly)
Returns Image operations.
16 17 18 |
# File 'lib/runapi/qwen_2/client.rb', line 16 def image_to_image @image_to_image end |
#text_to_image ⇒ Resources::TextToImage, ... (readonly)
Returns Image operations.
16 17 18 |
# File 'lib/runapi/qwen_2/client.rb', line 16 def text_to_image @text_to_image end |