Skip to content

BootcampToProd/spring-boot-ai-jdbc-chat-memory-mariadb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Spring AI JDBC Chat Memory - MariaDB

This repository demonstrates how to use Spring AI's JDBC Chat Memory with MariaDB to manage chat conversations persistently and reliably.

πŸš€ It covers two key use cases:

  • A shared chat memory for all users (using a common conversation ID).
  • A user-specific chat memory where each conversation history is isolated.

πŸ“– Dive Deeper: For a complete walkthrough and detailed explanation, read our blog:
πŸ‘‰ Spring AI JDBC Chat Memory: Building Persistent Conversational Applications with PostgreSQL and MariaDB

πŸŽ₯ Visual Learning: Prefer video tutorials? Watch our step-by-step implementation guide on YouTube.
πŸ‘‰ Spring AI JDBC Chat Memory with MariaDB | Building AI Chatbots With Perfect Memory! 🧠


πŸ“¦ Environment Variables

Make sure to provide these Java environment variables when running the application:

  • GEMINI_APP_KEY: Your Google Gemini API key.
  • DB_USERNAME: Your MariaDB username.
  • DB_PASSWORD: Your MariaDB password.

⚑ Important: Ensure that a database named springai exists in your MariaDB instance, or create one before running the application.

About

A simple Spring Boot app showing how to use Spring AI chat memory with MariaDB to store and retrieve messages in a conversation.

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages