https://github.com/showpune/spring-petclinic-springai
It is a spring ai LLM demo of petclinic
https://github.com/showpune/spring-petclinic-springai
llm petclinic spring-boot springai
Last synced: 2 months ago
JSON representation
It is a spring ai LLM demo of petclinic
- Host: GitHub
- URL: https://github.com/showpune/spring-petclinic-springai
- Owner: showpune
- License: apache-2.0
- Created: 2024-06-13T15:45:21.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-30T15:39:45.000Z (3 months ago)
- Last Synced: 2025-03-30T16:29:27.438Z (3 months ago)
- Topics: llm, petclinic, spring-boot, springai
- Language: CSS
- Homepage:
- Size: 748 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 8
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Spring PetClinic Sample Application With Azure OpenAI and springAi
## Understanding the Spring Petclinic application with a few diagrams
This is the spring ai version for spring petclinic, if you want to see a langchain4j version, please refer to [spring-petclinic-langchain4j](https://github.com/showpune/spring-petclinic-langchain4j)
## Run Petclinic locally
Spring Petclinic is a [Spring Boot](https://spring.io/guides/gs/spring-boot) application built
using [Maven](https://spring.io/guides/gs/maven/). You can build a jar
file and run it from the command line (it should work just as well with Java 17 or newer), Before you build the
application, you need to setup some openai properties in `src/main/resources/application.properties`:```bash
git clone https://github.com/showpune/spring-petclinic-springai.git
cd spring-petclinic-springai
mv src/main/resources/application.properties.example src/main/resources/application.properties
```edit the `src/main/resources/application.properties` file and add the following properties:
```properties
spring.ai.azure.openai.api-key=**
spring.ai.azure.openai.endpoint=https://***.openai.azure.com/
spring.ai.azure.openai.chat.options.deployment-name=gpt-4
spring.ai.azure.openai.chat.options.temperature=0.8
spring.ai.chat.client.enabled=true
spring.ai.azure.openai.embedding.options.deployment-name=text-embedding-ada-002
```You can build the application by running the following command:
```bash
./mvnw package
java -jar target/*.jar
```You can then access the Petclinic at
And the OpenAI chatbot at .
## Workthrough of the chat agent
Go to the owner page, you can query all owner information of "Davis"
You can also talk with the agent, query your information.
you can also talk with Chinese
Go to the owner page you can see your information is added
## License
The Spring PetClinic sample application is released under version 2.0 of
the [Apache License](https://www.apache.org/licenses/LICENSE-2.0).