Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add a vector database for the python bindings? #670

Closed
hsm207 opened this issue Apr 26, 2023 · 3 comments · Fixed by #684
Closed

How to add a vector database for the python bindings? #670

hsm207 opened this issue Apr 26, 2023 · 3 comments · Fixed by #684
Assignees
Labels
python Pull requests for the Python Semantic Kernel

Comments

@hsm207
Copy link
Contributor

hsm207 commented Apr 26, 2023

Hello,

I would like to help add a vector database for the python bindings and could not find anything in the docs that describes the steps to do it.

Is implementing the MemoryStoreBase class sufficient?

Any pointers and references would be highly appreciated 😀

@awharrison-28 awharrison-28 added the python Pull requests for the Python Semantic Kernel label Apr 26, 2023
@awharrison-28 awharrison-28 self-assigned this Apr 26, 2023
@awharrison-28
Copy link
Contributor

Hi @hsm207 here is the PR I mentioned - #684

Would you like to see additional documentation for how to extend the memory connectors?

@hsm207
Copy link
Contributor Author

hsm207 commented Apr 27, 2023

Hi @awharrison-28 ,

Thanks for linking to the PR. Looking at it, I think having a write up on how to go about making the changes would be very useful. For example, the docarray project has step by step walkthrough that walks users through the steps to add a new document store into the project.

lemillermicrosoft pushed a commit that referenced this issue Apr 28, 2023
### Motivation and Context
This PR significantly reduces the complexity of implementing a new
memory store. Previously, memory stores needed to implement
EmbeddingIndexBase, DataStoreBase, and MemoryStoreBase. Now, memory
stores only need to implement MemoryStoreBase. This PR also brings
MemoryStoreBase to parity with the .NET IMemoryStore interface.


### Description
- Removed `data_entry.py`, `data_store_base.py`,
`volatile_data_store.py`, and `embedding_index_base.py`
- Added `with_embedding` parameter to all get/search methods. Passing
the embedding between the application and storage is not optional and
defaults to False
- `MemoryStoreBase` (Python SK) == `IMemoryStore` (.NET SK)
- Updated `volatile_memory_store` to implement `MemoryStoreBase`
- Removed `ABC` from `MemoryStoreBase` 
- Added documentation to memory files

Closes #670
@hsm207
Copy link
Contributor Author

hsm207 commented Apr 28, 2023

@awharrison-28 I see the PR is closed. That's awesome. But I don't see any docs to provide guidance on how to add a new memory store as part of the PR.

Could you please give me some pointers to get started and pitfalls to watch out for?

dluc pushed a commit that referenced this issue Apr 29, 2023
### Motivation and Context
This PR significantly reduces the complexity of implementing a new
memory store. Previously, memory stores needed to implement
EmbeddingIndexBase, DataStoreBase, and MemoryStoreBase. Now, memory
stores only need to implement MemoryStoreBase. This PR also brings
MemoryStoreBase to parity with the .NET IMemoryStore interface.


### Description
- Removed `data_entry.py`, `data_store_base.py`,
`volatile_data_store.py`, and `embedding_index_base.py`
- Added `with_embedding` parameter to all get/search methods. Passing
the embedding between the application and storage is not optional and
defaults to False
- `MemoryStoreBase` (Python SK) == `IMemoryStore` (.NET SK)
- Updated `volatile_memory_store` to implement `MemoryStoreBase`
- Removed `ABC` from `MemoryStoreBase` 
- Added documentation to memory files

Closes #670
dehoward pushed a commit to lemillermicrosoft/semantic-kernel that referenced this issue Jun 1, 2023
### Motivation and Context
This PR significantly reduces the complexity of implementing a new
memory store. Previously, memory stores needed to implement
EmbeddingIndexBase, DataStoreBase, and MemoryStoreBase. Now, memory
stores only need to implement MemoryStoreBase. This PR also brings
MemoryStoreBase to parity with the .NET IMemoryStore interface.


### Description
- Removed `data_entry.py`, `data_store_base.py`,
`volatile_data_store.py`, and `embedding_index_base.py`
- Added `with_embedding` parameter to all get/search methods. Passing
the embedding between the application and storage is not optional and
defaults to False
- `MemoryStoreBase` (Python SK) == `IMemoryStore` (.NET SK)
- Updated `volatile_memory_store` to implement `MemoryStoreBase`
- Removed `ABC` from `MemoryStoreBase` 
- Added documentation to memory files

Closes microsoft#670
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests for the Python Semantic Kernel
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants