This is a public, read-only report. Striff reads this repository's docs, turns each sentence that makes a claim about the code into a rule, and checks the rule against the code on the default branch. How this works
Each sentence below has a stale name: a type the default branch doesn't declare, or declares somewhere else. Edit the doc so it matches the code, or bring the type back.
Per-request HTTP headers on AnthropicChatOptions#httpHeaders, distinct from client-level customHeaders on AbstractAnthropicOptions. customHeaders is set once on the client and applies to every request; httpHeaders is set per Prompt and merged in at request-build time. Useful for request tracing, beta-API toggles, and routing.
The repository once had models/spring-ai-anthropic/src/main/java/org/springframework/ai/anthropic/AbstractAnthropicOptions.java. It doesn't now. Closest names there: AnthropicCacheOptions, AnthropicChatOptions.
The main Advisor interfaces are located in the package org.springframework.ai.chat.client.advisor.api.
Advisor is in org.springframework.ai.chat.client.advisor.api
Holds
VectorStoreChatMemoryAdvisor + Retrieves memory from a VectorStore and adds it into the prompt's system text.
VectorStoreChatMemoryAdvisor depends on VectorStore
Holds
QuestionAnswerAdvisor + This advisor uses a vector store to provide question-answering capabilities, implementing the Naive RAG (Retrieval-Augmented Generation) pattern.
QuestionAnswerAdvisor depends on VectorStore
Holds
The OpenAiAudioSpeechOptions class implements the TextToSpeechOptions interface, providing both portable and OpenAI-specific configuration options.
The ChatMemory abstraction allows you to implement various types of memory to support different use cases.
ChatMemory is a contract
Holds
Spring AI auto-configures a ChatMemory bean that you can use directly in your application. By default, it uses an in-memory repository to store messages (InMemoryChatMemoryRepository) and a MessageWindowChatMemory implementation to manage the conversation history.
MessageWindowChatMemory implements ChatMemory
Holds
MessageWindowChatMemory maintains a sliding window of messages up to a specified maximum size. When the number of messages exceeds the maximum, older messages are evicted while always preserving SystemMessage instances.
MessageWindowChatMemory depends on SystemMessage
Holds
Spring AI offers the ChatMemoryRepository abstraction for storing chat memory.
ChatMemoryRepository is a contract
Holds
By default, if no other repository is already configured, Spring AI auto-configures a ChatMemoryRepository bean of type InMemoryChatMemoryRepository that you can use directly in your application.
Each message also stores a creation timestamp, exposed in the message metadata under the JdbcChatMemoryRepository.CONVERSATION_TS key as a java.time.Instant, so applications can display when a message was created.
JdbcChatMemoryRepository has CONVERSATION_TS
Holds
If you'd rather create the JdbcChatMemoryRepository manually, you can do so by providing a JdbcTemplate instance and a JdbcChatMemoryRepositoryDialect:
JdbcChatMemoryRepository depends on JdbcChatMemoryRepositoryDialect
Holds
You can extend support for other databases by implementing the JdbcChatMemoryRepositoryDialect interface.
JdbcChatMemoryRepositoryDialect is a contract
Holds
If you'd rather create the CassandraChatMemoryRepository manually, you can do so by providing a CassandraChatMemoryRepositoryConfig instance:
CassandraChatMemoryRepository depends on CassandraChatMemoryRepositoryConfig
Holds
The RedisChatMemoryRepository also implements AdvancedRedisChatMemoryRepository, which provides extended query capabilities:
MessageChatMemoryAdvisor. This advisor manages the conversation memory using the provided ChatMemory implementation.
MessageChatMemoryAdvisor depends on ChatMemory
Holds
VectorStoreChatMemoryAdvisor. This advisor manages the conversation memory using the provided VectorStore implementation.
VectorStoreChatMemoryAdvisor depends on VectorStore
Holds
The ChatMemory.CONVERSATION_ID parameter is required for all memory advisors.
ChatMemory has CONVERSATION_ID
Holds
Spring AI exposes this data through the standard ChatResponseMetadata#getRateLimit() accessor, which returns an AnthropicRateLimit populated from the response headers.
ChatResponseMetadata has a getRateLimit method
Holds
AnthropicChatOptions implements the StructuredOutputChatOptions interface, which provides portable getOutputSchema() method.
StructuredOutputChatOptions has a getOutputSchema method
Holds
Spring AI provides type-safe access to Anthropic's pre-built skills through the AnthropicSkill enum:
AnthropicSkill is an enumeration
Holds
Enum values of AnthropicCacheStrategy (NONE, TOOLS_ONLY, SYSTEM_ONLY, SYSTEM_AND_TOOLS, CONVERSATION_HISTORY) and AnthropicCacheTtl (FIVE_MINUTES, ONE_HOUR) are unchanged.
9 rules from this sentence
AnthropicCacheStrategy is in org.springframework.ai.anthropic
Holds
AnthropicCacheTtl is in org.springframework.ai.anthropic
Holds
AnthropicCacheStrategy has NONE
Holds
AnthropicCacheStrategy has TOOLS_ONLY
Holds
AnthropicCacheStrategy has SYSTEM_ONLY
Holds
AnthropicCacheStrategy has SYSTEM_AND_TOOLS
Holds
AnthropicCacheStrategy has CONVERSATION_HISTORY
Holds
AnthropicCacheTtl has FIVE_MINUTES
Holds
AnthropicCacheTtl has ONE_HOUR
Holds
The plainText(...), pdf(...), and customContent(...) factory methods still exist on the renamed AnthropicCitationDocument.
AnthropicCitationDocument is in org.springframework.ai.anthropic
Holds
Every streamed chunk now carries one MessagePart stamped with the index of the content block it belongs to (StreamingParts.partIndex) and, for deltas, StreamingParts.isPartial.
2 rules from this sentence
StreamingParts has partIndex
Holds
StreamingParts has isPartial
Holds
AnthropicChatOptions.validateCitationConsistency() now enforces this and throws IllegalArgumentException before the request is sent.
AnthropicChatOptions has a validateCitationConsistency method
Holds
The link:https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-deepseek/src/main/java/org/springframework/ai/deepseek/DeepSeekChatModel.java[DeepSeekChatModel] implements the ChatModel and StreamingChatModel and uses the <<low-level-api>> to connect to the DeepSeek service.
DeepSeekChatModel implements StreamingChatModel
Holds
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-google-genai/src/main/java/org/springframework/ai/google/genai/GoogleGenAiChatModel.java[GoogleGenAiChatModel] implements the ChatModel and uses the com.google.genai.Client to connect to the Google GenAI service.
GoogleGenAiChatModel implements ChatModel
Holds
The link:https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/MistralAiChatModel.java[MistralAiChatModel] implements the ChatModel and StreamingChatModel and uses the <<low-level-api>> to connect to the Mistral AI service.
MistralAiChatModel implements StreamingChatModel
Holds
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/OllamaChatModel.java[OllamaChatModel] implements the ChatModel and StreamingChatModel and uses the <<low-level-api>> to connect to the Ollama service.
2 rules from this sentence
OllamaChatModel depends on OllamaApi
Holds
OllamaChatModel implements StreamingChatModel
Holds
The https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiChatModel.java[OpenAiChatModel] implements the ChatModel and StreamingChatModel and uses the <<low-level-api>> to connect to the OpenAI service.
OpenAiChatModel implements StreamingChatModel
Holds
Spring AI provides flexible API key management through the ApiKey interface and its implementations. The default implementation, SimpleApiKey, is suitable for most use cases, but you can also create custom implementations for more complex scenarios.
SimpleApiKey implements ApiKey
Holds
Spring AI provides flexible API key management through the ApiKey interface and its implementations.
ApiKey is a contract
Holds
The item id, the item status and the assistant message phase ride along in the part's attributes(), because an item cannot be rebuilt without them.
MessagePart has an attributes method
Holds
A reasoning part is replayed only when its payload came from this provider, which ReasoningPart.replayableTo("openai.responses") reports.
ReasoningPart has a replayableTo method
Holds
getReasoning(), getToolCalls(), getMedia() and getText() are views over the same list, so the familiar accessors keep working.
4 rules from this sentence
AssistantMessage has a getReasoning method
Holds
AssistantMessage has a getToolCalls method
Holds
AssistantMessage has a getMedia method
Holds
AssistantMessage has a getText method
Holds
The ChatClientBuilderConfigurer applies all registered ChatClientBuilderCustomizer beans and wires up observability, mirroring what the auto-configuration does internally.
ChatClientBuilderConfigurer depends on ChatClientBuilderCustomizer
Holds
The ChatClient fluent API allows you to create a prompt in three distinct ways using an overloaded prompt method to initiate the fluent API:
ChatClient has a prompt method
Holds
validateSchema() -- validate the JSON response against the entity schema and automatically retry with error feedback on failure.
EntityParamSpec has a validateSchema method
Holds
useProviderStructuredOutput() -- send the schema to the provider as an API-level constraint instead of prompt text.
EntityParamSpec has an useProviderStructuredOutput method
Holds
Internally, the ChatClient uses the PromptTemplate class to handle the user and system text and replace the variables with the values provided at runtime relying on a given TemplateRenderer implementation.
ChatClient depends on TemplateRenderer
Holds
Internally, the ChatClient uses the PromptTemplate class to handle the user and system text and replace the variables with the values provided at runtime relying on a given TemplateRenderer implementation. By default, Spring AI uses the StTemplateRenderer implementation, which is based on the open-source https://www.stringtemplate.org/[StringTemplate] engine developed by Terence Parr.
StTemplateRenderer implements TemplateRenderer
Holds
The TemplateRenderer configured directly on the ChatClient (via .templateRenderer()) applies only to the prompt content defined directly in the ChatClient builder chain (e.g., via .user(), .system()).
NoOpTemplateRenderer implements TemplateRenderer
Holds
The metadata is included in the generated UserMessage and SystemMessage objects and can be accessed through the message's getMetadata() method.
2 rules from this sentence
UserMessage has a getMetadata method
Holds
SystemMessage has a getMetadata method
Holds
Builder mutate() returns a ChatClient.Builder initialized with the client's default settings.
ChatClient has a mutate method
Holds
Builder mutate() returns a ChatClient.Builder initialized with the request's current settings.
ChatClientRequestSpec has a mutate method
Holds
You can disable auto-registration for a single call using AdvisorParams.toolCallingAdvisorAutoRegister(false):
AdvisorParams has a toolCallingAdvisorAutoRegister method
Holds
Or you can provide your own ToolCallingAdvisor (or any other advisor implementing ToolAdvisor) — in that case auto-registration is suppressed automatically because the chain already contains a ToolAdvisor.
ToolCallingAdvisor implements ToolAdvisor
Holds
The default is ToolCallingAdvisor.DEFAULT_ORDER.
ToolCallingAdvisor has DEFAULT_ORDER
Holds
ToolAdvisor is a marker interface that signals to the ChatClient that the advisor chain already handles tool execution.
ToolAdvisor is a contract
Holds
The interface ChatMemory represents a storage for chat conversation memory.
ChatMemory is a contract
Holds
MessageWindowChatMemory is a chat memory implementation that maintains a window of messages up to a specified maximum size (default: 20 messages).
MessageWindowChatMemory implements ChatMemory
Holds
The MessageWindowChatMemory is backed by the ChatMemoryRepository abstraction which provides storage implementations for the chat conversation memory.
MessageWindowChatMemory depends on ChatMemoryRepository
Holds
The MessageWindowChatMemory is backed by the ChatMemoryRepository abstraction which provides storage implementations for the chat conversation memory. There are several implementations available, including the InMemoryChatMemoryRepository, JdbcChatMemoryRepository, CassandraChatMemoryRepository, Neo4jChatMemoryRepository, MongoChatMemoryRepository, and RedisChatMemoryRepository.
6 rules from this sentence
InMemoryChatMemoryRepository, JdbcChatMemoryRepository, CassandraChatMemoryRepository and 3 more implement ChatMemoryRepository
Holdsall 6
The ChatMemory.CONVERSATION_ID parameter is required for all memory advisors.
ChatMemory has CONVERSATION_ID
Holds
MemoryAdvisor is a marker interface extended by BaseChatMemoryAdvisor.
2 rules from this sentence
BaseChatMemoryAdvisor extends MemoryAdvisor
Holds
MemoryAdvisor is a contract
Holds
MemoryAdvisor is a marker interface extended by BaseChatMemoryAdvisor. DefaultChatClient uses this marker to detect downstream memory advisors in the auto-registration logic.
DefaultChatClient depends on MemoryAdvisor
Holds
The stream() method takes a String or Prompt parameter similar to ChatModel but it streams the responses using the reactive Flux API.
StreamingChatModel has a stream method
Holds
The https://github.com/spring-projects/spring-ai/blob/main/spring-ai-client-chat/src/main/java/org/springframework/ai/chat/prompt/Prompt.java[Prompt] is a ModelRequest that encapsulates a list of https://github.com/spring-projects/spring-ai/blob/main/spring-ai-model/src/main/java/org/springframework/ai/chat/messages/Message.java[Message] objects and optional model request options.
Prompt implements ModelRequest
Holds
The ChatOptions class is a subclass of ModelOptions and is used to define few portable options that can be passed to the AI model.
ChatOptions extends ModelOptions
Holds
The content of an AssistantMessage, UserMessage, ToolResponseMessage is an ordered list of MessagePart entries, available through getParts().
6 rules from this sentence
AssistantMessage depends on MessagePart
Holds
UserMessage depends on MessagePart
Holds
ToolResponseMessage depends on MessagePart
Holds
AssistantMessage has a getParts method
Holds
UserMessage has a getParts method
Holds
ToolResponseMessage has a getParts method
Holds
The familiar accessors are views over the parts, in part order: getText() joins the TextPart entries, getMedia() selects the MediaPart entries, and on AssistantMessagegetToolCalls() selects the complete ToolCallPart entries and getReasoning() the ReasoningPart entries.
7 rules from this sentence
MediaPart is in org.springframework.ai.chat.messages.part
Holds
ToolCallPart is in org.springframework.ai.chat.messages.part
Holds
ReasoningPart is in org.springframework.ai.chat.messages.part
Holds
AssistantMessage depends on ToolCallPart
Holds
AssistantMessage depends on ReasoningPart
Holds
AssistantMessage has a getToolCalls method
Holds
AssistantMessage has a getReasoning method
Holds
getText() joins the TextPart entries, getMedia() selects the MediaPart entries, and on AssistantMessagegetToolCalls() selects the complete ToolCallPart entries and getReasoning() the ReasoningPart entries.
2 rules from this sentence
AssistantMessage has a getText method
Holds
AssistantMessage has a getMedia method
Holds
A message with parts but no text part has an empty text.
TextPart is in org.springframework.ai.chat.messages.part
Holds
A part can carry an OpaquePayload with a provider, a kind and opaque data, for example the Anthropic thinking signature or the Gemini thought signature.
3 rules from this sentence
OpaquePayload has provider
Holds
OpaquePayload has kind
Holds
OpaquePayload has data
Holds
When streaming, each chunk carries its parts stamped with the index of the content block they belong to and a partial flag, see StreamingParts.
StreamingParts has partial
Holds
PagePdfDocumentReader an implementation of DocumentReader
PagePdfDocumentReader implements DocumentReader
Holds
TokenTextSplitter an implementation of DocumentTransformer
TokenTextSplitter implements DocumentTransformer
Holds
setCharset(Charset charset): Sets the character set used for reading the text file.
TextReader has a setCharset method
Holds
Custom metadata can be added to all documents created by the reader using the getCustomMetadata() method.
TextReader has a getCustomMetadata method
Holds
The TextSplitter an abstract base class that helps divides documents to fit the AI model's context window.
TextSplitter is declared abstract
Holds
Use TokenTextSplitter.builder() to create instances.
TokenTextSplitter has a builder method
Holds
The KeywordMetadataEnricher is a DocumentTransformer that uses a generative AI model to extract keywords from document content and add them as metadata.
The FileDocumentWriter is a DocumentWriter implementation that writes the content of a list of Document objects into a file.
FileDocumentWriter implements DocumentWriter
Holds
The ChatClient class can be likened to the JdbcClient, built on top of ChatModel and providing more advanced constructs via Advisor to consider past interactions with the model, augment the prompt with additional contextual documents, and introduce agentic behavior.
ChatClient depends on Advisor
Holds
The Prompt class functions as a container for an organized series of Message objects and a request ChatOptions.
Prompt depends on ChatOptions
Holds
getLastUserOrToolResponseMessage(): Returns the last user or tool response message, useful for conversation continuity
Prompt has a getLastUserOrToolResponseMessage method
Holds
All subclasses of AbstractMessage hold their content as an ordered list of MessagePart entries, available through getParts().
2 rules from this sentence
AbstractMessage depends on MessagePart
Holds
AbstractMessage has a getParts method
Holds
All subclasses of AbstractMessage hold their content as an ordered list of MessagePart entries, available through getParts(). getText() joins the TextPart entries and getMedia() (in UserMessage) selects the MediaPart entries, in part order, so the two accessors stay valid views over the parts.
AbstractMessage depends on TextPart
Holds
getText() joins the TextPart entries and getMedia() (in UserMessage) selects the MediaPart entries, in part order, so the two accessors stay valid views over the parts.
3 rules from this sentence
AbstractMessage has a getText method
Holds
UserMessage depends on MediaPart
Holds
UserMessage has a getMedia method
Holds
This class uses the TemplateRenderer API to render templates. By default, Spring AI uses the StTemplateRenderer implementation, which is based on the open-source https://www.stringtemplate.org/[StringTemplate] engine developed by Terence Parr.
StTemplateRenderer implements TemplateRenderer
Holds
You can provide your own implementation of TemplateRenderer if you need custom logic. For scenarios where no template rendering is required (e.g., the template string is already complete), you can use the provided NoOpTemplateRenderer.
NoOpTemplateRenderer implements TemplateRenderer
Holds
The method String render(): Renders a prompt template into a final string format without external input, suitable for templates without placeholders or dynamic content.
PromptTemplate has a render method
Holds
The method Message createMessage(): Creates a Message object without additional data, used for static or predefined message content.
PromptTemplate has a createMessage method
Holds
The method Prompt create(): Generates a Prompt object without external data inputs, ideal for static or predefined prompts.
PromptTemplate has a create method
Holds
The QuestionAnswerAdvisor uses a default template to augment the user question with the retrieved documents. You can customize this behavior by providing your own PromptTemplate object via the .promptTemplate() builder method.
QuestionAnswerAdvisor depends on PromptTemplate
Holds
This is distinct from configuring a TemplateRenderer on the ChatClient itself (using .templateRenderer()), which affects the rendering of the initial user/system prompt content before the advisor runs.
ChatClient depends on TemplateRenderer
Holds
The custom PromptTemplate can use any TemplateRenderer implementation (by default, it uses StPromptTemplate based on the https://www.stringtemplate.org/[StringTemplate] engine).
PromptTemplate depends on TemplateRenderer
Holds
The RetrievalAugmentationAdvisor is an Advisor providing an out-of-the-box implementation for the most common RAG flows, based on a modular architecture.
RetrievalAugmentationAdvisor implements Advisor
Holds
A VectorStoreDocumentRetriever retrieves documents from a vector store that are semantically similar to the input query.
VectorStoreDocumentRetriever depends on VectorStore
Holds
Spring AI automatically discovers ToolCallback beans in the application context and exposes them through the ToolCallbackResolver for name-based lookup.
ToolCallbackResolver depends on ToolCallback
Holds
With the auto-registered ToolCallingAdvisor, this is automatic — DefaultChatClient detects any MemoryAdvisor inside the loop and disables internal history with no additional configuration.
ToolAdvisor is a marker interface: any custom tool call advisor must implement it so that DefaultChatClient recognizes it, enforces the single-advisor constraint, and registers it in place of the default.
ToolAdvisor is a contract
Holds
The ToolCallback interface models a tool: it carries the definition the model sees and the execution logic invoked when the model calls it.
ToolCallback is a contract
Holds
Spring AI provides MethodToolCallback and FunctionToolCallback as built-in implementations. Implement ToolCallback directly when you need full control — for example, to proxy a remote tool source (as MCP integration does).
2 rules from this sentence
MethodToolCallback implements ToolCallback
Holds
FunctionToolCallback implements ToolCallback
Holds
ToolDefinition is the contract the model sees: name, description, and input schema.
ToolDefinition is a contract
Holds
For method-based tools, ToolDefinitions.from(method) generates a definition automatically.
ToolDefinitions has a from method
Holds
The default DefaultToolCallResultConverter uses Jackson to serialize the result. Configure a custom converter on the @Tool annotation (resultConverter) or via ToolMetadata.
When a tool throws, the exception is wrapped in ToolExecutionException and handed to the ToolExecutionExceptionProcessor:
ToolExecutionExceptionProcessor depends on ToolExecutionException
Holds
These defaults (DefaultToolCallingManager.DEFAULT_MAX_CALLS_PER_TOOL / DEFAULT_MAX_TOTAL_TOOL_CALLS) apply even without calling these methods.
2 rules from this sentence
DefaultToolCallingManager has DEFAULT_MAX_CALLS_PER_TOOL
Holds
DefaultToolCallingManager has DEFAULT_MAX_TOTAL_TOOL_CALLS
Holds
ToolCallingAdvisor catches it and returns the breach as the final response - a single Generation (via ex.buildGeneration()), never one generation per tool call, so a successful call earlier in a parallel batch can't hide the breach from callers reading only the first result.
ToolCallLimitExceededException has a buildGeneration method
Holds
DefaultToolCallingManager throws ToolCallLimitExceededException, carrying the tool name (null for a total-limit breach), the limit that was hit, and the partial ToolExecutionResult already executed in the current batch, so no completed work is discarded.
DefaultToolCallingManager depends on ToolCallLimitExceededException
Holds
Its finish reason is ToolCallLimitExceededException.FINISH_REASON, and any tool calls that did succeed earlier in the batch are preserved under the METADATA_PARTIAL_TOOL_RESPONSES metadata key instead of being discarded.
2 rules from this sentence
ToolCallLimitExceededException has FINISH_REASON
Holds
ToolCallLimitExceededException has METADATA_PARTIAL_TOOL_RESPONSES
Holds
With onLimitExceeded(ToolCallLimitBehavior.RETURN_ERROR_RESPONSE), the manager instead skips the call and synthesizes an error ToolResponse — the same mechanism used for ToolExecutionException — so the model is told the limit was reached and the conversation continues instead of terminating.
ToolCallLimitBehavior has RETURN_ERROR_RESPONSE
Holds
By default, StaticToolCallbackResolver is auto-configured with all ToolCallback beans in the application context, plus tools produced by ToolCallbackProvider beans (with the exception of MCP providers, which are excluded to avoid eager listing — see xref:#consuming-mcp-server-tools[Consuming MCP Server Tools]).
StaticToolCallbackResolver depends on ToolCallback
Holds
ToolCallingAdvisor implements both CallAdvisor and StreamAdvisor, plus the ToolAdvisor marker interface.
3 rules from this sentence
ToolCallingAdvisor implements CallAdvisor
Holds
ToolCallingAdvisor implements StreamAdvisor
Holds
ToolCallingAdvisor implements ToolAdvisor
Holds
The marker interface is what DefaultChatClient uses to enforce that exactly one tool advisor is present in the chain — see xref:#single-tooladvisor-invariant[Single-ToolAdvisor Invariant].
DefaultChatClient depends on ToolAdvisor
Holds
ToolExecutionEligibilityChecker is a functional interface:
ToolExecutionEligibilityChecker is a contract
Holds
doAfterStream operates on the response aggregated across the iteration's chunks;
ToolCallingAdvisor has doAfterStream
Holds
doFinalizeLoopStream can transform the entire output Flux.
ToolCallingAdvisor has doFinalizeLoopStream
Holds
It overrides doInitializeLoop and doInitializeLoopStream to index the tool set at session start and augment the system message, and doBeforeCall and doBeforeStream to inject only the tools discovered so far on each iteration.
4 rules from this sentence
ToolSearchToolCallingAdvisor has doInitializeLoop
Holds
ToolSearchToolCallingAdvisor has doInitializeLoopStream
Holds
ToolSearchToolCallingAdvisor has doBeforeCall
Holds
ToolSearchToolCallingAdvisor has doBeforeStream
Holds
ToolSearchToolCallingAdvisor is a concrete example of a ToolCallingAdvisor subclass.
The ToolIndex interface abstracts the search implementation.
ToolIndex is a contract
Holds
The ToolIndex interface and its companion types (ToolSearchRequest, ToolSearchResponse, ToolReference) live in the spring-ai-tool-search-tool module under org.springframework.ai.tool.toolsearch.
4 rules from this sentence
ToolIndex is in spring-ai-tool-search-tool, and ToolIndex is in org.springframework.ai.tool.toolsearch
Holds
ToolSearchRequest is in spring-ai-tool-search-tool, and ToolSearchRequest is in org.springframework.ai.tool.toolsearch
Holds
ToolSearchResponse is in spring-ai-tool-search-tool, and ToolSearchResponse is in org.springframework.ai.tool.toolsearch
Holds
ToolReference is in spring-ai-tool-search-tool, and ToolReference is in org.springframework.ai.tool.toolsearch
Holds
Spring AI offers an abstracted API for interacting with vector databases through the VectorStore interface and its read-only counterpart, the VectorStoreRetriever interface.
2 rules from this sentence
VectorStore is a contract
Holds
VectorStoreRetriever is a contract
Holds
The VectorStore interface extends VectorStoreRetriever and adds mutation capabilities:
VectorStore extends VectorStoreRetriever
Holds
The similaritySearch methods in the interface allow for retrieving documents similar to a given query string.
VectorStore has a similaritySearch method
Holds
Spring AI provides this functionality through the BatchingStrategy interface, which allows for processing documents in sub-batches based on their token counts.
BatchingStrategy is a contract
Holds
This interface defines a single method, batch, which takes a list of documents and returns a list of document batches.
BatchingStrategy has a batch method
Holds
The TokenCountBatchingStrategy internally uses a TokenCountEstimator (specifically, JTokkitTokenCountEstimator) to calculate token counts for efficient batching.
TokenCountBatchingStrategy depends on JTokkitTokenCountEstimator
Holds
For those cases the VectorStore interface offers upsert, which takes the document and its vector paired together in an EmbeddedDocument and never embeds anything itself:
VectorStore has upsert
Holds
upsert is opt-in per store: the default implementation throws UnsupportedOperationException, so a store supports it only once it has been implemented.
PgVectorStore has upsert
Holds
Spring AI's VertexAiMultimodalEmbeddingModel puts text and images in one 1408-dimension space, but it implements DocumentEmbeddingModel rather than EmbeddingModel, so using it on both sides means wrapping it for the store.
RedisVectorStore implements upsert(List<EmbeddedDocument>), so you can write documents together with embeddings you computed elsewhere instead of having the store embed them.
RedisVectorStore has an upsert method
Holds
The Redis Vector Store implementation provides access to the underlying native Redis client (RedisClient) through the getNativeClient() method: