Conversation
…tiveSequenceStrategy with memory type filtering and new memory ID extraction method; introduce agent_conversation script for TTS interactions between Lincoln and Nero.
…d timestamp handling This update modifies the `NarrativeSequenceStrategy` class to handle both string and numeric formats for memory content and reference timestamps. It introduces checks for content types when filtering memories by type and refines timestamp comparisons for better accuracy. Additionally, the test suite is updated to reflect a new time window of 24 hours and includes a new sequence size parameter for validation.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces enhancements to memory search by filtering memories based on metadata and improving timestamp comparisons, adds a new agent conversation script with text-to-speech integration, and updates test parameters for advanced sequence tests.
- Enhanced filtering and timestamp handling in memory search
- New script for simulating agent conversations with retry logic and audio playback
- Updated test suite parameters including extended time windows and a new sequence size test
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| validation/search/sequence/sequence_test_suite.py | Updated test parameters for time window and sequence size |
| scripts/agent_conversation.py | Added a new script for agent conversations with text-to-speech functionality |
| memory/search/strategies/sequence.py | Improved memory filtering by type, updated timestamp comparisons, and added a helper for memory ID extraction |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or 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.
This pull request introduces several enhancements and fixes across the
memory/search/strategies/sequence.py,scripts/agent_conversation.py, andvalidation/search/sequence/sequence_test_suite.pyfiles. Key changes include improving memory filtering and timestamp handling, adding a new script for agent conversations with text-to-speech functionality, and updating test parameters for advanced sequence tests.Enhancements to memory search functionality:
searchmethod, ensuring only relevant memories are considered during retrieval. (memory/search/strategies/sequence.py, memory/search/strategies/sequence.pyR118-R136)searchmethod by introducing Unix timestamp comparisons and fallback logic for parsing timestamps in various formats. (memory/search/strategies/sequence.py, memory/search/strategies/sequence.pyR168-R197)_extract_memory_idto simplify memory ID extraction logic. (memory/search/strategies/sequence.py, memory/search/strategies/sequence.pyR311-R322)New script for agent conversations:
scripts/agent_conversation.py, which simulates a conversation between two agents (Abraham Lincoln and Emperor Nero) with text-to-speech functionality using OpenAI's TTS API. The script includes retry logic for agent responses and audio playback for generated speech. (scripts/agent_conversation.py, scripts/agent_conversation.pyR1-R113)Updates to test suite:
time_window_minutesparameter to 1440 (24 hours) in the advanced sequence test to validate longer time windows. (validation/search/sequence/sequence_test_suite.py, validation/search/sequence/sequence_test_suite.pyL114-R114)sequence_sizeparameter to the advanced sequence test to test memory retrieval with a specific sequence size. (validation/search/sequence/sequence_test_suite.py, validation/search/sequence/sequence_test_suite.pyR130)