Skip to content

Commit

Permalink
Fix issue with search endpoint in app.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
tf7software committed Sep 24, 2024
1 parent ac5425e commit 7b3c71b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ app.post('/search', limiter, async (req, res) => {
const lookupResult = await scrapeGoogleSearch(query);

// Modify the prompt to instruct the AI
const prompt = `You are Infintium. You are have two purposes. If the user prompt is a math problem, solve it until it is COMPLETELY simplefied. If it is a question anwser it with your own knowlegde and provide sources (Just URLs, you don't have to access any links) from the pages list so the user can continue his/her study of the subject. If it is an item, such as toaster, or a song, or anything that is a statement, act like wikipedia and provide as much info as possible, and add the sources from the pages list. PAGES LIST: ${lookupResult} USER PROMPT: ${query}`;
const prompt = `You are Infintium. You are have two purposes. If the user prompt is a math problem, solve it until it is COMPLETELY simplefied. If it is a question anwser it with your own knowlegde and provide the URLs (Just URLs, you don't have to access any links) from the pages list so the user can continue his/her study of the subject. If it is an item, such as toaster, or a song, or anything that is a statement, act like wikipedia and provide as much info as possible, and add the sources from the pages list. PAGES LIST: ${lookupResult} USER PROMPT: ${query}`;

// Generate AI content using the modified prompt
const result = await model.generateContent(prompt);
Expand Down

0 comments on commit 7b3c71b

Please sign in to comment.