-
Notifications
You must be signed in to change notification settings - Fork 11
Add Azure AI Search as vector store option #156
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
Conversation
…y retrieval - Implement Azure AI Search storage for memory module - Add support for vector search with HNSW algorithm - Enable hybrid search capabilities - Support both API key and managed identity auth - Update documentation and dependencies - Closes microsoft#155
|
@lambasu please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces Azure AI Search as an additional vector store option to the memory module for improved enterprise-scale memory retrieval. Key changes include:
- Implementation of the AzureSearchMessageBufferStorage class.
- Updates to configuration and dependency files to support Azure AI Search.
- Adjustments in core modules and documentation to incorporate this storage option.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/teams_memory/teams_memory/storage/azure_search_message_buffer_storage.py | Implements Azure AI Search storage for message buffering. |
| packages/teams_memory/teams_memory/core/message_buffer.py | Adds Azure AI Search storage option for message buffering. |
| packages/teams_memory/teams_memory/core/memory_core.py | Adds Azure AI Search storage option for memory storage. |
| packages/teams_memory/teams_memory/config.py | Updates storage config to support Azure AI Search. |
| packages/teams_memory/pyproject.toml | Adds new dependencies for Azure AI Search. |
| packages/teams_memory/README.md | Updates documentation to include Azure AI Search setup instructions. |
| packages/teams_memory/CHANGELOG.md | Documents the addition of the Azure AI Search storage option. |
Comments suppressed due to low confidence (1)
packages/teams_memory/teams_memory/core/message_buffer.py:61
- [nitpick] The default index naming between AzureSearchMessageBufferStorage ('teams-memories-buffer') and AzureSearchMemoryStorage (using its own default 'teams-memories') appears inconsistent. Consider aligning these defaults or clearly documenting the differences to avoid confusion.
index_name=f"{config.storage.search_index_name or 'teams-memories'}-buffer",
|
|
||
| def _create_index_if_not_exists(self) -> None: | ||
| """Create the search index if it doesn't exist.""" | ||
| if not self.index_client.get_index(self.index_name): |
Copilot
AI
May 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of get_index to check an index's existence may raise an exception if the index does not exist instead of returning a falsy value. Consider wrapping this call in a try/except block to catch a potential ResourceNotFound error before proceeding with index creation.
| "created_at": message.created_at.isoformat(), | ||
| } | ||
|
|
||
| self.search_client.merge_or_upload_documents([document]) |
Copilot
AI
May 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This synchronous call is made inside an async function and may block the event loop. Consider using an asynchronous version of the client method or offloading the operation to a thread pool for better performance in async contexts.
|
Closing in favor of #157 |
This PR adds Azure AI Search as a vector store option for the memory module. Changes include:\n\n- Added AzureSearchMemory class implementation\n- Updated dependencies to include azure-search-documents\n- Added Azure AI Search configuration to settings\n- Updated documentation with Azure AI Search setup instructions\n- Added Azure AI Search to the memory factory\n\nThis enhancement provides users with another robust vector store option for their memory needs.