Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You should add internet to it #25

Open
Kritik-helpingai opened this issue Feb 25, 2024 · 6 comments
Open

You should add internet to it #25

Kritik-helpingai opened this issue Feb 25, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@Kritik-helpingai
Copy link

Kritik-helpingai commented Feb 25, 2024

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();
});
@Kritik-helpingai
Copy link
Author

@faetalize

@faetalize
Copy link
Owner

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.

@Kritik-helpingai
Copy link
Author

response of this API

@Kritik-helpingai
Copy link
Author

@faetalize,

I want to clarify that the API https://abhaykoul-webscout1.hf.space/search exists, and my intention was solely to suggest it for consideration.

@faetalize faetalize added the enhancement New feature or request label Mar 4, 2024
@faetalize faetalize self-assigned this Mar 4, 2024
@faetalize
Copy link
Owner

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.

@faetalize faetalize reopened this Mar 4, 2024
@Kritik-helpingai
Copy link
Author

Kritik-helpingai commented Mar 4, 2024

I have made it. Also it is hosted here https://huggingface.co/spaces/Abhaykoul/WebScout1/blob/main/app.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants