アップグレードノート

1.0.0-SNAPSHOT へのアップグレード

概要

1.0.0-SNAPSHOT バージョンでは、アーティファクト ID、パッケージ名、モジュール構造に大幅な変更が加えられています。このセクションでは、SNAPSHOT バージョンの使用に関する具体的なガイダンスを提供します。

スナップショットリポジトリの追加

1.0.0-SNAPSHOT バージョンを使用するには、スナップショットリポジトリをビルドファイルに追加する必要があります。詳細な手順については、「入門」ガイドのスナップショット - スナップショットリポジトリの追加セクションを参照してください。

アップデート依存関係管理

ビルド構成で、Spring AI BOM バージョンを 1.0.0-SNAPSHOT に更新します。依存関係管理を構成する詳細な手順については、「入門ガイド」の依存関係管理セクションを参照してください。

アーティファクト ID、パッケージ、モジュールの変更

1.0.0-SNAPSHOT には、アーティファクト ID、パッケージ名、モジュール構造の変更が含まれています。

AI を使ったアップグレードの自動化

提供されたプロンプトを備えた Claude コード CLI ツールを使用して、1.0.0-SNAPSHOT へのアップグレードプロセスを自動化できます。プロンプトは、AI に次のタスクを実行するように指示します。

  1. Spring AI BOM バージョンを 1.0.0-SNAPSHOT に更新します

  2. ビルド構成に必要なすべてのリポジトリが存在することを確認する

  3. 新しい命名パターンに従って Spring AI アーティファクト ID を更新します

この自動化を使用するには:

  1. Claude Code CLI tool (英語) をダウンロード

  2. update-to-snapshot.txt [GitHub] (英語) ファイルからプロンプトをコピーします

  3. プロンプトを Claude コード CLI に貼り付けます

  4. AI がプロジェクトを分析し、必要な変更を加えます

このアプローチにより、複数のプロジェクトや複雑なコードベースをアップグレードするときに時間を節約し、エラーの可能性を減らすことができます。

1.0.0-M8 へのアップグレード

  • The PromptTemplate API has been redesigned to support a more flexible and extensible way of templating prompts, relying on a new TemplateRenderer API. As part of this change, the getInputVariables() and validate() methods have been deprecated and will throw an UnsupportedOperationException if called. Any logic specific to a template engine should be available through the TemplateRenderer API.

1.0.0-M7 へのアップグレード

変更の概要

Spring AI 1.0.0-M7 は、RC1 および GA リリース前の最後のマイルストーンリリースです。アーティファクト ID、パッケージ名、モジュール構造にいくつかの重要な変更が導入されており、最終リリースでも維持されます。

アーティファクト ID、パッケージ、モジュールの変更

1.0.0-M7 には 1.0.0-SNAPSHOT と同じ構造変更が含まれています。

MCP Java SDK の 0.9.0 へのアップグレード

Spring AI 1.0.0-M7 は現在、MCP Java SDK バージョン 0.9.0 を使用しています。このバージョンには、以前のバージョンからの大幅な変更が含まれています。アプリケーションで MCP を使用している場合は、これらの変更に対応するためにコードを更新する必要があります。

主な変更点は次のとおりです。

インターフェース名の変更

  • ClientMcpTransport → McpClientTransport

  • ServerMcpTransport → McpServerTransport

  • DefaultMcpSession → McpClientSession または McpServerSession

  • すべての *Registration クラス→ *Specification クラス

サーバー作成の変更

  • ServerMcpTransport の代わりに McpServerTransportProvider を使用する

// Before
ServerMcpTransport transport = new WebFluxSseServerTransport(objectMapper, "/mcp/message");
var server = McpServer.sync(transport)
    .serverInfo("my-server", "1.0.0")
    .build();

// After
McpServerTransportProvider transportProvider = new WebFluxSseServerTransportProvider(objectMapper, "/mcp/message");
var server = McpServer.sync(transportProvider)
    .serverInfo("my-server", "1.0.0")
    .build();

ハンドラーシグネチャーの変更

すべてのハンドラーは、最初の引数として exchange パラメーターを受け取るようになりました。

// Before
.tool(calculatorTool, args -> new CallToolResult("Result: " + calculate(args)))

// After
.tool(calculatorTool, (exchange, args) -> new CallToolResult("Result: " + calculate(args)))

Exchange 経由のクライアントインタラクション

以前はサーバー上で使用可能だったメソッドは、交換オブジェクトを介してアクセスされるようになりました。

// Before
ClientCapabilities capabilities = server.getClientCapabilities();
CreateMessageResult result = server.createMessage(new CreateMessageRequest(...));

// After
ClientCapabilities capabilities = exchange.getClientCapabilities();
CreateMessageResult result = exchange.createMessage(new CreateMessageRequest(...));

ルート変更ハンドラー

// Before
.rootsChangeConsumers(List.of(
    roots -> System.out.println("Roots changed: " + roots)
))

// After
.rootsChangeHandlers(List.of(
    (exchange, roots) -> System.out.println("Roots changed: " + roots)
))

MCP コードの移行に関する完全なガイドについては、MCP Migration Guide [GitHub] (英語) を参照してください。

AI を使ったアップグレードの自動化

提供されたプロンプトを使用して、Claude コード CLI ツールを使用して 1.0.0-M7 へのアップグレードプロセスを自動化できます。

  1. Claude Code CLI tool (英語) をダウンロード

  2. Copy the prompt from the update-to-m7.txt [GitHub] (英語) file

  3. プロンプトを Claude コード CLI に貼り付けます

  4. AI がプロジェクトを分析し、必要な変更を加えます

自動アップグレードプロンプトは現在、アーティファクト ID の変更、パッケージの再配置、モジュール構造の変更に対応していますが、MCP 0.9.0 へのアップグレードに関する自動変更はまだ含まれていません。MCP をご利用の場合は、MCP Java SDK Upgrade セクションのガイダンスに従ってコードを手動で更新する必要があります。

バージョン間での共通の変更点

アーティファクト ID の変更

Spring AI スターターアーティファクトの命名パターンが変更されました。以下のパターンに従って依存関係を更新する必要があります。

  • モデルスターター: spring-ai-{model}-spring-boot-starter → spring-ai-starter-model-{model}

  • ベクトルストアスターター: spring-ai-{store}-store-spring-boot-starter → spring-ai-starter-vector-store-{store}

  • MCP スターター: spring-ai-mcp-{type}-spring-boot-starter → spring-ai-starter-mcp-{type}

サンプル

<!-- BEFORE -->
<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-openai-spring-boot-starter</artifactId>
</dependency>

<!-- AFTER -->
<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-starter-model-openai</artifactId>
</dependency>
// BEFORE
implementation 'org.springframework.ai:spring-ai-openai-spring-boot-starter'
implementation 'org.springframework.ai:spring-ai-redis-store-spring-boot-starter'

// AFTER
implementation 'org.springframework.ai:spring-ai-starter-model-openai'
implementation 'org.springframework.ai:spring-ai-starter-vector-store-redis'

Spring AI 自動構成アーティファクトの変更

Spring AI 自動構成は、単一のモノリシックアーティファクトから、モデル、ベクトルストア、その他のコンポーネントごとに個別の自動構成アーティファクトに変更されました。この変更は、Google プロトコルバッファー、Google RPC などの異なるバージョンの依存ライブラリが競合することによる影響を最小限に抑えるために行われました。自動構成をコンポーネント固有のアーティファクトに分離することで、不要な依存関係が取り込まれるのを防ぎ、アプリケーションでのバージョン競合のリスクを軽減できます。

オリジナルのモノリシックアーティファクトは利用できなくなりました。

<!-- NO LONGER AVAILABLE -->
<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-spring-boot-autoconfigure</artifactId>
    <version>${project.version}</version>
</dependency>

代わりに、各コンポーネントには次のパターンに従う独自の自動構成アーティファクトが含まれるようになりました。

  • モデルの自動構成: spring-ai-autoconfigure-model-{model}

  • ベクトルストアの自動構成: spring-ai-autoconfigure-vector-store-{store}

  • MCP 自動構成: spring-ai-autoconfigure-mcp-{type}

新しい自動構成アーティファクトの例

  • モデル

  • ベクトルストア

  • MCP

<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-autoconfigure-model-openai</artifactId>
</dependency>

<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-autoconfigure-model-anthropic</artifactId>
</dependency>

<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-autoconfigure-model-vertex-ai</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-autoconfigure-vector-store-redis</artifactId>
</dependency>

<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-autoconfigure-vector-store-pgvector</artifactId>
</dependency>

<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-autoconfigure-vector-store-chroma</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-autoconfigure-mcp-client</artifactId>
</dependency>

<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-autoconfigure-mcp-server</artifactId>
</dependency>
ほとんどの場合、これらの自動構成依存関係を明示的に追加する必要はありません。対応するスターター依存関係を使用すると、それらは推移的に含まれます。

パッケージ名の変更

IDE は、新しいパッケージの場所へのリファクタリングを支援する必要があります。

  • KeywordMetadataEnricher および SummaryMetadataEnricher は org.springframework.ai.transformer から org.springframework.ai.chat.transformer に移動しました。

  • ContentMediaContentMedia は org.springframework.ai.model から org.springframework.ai.content に移動しました。

モジュール構造

このプロジェクトでは、モジュールとアーティファクトの構造に大幅な変更が行われました。以前は spring-ai-core にすべての中心的なインターフェースが含まれていましたが、現在はアプリケーションにおける不要な依存関係を削減するため、専用のドメインモジュールに分割されています。

Spring AI Dependencies

spring-ai-commons

他の Spring AI モジュールに依存しないベースモジュール。以下が含まれます: - コアドメインモデル(DocumentTextSplitter) - JSON ユーティリティとリソース処理 - 構造化ログと可観測性のサポート

spring-ai-model

AI 機能の抽象化を提供する: - ChatModelEmbeddingModelImageModel のようなインターフェース - メッセージ型とプロンプトテンプレート - 関数呼び出しフレームワーク(ToolDefinitionToolCallback) - コンテンツフィルタリングと監視のサポート

spring-ai-vector-store

Unified vector database abstraction: - VectorStore interface for similarity search - Advanced filtering with SQL-like expressions - SimpleVectorStore for in-memory usage - Batching support for embeddings

spring-ai-client-chat

High-level conversational AI API: - ChatClient interface - Conversation persistence via ChatMemory - Response conversion with OutputConverter - Advisor-based interception - Synchronous and reactive streaming support

spring-ai-advisors-vector-store

Bridges chat with vector stores for RAG: - QuestionAnswerAdvisor: injects context into prompts - VectorStoreChatMemoryAdvisor: stores/retrieves conversation history

spring-ai-model-chat-memory-cassandra

Apache Cassandra persistence for ChatMemory: - CassandraChatMemory implementation - Type-safe CQL with Cassandra’s QueryBuilder ==== spring-ai-model-chat-memory-neo4j

Neo4j graph database persistence for chat conversations.

spring-ai-rag

Comprehensive framework for Retrieval Augmented Generation: - Modular architecture for RAG pipelines - RetrievalAugmentationAdvisor as main entry point - Functional programming principles with composable components

Dependency Structure

The dependency hierarchy can be summarized as:

  • spring-ai-commons (foundation)

  • spring-ai-model (depends on commons)

  • spring-ai-vector-store および spring-ai-client-chat (both depend on model)

  • spring-ai-advisors-vector-store および spring-ai-rag (depend on both client-chat and vector-store)

  • spring-ai-model-chat-memory-* modules (depend on client-chat)

ToolContext の変更

The ToolContext class has been enhanced to support both explicit and implicit tool resolution. Tools can now be:

  1. Explicitly Included : Tools that are explicitly requested in the prompt and included in the call to the model.

  2. Implicitly Available : Tools that are made available for runtime dynamic resolution, but never included in any call to the model unless explicitly requested.

Starting with 1.0.0-M7, tools are only included in the call to the model if they are explicitly requested in the prompt or explicitly included in the call.

Additionally, the ToolContext class has now been marked as final and cannot be extended anymore. It was never supposed to be subclassed. You can add all the contextual data you need when instantiating a ToolContext, in the form of a Map<String, Object>. For more information, check the [documentation]( docs.spring.io/spring-ai/reference/api/tools.html#_tool_context ).

1.0.0-M6 へのアップグレード

使用インターフェースと DefaultUsage 実装の変更

Usage インターフェースとそのデフォルト実装 DefaultUsage には、次の変更が加えられました。

  1. メソッド名の変更:

    • getGenerationTokens() は getCompletionTokens() になりました

  2. 型の変更:

    • DefaultUsage のすべてのトークンカウントフィールドが Long から Integer に変更されました。

      • promptTokens

      • completionTokens (formerly generationTokens)

      • totalTokens

必要なアクション

  • getGenerationTokens() へのすべての呼び出しを getCompletionTokens() に置き換えます

  • DefaultUsage コンストラクター呼び出しを更新します。

// Old (M5)
new DefaultUsage(Long promptTokens, Long generationTokens, Long totalTokens)

// New (M6)
new DefaultUsage(Integer promptTokens, Integer completionTokens, Integer totalTokens)
For more information on handling Usage, refer here

JSON Ser/Deser の変更

M6 は generationTokens フィールドの JSON デシリアライゼーションの下位互換性を維持していますが、このフィールドは M7 で削除されます。古いフィールド名を使用している永続化された JSON ドキュメントは、completionTokens を使用するように更新する必要があります。

新しい JSON 形式の例:

{
  "promptTokens": 100,
  "completionTokens": 50,
  "totalTokens": 150
}

ツール呼び出しにおける FunctionCallingOptions の使用箇所の変更

各 ChatModel インスタンスは、構築時に、モデルの呼び出しに使用されるデフォルトのツールを構成するために使用できるオプションの ChatOptions または FunctionCallingOptions インスタンスを受け入れます。

1.0.0-M6 以前:

  • デフォルトの FunctionCallingOptions インスタンスの functions() メソッドを介して渡されたツールは、その ChatModel インスタンスからのモデルへの各呼び出しに含まれており、ランタイムオプションによって上書きされている可能性があります。

  • デフォルトの FunctionCallingOptions インスタンスの functionCallbacks() メソッドを介して渡されるツールは、実行時の動的解決 (Tool Resolution を参照) でのみ使用可能になり、明示的にリクエストされない限り、モデルへの呼び出しには含まれません。

1.0.0-M6 の開始:

  • functions() メソッドまたはデフォルトの FunctionCallingOptions インスタンスの functionCallbacks() を介して渡されるすべてのツールは、同じ方法で処理されるようになりました。つまり、その ChatModel インスタンスからのモデルへの各呼び出しに含まれ、ランタイムオプションによって上書きされる可能性があります。これにより、モデルへの呼び出しにツールが含まれる方法に一貫性が保たれ、functionCallbacks() と他のすべてのオプションの動作の違いによる混乱が回避されます。

ツールを実行時の動的解決に利用できるようにし、明示的にリクエストされた場合にのみモデルへのチャットリクエストに含める場合は、Tool Resolution で説明されているいずれかの戦略を使用できます。

1.0.0-M6 introduced new API for handling tool calling. Backward compatibility is maintained for the old API across all scenarios, except the one described above. The old API are still available, but they are deprecated and will be removed in 1.0.0-M7.

Removal of deprecated Amazon Bedrock chat models

Starting 1.0.0-M6, Spring AI transitioned to using Amazon Bedrock’s Converse API for all Chat conversation implementations in Spring AI. All the Amazon Bedrock Chat models are removed except the Embedding models for Cohere and Titan.

Refer to Bedrock Converse documentation for using the chat models.

Changes to use Spring Boot 3.4.2 for dependency management

Spring AI updates to use Spring Boot 3.4.2 for the dependency management. You can refer here [GitHub] (英語) for the dependencies which Spring Boot 3.4.2

必要なアクション

  • If you are upgrading to Spring Boot 3.4.2, please make sure to refer to this [GitHub] (英語) documentation for the changes required to configure the REST Client. Notably, if you don ’ t have an HTTP client library on the classpath, this will likely result in the use of JdkClientHttpRequestFactory where SimpleClientHttpRequestFactory would have been used previously. To switch to use SimpleClientHttpRequestFactory, you need to set spring.http.client.factory=simple.

  • If you are using a different version of Spring Boot (say Spring Boot 3.3.x) and need a specific version of a dependency, you can override it in your build configuration.

Vector Store API changes

In version 1.0.0-M6, the delete method in the VectorStore interface has been modified to be a void operation instead of returning an Optional<Boolean>. If your code previously checked the return value of the delete operation, you’ll need to remove this check. The operation now throws an exception if the deletion fails, providing more direct error handling.

1.0.0-M6 以前:

Optional<Boolean> result = vectorStore.delete(ids);
if (result.isPresent() && result.get()) {
    // handle successful deletion
}

In 1.0.0-M6 and later:

vectorStore.delete(ids);
// deletion successful if no exception is thrown

1.0.0.M5 へのアップグレード

  • ベクトルビルダーは一貫性を保つためにリファクタリングされました。

  • 現在の VectorStore 実装コンストラクターは非推奨になっています。ビルダーパターンを使用してください。

  • VectorStore 実装パッケージは、アーティファクト間での競合を回避するために、一意のパッケージ名に移動されました。たとえば、org.springframework.ai.vectorstore から org.springframework.ai.pgvector.vectorstore へ。

1.0.0.RC3 へのアップグレード

  • ポータブルチャットオプション(frequencyPenaltypresencePenaltytemperaturetopP)の型が Float から Double に変更されました。

1.0.0.M2 へのアップグレード

  • Chroma ベクトルストアの構成プレフィックスは、他のベクトルストアの命名規則に合わせるために、spring.ai.vectorstore.chroma.store から spring.ai.vectorstore.chroma に変更されました。

  • スキーマを初期化できるベクトルストアの initialize-schema プロパティのデフォルト値が、false に設定されました。つまり、アプリケーションの起動時にスキーマが作成される場合、アプリケーションは、サポートされているベクトルストアでスキーマの初期化を明示的にオプトインする必要があります。すべてのベクトルストアがこのプロパティをサポートしているわけではありません。詳細については、対応するベクトルストアのドキュメントを参照してください。現在 initialize-schema プロパティをサポートしていないベクトルストアは次のとおりです。

    1. Hana

    2. Pinecone

    3. Weaviate

  • Bedrock Jurassic 2 では、チャットオプション countPenaltyfrequencyPenaltypresencePenalty の名前が countPenaltyOptionsfrequencyPenaltyOptionspresencePenaltyOptions に変更されました。さらに、チャットオプション stopSequences の型が String[] から List<String> に変更されました。

  • Azure、OpenAI では、チャットオプション frequencyPenalty および presencePenalty の型が、他のすべての実装と一致するように、Double から Float に変更されました。

1.0.0.M1 へのアップグレード

1.0.0 M1 のリリースに向けて、いくつかの重大な変更を加えました。申し訳ありませんが、これは最善の策です。

ChatClient の変更点

大きな変更が行われ、' 古い ' ChatClient の機能が ChatModel に移動されました。' 新しい ' ChatClient は、ChatModel のインスタンスを使用するようになりました。これは、Spring エコシステム内の他のクライアントクラス ( RestClientWebClientJdbcClient など) と同様のスタイルでプロンプトを作成および実行するための Fluent API をサポートするために行われました。Fluent API の詳細については、[JavaDoc]( ドキュメント ) を参照してください。適切なリファレンスドキュメントはまもなく公開される予定です。

「古い」 ModelClient の名前を Model に変更し、実装クラスの名前も変更しました。たとえば、ImageClient は ImageModel に名前が変更されました。Model 実装は、Spring AI API と基礎となる AI モデル API 間の変換を行う移植性レイヤーを表します。

変化への適応

ChatClient クラスはパッケージ org.springframework.ai.chat.client に含まれるようになりました

アプローチ 1

自動構成された ChatClient インスタンスではなく、ChatModel インスタンスが取得されます。名前変更後の call メソッドシグネチャーは同じままです。コードを変更するには、コードをリファクタリングして、ChatClient 型の使用を ChatModel 型に変更する必要があります。変更前の既存のコード例を次に示します。

@RestController
public class OldSimpleAiController {

    private final ChatClient chatClient;

    public OldSimpleAiController(ChatClient chatClient) {
        this.chatClient = chatClient;
    }

    @GetMapping("/ai/simple")
    Map<String, String> completion(@RequestParam(value = "message", defaultValue = "Tell me a joke") String message) {
        return Map.of("generation", this.chatClient.call(message));
    }
}

変更後はこうなります

@RestController
public class SimpleAiController {

    private final ChatModel chatModel;

    public SimpleAiController(ChatModel chatModel) {
        this.chatModel = chatModel;
    }

    @GetMapping("/ai/simple")
    Map<String, String> completion(@RequestParam(value = "message", defaultValue = "Tell me a joke") String message) {
        return Map.of("generation", this.chatModel.call(message));
    }
}
名前の変更はクラスにも適用されます * StreamingChatClient → StreamingChatModel * EmbeddingClient → EmbeddingModel * ImageClient → ImageModel * SpeechClient → SpeechModel * 他の <XYZ>Client クラスについても同様です

アプローチ 2

このアプローチでは、「新しい」 ChatClient で利用可能な新しい Fluent API を使用します。

変更前の既存コードの例を以下に示します

@RestController
class OldSimpleAiController {

    ChatClient chatClient;

    OldSimpleAiController(ChatClient chatClient) {
        this.chatClient = chatClient;
	}

	@GetMapping("/ai/simple")
	Map<String, String> completion(@RequestParam(value = "message", defaultValue = "Tell me a joke") String message) {
		return Map.of(
                "generation",
				this.chatClient.call(message)
        );
	}
}

変更後はこうなります

@RestController
class SimpleAiController {

    private final ChatClient chatClient;

    SimpleAiController(ChatClient.Builder builder) {
      this.chatClient = builder.build();
    }

    @GetMapping("/ai/simple")
    Map<String, String> completion(@RequestParam(value = "message", defaultValue = "Tell me a joke") String message) {
        return Map.of(
                "generation",
				this.chatClient.prompt().user(message).call().content()
        );
    }
}
ChatModel インスタンスは自動構成を通じて利用可能になります。

アプローチ 3

GitHub リポジトリには [v1.0.0-SNAPSHOT-before-chatclient-changes]( github.com/spring-projects/spring-ai/tree/v1.0.0-SNAPSHOT-before-chatclient-changes (英語) ) というタグがあり、これをチェックアウトしてローカルビルドを実行すると、コードベースを移行する準備ができるまでコードの更新を回避することができます。

git checkout tags/v1.0.0-SNAPSHOT-before-chatclient-changes

./mvnw clean install -DskipTests

アーティファクト名の変更

POM アーティファクト名を変更しました: - spring-ai-qdrant → spring-ai-qdrant-store - spring-ai-cassandra → spring-ai-cassandra-store - spring-ai-pinecone → spring-ai-pinecone-store - spring-ai-redis → spring-ai-redis-store - spring-ai-qdrant → spring-ai-qdrant-store - spring-ai-gemfire → spring-ai-gemfire-store - spring-ai-azure-vector-store-spring-boot-starter → spring-ai-azure-store-spring-boot-starter - spring-ai-redis-spring-boot-starter → spring-ai-starter-vector-store-redis

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>

To

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

Palm2 モデルに関連する Boot スターター

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

to

<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-vertex-ai-palm2-spring-boot-starter</artifactId>
</dependency>
  • 名前変更されたクラス (01.03.2024)

    • VertexAiApi → VertexAiPalm2Api

    • VertexAiClientChat → VertexAiPalm2ChatClient

    • VertexAiEmbeddingClient → VertexAiPalm2EmbeddingClient

    • VertexAiChatOptions → VertexAiPalm2ChatOptions

0.8.0 へのアップグレード

2024 年 1 月 24 日更新

  • promptmessagesmetadata パッケージを org.sf.ai.chat のサブパッケージに移動する

  • 新しい機能は、テキストからイメージへのクライアントです。クラスは OpenAiImageModel および StabilityAiImageModel です。使用箇所については統合テストを参照してください。ドキュメントは近日公開予定です。

  • 任意の入力 / 出力データ型の組み合わせに対する AI モデルクライアントの作成をサポートするインターフェースと基本クラスが含まれる新しいパッケージ model。現時点では、チャットモデルパッケージとイメージモデルパッケージがこれを実装しています。近々、埋め込みパッケージをこの新しいモデルに更新する予定です。

  • 新しい「ポータブルオプション」デザインパターン。さまざまなチャットベースの AI モデル間で ModelCall に可能な限りの移植性を提供したいと考えました。生成オプションの共通のセットと、モデルプロバイダーに固有の生成オプションのセットがあります。一種の「ダックタイピング」アプローチが使用されます。モデルパッケージ内の ModelOptions は、このクラスの実装がモデルのオプションを提供することを示すマーカーインターフェースです。すべての text → image ImageModel 実装にわたってポータブルオプションを定義するサブインターフェースである ImageOptions を参照してください。次に、StabilityAiImageOptions および OpenAiImageOptions は、各モデルプロバイダーに固有のオプションを提供します。すべてのオプションクラスは、流れるような API ビルダーを介して作成され、ポータブルな ImageModel API に渡すことができます。これらのオプションデータ型は、ImageModel 実装の自動構成 / 構成プロパティで使用されます。

2024 年 1 月 13 日更新

次の OpenAi 自動構成チャットプロパティが変更されました

  • spring.ai.openai.model から spring.ai.openai.chat.options.model まで。

  • spring.ai.openai.temperature から spring.ai.openai.chat.options.temperature まで。

OpenAi プロパティに関する更新されたドキュメントを検索します: 参照: openai-chat.html

2023 年 12 月 27 日更新

SimplePersistentVectorStore と InMemoryVectorStore を SimpleVectorStore にマージします * InMemoryVectorStore を SimpleVectorStore に置き換えます

2023 年 12 月 20 日更新

Ollama クライアントと関連クラスおよびパッケージ名のリファクタリング

  • org.springframework.ai.ollama.client.OllamaClient を org.springframework.ai.ollama.OllamaModelCall に置き換えます。

  • OllamaChatClient メソッドのシグネチャーが変更されました。

  • org.springframework.ai.autoconfigure.ollama.OllamaProperties の名前を org.springframework.ai.model.ollama.autoconfigure.OllamaChatProperties に変更し、サフィックスを spring.ai.ollama.chat に変更します。一部のプロパティも変更されました。

2023 年 12 月 19 日更新

AiClient および関連クラスおよびパッケージ名の変更

  • AiClient の名前を ChatClient に変更します

  • AiResponse の名前を ChatResponse に変更します

  • AiStreamClient の名前を StreamingChatClient に変更します

  • パッケージの名前を org.sf.ai.client から org.sf.ai.chat に変更します

アーティファクト ID の名前を変更します

  • transformers-embedding から spring-ai-transformers

Maven モジュールを最上位ディレクトリと embedding-clients サブディレクトリからすべて 1 つの models ディレクトリに移動しました。

2023 年 12 月 1 日

プロジェクトのグループ ID を移行しています。

  • FROMorg.springframework.experimental.ai

  • TOorg.springframework.ai

以下に示すように、アーティファクトは引き続きスナップショットリポジトリでホストされます。

メインの ブランチはバージョン 0.8.0-SNAPSHOT に移行します。1 ~ 2 週間は不安定になります。最新の状態を望まない場合は、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>

1.0.0.M4 へのアップグレード

  • PaLM API サポートの削除

PaLM API を廃止する (英語) という発表を受けて、PaLM API のサポートが削除されました。