Class: LLM::XAI::Images
- Inherits:
-
OpenAI::Images
- Object
- OpenAI::Images
- LLM::XAI::Images
- Defined in:
- lib/llm/shell/internal/llm.rb/lib/llm/providers/xai/images.rb
Overview
The LLM::XAI::Images class provides an interface for [xAI’s images API](docs.x.ai/docs/guides/image-generations). xAI supports multiple response formats: temporary URLs, or binary strings encoded in base64. The default is to return temporary URLs.
Instance Method Summary collapse
-
#create(prompt:, model: "grok-2-image-1212", **params) ⇒ LLM::Response
Create an image.
- #create_variation(model: "grok-2-image-1212") ⇒ Object
- #edit(model: "grok-2-image-1212") ⇒ Object
Methods inherited from OpenAI::Images
Constructor Details
This class inherits a constructor from LLM::OpenAI::Images
Instance Method Details
#create(prompt:, model: "grok-2-image-1212", **params) ⇒ LLM::Response
Create an image
42 43 44 |
# File 'lib/llm/shell/internal/llm.rb/lib/llm/providers/xai/images.rb', line 42 def create(prompt:, model: "grok-2-image-1212", **params) super end |
#create_variation(model: "grok-2-image-1212") ⇒ Object
54 55 56 |
# File 'lib/llm/shell/internal/llm.rb/lib/llm/providers/xai/images.rb', line 54 def create_variation(model: "grok-2-image-1212", **) raise NotImplementedError end |
#edit(model: "grok-2-image-1212") ⇒ Object
48 49 50 |
# File 'lib/llm/shell/internal/llm.rb/lib/llm/providers/xai/images.rb', line 48 def edit(model: "grok-2-image-1212", **) raise NotImplementedError end |