升级说明

升级到0.8.1

原来的 spring-ai-vertex-ai 已更名为 spring-ai-vertex-ai-palm2,而 spring-ai-vertex-ai-spring-boot-starter 已更名为 spring-ai-vertex-ai-palm2-spring-boot-starter

所以,您需要将依赖项从

<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-vertex-ai</artifactId>
</dependency>

更改为

<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-vertex-ai-palm2</artifactId>
</dependency>

相关的 Palm2 模型的 Boot starter 已从

<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-vertex-ai-spring-boot-starter</artifactId>
</dependency>

更改为

<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-vertex-ai-palm2-spring-boot-starter</artifactId>
</dependency>
  • 重命名的类(2024年3月1日)

    • VertexAiApi → VertexAiPalm2Api

    • VertexAiClientChat → VertexAiPalm2ChatClient

    • VertexAiEmbeddingClient → VertexAiPalm2EmbeddingClient

    • VertexAiChatOptions → VertexAiPalm2ChatOptions

升级至 0.8.0

2024年1月24日更新

  • promptmessages 以及 metadata 包移动到 org.sf.ai.chat 的子包

  • 新增功能为文本转图像客户端。类名为 OpenAiImageClientStabilityAiImageClient。查看集成测试以了解用法,文档即将发布。

  • 新增包 model,其中包含支持创建任意输入/输出数据类型组合的 AI 模型客户端的接口和基类。目前,聊天和图像模型包实现了这一点。我们将很快将嵌入包更新为这个新模型。

  • 新增了一种“可移植选项”设计模式。我们希望尽可能提供在不同聊天基础 AI 模型之间的可移植性。有一组通用的生成选项,然后有一些特定于模型提供者的选项。采用一种“鸭子类型”方法。模型包中的 ModelOptions 是一个标记接口,表示该类的实现将为模型提供选项。查看 ImageOptions,它是一个定义了所有文本→图像 ImageClient 实现的可移植选项的子接口。然后 StabilityAiImageOptionsOpenAiImageOptions 提供了特定于每个模型提供者的选项。所有选项类都通过流畅的 API 构建器创建,并且可以传递到可移植的 ImageClient API 中。这些选项数据类型在 ImageClient 实现的自动配置/配置属性中使用。

2024年1月13日更新

以下是 OpenAi 自动配置聊天属性的更改

  • spring.ai.openai.model 更改为 spring.ai.openai.chat.options.model

  • spring.ai.openai.temperature 更改为 spring.ai.openai.chat.options.temperature

2023年12月27日更新

将 SimplePersistentVectorStore 和 InMemoryVectorStore 合并为 SimpleVectorStore * 用 SimpleVectorStore 替换 InMemoryVectorStore

2023年12月20日更新

重构 Ollama 客户端及相关类和包名

  • 用 org.springframework.ai.ollama.OllamaChatClient 替换 org.springframework.ai.ollama.client.OllamaClient。

  • OllamaChatClient 方法签名已更改。

  • 将 org.springframework.ai.autoconfigure.ollama.OllamaProperties 重命名为 org.springframework.ai.autoconfigure.ollama.OllamaChatProperties 并将后缀更改为:spring.ai.ollama.chat。部分属性也发生了变化。

2023年12月19日更新

将 AiClient 及相关类和包名更名为 ChatClient

  • 将 AiClient 更名为 ChatClient

  • 将 AiResponse 更名为 ChatResponse

  • 将 AiStreamClient 更名为 StreamingChatClient

  • 将包 org.sf.ai.client 更名为 org.sf.ai.chat

将 artifact ID 更名为

  • transformers-embedding 更名为 spring-ai-transformers

将 Maven 模块从顶层目录和 embedding-clients 子目录移动到单个 models 目录下。

2023年12月1日

我们正在过渡项目的 Group ID:

  • org.springframework.experimental.ai

  • org.springframework.ai

依然将构件托管在快照仓库中,如下所示。

主分支将移动到版本 0.8.0-SNAPSHOT。它将在一两周内不稳定。如果不想处于最新阶段,请使用 0.7.1-SNAPSHOT。

您仍然可以像以前一样访问 0.7.1-SNAPSHOT 构件,并仍然可以访问 0.7.1-SNAPSHOT 文档

0.7.1-SNAPSHOT 依赖

  • Azure OpenAI

    <dependency>
        <groupId>org.springframework.experimental.ai</groupId>
        <artifactId>spring-ai-azure-openai-spring-boot-starter</artifactId>
        <version>0.7.1-SNAPSHOT</version>
    </dependency>
  • OpenAI

    <dependency>
        <groupId>org.springframework.experimental.ai</groupId>
        <artifactId>spring-ai-openai-spring-boot-starter</artifactId>
        <version>0.7.1-SNAPSHOT</version>
    </dependency>