Spring AI 1.0.0 M2 released

Releases | Mark Pollack | August 23, 2024 | ...

We are happy to announce the 1.0.0 Milestone 2 release of Spring AI.

This release brings significant enhancements and new features across various areas.

Key Focus: Observability

A major emphasis for this release has been on observability functionality, crucial for monitoring, debugging, and optimizing AI applications. Comprehensive observability features have been introduced for:

  • ChatClient (including Advisors)
  • Chat Models (OpenAI, Ollama, Mistral, Anthropic)
  • Embedding Models
  • Image Generation Models
  • Vector Stores

Note: Support for additional ChatModel implementation will be added in future releases.

Here are some samples showcasing this functionality to get started

Grazie mille (a thousand thanks ;) to Thomas Vitale for his significant efforts in contributing to the Observability feature!

Here is a screenshot showing the tracing of the following code

var response = chatClient.prompt()
	.user("How does Carina work?")
	.advisors(new QuestionAnswerAdvisor(vectorStore, SearchRequest.defaults()))
	.advisors(new PromptChatMemoryAdvisor(chatMemory))
	.call()
	.chatResponse();

Grafana view of Spring AI Trace

In the trace view, you can see the nesting of the ChatClient call which first passes through two advisors, the QuestionAnswerAdvisor that does an embedding request and a query to the PGVector database. Then it passes through the PromptChatMemoryAdvisor, which takes very little time, and then finally to the calling of the OpenAI gpt-4o model.

You can find all the details what metrics are available in the Observability Documentation

Core improvements

  • New: MarkdownDocumentReader for ETL pipelines
  • New: Cassandra-backed chat memory
  • New: Typesense testcontainer integration
  • ChatClient enhancements
    • Function registration with explicit input type
    • Dynamic filter expressions for QuestionAnswerAdvisor
    • Customizable logger advisor
  • Improved API design of ResponseMetadata and the Message object hierarchy
  • Embedding format changed from List to float[]
  • Added JSON array handling to JsonReader
  • Options improvements
    • ChatOptions: Enhanced metadata configuration for defined models
    • EmbeddingOptions: Added model and dimensions options
    • ImageOptions: Added style option
  • ChatOptions added to PromptTemplate create methods

ChatModel Enhancements

General improvements have been made across the chat model infrastructure classes. Key feature enhancements for specific models include:

  • Anthropic: Added Function calling support
  • Azure Open AI
    • Function calling integration
    • Updated to Azure OpenAI Client library 1.0 beta-10
    • New: Transcription support
    • Added image handling for byte arrays
    • Added Multimodality support
    • Added OpenAI API key and MS-Entra authentication options
  • Amazon Bedrock: Updated bedrockruntime version to 2.26.7
  • HuggingFace: Added Boot starter
  • Minimax
    • Improved function calling
    • Added Web search tool support
    • Introduced sensitive information masking option
  • Mistral
    • Added function calling support
    • Documentation for using Mistral AI via Spring AI's OpenAI client
  • New: Moonshot chat model with function calling
  • Ollama
    • Function calling support
    • Batch embedding request functionality
  • OpenAI
  • New: QianFan model for chat, embeddings, and image generation.
  • ONNX - Improved transformer embedding model
  • Google Vertex AI
    • Add Embedding model support
    • Updated Google Vertex SDK to 26.41.0
    • Resolved parallel function calling
    • Added system message support
    • Added ResponeMimeType in chat options
    • Added Google search retrieval tool support
  • ZhiPu: Added function calling support

Thanks for Geng Rong for the Moonshot, QianFan, and ZhiPu model support.

Vector Store improvements

  • Breaking Change: Default value for vector store configuration property initialize-schema changed to false.
  • Introduced BatchingStrategy for efficient document embedding operations
    • Added TokenCountBatchingStrategy implementation
  • Cassandra: Added CassandraChatMemory
  • Chroma:
    • Upgraded from use of RestTemplate to RestClient
    • Integrated ChromaDB's CHROMA_SERVER_AUTHN_CREDENTIALS environment variable for Docker Compose and Testcontainers
  • Gemfire: Enhanced functionality
  • Milvus: Removed flush operations to prevent excessive segment creation
  • MongoDB: Improved efficiency using org.bson.Documents
  • Neo4j - Updated to latest Cypher-DSL
  • New: Opensearch VectorStore implementation Thanks Jemin Huh!
  • New: Oracle 23ai VectorStore implementation Thanks Loïc Lefèvre!
  • PGVector
    • Introduced customizable schema, table, and index names
    • Fixed IN/NOT IN filters for JSON queries
  • Pinecone
    • Added configurable content and distance metadata fields
    • Added AOT hints
  • Redis: Enabled use of standard RedisAutoConfiguration
  • New: Typesense support

General improvements

Many refactoring, bug fixing, documentation enhancements across the board by a wide range of contributors. If we haven’t gotten to your PR yet, we will, please be patient. Thanks to

Mohammed, Ahmed Yousri Salama, Ashwin Krishna K, blackbean99, Youngrae Cho, DadySu, Jerry (Flyingblu), Lorenzo Caenazzo, Jemin Huh, Bill Lau, JayPark7821, KAMOsama, David Caudill, Lee-ChungMu, Pablo Sanchi, Seol_JY, TarasVovk669, Thomas Vitale, TimJ0212, Fu Cheng, ashni, Benoit Moussaud, Dariusz Jędrzejczyk, cocomongg, ChanYeong, David Afriz, devholic22, Mariusz Bernacki, dongfeng3692, Dave Syer, Eddú Meléndez, El Mahdi Oukhamou, Seongmin Kim, Francisco Javier Torres, geetrawat, Craig Walls, yinpeng, Sinsy, Johnny Lim, jo-kim, Josh Long, KimMinjeong, Cameron Kirk, Laura Trotta, Loïc Lefèvre, Hyoseop Song, luocq3, Michael Simons, mck, Jonatan Soto, Muthukumaran Navaneethakrishnan, Geng Rong, Nicholas Zhan, Szymon Ochnio, Philipp Gerhard, Piotr Olaszewski, rapenumaka, rivkode, Ross Lawley, Andrea Rubino, Soby Chacko, xiaoxin, Stefan Vassilev, Tim Kelly, Chris Turchin, uzhuraul, Veerendra Vellanki, 吴博, xiehui1956, xsg22, 양예성, Yulong Shi, jiwoo, zlzzlzz2l

Get the Spring newsletter

Stay connected with the Spring newsletter

Subscribe

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all