mirror of
https://github.com/marcominerva/SqlDatabaseVectorSearch.git
synced 2026-06-20 12:23:10 +00:00
Add message limit to chat history management
Updated `ChatService` to enforce a message limit based on the new `MessageLimit` property in `AppSettings`. Excess messages are removed before updating the cache to optimize performance. Adjusted `appsettings.json` to reflect the new configuration, changing `MaxInputTokens` from 16385 to 16384 and adding `MessageLimit` with a default value of 20.
This commit is contained in:
@@ -24,9 +24,10 @@
|
||||
"MaxTokensPerParagraph": 1000,
|
||||
"OverlapTokens": 100,
|
||||
"MaxRelevantChunks": 10,
|
||||
"MaxInputTokens": 16385,
|
||||
"MaxInputTokens": 16384,
|
||||
"MaxOutputTokens": 800,
|
||||
"MessageExpiration": "00:05:00"
|
||||
"MessageExpiration": "00:05:00",
|
||||
"MessageLimit": 20
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
|
||||
Reference in New Issue
Block a user