Package org.springframework.ai.zhipuai
Class ZhiPuAiImageModel
java.lang.Object
org.springframework.ai.zhipuai.ZhiPuAiImageModel
- All Implemented Interfaces:
ImageModel
,Model<ImagePrompt,
ImageResponse>
ZhiPuAiImageModel is a class that implements the ImageModel interface. It provides a
client for calling the ZhiPuAI image generation API.
- Since:
- 1.0.0 M1
- Author:
- Geng Rong
-
Field Summary
Modifier and TypeFieldDescriptionfinal org.springframework.retry.support.RetryTemplate
-
Constructor Summary
ConstructorDescriptionZhiPuAiImageModel
(ZhiPuAiImageApi zhiPuAiImageApi) ZhiPuAiImageModel
(ZhiPuAiImageApi zhiPuAiImageApi, ZhiPuAiImageOptions defaultOptions, org.springframework.retry.support.RetryTemplate retryTemplate) -
Method Summary
Modifier and TypeMethodDescriptioncall
(ImagePrompt imagePrompt) Executes a method call to the AI model.
-
Field Details
-
retryTemplate
public final org.springframework.retry.support.RetryTemplate retryTemplate
-
-
Constructor Details
-
ZhiPuAiImageModel
-
ZhiPuAiImageModel
public ZhiPuAiImageModel(ZhiPuAiImageApi zhiPuAiImageApi, ZhiPuAiImageOptions defaultOptions, org.springframework.retry.support.RetryTemplate retryTemplate)
-
-
Method Details
-
getDefaultOptions
-
call
Description copied from interface:Model
Executes a method call to the AI model.- Specified by:
call
in interfaceImageModel
- Specified by:
call
in interfaceModel<ImagePrompt,
ImageResponse> - Parameters:
imagePrompt
- the request object to be sent to the AI model- Returns:
- the response from the AI model
-