Skip to content

Ref app sq lite mem store#245

Closed
amsacha wants to merge 12 commits intomicrosoft:feature-refappfrom
amsacha:RefApp_SqLiteMemStore
Closed

Ref app sq lite mem store#245
amsacha wants to merge 12 commits intomicrosoft:feature-refappfrom
amsacha:RefApp_SqLiteMemStore

Conversation

@amsacha
Copy link
Copy Markdown
Contributor

@amsacha amsacha commented Mar 30, 2023

Motivation and Context

  • A persistent analog to Volatile Memory Store will allow for the memory concepts to persist beyond a single session and act as long term memory.
  • Using Sqlite as it is commonly used database engine.
  • Copied these internal SK classes : MinHeap.cs, Score.cs, ScoredValue.cs, TopNCollections.cs, Verify.cs
    This is because we dont have access to those files as they are in another assembly.

Description

Adding a persistent memory store using Sqlite, implemented using the IMemoryStore interface.

Contribution Checklist

@amsacha amsacha force-pushed the RefApp_SqLiteMemStore branch 2 times, most recently from 8165046 to eafb38d Compare March 30, 2023 23:59
Comment thread dotnet/src/SemanticKernel.Skills/Skills.Memory.Sqlite/Database.cs
Comment thread dotnet/src/SemanticKernel.Skills/Skills.Memory.Sqlite/Imported/MinHeap.cs Outdated
Comment thread samples/dotnet/KernelHttpServer/Program.cs Outdated
Comment thread samples/dotnet/github-skills/GitHubSkill.cs Outdated
@amsacha amsacha force-pushed the RefApp_SqLiteMemStore branch 4 times, most recently from 26d9fe0 to 5799748 Compare March 31, 2023 18:40
@amsacha amsacha requested a review from dluc March 31, 2023 18:43
Comment thread dotnet/src/SemanticKernel.Skills/Skills.Memory.Sqlite/Database.cs Outdated
Comment thread dotnet/src/SemanticKernel.Skills/Skills.Memory.Sqlite/Database.cs
Comment thread dotnet/src/SemanticKernel.Skills/Skills.Memory.Sqlite/Database.cs Outdated
Comment thread dotnet/src/SemanticKernel.Skills/Skills.Memory.Sqlite/SqliteDataStore.cs Outdated
Comment thread dotnet/src/SemanticKernel.Skills/Skills.Memory.Sqlite/SqliteMemoryStore.cs Outdated
Comment thread dotnet/src/SemanticKernel.Skills/Skills.Memory.Sqlite/SqliteMemoryStore.cs Outdated
Comment thread dotnet/src/SemanticKernel.Skills/Skills.Memory.Sqlite/SqliteMemoryStore.cs Outdated
Comment thread dotnet/src/SemanticKernel.Skills/Skills.Memory.Sqlite/SqliteMemoryStore.cs Outdated
Comment thread samples/dotnet/KernelHttpServer/Program.cs Outdated
@adrianwyatt adrianwyatt added PR: feedback to address Waiting for PR owner to address comments/questions .NET Issue or Pull requests regarding .NET code labels Mar 31, 2023
@adrianwyatt adrianwyatt self-assigned this Mar 31, 2023
@adrianwyatt adrianwyatt removed the request for review from dluc March 31, 2023 21:35
Comment thread samples/dotnet/KernelHttpServer/Program.cs
Comment thread dotnet/src/SemanticKernel.Skills/Skills.Memory.Sqlite/SqliteMemoryStore.cs Outdated
Comment thread dotnet/src/SemanticKernel.Skills/Skills.Memory.Sqlite/SqliteMemoryStore.cs Outdated
Comment thread dotnet/src/SemanticKernel.Skills/Skills.Memory.Sqlite/SqliteMemoryStore.cs Outdated
Comment thread dotnet/src/SemanticKernel.Skills/Skills.Memory.Sqlite/Database.cs Outdated
Copy link
Copy Markdown
Contributor

@dluc dluc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add docblocks

@amsacha amsacha force-pushed the RefApp_SqLiteMemStore branch 2 times, most recently from b1dd775 to bade4b4 Compare March 31, 2023 23:23
Copy link
Copy Markdown
Contributor

@dluc dluc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's some confusion on insert, updates and how conflicts are handled

@amsacha amsacha requested review from adrianwyatt and dluc April 1, 2023 00:27
@amsacha amsacha force-pushed the RefApp_SqLiteMemStore branch 5 times, most recently from d514dba to 8f73b1e Compare April 3, 2023 20:48
@amsacha amsacha force-pushed the RefApp_SqLiteMemStore branch from 8f73b1e to 8a935ea Compare April 3, 2023 21:57
amsacha added 9 commits April 4, 2023 13:22
kernelhttpserver compiles with sqliteMemoryStore;
…g into problem deserializing the interface type of IEmbeddingWithMetadata<TEmbedding>
Updates to deserialization
added JsonPropertyName tags to memoryRecord

Cleanup:
remove sqliteDataStore
remove sqlite library solution
reset sqliteDataStore to state before my changes; use correct namespace
set s couple files back to their state before my changes
ran dotnet format
…ll.cs; use UPSERT instead of INSERT for sqlite
@amsacha amsacha force-pushed the RefApp_SqLiteMemStore branch from 3a08c31 to 69d8c34 Compare April 4, 2023 20:23
@adrianwyatt
Copy link
Copy Markdown
Contributor

adrianwyatt commented Apr 4, 2023

I would like to hold this until feature-refapp comes into main this week.

@amsacha amsacha closed this Apr 6, 2023
@amsacha amsacha deleted the RefApp_SqLiteMemStore branch April 11, 2023 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Issue or Pull requests regarding .NET code PR: feedback to address Waiting for PR owner to address comments/questions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants