增加 spring ai Image模块注释

This commit is contained in:
cherishsince 2024-03-17 09:50:48 +08:00
parent c3e36c19ea
commit 7fe1b77919
3 changed files with 10 additions and 0 deletions

View File

@ -21,11 +21,15 @@ import java.util.Objects;
public class Image { public class Image {
/** /**
* 可以访问图像的URL
*
* The URL where the image can be accessed. * The URL where the image can be accessed.
*/ */
private String url; private String url;
/** /**
* Base64编码的图像字符串
*
* Base64 encoded image string. * Base64 encoded image string.
*/ */
private String b64Json; private String b64Json;

View File

@ -22,6 +22,11 @@ import cn.iocoder.yudao.framework.ai.model.ModelClient;
@FunctionalInterface @FunctionalInterface
public interface ImageClient extends ModelClient<ImagePrompt, ImageResponse> { public interface ImageClient extends ModelClient<ImagePrompt, ImageResponse> {
/**
* chat一样
* @param request the request object to be sent to the AI model
* @return
*/
ImageResponse call(ImagePrompt request); ImageResponse call(ImagePrompt request);
} }

View File

@ -21,6 +21,7 @@ import cn.iocoder.yudao.framework.ai.model.ModelResult;
public class ImageGeneration implements ModelResult<Image> { public class ImageGeneration implements ModelResult<Image> {
// metadata 信息为空现在
private ImageGenerationMetadata imageGenerationMetadata; private ImageGenerationMetadata imageGenerationMetadata;
private Image image; private Image image;