Skip to content

Ref app sq lite mem store - #245

Closed
Aman Sachan (amsacha) wants to merge 12 commits into
microsoft:feature-refappfrom
amsacha:RefApp_SqLiteMemStore
Closed

Ref app sq lite mem store#245
Aman Sachan (amsacha) wants to merge 12 commits into
microsoft:feature-refappfrom
amsacha:RefApp_SqLiteMemStore

Conversation

@amsacha

@amsacha Aman Sachan (amsacha) commented Mar 30, 2023

Copy link
Copy Markdown
Contributor

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
Aman Sachan (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
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 Adrian Bonar (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
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

@dluc Devis Lucato (dluc) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add docblocks

@amsacha
Aman Sachan (amsacha) force-pushed the RefApp_SqLiteMemStore branch 2 times, most recently from b1dd775 to bade4b4 Compare March 31, 2023 23:23

@dluc Devis Lucato (dluc) left a comment

Copy link
Copy Markdown
Contributor

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

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
@adrianwyatt

Adrian Bonar (adrianwyatt) commented Apr 4, 2023

Copy link
Copy Markdown
Contributor

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

@amsacha
Aman Sachan (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