Class StabilityAiImageModel
java.lang.Object
org.springframework.ai.stabilityai.StabilityAiImageModel
- All Implemented Interfaces:
ImageModel
,Model<ImagePrompt,
ImageResponse>
StabilityAiImageModel is a class that implements the ImageModel interface. It provides
a client for calling the StabilityAI image generation API.
-
Constructor Summary
ConstructorDescriptionStabilityAiImageModel
(StabilityAiApi stabilityAiApi) StabilityAiImageModel
(StabilityAiApi stabilityAiApi, StabilityAiImageOptions defaultOptions) -
Method Summary
Modifier and TypeMethodDescriptioncall
(ImagePrompt imagePrompt) Calls the StabilityAiImageModel with the given StabilityAiImagePrompt and returns the ImageResponse.
-
Constructor Details
-
StabilityAiImageModel
-
StabilityAiImageModel
-
-
Method Details
-
getOptions
-
call
Calls the StabilityAiImageModel with the given StabilityAiImagePrompt and returns the ImageResponse. This overloaded call method lets you pass the full set of Prompt instructions that StabilityAI supports.- Specified by:
call
in interfaceImageModel
- Specified by:
call
in interfaceModel<ImagePrompt,
ImageResponse> - Parameters:
imagePrompt
- the StabilityAiImagePrompt containing the prompt and image model options- Returns:
- the ImageResponse generated by the StabilityAiImageModel
-