Semantic kernel memory connector#69 - #256
tikhandesanket wants to merge 6 commits into
Conversation
|
LGTM! |
codeforstartups
left a comment
There was a problem hiding this comment.
Really nice Semantic Kernel connector, @tikhandesanket — DynavecCollection / DynavecStore with a clean example. One blocker before merge, and it is not visible on this branch: strict mypy landed on development via #207, and it is now a required CI job. This PR predates it, so the typecheck job never ran here — but I merged current development in locally and ran it, and it fails. Two things to fix:
1. Add semantic-kernel to the typecheck extra in pyproject.toml (alongside langchain-core / llama-index-core / haystack-ai), or CI mypy cannot resolve the import at all.
2. Make src/dynavec/integrations/semantic_kernel.py strict-mypy clean — 14 errors right now. Grouped:
Mechanical:
data = {...}dicts inferred asdict[str, str]then assigned vectors/None → annotatedata: dict[str, Any] = {}(lines ~210/216/218)._inner_getmissing return type + param annotations (line 71).DynavecCollectionused without type args (line 298) →DynavecCollection[Any, Any](or the real key/model params)._get_score_from_resultreturnsAnywherefloat | Noneis declared (159) → cast.
Need your SK-API knowledge (v1.44):
_serialize_dicts_to_store_models/_deserialize_store_models_to_dictsviolate the base signatures (Liskov, lines 162/199) — match SK’s exactSequence[...]/TModelsignatures.VectorStoreCollection.__init__definition/collection_nameargument types (53/54) and_inner_upsertreturninglist[str]vsSequence[TKey](69).filter=passed toDynavec.searchis SK’s union type (129/137) — narrow/cast to thedictdynavec expects.
Run make run-ci locally after uv pip install -e ".[dev,ingest,typecheck,semantic-kernel]" to reproduce. If a couple of the override mismatches are genuinely irreconcilable between SK’s generics and dynavec’s Document, a targeted # type: ignore[override] on just those two methods is acceptable — but let’s keep it to those.
I did not merge because it would turn development’s required mypy job red. Ping me once it’s green and I’ll merge right away. Thanks! 🙌
Description
Adds a Semantic Kernel VectorStore adapter backed by Dynavec, allowing Semantic Kernel applications to use Dynavec for vector storage, retrieval, filtering, and namespaces.
Related issue
Fixes #69
Changes
DynavecStoreandDynavecCollectionSemantic Kernel VectorStore integration.semantic-kernel>=1.44dependency and included it in theallextra.Testing
Test results
git diff --cached --check: PassedChecklist