Class QianFanImageModel

java.lang.Object
org.springframework.ai.qianfan.QianFanImageModel
All Implemented Interfaces:
ImageModel, Model<ImagePrompt,ImageResponse>

public class QianFanImageModel extends Object implements ImageModel
QianFanImageModel is a class that implements the ImageModel interface. It provides a client for calling the QianFan image generation API.
Since:
1.0
Author:
Geng Rong
  • Constructor Details

    • QianFanImageModel

      public QianFanImageModel(QianFanImageApi qianFanImageApi)
      Creates an instance of the QianFanImageModel.
      Parameters:
      qianFanImageApi - The QianFanImageApi instance to be used for interacting with the QianFan Image API.
      Throws:
      IllegalArgumentException - if qianFanImageApi is null
    • QianFanImageModel

      public QianFanImageModel(QianFanImageApi qianFanImageApi, QianFanImageOptions options)
      Creates an instance of the QianFanImageModel.
      Parameters:
      qianFanImageApi - The QianFanImageApi instance to be used for interacting with the QianFan Image API.
      options - The QianFanImageOptions to configure the image model.
      Throws:
      IllegalArgumentException - if qianFanImageApi is null
    • QianFanImageModel

      public QianFanImageModel(QianFanImageApi qianFanImageApi, QianFanImageOptions options, org.springframework.retry.support.RetryTemplate retryTemplate)
      Creates an instance of the QianFanImageModel.
      Parameters:
      qianFanImageApi - The QianFanImageApi instance to be used for interacting with the QianFan Image API.
      options - The QianFanImageOptions to configure the image model.
      retryTemplate - The retry template.
      Throws:
      IllegalArgumentException - if qianFanImageApi is null
    • QianFanImageModel

      public QianFanImageModel(QianFanImageApi qianFanImageApi, QianFanImageOptions options, org.springframework.retry.support.RetryTemplate retryTemplate, io.micrometer.observation.ObservationRegistry observationRegistry)
      Initializes a new instance of the QianFanImageModel.
      Parameters:
      qianFanImageApi - The QianFanImageApi instance to be used for interacting with the QianFan Image API.
      options - The QianFanImageOptions to configure the image model.
      retryTemplate - The retry template.
      observationRegistry - The ObservationRegistry used for instrumentation.
  • Method Details