- Notifications
You must be signed in to change notification settings - Fork0
rjtmahinay/watsonx-spring-ai-hilla
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a demonstration of creating a simple chatbot using watsonx.ai and Spring AI. Thischatbot includes basic chat and streaming chat.
The following project uses JDK 21.
The chatbot needs to connect to watsonx.ai platform using an API Key and Project ID. These 2 properties is hidden andis declared inenv_vars.properties
- Under the root project folder (watsonx-spring-ai-hilla), create a folder namedconfig
- Create a file namedenv_vars.properties under the config folder
- Define the properties below in the file:
API_KEY=PROJECT_ID=
- Find in the project directory the class calledWatsonxSpringAiHillaApplication
- Right-click and chooseRun
- Access in your browser the following URLs
- Basic Chat:http://localhost:8080/chat
- Streaming Chat:http://localhost:8080/streaming-chat
- It should display a chatbot view
The terminal approach assumes that you have a JAVA_HOME environment variable in your laptop and it is pointingin JDK 21.
For people who are inclined to start an application via terminal, please run the command below:
- In your terminal, change directory to this project (watsonx-spring-ai-hilla)
- Run the following command
- Windows
gradlew bootRun
- Linux and Mac
OR./gradlew bootRun
sh ./gradlew.sh bootRun
- Spring AI:https://docs.spring.io/spring-ai/reference/
- Hilla Framework by Vaadin:https://vaadin.com/docs/latest/hilla/guides
- watsonx.ai SaaS:https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/welcome-main.html?context=wx&audience=wdp
About
Spring AI integration to watsonx with Hilla
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.