This project demonstrates various AI functionalities using Spring AI. It includes capabilities for generating chat responses, handling JSON formatted data, creating images, describing images, loading real-time data via APIs with Open AI Functions, generating speech from text, and utilizing a vector store for custom data.
- URL:
http://localhost:8080/api/generalMessage
- Description: Sends a general message to AI for a response.
- URL:
http://localhost:8080/api/biggestCustomers
- Description: Retrieves the biggest customers for a given company in JSON format.
- URL:
http://localhost:8080/api/companyHeadquarters
- Description: Gets the headquarters of a given company in JSON format.
- URL:
http://localhost:8080/api/weatherService
- Description: Uses AI functions to load actual data from an API request and generate a response.
- URL:
http://localhost:8080/api/describeImage
- Description: Uses OpenAI vision to describe the content of an image.
- URL:
http://localhost:8080/api/describeImageWithSpeech
- Description: Describes an image with generated speech.
- URL:
http://localhost:8080/vectorstore/message
- Description: Uses a vector store to build embeddings on custom data.
CREATE EXTENSION IF NOT EXISTS vector;
CREATE EXTENSION IF NOT EXISTS hstore;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE IF NOT EXISTS vector_store (
id uuid DEFAULT uuid_generate_v4() PRIMARY KEY,
content text,
metadata json,
embedding vector(1536)
);
CREATE INDEX ON vector_store USING HNSW (embedding vector_cosine_ops);