第八模型介绍-图像模型
官网
这些模型专门用于图像生成,允许开发人员在不同的图像相关模型之间切换,同时只需进行最少的代码更改
spring-ai网址【https://docs.spring.io/spring-ai/reference/api/imageclient.html】
ImagePrompt
源码示例
https://gitee.com/kcnf_open/spring-ai-sample/tree/master/spring-ai/spring-ai-sample07
-
yaml配置
spring:
ai:
zhipuai:
api-key: ${ZHIPUAI_API_KEY}
chat:
options:
model: glm-4v-flash
embedding:
options:
model: embedding-3 # 嵌入模型
image:
options:
model: CogView-3-Flash # 图像生成模型 -
测试代码
