New Constructor for PromptChatMemoryAdvisor #1302
KushParsaniya
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Feature Proposal: Overloaded Constructor for PromptChatMemoryAdvisor with Default systemTextAdvise
Summary
Currently, the PromptChatMemoryAdvisor requires passing a systemTextAdvise string when a custom ConversationId is used. To enhance usability, this proposal suggests adding an overloaded constructor to allow users to pass only the ChatMemory, ConversationId, and chatHistoryWindowSize, while the systemTextAdvise defaults to DEFAULT_SYSTEM_TEXT_ADVISE.
Problem
When using PromptChatMemoryAdvisor, developers are required to pass the systemTextAdvise explicitly, even when a default value would suffice. This is inconvenient, especially in cases where the developer is already passing a custom ConversationId and doesn't need to customize the systemTextAdvise.
For example:
Proposed Solution
To streamline this, I propose introducing an overloaded constructor in PromptChatMemoryAdvisor that only requires the ChatMemory, ConversationId, and chatHistoryWindowSize. The systemTextAdvise should default to a predefined value, such as DEFAULT_SYSTEM_TEXT_ADVISE, when not provided.
The new constructor could look like this:
This would allow developers to simplify their usage:
Beta Was this translation helpful? Give feedback.
All reactions