Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
00ffd99
initial work on SQL connector
eavanvalkenburg Mar 14, 2025
0e16cea
working collection
eavanvalkenburg Mar 17, 2025
7ed3017
improved queries
eavanvalkenburg Mar 18, 2025
086753a
improved queries and added store
eavanvalkenburg Mar 18, 2025
0c46118
mypy fix
eavanvalkenburg Mar 18, 2025
cdbb475
first batch of sql tests
eavanvalkenburg Mar 19, 2025
fedd3b4
test fix
eavanvalkenburg Mar 19, 2025
494d491
check import
eavanvalkenburg Mar 19, 2025
311cad7
conditional tests
eavanvalkenburg Mar 19, 2025
80f35bf
everything
eavanvalkenburg Mar 19, 2025
50a9b3c
allow_module_level set
eavanvalkenburg Mar 19, 2025
c835b96
test in classes
eavanvalkenburg Mar 19, 2025
5057701
skip all
eavanvalkenburg Mar 19, 2025
8cfa123
redo import
eavanvalkenburg Mar 19, 2025
96ba3f7
type only
eavanvalkenburg Mar 19, 2025
9d7dc2f
additional tests
eavanvalkenburg Mar 19, 2025
ed5237f
addressed feedback
eavanvalkenburg Mar 20, 2025
5d3d10b
filters with params, batch upsert and additional tests
eavanvalkenburg Mar 21, 2025
9387482
patched pyodbc
eavanvalkenburg Mar 21, 2025
2df3205
fixed mock connection
eavanvalkenburg Mar 21, 2025
5c9a690
more tests
eavanvalkenburg Mar 21, 2025
a0b46d8
delete collection test
eavanvalkenburg Mar 21, 2025
d3be475
removed some mentions of many
eavanvalkenburg Mar 21, 2025
f89681d
add final test
eavanvalkenburg Mar 21, 2025
922cd40
param spec
eavanvalkenburg Mar 21, 2025
b4bc801
added experimental tags
eavanvalkenburg Mar 21, 2025
db20cfc
updated imports
eavanvalkenburg Apr 2, 2025
5072eb5
updated test imports
eavanvalkenburg Apr 2, 2025
555ec2d
updated lock
eavanvalkenburg Apr 2, 2025
791a9e1
reupdated lock
eavanvalkenburg Apr 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ realtime = [
"websockets >= 13, < 16",
"aiortc>=1.9.0",
]
sql = [
"pyodbc >= 5.2"
]

[tool.uv]
prerelease = "if-necessary-or-explicit"
Expand Down
12 changes: 10 additions & 2 deletions python/samples/concepts/memory/complex_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from semantic_kernel.connectors.memory.postgres import PostgresCollection
from semantic_kernel.connectors.memory.qdrant import QdrantCollection
from semantic_kernel.connectors.memory.redis import RedisHashsetCollection, RedisJsonCollection
from semantic_kernel.connectors.memory.sql_server import SqlServerCollection
from semantic_kernel.connectors.memory.weaviate import WeaviateCollection
from semantic_kernel.data import (
VectorizableTextSearchMixin,
Expand Down Expand Up @@ -120,7 +121,7 @@ class DataModelList:
# Depending on the vector database, the index kind and distance function may need to be adjusted
# since not all combinations are supported by all databases.
# The values below might need to be changed for your collection to work.
distance_function = DistanceFunction.EUCLIDEAN_SQUARED_DISTANCE
distance_function = DistanceFunction.COSINE_DISTANCE
index_kind = IndexKind.FLAT
DataModel = get_data_model("array", index_kind, distance_function)

Expand All @@ -147,11 +148,14 @@ class DataModelList:
# The chroma collection is currently only available for in-memory versions
# Client-Server mode and Chroma Cloud are not yet supported.
# More info on Chroma here: https://docs.trychroma.com/docs/overview/introduction
# - faiss: Faiss - in-memory with optimized indexes.
# - pinecone: Pinecone
# - sql_server: SQL Server, can connect to any SQL Server compatible database, like Azure SQL.
# This is represented as a mapping from the collection name to a
# function which returns the collection.
# Using a function allows for lazy initialization of the collection,
# so that settings for unused collections do not cause validation errors.
collections: dict[str, Callable[[], VectorStoreRecordCollection[str, DataModel]]] = {
collections: dict[str, Callable[[], VectorStoreRecordCollection]] = {
"ai_search": lambda: AzureAISearchCollection[str, DataModel](
data_model_type=DataModel,
),
Expand Down Expand Up @@ -204,6 +208,10 @@ class DataModelList:
collection_name=collection_name,
data_model_type=DataModel,
),
"sql_server": lambda: SqlServerCollection[str, DataModel](
data_model_type=DataModel,
collection_name=collection_name,
),
}


Expand Down
Loading
Loading