LangChain MariaDB
LangChain integration for MariaDB, providing vector stores, chat message history, and natural language query capabilities.
Features
Installation
pip install langchain-mariadbQuick Start
Vector Store Example
from langchain_mariadb import MariaDBStore
from langchain_openai import OpenAIEmbeddings
embeddings = OpenAIEmbeddings()
vectorstore = MariaDBStore(
embeddings=embeddings,
datasource="mariadb://user:password@localhost/database",
collection_name="my_documents"
)
# Add documents
vectorstore.add_texts(["Hello world", "LangChain with MariaDB"])
# Search
results = vectorstore.similarity_search("greeting", k=1)Chat Message History Example
Documentation
Resources
Version
Last updated
Was this helpful?

