百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

playground-flight-booking

> DevOps
开源

基于 Spring AI 的专家系统演示

356 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

基于 Spring AI 的专家系统演示

AI powered expert system demo

Spring AI re-implementation of https://github.com/marcushellberg/java-ai-playground

This app shows how you can use Spring AI to build an AI-powered system that:

  • Has access to terms and conditions (retrieval augmented generation, RAG)
  • Can access tools (Java methods) to perform actions (Function Calling)
  • Uses an LLM to interact with the user

Requirements

  • Java 17+
  • OpenAI API key in OPENAI_API_KEY environment variable

Running

Run the app by running Application.java in your IDE or mvn in the command line.

With OpenAI Chat

Add to the POM the Spring AI Open AI boot starter:

xml

    org.springframework.ai
    spring-ai-openai-spring-boot-starter

Add the OpenAI configuraiton to the applicaiton.properties:

spring.ai.openai.api-key=${OPENAI_API_KEY}
spring.ai.openai.chat.options.model=gpt-4o

WIth VertexAI Geminie Chat

Add to the POM the Spring AI VertexAI Gemeni and Onnx Transfomer Embedding boot starters:

xml

    org.springframework.ai
    spring-ai-vertex-ai-gemini-spring-boot-starter

    org.springframework.ai
    spring-ai-transformers-spring-boot-starter

Add the VertexAI Gemini configuraiton to the applicaiton.properties:

spring.ai.vertex.ai.gemini.project-id=${VERTEX_AI_GEMINI_PROJECT_ID}
spring.ai.vertex.ai.gemini.location=${VERTEX_AI_GEMINI_LOCATION}
spring.ai.vertex.ai.gemini.chat.options.model=gemini-1.5-pro-001
# spring.ai.vertex.ai.gemini.chat.options.model=gemini-1.5-flash-001

With Azure OpenAI Chat

Add to the POM the Spring AI Azure OpenAI boot starter:

xml

    org.springframework.ai
    spring-ai-azure-openai-spring-boot-starter

Add the Azure OpenAI configuraiton to the applicaiton.properties:

spring.ai.azure.openai.api-key=${AZURE_OPENAI_API_KEY}
spring.ai.azure.openai.endpoint=${AZURE_OPENAI_ENDPOINT}
spring.ai.azure.openai.chat.options.deployment-name=gpt-4o

With Groq Chat

It reuses the OpenAI Chat client but ponted to the Groq endpont

Add to the POM the Spring AI Open AI boot starter:

xml

    org.springframework.ai
    spring-ai-openai-spring-boot-starter

    org.springframework.ai
    spring-ai-transformers-spring-boot-starter

Add the Groq configuraiton to the applicaiton.properties:

spring.ai.openai.api-key=${GROQ_API_KEY}
spring.ai.openai.base-url=https://api.groq.com/openai
spring.ai.openai.chat.options.model=llama3-70b-8192

With Anthropic Claude 3 Chat

Add to the POM the Spring AI Anthropic Claude and Onnx Transfomer Embedding boot starters:

xml

    org.springframework.ai
    spring-ai-anthropic-spring-boot-starter

    org.springframework.ai
    spring-ai-transformers-spring-boot-starter

Add the Anthropic configuration to the application.properties:

spring.ai.anthropic.api-key=${ANTHROPIC_API_KEY}
spring.ai.openai.chat.options.model=llama3-70b-8192
spring.ai.anthropic.chat.options.model=claude-3-5-sonnet-20240620

Build Jar

bash
./mvnw clean install -Pproduction
bash
java -jar ./target/playground-flight-booking-0.0.1-SNAPSHOT.jar
bash
docker run -it --rm --name postgres -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres ankane/pgvector

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Javaartificial-intelligenceexpert-systemgenerative-ai

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理