Introduction
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 集成的根本挑战: |
Spring AI addresses the fundamental challenge of AI integration: |
Spring AI 提供了抽象,作为开发 AI 应用程序的基础。这些抽象有多种实现,能够轻松进行组件交换,同时最大限度地减少代码更改。
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:
-
对 AI 提供商的聊天、文本到图像和嵌入模型提供可移植的 API 支持。支持同步和流式 API 选项。还可以访问模型特定的功能。
-
Portable API support across AI providers for Chat, text-to-image, and Embedding models. Both synchronous and streaming API options are supported. Access to model-specific features is also available.
-
支持所有主要的 AI Model providers ,例如 Anthropic、OpenAI、Microsoft、Amazon、Google 和 Ollama。支持的模型类型包括:
-
Support for all major AI Model providers such as Anthropic, OpenAI, Microsoft, Amazon, Google, and Ollama. Supported model types include:
-
Structured Outputs - AI 模型输出到 POJO 的映射。
-
Structured Outputs - Mapping of AI Model output to POJOs.
-
支持所有主要的 Vector Database providers ,例如Apache Cassandra、Azure Cosmos DB、Azure Vector Search、Chroma、Elasticsearch、GemFire、MariaDB、Milvus、MongoDB Atlas、Neo4j、OpenSearch、Oracle、PostgreSQL/PGVector、PineCone、Qdrant、Redis、SAP Hana、Typesense和Weaviate。
-
Support for all major Vector Database providers such as Apache Cassandra, Azure Cosmos DB, Azure Vector Search, Chroma, Elasticsearch, GemFire, MariaDB, Milvus, MongoDB Atlas, Neo4j, OpenSearch, Oracle, PostgreSQL/PGVector, PineCone, Qdrant, Redis, SAP Hana, Typesense and Weaviate.
-
一个跨矢量数据库提供商的可移植 API,包括一个新颖的类 SQL 元数据过滤 API。
-
Portable API across Vector Store providers, including a novel SQL-like metadata filter API.
-
Tools/Function Calling - 允许模型请求执行客户端工具和函数,从而按需访问必要的实时信息并采取行动。
-
Tools/Function Calling - Permits the model to request the execution of client-side tools and functions, thereby accessing necessary real-time information as required and taking action.
-
Observability - 提供有关 AI 相关操作的见解。
-
Observability - Provides insights into AI-related operations.
-
用于数据工程的文档摄取 ETL framework 。
-
Document ingestion ETL framework for Data Engineering.
-
AI Model Evaluation - 有助于评估生成内容并防止幻觉响应的实用工具。
-
AI Model Evaluation - Utilities to help evaluate generated content and protect against hallucinated response.
-
用于 AI 模型和向量存储的 Spring Boot 自动配置和启动器。
-
Spring Boot Auto Configuration and Starters for AI Models and Vector Stores.
-
ChatClient API - 用于与 AI 聊天模型通信的流畅 API,在惯用上类似于 WebClient 和 RestClient API。
-
ChatClient API - Fluent API for communicating with AI Chat Models, idiomatically similar to the WebClient and RestClient APIs.
-
Advisors API - Encapsulates recurring Generative AI patterns, transforms data sent to and from Language Models (LLMs), and provides portability across various models and use cases.
-
Advisors API - Encapsulates recurring Generative AI patterns, transforms data sent to and from Language Models (LLMs), and provides portability across various models and use cases.
-
好的,以下是使用Gemini将“Support for Chat Conversation Memory and Retrieval Augmented Generation (RAG) .”翻译成中文:支持 Chat Conversation Memory 和 Retrieval Augmented Generation (RAG) 。
-
Support for Chat Conversation Memory and Retrieval Augmented Generation (RAG).
以下是使用 Gemini 翻译后的文本:该功能集可让您实现常见的用例,例如 “Q&A over your documentation” 或 “Chat with your documentation.”
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.