org.llm4s.imagegeneration.provider
Members list
Type members
Classlikes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class HttpClient
Attributes
- Companion
- object
- Supertypes
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
HttpClient.type
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
HuggingClientPayload.type
HuggingFace Inference API client for image generation.
HuggingFace Inference API client for image generation.
This client provides access to HuggingFace's hosted diffusion models through their Inference API. It supports popular models like Stable Diffusion and other text-to-image models available on the HuggingFace Hub.
Value parameters
- config
-
Configuration containing API key and model settings
Attributes
- Example
-
val config = HuggingFaceConfig( apiKey = "your-hf-token", model = "stabilityai/stable-diffusion-2-1" ) val client = new HuggingFaceClient(config) client.generateImage("a beautiful sunset over mountains") match { case Right(image) => println(s"Generated image: $${image.size}") case Left(error) => println(s"Error: $${error.message}") } - Supertypes
OpenAI DALL-E API client for image generation.
OpenAI DALL-E API client for image generation.
This client connects to OpenAI's DALL-E API for text-to-image generation. It supports both DALL-E 2 and DALL-E 3 models with their respective capabilities and limitations.
Value parameters
- config
-
Configuration containing API key, model selection, and timeout settings
Attributes
- Example
-
val config = OpenAIConfig( apiKey = "your-openai-api-key", model = "dall-e-2" // or "dall-e-3" ) val client = new OpenAIImageClient(config) val options = ImageGenerationOptions( size = ImageSize.Square1024, format = ImageFormat.PNG ) client.generateImage("a beautiful landscape", options) match { case Right(image) => println(s"Generated image: $${image.size}") case Left(error) => println(s"Error: $${error.message}") } - Supertypes
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
Parameters.type
Stable Diffusion WebUI API client for image generation.
Stable Diffusion WebUI API client for image generation.
This client connects to a locally hosted or remote Stable Diffusion WebUI instance through its REST API. It supports all the standard text-to-image generation features including custom sampling, guidance scale, negative prompts, and more.
Value parameters
- config
-
Configuration containing base URL, API key, and timeout settings
Attributes
- Example
-
val config = StableDiffusionConfig( baseUrl = "http://localhost:7860", apiKey = Some("your-api-key") // optional ) val client = new StableDiffusionClient(config) val options = ImageGenerationOptions( size = ImageSize.Square512, guidanceScale = 7.5, negativePrompt = Some("blurry, low quality") ) client.generateImage("a beautiful landscape", options) match { case Right(image) => println(s"Generated image: $${image.size}") case Left(error) => println(s"Error: $${error.message}") } - Supertypes
Represents the JSON payload for the Stable Diffusion WebUI API's text-to-image endpoint. This case class ensures type-safe construction of the request body.
Represents the JSON payload for the Stable Diffusion WebUI API's text-to-image endpoint. This case class ensures type-safe construction of the request body.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type