-
Notifications
You must be signed in to change notification settings - Fork 22
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
Elastic Memory Provider & Podcast Commands #516
Merged
The head ref may contain hidden characters: "stagElastic\u{1F98C}"
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Elastic Memory Provider
This PR adds an implementation of an Elastisearch memory provider to the
/examples/memoryProvider
directory. This memory provider uses the existing implementations based on the filesystem for the object table and the temporal table. In the future we hope to add support for these to the elastic instance as well.This implementation is built off of the
StorageProvider
interface defined in the Knowledge Processor package.In addition to the memory provider, two commands were added for interacting with podcasts that have been indexed.
This pull request introduces significant updates to the memory management system in the chat and podcast examples, primarily by integrating Elasticsearch for enhanced storage capabilities. Additionally, it includes various dependency updates and minor code improvements.
Automatically Generated by GitHub:
Integration of Elasticsearch:
ts/examples/chat/src/memory/podcastMemory.ts
: Added support for Elasticsearch as a storage option in thecreatePodcastMemory
function and introduced a new commandpodcastEntities
to list podcast entities. [1] [2] [3] [4]ts/examples/memoryProviders/src/elastic/common.ts
: Introduced utility functions to create an Elasticsearch client, delete indices, generate text IDs, and convert strings to valid index names.ts/examples/memoryProviders/src/elastic/storageClient.ts
: Implemented a storage client for Elasticsearch, providing methods to create object folders, temporal logs, text indices, and key-value indices.ts/examples/memoryProviders/src/elastic/keyValueIndex.ts
: Added a key-value index implementation for Elasticsearch.ts/examples/memoryProviders/src/elastic/index.ts
: Exported Elasticsearch-related modules.Dependency Updates:
ts/examples/memoryProviders/package.json
: Added@elastic/elasticsearch
as a dependency.ts/pnpm-lock.yaml
: Updated to include new dependencies and versions, such as@elastic/elasticsearch
,@types/command-line-args
, andapache-arrow
. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Code Improvements:
ts/examples/chat/src/memory/chatMemory.ts
andts/examples/chat/src/memory/podcastMemory.ts
: Updated copyright comments. [1] [2]ts/packages/knowledgeProcessor/src/conversation/entities.ts
: Added a safeguard in thetoCompositeEntity
function to handle undefined entities.These changes collectively enhance the memory management capabilities by leveraging Elasticsearch, improve code robustness, and ensure dependencies are up to date.