{"id":19271719,"url":"https://github.com/tzolov/playground-flight-booking","last_synced_at":"2025-04-13T00:49:29.724Z","repository":{"id":227029836,"uuid":"770225328","full_name":"tzolov/playground-flight-booking","owner":"tzolov","description":"Spring AI powered expert system demo","archived":false,"fork":false,"pushed_at":"2025-04-04T21:39:55.000Z","size":832,"stargazers_count":178,"open_issues_count":6,"forks_count":103,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-13T00:49:25.703Z","etag":null,"topics":["artificial-intelligence","expert-system","generative-ai"],"latest_commit_sha":null,"homepage":"https://docs.spring.io/spring-ai/reference/1.0-SNAPSHOT/index.html","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tzolov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-11T07:09:01.000Z","updated_at":"2025-04-12T16:08:36.000Z","dependencies_parsed_at":"2024-06-11T06:29:31.814Z","dependency_job_id":"461b1c43-3179-4b2c-8688-a40b4974a9ff","html_url":"https://github.com/tzolov/playground-flight-booking","commit_stats":null,"previous_names":["tzolov/playground-flight-booking"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzolov%2Fplayground-flight-booking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzolov%2Fplayground-flight-booking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzolov%2Fplayground-flight-booking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzolov%2Fplayground-flight-booking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tzolov","download_url":"https://codeload.github.com/tzolov/playground-flight-booking/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650436,"owners_count":21139672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","expert-system","generative-ai"],"created_at":"2024-11-09T20:33:48.136Z","updated_at":"2025-04-13T00:49:29.704Z","avatar_url":"https://github.com/tzolov.png","language":"Java","funding_links":[],"categories":["Code \u0026 Examples"],"sub_categories":["Code Examples"],"readme":"# AI powered expert system demo\n\nSpring AI re-implementation of https://github.com/marcushellberg/java-ai-playground\n\nThis app shows how you can use [Spring AI](https://github.com/spring-projects/spring-ai) to build an AI-powered system that:\n\n- Has access to terms and conditions (retrieval augmented generation, RAG)\n- Can access tools (Java methods) to perform actions (Function Calling)\n- Uses an LLM to interact with the user\n\n![alt text](diagram.jpg)\n\n## Requirements\n\n- Java 17+\n- OpenAI API key in `OPENAI_API_KEY` environment variable\n\n## Running\n\nRun the app by running `Application.java` in your IDE or `mvn` in the command line.\n\n### With OpenAI Chat\n\nAdd to the POM the Spring AI Open AI boot starter:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.springframework.ai\u003c/groupId\u003e\n    \u003cartifactId\u003espring-ai-openai-spring-boot-starter\u003c/artifactId\u003e\n\u003c/dependency\u003e\n```\n\nAdd the OpenAI configuration to the `application.properties`:\n\n```\nspring.ai.openai.api-key=${OPENAI_API_KEY}\nspring.ai.openai.chat.options.model=gpt-4o\n```\n\n### WIth VertexAI Gemini Chat\n\nAdd to the POM the Spring AI VertexAI Gemini and Onnx Transformer Embedding boot starters:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.springframework.ai\u003c/groupId\u003e\n    \u003cartifactId\u003espring-ai-vertex-ai-gemini-spring-boot-starter\u003c/artifactId\u003e\n\u003c/dependency\u003e\n\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.springframework.ai\u003c/groupId\u003e\n    \u003cartifactId\u003espring-ai-transformers-spring-boot-starter\u003c/artifactId\u003e\n\u003c/dependency\u003e\n```\n\nAdd the VertexAI Gemini configuration to the `application.properties`:\n\n```\nspring.ai.vertex.ai.gemini.project-id=${VERTEX_AI_GEMINI_PROJECT_ID}\nspring.ai.vertex.ai.gemini.location=${VERTEX_AI_GEMINI_LOCATION}\nspring.ai.vertex.ai.gemini.chat.options.model=gemini-1.5-pro-001\n# spring.ai.vertex.ai.gemini.chat.options.model=gemini-1.5-flash-001\n```\n\n### With Azure OpenAI Chat\n\nAdd to the POM the Spring AI Azure OpenAI boot starter:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.springframework.ai\u003c/groupId\u003e\n    \u003cartifactId\u003espring-ai-azure-openai-spring-boot-starter\u003c/artifactId\u003e\n\u003c/dependency\u003e\n```\n\nAdd the Azure OpenAI configuration to the `application.properties`:\n\n```\nspring.ai.azure.openai.api-key=${AZURE_OPENAI_API_KEY}\nspring.ai.azure.openai.endpoint=${AZURE_OPENAI_ENDPOINT}\nspring.ai.azure.openai.chat.options.deployment-name=gpt-4o\n```\n\n### With Groq Chat\n\nIt reuses the OpenAI Chat client but pointed to the Groq endpoint\n\nAdd to the POM the Spring AI Open AI boot starter:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.springframework.ai\u003c/groupId\u003e\n    \u003cartifactId\u003espring-ai-openai-spring-boot-starter\u003c/artifactId\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.springframework.ai\u003c/groupId\u003e\n    \u003cartifactId\u003espring-ai-transformers-spring-boot-starter\u003c/artifactId\u003e\n\u003c/dependency\u003e\n```\n\nAdd the Groq configuration to the `application.properties`:\n\n```\nspring.ai.openai.api-key=${GROQ_API_KEY}\nspring.ai.openai.base-url=https://api.groq.com/openai\nspring.ai.openai.chat.options.model=llama3-70b-8192\n```\n\n### With Anthropic Claude 3 Chat\n\nAdd to the POM the Spring AI Anthropic Claude and Onnx Transformer Embedding boot starters:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.springframework.ai\u003c/groupId\u003e\n    \u003cartifactId\u003espring-ai-anthropic-spring-boot-starter\u003c/artifactId\u003e\n\u003c/dependency\u003e\n\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.springframework.ai\u003c/groupId\u003e\n    \u003cartifactId\u003espring-ai-transformers-spring-boot-starter\u003c/artifactId\u003e\n\u003c/dependency\u003e\n```\n\nAdd the Anthropic configuration to the `application.properties`:\n\n```\nspring.ai.anthropic.api-key=${ANTHROPIC_API_KEY}\nspring.ai.anthropic.chat.options.model=claude-3-5-sonnet-20240620\n```\n\n\n## Build Jar\n\n```shell\n./mvnw clean install -Pproduction\n```\n\n```shell\njava -jar ./target/playground-flight-booking-0.0.1-SNAPSHOT.jar\n```\n\n\n```\ndocker run -it --rm --name postgres -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres ankane/pgvector\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftzolov%2Fplayground-flight-booking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftzolov%2Fplayground-flight-booking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftzolov%2Fplayground-flight-booking/lists"}