You should add internet to it
Opened this issue · 6 comments
https://abhaykoul-webscout1.hf.space/search this API URL will search 10 results from web if limit is not set, if you want you can you this API in your code
const https = require('https');
const readline = require('readline').createInterface({
input: process.stdin,
output: process.stdout
});
readline.question('Enter your search query: ', (query) => {
const url = "https://abhaykoul-webscout1.hf.space/search";
const payload = JSON.stringify({ query: query, limit: 5 }); // Set limit to 5
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': Buffer.byteLength(payload)
}
};
const req = https.request(url, options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
try {
const parsedData = JSON.parse(data);
console.log(parsedData);
// Process the data here
} catch (e) {
console.error('Error parsing JSON:', e);
}
});
});
req.on('error', (e) => {
console.error('There was a problem with the request:', e.message);
});
req.write(payload);
req.end();
readline.close();
});
Oh gosh... not the AI generated issue with a random (and nonexistent) API...
Am I dreaming rn?
@HelpingAI please do not ever submit anything to my codebases unless your account is being manned.
I want to clarify that the API https://abhaykoul-webscout1.hf.space/search exists, and my intention was solely to suggest it for consideration.
anywho, adding internet features is planned. but what is this api? what is the documentation of it? who made it?
this is a weird issue. i'll leave it open for now.
I have made it. Also it is hosted here https://huggingface.co/spaces/Abhaykoul/WebScout1/blob/main/app.py