semantic-kernel
semantic-kernel copied to clipboard
Postgres connector for Semantic Memory
Motivation and Context
Postgres supports cosine similarity search by installing the pgvector extension.
Description
Add a new Semantic Memory Connector leveraging Postgres with pgvector extension. Update the syntax example to demonstrate how it is used.
Contribution Checklist
- [x] The code builds clean without any errors or warnings
- [x] The PR follows SK Contribution Guidelines (https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [x] The code follows the .NET coding conventions (https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions) verified with
dotnet format
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone :smile:
Close #945
@microsoft-github-policy-service agree
I need some help, because some packages depend on different versions of nuget and cause conflict warnings when compiling.
Pgvector 0.1.2 -> Npgsql 7.0.0 -> Microsoft.Bcl.HashCode (>= 1.1.1) Pgvector 0.1.2 -> Npgsql 7.0.0 -> System.Text.Json (>= 7.0.0) Pgvector 0.1.2 -> Npgsql 7.0.0 -> System.Text.Json 7.0.0 -> Microsoft.Bcl.AsyncInterfaces (>= 7.0.0) Microsoft.SemanticKernel.Skills.Web -> System.Text.Json 6.0.0 SemanticKernel.Abstractions -> System.Text.Json 6.0.0 ~~
Update
After merge #955, it seems normal.
Thanks for the PR, looks great overall. If you could add a readme with instructions on quickly setting up postgres locally or even just a link to documentation would be helpful.
I have added the README.md file. https://github.com/JadynWong/semantic-kernel/blob/jadyn/feature-postgres-memory/dotnet/src/Connectors/Connectors.Memory.Postgres/README.md
Hi, @adrianwyatt,
Can you review these new commits and let me know if there is anything else that can be done?
Thank you!
Hi @lemillermicrosoft. It looks like the formatting style of the .cs file was changed by #1030. Can you retrigger these actions? Thanks.