Add implementations of FilterPreviousMessage function:
filterOnlySystemPrompt(): default. only include the initial system prompt
makeFilterNPreviousMessages(): Constructor of filter to include initial system prompt + N previous messages in conversation
Add FilterPreviousMessages config to the conversations router
Add implementation of FilterPreviousMessages to the MongoDB Chatbot server. Includes increasing conversation max number of user messages to 50.
Document addition of FilterPreviousMessages
Notes
In the future we can consider increasing the max number of user messages. The current 50 was an arbitrary "biggish" number that won't break the server.
Jira: https://jira.mongodb.org/browse/EAI-98
Changes
FilterPreviousMessages
functionFilterPreviousMessage
function:filterOnlySystemPrompt()
: default. only include the initial system promptmakeFilterNPreviousMessages()
: Constructor of filter to include initial system prompt + N previous messages in conversationFilterPreviousMessages
to the MongoDB Chatbot server. Includes increasing conversation max number of user messages to 50.FilterPreviousMessages
Notes