{"id":21822142,"url":"https://github.com/stylepatrick/spring-ai-chat-bot","last_synced_at":"2025-03-21T11:21:38.032Z","repository":{"id":240279079,"uuid":"802177348","full_name":"stylepatrick/spring-ai-chat-bot","owner":"stylepatrick","description":"Demonstrates various AI functionalities using Spring AI, including chat responses, JSON data handling, image creation and description, real-time data loading, text-to-speech, and vector store usage.","archived":false,"fork":false,"pushed_at":"2024-06-16T15:29:54.000Z","size":8724,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T07:41:22.696Z","etag":null,"topics":["chatbot","custom-data","openai-functions","rest-api","spring","spring-ai","spring-openapi","vectorstore"],"latest_commit_sha":null,"homepage":"","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/stylepatrick.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-05-17T17:08:15.000Z","updated_at":"2024-12-03T11:03:09.000Z","dependencies_parsed_at":"2024-06-16T08:25:42.842Z","dependency_job_id":"772432da-fa83-4d6c-8a3a-13219c819201","html_url":"https://github.com/stylepatrick/spring-ai-chat-bot","commit_stats":null,"previous_names":["stylepatrick/spring-ai-chat-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stylepatrick%2Fspring-ai-chat-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stylepatrick%2Fspring-ai-chat-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stylepatrick%2Fspring-ai-chat-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stylepatrick%2Fspring-ai-chat-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stylepatrick","download_url":"https://codeload.github.com/stylepatrick/spring-ai-chat-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244787064,"owners_count":20510053,"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":["chatbot","custom-data","openai-functions","rest-api","spring","spring-ai","spring-openapi","vectorstore"],"created_at":"2024-11-27T17:13:18.342Z","updated_at":"2025-03-21T11:21:37.995Z","avatar_url":"https://github.com/stylepatrick.png","language":"Java","readme":"# Spring AI Chat Bot\n\nThis 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.\n\n### API POST-Requests:\n\n#### General Message to AI\n- **URL**: `http://localhost:8080/api/generalMessage`\n- **Description**: Sends a general message to AI for a response.\n![General Message](img_1.png)\n\n#### Get Biggest Customers\n- **URL**: `http://localhost:8080/api/biggestCustomers`\n- **Description**: Retrieves the biggest customers for a given company in JSON format.\n![Biggest Customers](img_3.png)\n\n#### Get Headquarters for a Company\n- **URL**: `http://localhost:8080/api/companyHeadquarters`\n- **Description**: Gets the headquarters of a given company in JSON format.\n![Company Headquarters](img_4.png)\n\n#### Generate an Image from Text\n- **URL**: `http://localhost:8080/api/image`\n- **Description**: Generates an image from a given text using DALLE.\n![Image Generation](img.png)\n\n#### Load Real-Time Data via API\n- **URL**: `http://localhost:8080/api/weatherService`\n- **Description**: Uses AI functions to load actual data from an API request and generate a response.\n![Weather Service](img_5.png)\n\n#### Describe an Image\n- **URL**: `http://localhost:8080/api/describeImage`\n- **Description**: Uses OpenAI vision to describe the content of an image.\n![Image Description](img_6.png)\n\n#### Generate Speech from Text\n- **URL**: `http://localhost:8080/api/talk`\n- **Description**: Generates speech from a given text.\n![Text to Speech](img_7.png)\n\n#### Describe an Image with Speech\n- **URL**: `http://localhost:8080/api/describeImageWithSpeech`\n- **Description**: Describes an image with generated speech.\n![Image Description with Speech](img_8.png)\n\n#### Use a Vector Store for Custom Data\n- **URL**: `http://localhost:8080/vectorstore/message`\n- **Description**: Uses a vector store to build embeddings on custom data.\n![Vector Store Message](img_2.png)\n\n## Vector Store Setup in PostgreSQL\n\n```sql\nCREATE EXTENSION IF NOT EXISTS vector;\nCREATE EXTENSION IF NOT EXISTS hstore;\nCREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";\n\nCREATE TABLE IF NOT EXISTS vector_store (\n    id uuid DEFAULT uuid_generate_v4() PRIMARY KEY,\n    content text,\n    metadata json,\n    embedding vector(1536)\n);\n\nCREATE INDEX ON vector_store USING HNSW (embedding vector_cosine_ops);\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstylepatrick%2Fspring-ai-chat-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstylepatrick%2Fspring-ai-chat-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstylepatrick%2Fspring-ai-chat-bot/lists"}