Skip to content

Commit

Permalink
mariadb store
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Feb 24, 2025
1 parent 26a084d commit a2708a9
Show file tree
Hide file tree
Showing 8 changed files with 551 additions and 3,465 deletions.
12 changes: 2 additions & 10 deletions docs/docs/integrations/vectorstores/mariadb.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,13 @@
"from langchain_openai import OpenAIEmbeddings\n",
"\n",
"# Create a connection pool\n",
"pool = mariadb.ConnectionPool(\n",
" pool_name=\"mypool\",\n",
" pool_size=3,\n",
" host=\"127.0.0.1\",\n",
" port=3306,\n",
" user=\"langchain\",\n",
" password=\"langchain\",\n",
" database=\"langchain\",\n",
")\n",
"url = f\"mariadb+mariadbconnector://langchain:[email protected]/langchain\"\n",
"\n",
"# Create a new vector store\n",
"vectorstore = MariaDBStore(\n",
" embeddings=OpenAIEmbeddings(),\n",
" embedding_length=1536,\n",
" datasource=pool,\n",
" datasource=url,\n",
" collection_name=\"my_docs\",\n",
")"
]
Expand Down
2 changes: 1 addition & 1 deletion libs/community/extended_testing_deps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ langchain_openai>=0.2.1
litellm>=1.30,<=1.39.5
lxml>=4.9.3,<6.0
markdownify>=0.11.6,<0.12
mariadb>=1.1.11
mariadb>=1.1.12
motor>=3.3.1,<4
msal>=1.25.0,<2
mwparserfromhell>=0.6.4,<0.7
Expand Down
Loading

0 comments on commit a2708a9

Please sign in to comment.