Package org.springframework.ai.openai
Class OpenAiImageClient
java.lang.Object
org.springframework.ai.openai.OpenAiImageClient
- All Implemented Interfaces:
ImageClient
,ModelClient<ImagePrompt,
ImageResponse>
OpenAiImageClient is a class that implements the ImageClient interface. It provides a
client for calling the OpenAI image generation API.
- Since:
- 0.8.0
- Author:
- Mark Pollack, Christian Tzolov
-
Field Summary
Modifier and TypeFieldDescriptionfinal org.springframework.retry.support.RetryTemplate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncall
(ImagePrompt imagePrompt) Executes a method call to the AI model.withDefaultOptions
(OpenAiImageOptions defaultOptions)
-
Field Details
-
retryTemplate
public final org.springframework.retry.support.RetryTemplate retryTemplate
-
-
Constructor Details
-
OpenAiImageClient
-
-
Method Details
-
getDefaultOptions
-
withDefaultOptions
-
call
Description copied from interface:ModelClient
Executes a method call to the AI model.- Specified by:
call
in interfaceImageClient
- Specified by:
call
in interfaceModelClient<ImagePrompt,
ImageResponse> - Parameters:
imagePrompt
- the request object to be sent to the AI model- Returns:
- the response from the AI model
-