Update max length according to new NCTX configured
This commit is contained in:
parent
e475e6d374
commit
a20e8c182f
@ -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) {
|
||||
|
@ -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=
|
Loading…
Reference in New Issue
Block a user