A very simple chat ui that can be used to test Spring-AI/Tanzu AI Server (or any OpenAI compatible endpoint)
Then access the UI in the browser at http://localhost:9091
export OPENAI_API_KEY=...
export OPENAI_BASE_URL=...
export OPENAI_MODEL=...
./mvnw spring-boot:runexport ENDPOINT_NAME=test
export API_KEY=<key>
export API_BASE=http://<ai-server-url>/$ENDPOINT_NAME
export CONFIG_URL=$API_BASE/config/v1/endpoint
export VCAP_SERVICES='{"genai":[{ "name":"genai","label":"genai","credentials":{"endpoint":{"api_base":"'"$API_BASE"'","name":"test","api_key":"'"$API_KEY"'","config_url":"'"$CONFIG_URL"'"}}}]}'
./mvnw spring-boot:runThen access the UI in the browser at http://localhost:8080
./mvnw package -DskipTests
cf push simple-ui --path target/simpleui-0.0.1-SNAPSHOT.jar --no-start
cf set-env simple-ui JBP_CONFIG_OPEN_JDK_JRE '{ jre: { version: 21.+ } }'
cf create-service genai ...
cf bind-service ...
cf restage simple-uiNOTE: when cf push'ing the application, VCAP_SERVICES will be created for you.