Package org.springframework.ai.zhipuai
Class ZhiPuAiImageModel
java.lang.Object
org.springframework.ai.zhipuai.ZhiPuAiImageModel
- All Implemented Interfaces:
org.springframework.ai.image.ImageModel,org.springframework.ai.model.Model<org.springframework.ai.image.ImagePrompt,org.springframework.ai.image.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
FieldsModifier and TypeFieldDescriptionfinal org.springframework.retry.support.RetryTemplate -
Constructor Summary
ConstructorsConstructorDescriptionZhiPuAiImageModel(ZhiPuAiImageApi zhiPuAiImageApi) ZhiPuAiImageModel(ZhiPuAiImageApi zhiPuAiImageApi, ZhiPuAiImageOptions defaultOptions, org.springframework.retry.support.RetryTemplate retryTemplate) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.ai.image.ImageResponsecall(org.springframework.ai.image.ImagePrompt imagePrompt)
-
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
public org.springframework.ai.image.ImageResponse call(org.springframework.ai.image.ImagePrompt imagePrompt) - Specified by:
callin interfaceorg.springframework.ai.image.ImageModel- Specified by:
callin interfaceorg.springframework.ai.model.Model<org.springframework.ai.image.ImagePrompt,org.springframework.ai.image.ImageResponse>
-