Spring AI

Spring AI 项目旨在简化应用程序的开发,这些应用程序纳入了人工智能功能,无需不必要复杂性。

The Spring AI project aims to streamline the development of applications that incorporate artificial intelligence functionality without unnecessary complexity.

该项目从 LangChain、LlamaIndex 等知名 Python 项目中获取灵感,但 Spring AI 并非这些项目的直接移植。该项目建立在这样的信念之上:即将来的 Generative AI 应用程序浪潮不只会面向 Python 开发者,而是会普遍存在于多种编程语言中。

The project draws inspiration from notable Python projects, such as LangChain and LlamaIndex, but Spring AI is not a direct port of those projects. The project was founded with the belief that the next wave of Generative AI applications will not be only for Python developers but will be ubiquitous across many programming languages.

在核心方面,Spring AI 提供抽象作为开发 AI 应用程序的基础。这些抽象具有多种实现,从而能够使用最小的代码更改轻松交换组件。

At its core, Spring AI provides abstractions that serve as the foundation for developing AI applications. These abstractions have multiple implementations, enabling easy component swapping with minimal code changes.

Spring AI 提供以下功能:

Spring AI provides the following features:

  • Support for all major Model providers such as OpenAI, Microsoft, Amazon, Google, and Huggingface.

  • Supported Model types are Chat and Text to Image with more on the way.

  • Portable API across AI providers for Chat and for Embedding models. Both synchronous and stream API options are supported. Dropping down to access model specific features is also supported.

  • Mapping of AI Model output to POJOs.

  • Support for all major Vector Database providers such as Azure Vector Search, Chroma, Milvus, Neo4j, PostgreSQL/PGVector, PineCone, Qdrant, Redis, and Weaviate

  • Portable API across Vector Store providers, including a novel SQL-like metadata filter API that is also portable.

  • Function calling

  • Spring Boot Auto Configuration and Starters for AI Models and Vector Stores.

  • ETL framework for Data Engineering

此功能集使你能够实现常见用例,例如“关于你的文档的问答”或“与你的文档聊天”。

This feature set lets you implement common use cases such as “Q&A over your documentation” or “Chat with your documentation.”

concepts section 对 AI 概念及其在 Spring AI 中的表示提供了高级概述。

The concepts section provides a high-level overview of AI concepts and their representation in Spring AI.

Getting Started 部分向您展示如何创建您的第一个 AI 应用程序。后续部分深入探讨每个组件和常见用例,方法以代码为中心。

The Getting Started section shows you how to create your first AI application. Subsequent sections delve into each component and common use cases with a code-focused approach.