Update max length according to new NCTX configured

This commit is contained in:
Raven 2024-08-07 02:16:30 -04:00
parent e475e6d374
commit a20e8c182f
2 changed files with 3 additions and 3 deletions

View File

@ -180,7 +180,7 @@ app.post('/api/v1/chat', async (req, res) => {
});
// Trim conversation history if it exceeds the token limit
const maxLength = 7800;
const maxLength = 14000;
const tolerance = 25;
trimConversationHistory(conversationHistory[ip], maxLength, tolerance);
@ -491,7 +491,7 @@ async function handleSearchPlugin(searchQuery, ip, conversationHistory) {
searchResponse += `${i + 1}. ${result.title} - ${result.link}\n`;
try {
const scrapeResult = await scrapeWebPage(result.link, 400);
const scrapeResult = await scrapeWebPage(result.link, 800);
searchResponse += `Scraped Data: ${scrapeResult}\n`;
scrapedContent += `Scraped Data from ${result.link}:\n${scrapeResult}\n`;
} catch (scrapeErr) {

View File

@ -1,6 +1,6 @@
# Key for AbuseDB
ABUSE_KEY=
# Max Content to fetch from given URLs
MAX_CONTENT_LENGTH=8000
MAX_CONTENT_LENGTH=10000
PROMPT=